Skip to content

Commit

Permalink
skipping all quantities except salinity/temperature and tracer* (#970)
Browse files Browse the repository at this point in the history
  • Loading branch information
veenstrajelmer authored Aug 21, 2024
1 parent a869dc7 commit f6069de
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions dfm_tools/modelbuilder.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,13 +133,16 @@ def cmems_nc_to_ini(ext_old, dir_output, list_quantities, tstart, dir_pattern, c
data_xr["thetao"] = data_xr_tem["thetao"]
quantity = "nudge_salinity_temperature"
varname = None
else:
elif "tracer" in quan_bnd:
data_xr = xr.open_mfdataset(dir_pattern_one)
data_xr = ds_apply_conversion_dict(data_xr=data_xr, conversion_dict=conversion_dict, quantity=quan_bnd)
quantity = f'initial{quan_bnd.replace("bnd","")}'
varname = quantity
data_xr = data_xr.rename_vars({quan_bnd:quantity})

else:
# skip all other quantities since they are also not supported by delft3dfm
continue

# subset two times. interp to tstart would be the proper way to do it,
# but FM needs two timesteps for nudge_salinity_temperature and initial waq vars
data_xr = data_xr.sel(time=slice(tstart_round, tstop_round))
Expand Down

0 comments on commit f6069de

Please sign in to comment.