Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 22 additions & 18 deletions data/cesm_regrid_maps.yaml → data/cesm_grids.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ESMF regrid weight files for CESM, keyed by resolution.
# See noresm_regrid_maps.yaml for the schema.
# See noresm_grids.yaml for the schema.

inputdata_dir: /glade/campaign/cesm/cesmdata/inputdata/

Expand All @@ -11,35 +11,39 @@ resolutions:
conservative: cpl/gridmaps/tx2_3v2/map_t232_TO_1x1d_aave.251023.nc
bilinear: cpl/gridmaps/tx2_3v2/map_t232_TO_1x1d_blin.251023.nc

# 'regular' means the variable already carries lat/lon, so nothing is
# regridded (see the resolution == "regular" branch in regrid.py) and no
# 'custom' means the variable already carries lat/lon, so nothing is
# regridded (see the resolution == "custom" branch in regrid.py) and no
# weights are ever applied. The entry exists only because _regrid_fx_once
# builds a regridder before checking whether it needs one, so the file must
# exist to be opened and discarded. These are the maps the old implicit
# fallback used; they are named here to keep that behaviour visible.
regular:
custom:
conservative: cpl/gridmaps/tx2_3v2/map_t232_TO_1x1d_aave.251023.nc
bilinear: cpl/gridmaps/tx2_3v2/map_t232_TO_1x1d_blin.251023.nc


# Per-realm grids; see noresm_grids.yaml for the fields and a template.
#
# No ne16 entry: 'resolutions' above defines no ne16 weights for CESM, so an
# ne16 CESM run could never have regridded anything.
#
# The ocean, sea-ice and land-ice grid_labels are carried over unchanged and
# still say g106 (regular 1 x 1), which cannot be right for a tripolar or a
# projected grid. They are left alone because this change is about where the
# input grid is stated, not about correcting CESM's labels.
grid_names_per_realm:
ne16:
atmos: g123
aerosol: g123
atmosChem: g123
land: g123
seaIce: g202
landIce: g194
ne30:
atmos: g106
aerosol: g106
atmosChem: g106
land: g106
seaIce: g106
landIce: g106
atmos: {input_grid: ne30, grid_label: g106}
aerosol: {input_grid: ne30, grid_label: g106}
atmosChem: {input_grid: ne30, grid_label: g106}
land: {input_grid: ne30, grid_label: g106}
ocean: {input_grid: tx2_3v2, grid_label: g106}
ocnBgchem: {input_grid: tx2_3v2, grid_label: g106}
seaIce: {input_grid: tx2_3v2, grid_label: g106}
landIce: {input_grid: custom, grid_label: g106}

# Static dataset (global attribute) metadata for the CMOR dataset JSON builder;
# see noresm_regrid_maps.yaml for the schema. CESM writes CESM3 at every
# see noresm_grids.yaml for the schema. CESM writes CESM3 at every
# resolution for now (placeholder).
dataset:
base_source_id: CESM3
Expand Down
2 changes: 1 addition & 1 deletion data/intensive_vars.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
# Fluxes must conserve their integral over a cell and use the conservative map,
# which is the default for anything not listed here.
#
# Unlike the include-pattern and regrid-map tables, this file is NOT per model:
# Unlike the include-pattern and grid tables, this file is NOT per model:
# whether a quantity is intensive is a property of the variable, not of the
# model that produced it. Keeping one copy stops CESM and NorESM output from
# diverging in how the same variable was regridded.
Expand Down
101 changes: 101 additions & 0 deletions data/noresm_grids.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
# ESMF regrid weight files for NorESM, keyed by resolution.
#
# Paths are relative to 'inputdata_dir'. Each resolution supplies a
# conservative map and, optionally, a bilinear one; regrid.py uses the
# bilinear map for the variables listed in intensive_vars.yaml and the
# conservative map for everything else, including all fx fields.
#
# Both maps for a resolution must target the SAME destination grid, or a
# single run emits variables on two different grids.

inputdata_dir: /nird/datalake/NS9560K/diagnostics/land_xesmf_diag_data/

