File tree Expand file tree Collapse file tree
python/nwm_client/src/hydrotools/nwm_client Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -144,8 +144,8 @@ def get_files(
144144 downloader .get (zip (urls ,filenames ))
145145
146146 # Return nested list of files
147- files = sorted (list (subdirectory .glob ("*.nc" )))
148- num_groups = len (files ) // group_size + 1
147+ files : list [ Path ] = sorted (list (subdirectory .glob ("*.nc" )))
148+ num_groups : int = len (files ) // group_size + 1
149149 file_groups = np .array_split (files , num_groups )
150150 return {f"group_{ idx } " : fg for idx , fg in enumerate (file_groups )}
151151
@@ -249,11 +249,13 @@ def get(
249249 # Add required columns
250250 df ["measurement_unit" ] = ds [var ].attrs ["units" ]
251251 df ["variable_name" ] = var
252- df ["configuration" ] = ds .attrs ["model_configuration" ]
253252
254- # Address ambigious "No-DA" cycle names
255- if cfg .endswith ("no_da" ):
256- df ["configuration" ] = df ["configuration" ] + "_no_da"
253+ model_configuration : str = ds .attrs .get ("model_configuration" , cfg ).lower ()
254+
255+ if cfg .endswith ("no_da" ) and not model_configuration .endswith ("no_da" ):
256+ model_configuration += "_no_da"
257+
258+ df ["configuration" ] = model_configuration
257259
258260 # Map crosswalk
259261 for col in self .crosswalk :
Original file line number Diff line number Diff line change 1- __version__ = "9.2.0 "
1+ __version__ = "9.2.1 "
You can’t perform that action at this time.
0 commit comments