CDO script generation fails when requested variable is missing in input data
Error log:
warnings.warn(f"A NumPy version >={np_minversion} and <{np_maxversion}"
A bash script will be generated. Please run it by yourself.
Traceback (most recent call last):
File "/linkhome/rech/genlsc01/rlmd343/.conda/envs/abo/bin/data-rigueur", line 8, in <module>
sys.exit(main())
File "/linkhome/rech/genlsc01/rlmd343/.conda/envs/abo/lib/python3.10/site-packages/datarigueur/entrypoint.py", line 24, in main
args.func(args)
File "/linkhome/rech/genlsc01/rlmd343/.conda/envs/abo/lib/python3.10/site-packages/datarigueur/process/preparation.py", line 42, in preparation
transformation.apply(metadata=dataset_metadata, output=args.output_dataset)
File "/linkhome/rech/genlsc01/rlmd343/.conda/envs/abo/lib/python3.10/site-packages/datarigueur/transformation/cdo_engine.py", line 80, in apply
mds = variable_map[variable]
KeyError: 't'
Run with:
data-rigueur --verbose prepare --transformation-backend=cdo spec_lam.toml /gpfsstore/rech/psl/rpsl376/ergon/ERA5/NETCDF/GLOBAL_025/hourly//AN_PL/2022/ /gpfsstore/rech/psl/rpsl376/ergon/ERA5/NETCDF/GLOBAL_025/hourly//AN_SF/2022/ --output-dataset /gpfsscratch/rech/brn/rlmd343/LAM_ERA5-40S_hourly/nudging_forcing_ERA5-40S_hourly_202201.nc
Ideally, we test the existence of the t
variable at this particular moment. Ideally and in the future, we make the dataset validation before preparing it to see if all components are there.
Edited by Patryk Kiepas