Skip to content

Commit

Permalink
Fixes according to @zklaus review
Browse files Browse the repository at this point in the history
  • Loading branch information
senesis committed Jun 10, 2021
1 parent 3234ee7 commit c8040ef
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 43 deletions.
76 changes: 41 additions & 35 deletions esmvalcore/_config/extra_facets/ipslcm-mappings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
# ESMValTool to use key 'ipsl_varname' for building the filename,
# while for format 'Output' it specifies to use key 'group'
#
# Specifying 'igcm_dir' here allows to avoid having to secifiy it in
# Specifying 'igcm_dir' here allows to avoid having to specifiy it in
# datasets definitions
#
# Key 'use_cdo' allows to choose whether CDO will be invoked for
Expand All @@ -15,15 +15,16 @@
# not compliant with ESMValtool licence policy, the default
# configuration is to avoid using it. You may use customized settings
# by installing a modified version of this file as
# ~/.esmvatlool/variable_details/native6-ipsl-cm6-*.yml
# ~/.esmvatlool/variable_details/ipslcm-*.yml
# see : https://docs.esmvaltool.org/projects/esmvalcore/en/latest/quickstart/configure.html#location-of-the-extra-facets-files)
#
# Key 'positive' allows to tell ESMValTool when the sign convention
# for a variable is reversed between IPSL-CM6 and CMIP6. In that case,
# just e.g. put 'positive: down' if the CMIP6 convention is 'positive: up'
#
# The main key below, 'IPSL-CM6', is the one to use as a value for
# attribute 'dataset' in the 'datasets' entry of recipes; it matches
# the module name 'ipsl.py' in 'cmor_fixes/ipsl*/ipsl.py'
# the module name 'ipsl_cm6.py' in 'cmor_fixes/ipsl*/ipsl_cm6.py'
#
---
# A series of shortcuts for repetitive settings
Expand All @@ -46,7 +47,9 @@ ShortCuts:
IPSL-CM6:
# ========================================================================================
Amon:
# ========================================================================================
# ========================================================
# ATM variables processed using their CMIP6 short_name
# ========================================================
# ATM 3D Variables
ta: {ipsl_varname: ta, <<: *atm3dvars}
ua: {ipsl_varname: ua, <<: *atm3dvars}
Expand All @@ -62,45 +65,16 @@ IPSL-CM6:
ts: {ipsl_varname: tsol, <<: *atmvars}
huss: {ipsl_varname: q2m, <<: *atmvars}
uas: {ipsl_varname: u10m, <<: *atmvars}
"vas": {ipsl_varname: v10m, <<: *atmvars}
vas: {ipsl_varname: v10m, <<: *atmvars}
sfcWind: {ipsl_varname: wind10m, <<: *atmvars}
hurs: {ipsl_varname: rh2m, <<: *atmvars}

# ATM general variables
precip: {ipsl_varname: precip, <<: *atmvars}
prw: {ipsl_varname: prw, <<: *atmvars}
slp: {ipsl_varname: slp, <<: *atmvars}
t2m: {ipsl_varname: t2m, <<: *atmvars}
q2m: {ipsl_varname: q2m, <<: *atmvars}
u10m: {ipsl_varname: u10m, <<: *atmvars}
v10m: {ipsl_varname: v10m, <<: *atmvars}
wind10m: {ipsl_varname: wind10m, <<: *atmvars}

# -> Turbulent fluxes
taux: {ipsl_varname: taux, <<: *atmvars}
tauy: {ipsl_varname: tauy, <<: *atmvars}

# -> Radiative down at TOA
SWdnTOA: {ipsl_varname: SWdnTOA, <<: *atmvars}

# -> Radiative down at TOA
topl: {ipsl_varname: topl, <<: *atmvars}
SWupTOA: {ipsl_varname: SWupTOA, <<: *atmvars}
topl0: {ipsl_varname: topl0, <<: *atmvars}
SWupTOAclr: {ipsl_varname: SWupTOAclr, <<: *atmvars}

# -> Radiative up at Surface
LWupSFC: {ipsl_varname: LWupSFC, <<: *atmvars}
SWupSFC: {ipsl_varname: SWupSFC, <<: *atmvars}
SWupSFcclr: {ipsl_varname: SWupSFcclr, <<: *atmvars}
LWupSFcclr: {ipsl_varname: LWupSFcclr, <<: *atmvars}

# -> Radiative down at Surface
LWdnSFC: {ipsl_varname: LWdnSFC, <<: *atmvars}
SWdnSFC: {ipsl_varname: SWdnSFC, <<: *atmvars}
LWdnSFcclr: {ipsl_varname: LWdnSFcclr, <<: *atmvars}
SWdnSFcclr: {ipsl_varname: SWdnSFcclr, <<: *atmvars}

