get_gridded_temporal_profile in rotated_nested domains
Hi @ctena ,
In auto-monarch I was trying to use a new/different HERMES configuration file for the second nested-domain (using only HERMESv3_GR, not BU), by modifying the template hermesv3_gr.sh
, but the HERMESv3_GR job failed. This is the error in the log file:
Traceback (most recent call last):
File "/gpfs/scratch/pr1enx00/pr1enx16/a4f0/HERMESv3/sources/HERMESv3_GR/hermesv3_gr/modules/temporal/temporal.py", line 206, in get_gridded_temporal_profile
if nc_in.dimensions[lat_name].size * nc_in.dimensions[lon_name].size != self.grid.full_shape[-2] * \
KeyError: 'lat'
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "hermes.py", line 151, in <module>
run()
File "hermes.py", line 144, in run
date = HermesGr(Config()).main()
File "hermes.py", line 72, in __init__
self.options.countries_shapefile)
File "/gpfs/scratch/pr1enx00/pr1enx16/a4f0/HERMESv3/sources/HERMESv3_GR/hermesv3_gr/modules/emision_inventories/emission_inventory.py", line 380, in make_emission_list
countries_shapefile=countries_shapefile))
File "/gpfs/scratch/pr1enx00/pr1enx16/a4f0/HERMESv3/sources/HERMESv3_GR/hermesv3_gr/modules/emision_inventories/emission_inventory.py", line 144, in __init__
options.world_info, options.auxiliary_files_path, grid, options.first_time)
File "/gpfs/scratch/pr1enx00/pr1enx16/a4f0/HERMESv3/sources/HERMESv3_GR/hermesv3_gr/modules/temporal/temporal.py", line 87, in __init__
self.daily_profile = self.get_daily_profile(daily_profile_id, daily_profile_path)
File "/gpfs/scratch/pr1enx00/pr1enx16/a4f0/HERMESv3/sources/HERMESv3_GR/hermesv3_gr/modules/temporal/temporal.py", line 270, in get_daily_profile
profile = self.get_gridded_temporal_profile('Fday', profile_id)
File "/gpfs/scratch/pr1enx00/pr1enx16/a4f0/HERMESv3/sources/HERMESv3_GR/hermesv3_gr/modules/temporal/temporal.py", line 215, in get_gridded_temporal_profile
if nc_in.dimensions['latitude'].size * nc_in.dimensions['longitude'].size != self.grid.full_shape[-2] * \
KeyError: 'latitude'
The job was succesfully run when making the following change in the file /HERMESv3_GR/hermesv3_gr/modules/temporal/temporal.py
, line 196:
if self.grid.grid_type in ['rotated','rotated_nested']:
Please, let me know if there's any missing information.