Closed grafmi closed 1 year ago
@grafmi Thanks for redoing this PR. I was able to compile the code, download the 0.6 deg ICON data using download_icon.sh, and run through ungrib, metgrid, real and wrf. I like that the Vtable included the GHT data from the model. This will provide a better estimate for input geopotential for the WRF model. I have a couple of quetions:
@mgduda @jimbresch If you would like to take a look at this, I have a couple of downloaded ICON data files on Cheyenne. Let me know.
@weiwangncar
@mgduda @jimbresch Can you review this PR? Let's see if we can get it into v4.5 release. Thanks!
@grafmi Do you mind making your download script available for others?
@grafmi Do you mind making your download script available for others?
@weiwangncar It's fine for me to make it available to others. Where should I provide it?
@grafmi We may add a link in the release note for downloading the script, and we can also add it to our FAQs. Is there anything in the script you'd like to revise? Have you used it recently? It seems the data is update daily on the server and there is no archive of the data, correct?
I was having issues with this version when using the ICON-D2
dataset with pressure levels. I am not very familiar with WPS in general so I may be missing something obvious. The file I'm attaching has my namelists, run scripts and log files for downloading the ICON-D2
data, running ungrib and running metgrid.
It looks like something funky is happening with GEOPT:
metgrid.log
:
...
2023-04-14 11:18:36.698 --- DEBUG: . PRES SOIL_LEVE SOILT SOILM GHT GEOPT TT SOILM999 SOILM486 SOILM162 SOILM054 SOILM018 SOILM006 SOILM002 SOILM001 SOILT999 SOILT486 SOILT162 SOILT054 SOILT018 SOILT006 SOILT002 SOILT001 SKINTEMP SOILHGT PSFC RH VV UU PMSL
2023-04-14 11:18:36.698 --- DEBUG: 20000 X - - - X X X - - - - - - - - - - - - - - - - - - - X X X -
2023-04-14 11:18:36.698 --- DEBUG: 25000 X - - - X X X - - - - - - - - - - - - - - - - - - - X X X -
2023-04-14 11:18:36.698 --- DEBUG: 30000 X - - - X X X - - - - - - - - - - - - - - - - - - - X X X -
2023-04-14 11:18:36.698 --- DEBUG: 40000 X - - - X X X - - - - - - - - - - - - - - - - - - - X X X -
2023-04-14 11:18:36.698 --- DEBUG: 50000 X - - - X X X - - - - - - - - - - - - - - - - - - - X X X -
2023-04-14 11:18:36.698 --- DEBUG: 60000 X - - - X X X - - - - - - - - - - - - - - - - - - - X X X -
2023-04-14 11:18:36.699 --- DEBUG: 70000 X - - - X X X - - - - - - - - - - - - - - - - - - - X X X -
2023-04-14 11:18:36.699 --- DEBUG: 85000 X - - - X X X - - - - - - - - - - - - - - - - - - - X X X -
2023-04-14 11:18:36.699 --- DEBUG: 95000 X - - - X X X - - - - - - - - - - - - - - - - - - - X X X -
2023-04-14 11:18:36.699 --- DEBUG: 97500 X - - - X X X - - - - - - - - - - - - - - - - - - - X X X -
2023-04-14 11:18:36.699 --- DEBUG: 100000 X - - - X X X - - - - - - - - - - - - - - - - - - - X X X -
2023-04-14 11:18:36.699 --- DEBUG: 200100 X - - - X - X X X X X X X X X X X X X X X X X X X X X X X -
2023-04-14 11:18:36.699 --- DEBUG: 1 - X X X - - - - - - - - - - - - - - - - - - - - - - - - - -
2023-04-14 11:18:36.699 --- DEBUG: 2 - X X X - - - - - - - - - - - - - - - - - - - - - - - - - -
2023-04-14 11:18:36.699 --- DEBUG: 6 - X X X - - - - - - - - - - - - - - - - - - - - - - - - - -
2023-04-14 11:18:36.699 --- DEBUG: 18 - X X X - - - - - - - - - - - - - - - - - - - - - - - - - -
2023-04-14 11:18:36.699 --- DEBUG: 54 - X X X - - - - - - - - - - - - - - - - - - - - - - - - - -
2023-04-14 11:18:36.699 --- DEBUG: 162 - X X X - - - - - - - - - - - - - - - - - - - - - - - - - -
2023-04-14 11:18:36.699 --- DEBUG: 486 - X X X - - - - - - - - - - - - - - - - - - - - - - - - - -
2023-04-14 11:18:36.699 --- DEBUG: 1458 - X X X - - - - - - - - - - - - - - - - - - - - - - - - - -
2023-04-14 11:18:36.699 --- DEBUG: 201300 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - X
...
metgrid.exe stderr/stdout
:
...
WARNING: Entry in METGRID.TBL not found for field GEOPT. Default options will be used for this field!
...
WRF_DEBUG: Warning DIM 4 , NAME num_metgrid_levels REDEFINED by var GEOPT 12 11 in wrf_io.F90 line 2588
ERROR: Error in ext_pkg_write_field
Interestingly I did have success though when running with @WQadam's WPS:Support-for-DWD-suite-of-models from PR #220.
I was having issues with this version when using the
ICON-D2
dataset with pressure levels. I am not very familiar with WPS in general so I may be missing something obvious. The file I'm attaching has my namelists, run scripts and log files for downloading theICON-D2
data, running ungrib and running metgrid.It looks like something funky is happening with GEOPT:
metgrid.log
:... 2023-04-14 11:18:36.698 --- DEBUG: . PRES SOIL_LEVE SOILT SOILM GHT GEOPT TT SOILM999 SOILM486 SOILM162 SOILM054 SOILM018 SOILM006 SOILM002 SOILM001 SOILT999 SOILT486 SOILT162 SOILT054 SOILT018 SOILT006 SOILT002 SOILT001 SKINTEMP SOILHGT PSFC RH VV UU PMSL 2023-04-14 11:18:36.698 --- DEBUG: 20000 X - - - X X X - - - - - - - - - - - - - - - - - - - X X X - 2023-04-14 11:18:36.698 --- DEBUG: 25000 X - - - X X X - - - - - - - - - - - - - - - - - - - X X X - 2023-04-14 11:18:36.698 --- DEBUG: 30000 X - - - X X X - - - - - - - - - - - - - - - - - - - X X X - 2023-04-14 11:18:36.698 --- DEBUG: 40000 X - - - X X X - - - - - - - - - - - - - - - - - - - X X X - 2023-04-14 11:18:36.698 --- DEBUG: 50000 X - - - X X X - - - - - - - - - - - - - - - - - - - X X X - 2023-04-14 11:18:36.698 --- DEBUG: 60000 X - - - X X X - - - - - - - - - - - - - - - - - - - X X X - 2023-04-14 11:18:36.699 --- DEBUG: 70000 X - - - X X X - - - - - - - - - - - - - - - - - - - X X X - 2023-04-14 11:18:36.699 --- DEBUG: 85000 X - - - X X X - - - - - - - - - - - - - - - - - - - X X X - 2023-04-14 11:18:36.699 --- DEBUG: 95000 X - - - X X X - - - - - - - - - - - - - - - - - - - X X X - 2023-04-14 11:18:36.699 --- DEBUG: 97500 X - - - X X X - - - - - - - - - - - - - - - - - - - X X X - 2023-04-14 11:18:36.699 --- DEBUG: 100000 X - - - X X X - - - - - - - - - - - - - - - - - - - X X X - 2023-04-14 11:18:36.699 --- DEBUG: 200100 X - - - X - X X X X X X X X X X X X X X X X X X X X X X X - 2023-04-14 11:18:36.699 --- DEBUG: 1 - X X X - - - - - - - - - - - - - - - - - - - - - - - - - - 2023-04-14 11:18:36.699 --- DEBUG: 2 - X X X - - - - - - - - - - - - - - - - - - - - - - - - - - 2023-04-14 11:18:36.699 --- DEBUG: 6 - X X X - - - - - - - - - - - - - - - - - - - - - - - - - - 2023-04-14 11:18:36.699 --- DEBUG: 18 - X X X - - - - - - - - - - - - - - - - - - - - - - - - - - 2023-04-14 11:18:36.699 --- DEBUG: 54 - X X X - - - - - - - - - - - - - - - - - - - - - - - - - - 2023-04-14 11:18:36.699 --- DEBUG: 162 - X X X - - - - - - - - - - - - - - - - - - - - - - - - - - 2023-04-14 11:18:36.699 --- DEBUG: 486 - X X X - - - - - - - - - - - - - - - - - - - - - - - - - - 2023-04-14 11:18:36.699 --- DEBUG: 1458 - X X X - - - - - - - - - - - - - - - - - - - - - - - - - - 2023-04-14 11:18:36.699 --- DEBUG: 201300 - - - - - - - - - - - - - - - - - - - - - - - - - - - - - X ...
metgrid.exe stderr/stdout
:... WARNING: Entry in METGRID.TBL not found for field GEOPT. Default options will be used for this field! ... WRF_DEBUG: Warning DIM 4 , NAME num_metgrid_levels REDEFINED by var GEOPT 12 11 in wrf_io.F90 line 2588 ERROR: Error in ext_pkg_write_field
Interestingly I did have success though when running with @WQadam's WPS:Support-for-DWD-suite-of-models from PR #220.
Looks like GEOPT is missing from the metgrid.tbl in this PR, hence why it worked in mine but not this one. GEOPT should be added to the metgrid table like HGTT is in the metgrid table.
Yes, it seems that I forgot to add the field GEOPT to the METGRID.TBL. Thanks for the hint @WQadam. @sael9740 Try to add the lines below to METGRID.TBL.ARW:
_name=GEOPT output=no interp_option=nearestneighbor ========================================
Yes, it seems that I forgot to add the field GEOPT to the METGRID.TBL. Thanks for the hint @WQadam. @sael9740 Try to add the lines below to METGRID.TBL.ARW:
_name=GEOPT output=no interp_option=nearestneighbor ========================================
@grafmi - This fixed the issue for me. Thanks for the help!
I'm guessing it is alright to put GEOPT in the metgrid table like that. I see other vtables use GEOPT, mainly ecmwf. When running the EC and ERA5 models i see its needed to run calc_p_ecmwf before metgrid. I thought this was executable was mainly to calculate pressure which isnt needed for icon but i think this executable might also fill the lowest GEOPT level which metgrid is erroring on. Basically not sure if by putting GEOPT in the metgrid table we have bypassed a wrf error check for the ECMWF and ERA models? I have run some ERA5 initialized wrf runs without needing to do calc_p_ecmwf and the output has seemed fine.
@sael9740 There is no need to process GEOPT in metgrid since the model would not know what to do with it. The correct fix is to remove Geopotential in the row for GEOPT in Vtable.ICONp, like it is done in Vtable.ECMWF:
129 | 100 | * | | GEOPT | m2 s-2 | | 0 | 3 | 4 | 100 |
| 100 | * | | HGT | m | Height | | | | 100 |
The ungrib program knows to compute HGT from GEOPT and write only HGT out in the intermediate file. Can you give it a try?
@weiwangncar - Ya sure. I'll try that now and get back with you.
@sael9740 There is no need to process GEOPT in metgrid since the model would not know what to do with it. The correct fix is to remove Geopotential in the row for GEOPT in Vtable.ICONp, like it is done in Vtable.ECMWF:
129 | 100 | * | | GEOPT | m2 s-2 | | 0 | 3 | 4 | 100 | | 100 | * | | HGT | m | Height | | | | 100 |
The ungrib program knows to compute HGT from GEOPT and write only HGT out in the intermediate file. Can you give it a try?
@weiwangncar - Yes this worked. Just to be clear I used https://github.com/wrf-model/WPS/commit/a22c0730138af592965137749575a4dde9ad89dc as is with the exception that I removed the GEOPT
entry in the Vtable.ICONp
:
https://github.com/wrf-model/WPS/blob/a22c0730138af592965137749575a4dde9ad89dc/ungrib/Variable_Tables/Vtable.ICONp#L8
@sael9740 @grafmi Thanks for trying.
@grafmi Do you mind making your download script available for others?
@weiwangncar It's fine for me to make it available to others. Where should I provide it?
Is WPS-V4.5 suitable for handling ICON global forecast data?(Data is downloaded here:https://opendata.dwd.de/weather/nwp/icon/grib) Thanks!
@grafmi Do you mind making your download script available for others?
@weiwangncar It's fine for me to make it available to others. Where should I provide it?
Is WPS-V4.5 suitable for handling ICON global forecast data?(Data is downloaded here:https://opendata.dwd.de/weather/nwp/icon/grib) Thanks!
Yes it is! You have to do an additional step on download though to get it to a lat lon grid as WPS cant handle the icosahedral grid. Once set up the conversion is quick but can take a while to set up. I have run it from the model level version but i think you should be able to run it with the pressure levels aswell, however there isnt many pressure levels in the global model.
see helpful links here on how to regrid icon global - https://www.dwd.de/DE/leistungen/opendata/help/modelle/Opendata_cdo_EN.pdf?__blob=publicationFile&v=3 https://github.com/DeutscherWetterdienst/regrid
@grafmi Do you mind making your download script available for others?
@weiwangncar It's fine for me to make it available to others. Where should I provide it?
Is WPS-V4.5 suitable for handling ICON global forecast data?(Data is downloaded here:https://opendata.dwd.de/weather/nwp/icon/grib) Thanks!
Yes it is! You have to do an additional step on download though to get it to a lat lon grid as WPS cant handle the icosahedral grid. Once set up the conversion is quick but can take a while to set up. I have run it from the model level version but i think you should be able to run it with the pressure levels aswell, however there isnt many pressure levels in the global model.
see helpful links here on how to regrid icon global - https://www.dwd.de/DE/leistungen/opendata/help/modelle/Opendata_cdo_EN.pdf?__blob=publicationFile&v=3 https://github.com/DeutscherWetterdienst/regrid
Thank you so much! Can you provide a script that can download global ICON model-level data for WRF?
icon_download_modlv_global.txt
See the download file above that is a shell script. I have had to put it as a text file to put it onto github.
You will have to fill out the working directory and create your domain target text files and nc file by looking at the DWD help link in my previous comment. Things to note are there is a few date variables that are set in the script and you will need to change these to your start and end date of the download. Plus the value in the time do loop sets how often the files are downloaded ie hourly, three hourly etc. CDO needs to be installed aswell on the machine to use this script as it uses these commands. Also i have only tested it for reasonable data using soil level 0 rather than 5 (0.5) which is supported by WPS 4.5 but in theory i dont think this will make a difference to the run data much unless you are looking at soil moisture and temperature.
The ICON grib2 data set is now able to be ingested by the ungrib program. Informations about the ICON data set can be found here: https://www.dwd.de/DWD/forschung/nwv/fepub/icon_database_main.pdf
This PR has been tested with ICON-EU (~6.6 km resolution) data, but it should be able to run with ICON-D2 (~2.2 km resolution) and ICON-Global. For the latter it needs to be converted from an icosahedral grid to a regular lat-lon grid. Data for testing can be taken from PR #154
This PR is very similar to PR #220. Nevertheless I published it, so you can decide which one is more appropriate for your needs.