Skip to content

Commit f6069de

Browse files
skipping all quantities except salinity/temperature and tracer* (#970)
1 parent a869dc7 commit f6069de

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

dfm_tools/modelbuilder.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -133,13 +133,16 @@ def cmems_nc_to_ini(ext_old, dir_output, list_quantities, tstart, dir_pattern, c
133133
data_xr["thetao"] = data_xr_tem["thetao"]
134134
quantity = "nudge_salinity_temperature"
135135
varname = None
136-
else:
136+
elif "tracer" in quan_bnd:
137137
data_xr = xr.open_mfdataset(dir_pattern_one)
138138
data_xr = ds_apply_conversion_dict(data_xr=data_xr, conversion_dict=conversion_dict, quantity=quan_bnd)
139139
quantity = f'initial{quan_bnd.replace("bnd","")}'
140140
varname = quantity
141141
data_xr = data_xr.rename_vars({quan_bnd:quantity})
142-
142+
else:
143+
# skip all other quantities since they are also not supported by delft3dfm
144+
continue
145+
143146
# subset two times. interp to tstart would be the proper way to do it,
144147
# but FM needs two timesteps for nudge_salinity_temperature and initial waq vars
145148
data_xr = data_xr.sel(time=slice(tstart_round, tstop_round))

0 commit comments

Comments
 (0)