convert_ic_to_pcd_radius
utils/mpas/convert_ic_to_pcd_radius.py converts an existing MPAS-Ocean or
MPAS-Seaice initial condition on a spherical mesh to the Physical Constants
Dictionary (PCD) mean Earth radius, so that the mesh matches the radius the
models use. It:
rescales the horizontal coordinates, lengths and areas, and the
sphere_radiusattribute, from the file’ssphere_radiusto the PCDmean_radiuswithpolaris.mesh.radius.rescale_sphere_radius();removes
fCell,fEdgeandfVertex, which the models compute at init on spherical meshes;leaves every other field and global attribute unchanged, and records the old radius and the PCD version in the
historyattribute;writes the result in the input’s netCDF format.
Unless --output names a file, the output goes in the given directory (by
default the current one) and is named after the input with its 6- or
8-digit date stamp replaced by an 8-digit YYYYMMDD one (today’s unless
--date is given). A cice. prefix becomes mpassi..
./utils/mpas/convert_ic_to_pcd_radius.py \
-i /path/to/inputdata/ocn/mpas-o/oQU240wLI/ocean.QU.240wLI.230220.nc \
-o /path/to/output/
writes /path/to/output/ocean.QU.240wLI.<YYYYMMDD>.nc.
To use a converted file in E3SM, update the date in the component’s
buildnml (ic_date for MPAS-Ocean, grid_date for MPAS-Seaice) and, for
renamed sea-ice files, grid_prefix.