Fix MARS key duplicates for records with levtype=heightAboveSea#6
Fix MARS key duplicates for records with levtype=heightAboveSea#6victoria-cherkas wants to merge 2 commits intorevise_mars_modelfrom
Conversation
|
Issue likely related to ecmwf/earthkit-data#121 |
|
I see the point, and I also do not know why depthBelowLand, heightAboveSea are mapped into sfc. |
|
Fine for me to clarify with ECMWF first, but I think the issue comes from the eccodes_cosmo_definitions, so perhaps ECMWF still has the mars.levelist defined for 'sfc' fields. Perhaps this PR should rather remove those three lines of code, but not sure if that would have negative side effects. Update - didnt realise that file in eccodes cosmo definition is just copied from eccodes definitions, so actually yes they should have the same issue. https://github.com/ecmwf/eccodes/blob/2.25.1/definitions/grib2/template.4.horizontal.def#L80-L82 |
|
@petrabaumann was this discussed during these days ? I think you discussed a new mars levtype encoding for height above sea and height about ground ? |
|
Yes, I started the discussion on that, and Sebastien told me that they had to add level types for Destination Earth, e.g. a height-above-ground-type hl. These changes for Destination Earth are available in eccodes 2.32.0. I will check these changes and discuss how to adopt them with Sebastien in a follow-up. |
petrabaumann
left a comment
There was a problem hiding this comment.
Thanks for spotting this!
I think that we should introduce new type of level values to differentiate between model levels, height above mean sea, and depth below land levels. ECMWF also started to work on these issues for Detination Earth.
| if (centreForLocal == 215) { | ||
| # class | ||
| transient marsClass='od'; | ||
| # transient marsClass='od'; |
| 'sfc' = {typeOfFirstFixedSurface=102; typeOfSecondFixedSurface=255;} | ||
| # heightAboveSea | ||
| 'ml' = {typeOfFirstFixedSurface=102; typeOfSecondFixedSurface=255;} | ||
| 'sfc' = {typeOfFirstFixedSurface=103; typeOfSecondFixedSurface=255;} |
There was a problem hiding this comment.
I would introduce antother key value 'zl' for this level type. I am planning to add also a height above ground level type 'hl', with rules for special meteorologocal parameters as 2m-temperature, 10m wind components, as ECMWF introduced for Destination Earth in another PR.
| # depthBelowLand | ||
| 'ml' = {typeOfFirstFixedSurface=106; typeOfSecondFixedSurface=255;} | ||
| 'ml' = {typeOfFirstFixedSurface=106;typeOfSecondFixedSurface=106;} | ||
| 'pt' = {typeOfFirstFixedSurface=107; typeOfSecondFixedSurface=255;} |
There was a problem hiding this comment.
We should define a special value for soil levels here, e.g. 'sl' or something more expressive. Can discuss that with Sebastien, when we review our model.I still have to figure out how to solve the scaling issue.
typeOfLevel = (depthBelowLand, heightAboveSea) were interpreted as marsLevType = sfc, which meant there was no level (and theremore mars.levelist) defined. We require the level since we have multiple records with different scaledValueOfFirstFixedSurface etc.
Changes marsLevType from sfc to ml for both (depthBelowLand, heightAboveSea).
This resolves the issue of duplicates for heightAboveSea , as records now have various level values.
This does not resolve the issue of duplicates for depthBelowLand, since the resulting level is 0 for multiple records (eg 0.01 rounds to 0, 0.05 rounds to 0 etc).