resolutions:
ne30:
conservative: map_ne30pg3_to_1x1d_aave.nc
bilinear: map_ne30pg3_to_1x1d_bilin.nc
ne16:
conservative: map_ne16pg3_to_2x2_aave_c20260904.nc
bilinear: map_ne16pg3_to_2x2_blin_c20260904.nc
tnx1v4:
conservative: map_tnx1v4_to_1x1_aave_c260531.nc
bilinear: map_tnx1v4_to_1x1_blin_c260531.nc

# 'custom' means the variable already carries lat/lon, so nothing is
# regridded (see the resolution == "custom" branch in regrid.py) and no
# weights are ever applied. The entry exists only because _regrid_fx_once
# builds a regridder before checking whether it needs one, so the file must
# exist to be opened and discarded. These are the maps the old implicit
# fallback used; they are named here to keep that behaviour visible.
custom:
conservative: map_tnx1v4_to_1x1_aave_c260531.nc
bilinear: map_tnx1v4_to_1x1_blin_c260531.nc

# Per-realm grids, for each resolution the case may have been run at.
#
# input_grid the grid the realm's history files are on, naming an entry in
# 'resolutions' above. 'custom' means nothing is regridded:
# CISM land-ice output is georeferenced from its projected x/y
# coordinates instead.
# grid_label the grid the output lands on, as a CMIP7 grid code.
#
# Only the atmosphere and land change with the resolution. The ocean, sea-ice
# and land-ice rows are deliberately identical between ne16 and ne30, because
# those components run the same grids in both configurations.
#
grid_names_per_realm:
NorESM3-LM:
atmos: {input_grid: ne16, grid_label: g123}
aerosol: {input_grid: ne16, grid_label: g123}
atmosChem: {input_grid: ne16, grid_label: g123}
land: {input_grid: ne16, grid_label: g123}
ocean: {input_grid: tnx1v4, grid_label: g202}
ocnBgchem: {input_grid: tnx1v4, grid_label: g202}
seaIce: {input_grid: tnx1v4, grid_label: g202}
landIce: {input_grid: custom, grid_label: g194}
NorESM3-MM:
atmos: {input_grid: ne30, grid_label: g106}
aerosol: {input_grid: ne30, grid_label: g106}
atmosChem: {input_grid: ne30, grid_label: g106}
land: {input_grid: ne30, grid_label: g106}
ocean: {input_grid: tnx1v4, grid_label: g202}
ocnBgchem: {input_grid: tnx1v4, grid_label: g202}
seaIce: {input_grid: tnx1v4, grid_label: g202}
landIce: {input_grid: custom, grid_label: g194}

# To add a resolution, uncomment and fill in every field for the grids that
# case ran. Name it 'custom' to run a case this table does not otherwise
# describe; a 'custom' block is used like any other, and without one nothing
# is regridded. Any grid may be named, including new ones, so long as each
# has an entry in 'resolutions' above. Nothing is inherited from the blocks above: a
# resolution running a different ocean or ice-sheet grid says so here. Each
# input_grid needs an entry in 'resolutions', and each grid_label must be
# registered in the controlled vocabulary, or CMOR refuses to write.
#
# <resolution>:
# atmos: {input_grid: <grid>, grid_label: <code>}
# aerosol: {input_grid: <grid>, grid_label: <code>}
# atmosChem: {input_grid: <grid>, grid_label: <code>}
# land: {input_grid: <grid>, grid_label: <code>}
# ocean: {input_grid: <grid>, grid_label: <code>}
# ocnBgchem: {input_grid: <grid>, grid_label: <code>}
# seaIce: {input_grid: <grid>, grid_label: <code>}
# landIce: {input_grid: <grid>, grid_label: <code>}

# Static dataset (global attribute) metadata for the CMOR dataset JSON builder.
# base_source_id is the key looked up in cmor-cvs.json for institution_id and
# source text; it must be a CV source_id entry. source_ids/nominal_resolution
# are the branded, per-resolution values actually written to the output; the
# default_* keys catch any resolution not listed (e.g. non-CMIP test runs).
dataset:
base_source_id: NorESM3
source_type: AOGCM
calendar: noleap
source_ids:
NorESM3-LM: NorESM3-LM
NorESM3-MM: NorESM3-MM
default_source_id: NorESM3
nominal_resolution:
NorESM3-LM: 250 km
NorESM3-MM: 100 km
default_nominal_resolution: 100 km
66 changes: 0 additions & 66 deletions data/noresm_regrid_maps.yaml

This file was deleted.

Loading
Loading