Creating Fix and IC files required for the Coupled Model - ufs-community/ufs-weather-model GitHub Wiki

For the UFS coupled model application S2S or S2SW, the following fix files are required:

  • The CICE6 grid and mask file
  • The mesh file for the desired OCN/ICE resolution, which is identical for MOM6 and CICE6.
  • The mapped ocean mask on the FV3 tiles
  • The ESMF regridding weights required to create the CICE6 IC from CPC (SIS2) reanalysis.
  • The ESMF regridding weights required to remap the CICE6 or MOM6 output from tripole grid to a rectilinear grid (optional).

Since MOM6 creates the model grid at runtime (including adjusting the land mask, if required), the required files for CICE and UFSAtm must be created in a pre-processing step using only the MOM6 supergrid, topography and land mask files as input. This allows the mapped ocean mask (used for creating of the ATM ICs) and the CICE6 grid and mask files to be consistent with the run-time configuration of MOM6.

As of Sept 1, 2021, the previous multi-step procedure has been replaced with the process described below.

Generating the grid files

Clone the GridGen repo. The GridGen repository contains a fortran code which

  1. reads the MOM6 supergrid and ocean mask file and optionally creates the required topo_edits file if the land mask for MOM6 is to be changed at runtime.
  2. creates a master grid file containing all stagger locations of the grid fully defined
  3. creates the CICE6 grid variables and writes the required CICE6 grid file
  4. creates a SCRIP file for the center stagger (tracer) grid points and a second SCRIP file also containing the land mask
  5. creates the ESMF conservative regridding weights to map the ocean mask to the FV3 tiles and write the mapped mask to 6 tile files
  6. creates the ESMF regridding weights to map the 1/4 CICE6 restart file to a lower resolution tripole grid
  7. optionally calls a routine to generate ESMF regridding weights to map the tripole grid to a set of rectilinear grids
  8. uses the command line tool ESMF_Scrip2Unstruct to generate the ocean mesh from the SCRIP file containing the land mask (item 4)
  9. uses the NCO command line tool to generate the CICE6 land mask file from the CICE6 grid file

The code requires both ESMF and NCO. To provide the required modules, you can use the same hpc-stack that the coupled model uses.

The script to run the code is run_gridgen.sh. Edit this file to set the path to the MOM6 super-grid and mask file (FIXDIR_PATH), the location of the FV3 mosaic files for the desired resolution (MOSAICDIR_PATH) and an output location (OUTDIR_PATH). To execute the script to create 1/2 deg files, use run_gridgen.sh 050.

The generated files

The exact list of files produced by the run_gridgen.sh script will vary depending on several factors. For example, if the DO_POSTWGHTS is true, then a SCRIP format file will be produced for each rectilinear destination grid desired and a file containing the regridding weights to map from the center (Ct, tracer) stagger point to the rectilinear grid will also be written. If an OCN/ICE grid resolution less than 1/4 degree is chosen, then a file containing regridding weights from the 1/4 degree grid to a lower resolution grid will also be written. Note also that multiple intermediate SCRIP format files may be produced depending on the options chosen.

  • Executing the script for the 1/4 deg OCN/ICE resolution will result in the following files being produced in the output location:
Output files for 1/4 deg
File name Description Function
tripole.mx025.nc master grid file Creating all subsequent grid or mapping files
grid_cice_NEMS_mx025.nc the CICE grid file used at runtime by CICE6
kmtu_cice_NEMS_mx025.nc the CICE mask file used at runtime by CICE6
mesh.mx025.nc the ocean and ice mesh file used at runtime by CICE6, MOM6, and CMEPS
C384.mx025.tile[1-6].nc the mapped ocean mask on the ATM tiles used to create ATM ICs consistent with the fractional grid
  • If the optional post-weights are generated, the following files will be produced in the output location:
Optional post-weights files for 1/4 deg
File name Function
tripole.mx025.[Cu][Cv][Bu].to.Ct.bilinear.nc the ESMF weights for mapping OCN or ICE output fields from the various stagger locations on the tripole grid to the center (Ct) stagger location on the tripole grid using bilinear mapping
tripole.mx025.Ct.to.rect.[destination resolution].[bilinear][conserve].nc the ESMF weights for mapping variables on the center (Ct) stagger location on the tripole grid to a rectilinear grid with destination resolution using either bilinear or conservative mapping
  • If a resolution other than 1/4 degree is used in run_gridgen.sh, the following file will be produced in the output location:
Output files for CICE6 IC creation at tripole destination resolution
File name Function
tripole.mx025.Ct.to.mx[destination resolution].Ct.neareststod.nc the ESMF weights for mapping the 1/4 CICE ICs to a tripole destination resolution using nearest source-to-destination mapping
  • If run-time land mask changes for MOM6 are requested, the following file will be produced in the output location:
Output files for run-time modification of MOM6 land mask
File name Function
ufs.[Default_filename].nc Topo-edits required for UFS application. These are appended to the existing default topo edits file and implemented at run time with the parameter flag ALLOW_LANDMASK_CHANGES=true. All files produced by the run_gridgen.sh will be consistent with this run-time land mask.

Creating the CICE6 IC

  • Note only the 1/4 degree resolution has MOM6 ICs which are generated from an actual MOM6 run. All other MOM6 resolutions use T and S initial conditions (ocean at rest) so no new IC files are required.
  • CICE6 ICs at lower resolutions are generated using CICE6 ICs at 1/4 deg. This is because the source of the CICE6 ICs is either SIS or SIS2 non-coupled runs from either CFSRv2 or CPC reanalysis. The conversion of the SIS/SIS2 restart file to a CICE6 IC file involves many approximations. Once the CICE ICs is created at 1/4 deg, it is more direct to simply use that resolution to create lower resolution ICs for CICE.
  1. Clone the CICE5_ICgen repo. This repo contains NCL scripts to either create the CICE6 IC at 1/4 degree from a CPC SIS2 restart file or, if the CICE6 IC file has been created already, to regrid from 1/4 deg to a lower resolution.
  2. To create a CICE6 restart at 1/4 degree from a CPC SIS2 restart, use the NCL script cpc_ugcs_convert_cice5_025.ncl. Edit the srcdir and dates items to refer to the desired file.
  3. Edit the script cice5_mx025.to.lowres.ncl to customize the locations, date and output resolution required. The script will operate on a single IC file at 1/4 deg resolution and create a new IC file for the same date at the prescribed resolution. It requires the 1/4 degree IC file, the 1/4 deg grid file, the grid file at the new resolution mxnew, and the weights file tripole.mx025.Ct.to.mxnew.Ct.nearestod.nc. All of these files will be available from the run_gridgen.sh script.
⚠️ **GitHub.com Fallback** ⚠️