# -> Turbulent fluxes
hfls: {ipsl_varname: flat, <<: *atmvars, positive: down}
hfss: {ipsl_varname: sens, <<: *atmvars, positive: down}
Expand Down Expand Up @@ -131,12 +105,44 @@ IPSL-CM6:
rldscs: {ipsl_varname: LWdnSFcclr, <<: *atmvars}
rsdscs: {ipsl_varname: SWdnSFcclr, <<: *atmvars}

# ========================================================
# ATM variables processed using their own IPSL short_name
# ========================================================
# -> general variables
precip: {ipsl_varname: precip, <<: *atmvars}
slp: {ipsl_varname: slp, <<: *atmvars}

# -> Turbulent fluxes
taux: {ipsl_varname: taux, <<: *atmvars}
tauy: {ipsl_varname: tauy, <<: *atmvars}

# -> Radiative down at TOA
SWdnTOA: {ipsl_varname: SWdnTOA, <<: *atmvars}

# -> Radiative up at TOA
topl: {ipsl_varname: topl, <<: *atmvars}
SWupTOA: {ipsl_varname: SWupTOA, <<: *atmvars}
topl0: {ipsl_varname: topl0, <<: *atmvars}
SWupTOAclr: {ipsl_varname: SWupTOAclr, <<: *atmvars}

# -> Radiative up at Surface
LWupSFC: {ipsl_varname: LWupSFC, <<: *atmvars}
SWupSFC: {ipsl_varname: SWupSFC, <<: *atmvars}
SWupSFcclr: {ipsl_varname: SWupSFcclr, <<: *atmvars}
LWupSFcclr: {ipsl_varname: LWupSFcclr, <<: *atmvars}

# -> Radiative down at Surface
LWdnSFC: {ipsl_varname: LWdnSFC, <<: *atmvars}
SWdnSFC: {ipsl_varname: SWdnSFC, <<: *atmvars}
LWdnSFcclr: {ipsl_varname: LWdnSFcclr, <<: *atmvars}
SWdnSFcclr: {ipsl_varname: SWdnSFcclr, <<: *atmvars}


# ========================================================================================
Lmon:
# ========================================================================================
# SRF -- Land surface - ORCHIDEE

# --> !!! This will not stay in the param file !!! --------------------
fluxlat: {ipsl_varname: fluxlat, <<: *srfvars}
fluxsens: {ipsl_varname: fluxsens, <<: *srfvars}
albnir: {ipsl_varname: alb_nir, <<: *srfvars}
Expand Down
5 changes: 3 additions & 2 deletions esmvalcore/cmor/_fixes/ipslcm/ipsl_cm6.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,16 @@ class AllVars(Fix):
"""Fixes for all IPSLCM variables."""

def fix_file(self, filepath, output_dir):
"""Select IPSLCM variable in filepath, by calling CDO, if relevant.
"""Select IPSLCM variable in filepath.
This is done only if input file is a multi-variable one. This
is diagnosed by searching in the input filepathame for the
extra_facet value for key 'group'.
In such cases, it is worth to use an external tool for
filtering, at least until Iris loads fast (which is not the case
up to, and including, V3.0.2)
up to, and including, V3.0.2), and CDO can be used, depending on
extra_facets key `use_cdo`
However, we take care of ESMValTool policy re. dependencies licence
Expand Down
7 changes: 1 addition & 6 deletions esmvalcore/config-developer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -195,12 +195,8 @@ native6:
cmor_strict: false
input_dir:
default: 'Tier{tier}/{dataset}/{latestversion}/{frequency}/{short_name}'
IPSL: '{root}/{account}/{model}/{status}/{exp}/{simulation}/{dir}/{freq}'
input_file:
default: '*.nc'
IPSL:
- '{simulation}_*_{ipsl_varname}.nc'
- '{simulation}_*_{group}.nc'
output_file: '{project}_{dataset}_{type}_{version}_{mip}_{short_name}'
cmor_type: 'CMIP6'
cmor_default_table_prefix: 'CMIP6_'
Expand All @@ -211,8 +207,7 @@ obs4mips:
default: 'Tier{tier}/{dataset}'
RCAST: '/'
IPSL: '{realm}/{short_name}/{freq}/{grid}/{institute}/{dataset}/{latest_version}'
input_file:
default: '{short_name}_{dataset}_{level}_{version}_*.nc'
input_file: '{short_name}_{dataset}_{level}_{version}_*.nc'
output_file: '{project}_{dataset}_{level}_{version}_{short_name}'
cmor_type: 'CMIP6'
cmor_path: 'obs4mips'
Expand Down

0 comments on commit c8040ef

Please sign in to comment.