Closed mattiarighi closed 5 years ago
The current landcover implementation was written by @tobstac #756
This issue is because typebare is an auxillary dimension for baresoilFract defined by the CMIP5 table. However, a number of modelers seem to have missed it and thus it is not included in all model output files. We already discussed about this last winter in #770 and at that time decided to implement a fix file for the inmcm4 model (41aeb6cf91ed386c426b57eb2330de28d2dc2094). I just updated my branch and noticed all the fix files are gone, so naturally the problem reoccurs.
OK, I just realized the fix files did not vanish, but were moved to the esmvalcore. For some reason, Fix.get_fixes(...) does return an empty list, although the inmcm4 fix file does exists. I'll have a look and try to find out why this is happening.
OK, found it. The issue is with esmvalcore/cmor/fixes/fix.py. The problem is all the land cover fraction variables have an uppercase F in their name, e.g. baresoilFrac. But when the fix information is converted into a dictionary, the key is turned in to a lowercase name. Thus, this can be easily fixed by replacing
`variable = variable.replace('-', '')with
variable = variable.replace('-', '_').lower()` similar to what is done with project and dataset two lines above.
Unfortunately, I don't know how to commit this fix, as I do find the fix.py in my anaconda environment, but not in the repository anymore.
I think you have to do this in the core repository. As this is so small, you might just head to the development (edit: not master) branch there and edit the file and save to new branch instead of direct committing. (https://github.com/ESMValGroup/ESMValCore/blob/2ef34a6669cb01fa9e59f774db347c7d65942e64/esmvalcore/cmor/_fixes/fix.py#L140)
Hm, might be a bit more complicated. According to ESMValGroup/ESMValCore#101 they omitted the variables on purpose and under the assumption all model variables are lower case. Also, these changes are not merged into the core master yet, so I can't edit it there. Maybe, @bouweandela could have a look into this, as he was involved in the issue there.
@tobstac I opened an issue for you, but please feel free to open an issue yourself in the ESMValCore repository if you find bugs, or even a pull request if you already know how to fix it.
recipe_landcover
is currently not working (tested at DKRZ). The following error is returned: