Skip to content
Snippets Groups Projects
Commit 5e50d124 authored by Frisinghelli Daniel's avatar Frisinghelli Daniel
Browse files

Improve state file naming convention.

parent 92a64723
No related branches found
No related tags found
No related merge requests found
......@@ -122,8 +122,17 @@ class EoDataset(torch.utils.data.Dataset):
Spredictors = ''.join([ERA5_S_VARIABLE_NAME[p] for p in predictors if p
in ERA5_S_VARIABLE_NAME])
plevels = [str(p) for p in plevels]
state_file = '_'.join([model.__name__, str(predictand), Ppredictors,
*plevels, Spredictors])
state_file = '_'.join([model.__name__, str(predictand)])
# check if predictors on pressure levels are used
state_file = ('_'.join([state_file, Ppredictors, *plevels]) if
any([p in ERA5_P_VARIABLE_NAME for p in predictors]) else
state_file)
# check if predictors on surface are used
state_file = ('_'.join([state_file, Spredictors]) if
any([p in ERA5_S_VARIABLE_NAME for p in predictors]) else
state_file)
# check whether digital elevation model, slope and aspect, and the day
# of year were used
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment