You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The hourofyear NetCDF needs to have a fixed size of 8784 hours; which isn't the case currently (maybe it is for a leap year, but not for my tested year 2018).
Code for reproduction
fromemiproc.inventories.tnoimportTNO_Inventoryinv=TNO_Inventory("/users/ekoene/CTDAS_inputs/TNO_6x6_GHGco_v4_0/TNO_GHGco_v4_0_year2018.nc")
fromemiproc.gridsimportICONGridicon_grid_file="/users/ekoene/CTDAS_inputs/icon_europe_DOM01.nc"icon_grid=ICONGrid(icon_grid_file)
# Convert to a planar crs before# you will get a warning from pygeos if you dont do thatfromemiproc.gridsimportWGS84_PROJECTEDinv.to_crs(WGS84_PROJECTED)
fromemiproc.regridimportremap_inventoryremaped_tno=remap_inventory(inv, icon_grid, ".remap_tno5")
fromemiproc.exports.iconimportexport_icon_oem, TemporalProfilesTypesexport_icon_oem(remaped_tno,
icon_grid_file,
"/capstor/scratch/cscs/ekoene/inventories/icon_with_tno_emissions/",
temporal_profiles_type=TemporalProfilesTypes.HOUR_OF_YEAR,
year=2018,
substances='CO2')
Additional information
Currently, in ICON-ART-OEM, the following things are hardcoded:
in other words, it tries to read out a table from (1,1) to (n_countries, 8784) from the NetCDF. However, emiproc only writes out a table of size (1,1) to (n_countries, 8760) for the TNO database for the year 2018. Hence, the NetCDF reading runs into an error as there isn't enough data present, and ICON crashes correspondingly.
I manually simply appended a copy of the final day into the NetCDF as a workaround for my case, but it'd be good if this could be addressed in emiproc in some way.
The text was updated successfully, but these errors were encountered:
My issue is still that in a non leap year like 2018, there are 8760 hours, whereas there are 8784 hours only during leap years, thus I think the problem has to be addressed on the OEM side and not on the emiproc side.
Bug summary
The
hourofyear
NetCDF needs to have a fixed size of 8784 hours; which isn't the case currently (maybe it is for a leap year, but not for my tested year 2018).Code for reproduction
Additional information
Currently, in ICON-ART-OEM, the following things are hardcoded:
in other words, it tries to read out a table from (1,1) to (n_countries, 8784) from the NetCDF. However, emiproc only writes out a table of size (1,1) to (n_countries, 8760) for the TNO database for the year 2018. Hence, the NetCDF reading runs into an error as there isn't enough data present, and ICON crashes correspondingly.
I manually simply appended a copy of the final day into the NetCDF as a workaround for my case, but it'd be good if this could be addressed in emiproc in some way.
The text was updated successfully, but these errors were encountered: