pcmdi_metrics
pcmdi_metrics copied to clipboard
Create variable mapping dictionaries for GFDL/NCAR/CAM
It seems with the suite of demo scripts that we're starting to collate, it would be suitable to further extend the metrics package with known variable mappings - as has already been done with GFDL and NCAR/ACME/CAM.
It we generate these dictionaries and drop them somewhere (maybe in the doc main subdir, maybe further down under src/python/pcmdi/scripts/) then they can easily be reused/refined as model versions are tweaked - I would be surprised if once we get to the UKMetOffice/ACCESS folks a generic "UM" mapping file can also be created.
An example of this could be:
Model identifier | CMIP variable | Realm | Model variable name | Model units | Conversion algorithm |
---|---|---|---|---|---|
NCAR-CAM5 | pr | atmos | PRECC, PRECL | m s-1 | PRECC + PRECL and unit conversion |
NCAR-CAM5 | rlut | atmos | FSNTOA, FSNT, FLNT | W m-2 | FSNTOA-FSNT+FLNT |
GFDL-CM4 | sos | ocean | SALT | 1e-3 | 1 |
GFDL-CM4 | tos | ocean | TEMP | degrees_C | 1 |
GFDL-CM4 | zos | ocean | SSH | m | 1 |
Some of the example lists are linked below: https://github.com/PCMDI/pcmdi_metrics/blob/master/src/python/pcmdi/scripts/GFDL/createXmlAndNcs.py#L58-59 https://github.com/PCMDI/pcmdi_metrics/blob/master/src/python/pcmdi/scripts/ACME/createXmlAndNcs.py#L47-56 https://github.com/PCMDI/pcmdi_metrics/blob/master/src/python/pcmdi/scripts/NCAR/createXmlAndNcs.py#L45-56
@gleckler1 it would be a good idea to go through this data "conditioning" process with @jservonnat and include an IPSL mapping dictionary in our demo templates
I'm ok with that too!
@durack1 This is exactly what we are looking to do! Should be very helpful for runs without being CMORIZED. I will keep you in the updated as this progresses. Thanks!
@chengzhuzhang ok let's reopen this one.. I think it's a worthy effort
@jservonnat wanna pipe in with your IPSL mappings - have you done this?
Good idea to put them in a dictionary json file
@durack1 Just for housekeeping, I wonder if this issue addressed and okay to close.
@lee1043 good question, to a point this is included in the https://github.com/PCMDI/pcmdi_metrics/tree/main/sample_setups/external-setups examples, but is not managed in any coherent way across these examples (which was the initial intent). As this originates from 9 years ago, would be fine to close
@durack1 thanks for your comment. I am closing it now but we shall reopen in the future if needed.