After looking further into the soil moisture in the wrfout files i realized wrf itself was not reading the soil moisture correctly using that last vtable i supplied.
ygzylmz there is a few things going on here which are voiced in other forum threads but there doesn't seem to be a definite answer to it.
Firstly the output from icon is kg m-2 but wps does not like this and it expects the units to be in soil fraction. I am not 100% sure how to do his conversion but this nasa website seems to suggest dividing by soil layer thickness in mm and then dividing by porosity. https://ldas.gsfc.nasa.gov/faq/nca-ldas
This conversion will have to be done before ungrib. i have provided my download script if that helps show the conversion.
One bug in this conversion is the porosity as i think this might vary per grid point and searching online the porosity is a range for each soil type rather than a set value. For the moment i have just assumed the porosity to be 0.5. I am not 100% sure if we need to do this porosity conversion because this pushes the soil fraction above 1.
Can anyone from WRF or the WPS team shine any light on this conversion. I have seen on other forum threads WPS needs the data in volumetric soil moisture but all the vtables say fraction?
Secondly the soil levels in the icon output are different for the soil variables. I think this is what you are struggling with. From what i can see ungrib is reading the depth from soil temperature but the Level1 (upper bound) for the soil moisture. This seems to be due to the soil temperature not having any upper or lower bound but the soil moisture does. To get around this i told ungrib the depth for soil temperature and Level1 for soil moisture. I then used metgrid to put these onto a consistent depth scale for both Soil temperature and Soil moisture.
The main question now is what depth scale we should use to properly put the data through wrf. So we use the soil lay mid value, or the upper or lower bound of the soil layer. The hrrr seems to use the lower bound but not 100% sure why.
Here is the revised v table.
Code:
GRIB1| Level| From | To | metgrid | metgrid | metgrid |GRIB2|GRIB2|GRIB2|GRIB2|
Param| Type |Level1|Level2| Name | Units | Description |Discp|Catgy|Param|Level|
-----+------+------+------+----------+---------+-----------------------------------------+-----------------------+
11 | 100 | * | | TT | K | Temperature | 0 | 0 | 0 | 100 |
33 | 100 | * | | UU | m s-1 | U | 0 | 2 | 2 | 100 |
34 | 100 | * | | VV | m s-1 | V | 0 | 2 | 3 | 100 |
52 | 100 | * | | RH | % | Relative Humidity | 0 | 1 | 1 | 100 |
7 | 100 | * | | HGT | m | Height | 0 | 3 | 4 | 100 |
11 | 105 | 2 | | TT | K | Temperature at 2 m | 0 | 0 | 0 | 103 |
33 | 105 | 10 | | UU | m s-1 | U at 10 m | 0 | 2 | 2 | 103 |
34 | 105 | 10 | | VV | m s-1 | V at 10 m | 0 | 2 | 3 | 103 |
52 | 105 | 2 | | RH | % | Relative Humidity at 2 m | 0 | 1 | 1 | 103 |
1 | 1 | 0 | | PSFC | Pa | Surface Pressure | 0 | 3 | 0 | 1 |
2 | 102 | 0 | | PMSL | Pa | Sea-level Pressure | 0 | 3 | 1 | 101 |
144 | 111 | 0 | | SOILM000 | Fraction| Soil Moist 0 cm | 2 | 3 | 20 | 106 |
144 | 111 | 1 | | SOILM002 | Fraction| Soil Moist 2 cm | 2 | 3 | 20 | 106 |
144 | 111 | 3 | | SOILM006 | Fraction| Soil Moist 6 cm | 2 | 3 | 20 | 106 |
144 | 111 | 9 | | SOILM018 | Fraction| Soil Moist 18 cm | 2 | 3 | 20 | 106 |
144 | 111 | 27 | | SOILM054 | Fraction| Soil Moist 54 cm | 2 | 3 | 20 | 106 |
144 | 111 | 81 | | SOILM162 | Fraction| Soil Moist 162 cm | 2 | 3 | 20 | 106 |
144 | 111 | 243 | | SOILM486 | Fraction| Soil Moist 486 cm | 2 | 3 | 20 | 106 |
144 | 111 | 729 | | SOILM999 | Fraction| Soil Moist 1458 cm | 2 | 3 | 20 | 106 |
11 | 111 | 0 | | SOILT000 | K | Soil Temperature 0 cm | 2 | 3 | 18 | 106 |
11 | 111 | 2 | | SOILT002 | K | Soil Temperature 2 cm | 2 | 3 | 18 | 106 |
11 | 111 | 6 | | SOILT006 | K | Soil Temperature 6 cm | 2 | 3 | 18 | 106 |
11 | 111 | 18 | | SOILT018 | K | Soil Temperature 18 cm | 2 | 3 | 18 | 106 |
11 | 111 | 54 | | SOILT054 | K | Soil Temperature 54 cm | 2 | 3 | 18 | 106 |
11 | 111 | 162 | | SOILT162 | K | Soil Temperature 162 cm | 2 | 3 | 18 | 106 |
11 | 111 | 486 | | SOILT486 | K | Soil Temperature 486 cm | 2 | 3 | 18 | 106 |
11 | 111 |1458 | | SOILT999 | K | Soil Temperature 1458 cm | 2 | 3 | 18 | 106 |
81 | 1 | 0 | | LANDSEA | proprtn | Land/Sea flag (1=land, 0 or 2=sea) | 2 | 0 | 0 | 1 |
7 | 1 | 0 | | SOILHGT | m | Terrain field of source analysis | 0 | 3 | 6 | 1 |
11 | 1 | 0 | | SKINTEMP | K | Skin temperature | 0 | 0 | 0 | 1 |
65 | 1 | 0 | | SNOW | kg m-2 | Snow depth water equivalent | 0 | 1 | 60 | 1 |
| 1 | 0 | | SNOWH | m | Physical Snow Depth | 0 | 1 | 11 | 1 |
-----+------+------+------+----------+---------+--------------------------------------
#
#
# Vtable for Icon-EU pressure levels from the dwd server.
#
# https://opendata.dwd.de/weather/nwp/
#
# Variables from server come as individual files per variable and timestep so need to merge them together.
# Some variable only come for initial time so need to be added for each timestep being ingested into wps.
#
# Height (HGT) needs to be converted from m2 s-2 in the grib file to m before ungrib stage.
# Needs to convert Soil moisture from kg m-2 in icon output files to soil fraction before ungrib stage.
#