1313# TODO: add some kind of check that each instrument has a dataclass, particle class, InputDataset class and Instrument class?
1414# TODO: probably as a test
1515
16+ # =====================================================
17+ # SECTION: Dataclass
18+ # =====================================================
19+
1620
1721@dataclass
1822class CTD :
@@ -24,6 +28,10 @@ class CTD:
2428 max_depth : float
2529
2630
31+ # =====================================================
32+ # SECTION: Particle Class
33+ # =====================================================
34+
2735_CTDParticle = JITParticle .add_variables (
2836 [
2937 Variable ("salinity" , dtype = np .float32 , initial = np .nan ),
@@ -36,7 +44,9 @@ class CTD:
3644)
3745
3846
39- # TODO: way to group kernels together, just to make clearer?
47+ # =====================================================
48+ # SECTION: Kernels
49+ # =====================================================
4050
4151
4252def _sample_temperature (particle , fieldset , time ):
@@ -61,6 +71,11 @@ def _ctd_cast(particle, fieldset, time):
6171 particle .delete ()
6272
6373
74+ # =====================================================
75+ # SECTION: InputDataset Class
76+ # =====================================================
77+
78+
6479@register_input_dataset (InstrumentType .CTD )
6580class CTDInputDataset (InputDataset ):
6681 """Input dataset for CTD instrument."""
@@ -99,14 +114,17 @@ def get_datasets_dict(self) -> dict:
99114 }
100115
101116
117+ # =====================================================
118+ # SECTION: Instrument Class
119+ # =====================================================
120+
121+
102122@register_instrument (InstrumentType .CTD )
103123class CTDInstrument (Instrument ):
104124 """CTD instrument class."""
105125
106126 def __init__ (self , expedition , directory ):
107127 """Initialize CTDInstrument."""
108- #! TODO: actually don't need to download U and V for CTD simulation... can instead add mock/duplicate of T and name it U (also don't need V)!
109-
110128 filenames = {
111129 "S" : f"{ CTD .name } _s.nc" ,
112130 "T" : f"{ CTD .name } _t.nc" ,
0 commit comments