-
Notifications
You must be signed in to change notification settings - Fork 0
Creating new resolutions for MOM6 and CICE6 and new ICs for CICE6
In UFS, MOM6 and CICE6 always have the same grid, so implementing a new resolution requires the generation of both CICE6 and MOM6 files. In general, three steps are required implement a new resolution for the MOM6 and CICE components of ufs-weather-model.
Note: While the repo and files are referred to here as CICE5, they also apply to CICE6.
- Using the MOM6 supergrid file for the desired grid, create the CICE6 grid files and a file containing a complete description of the MOM6 tripole grid at the desired resolution.
- Using the tripole grid file created in Step 1, generate the regridding weights from source to destination grid and the mesh file for the CICE6 grid.
- Using the regridding weights generated in Step 2, generate the new CICE6 ICs at the desired resolution.
- 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 the existing 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 we have the CICE ICs at 1/4 deg, it is more direct to simply use that resolution to create lower resolution ICs for CICE.
-
Clone the GridGen repo. This repo contains fortran code which reads the required MOM6 supergrid file and produces both the CICE6 grid file as well as a tripole grid file containing information needed to generate the regridding weights.
The two files required from MOM6 are
ocean_hgrid.nc
andocean_mask.nc
. The fileocean_hgrid.nc
will be at twice the resolution of the desired grid. For example, if the desired grid is 1440x1080, the supergrid file will be 2880x2160. -
Edit the source code as required:
- Edit
charstrings.F90
to describe the new resolution you are creating and the source and output directories you will be reading and writing to. - Edit
param.F90
to set the desired grid size. - Edit the
Makefile
to create an ifdef for your new resolution.
Compile and run the code. This should result in three files, where mxnew is the name given to the new grid in
charstrings.F90
:-
tripole.mxnew.nc
, containing locations and vertices for each grid stagger in the MOM6 tripole grid -
grid_cice_NEMS_mxnew.nc
, containing the CICE6 grid file used at runtime -
kmtu_cice_NEMS_mxnew.nc
, containing the CICE6 land mask file used at runtime
- Edit
-
Checking the grid file (placeholder)
-
Clone the WeightGen repo. This repo contains NCL routines to create both the mesh file and the regridding weights required for regridding ICs from one resolution to another.
-
To generate a new ice mesh file (used by CMEPS to represent the CICE6 component grid), edit
generate_icemesh.ncl
to use the mxnew character string and the location (dirsrc
) of thetripole.mxnew.nc
file. Run the script. A new mesh filemesh.mxnew.nc
will be generated indirout
. Currently the script is set to loop over several resolutions. The variablecice6res
can be edited to create only the new resolution:;cice6res = (/"mx100", "mx050", "mx025"/) cice6res = (/"mxnew"/)
-
To generate the required weights file, the NCL script
generate_iceocn_weights.ncl
will need to be edited. This script performs multiple functions. It generates the weights for tripole-to-tripole regridding as well as the weights needed for tripole-to- rectilinear regridding (this is used in post-processing).For tripole-to-tripole regridding, the weights can be generated using the settings:
generate_srcgrid_SCRIP_files = True generate_dstgrid_SCRIP_files = False generate_unstagger_weights = False generate_restagger_weights = False generate_tripole_rect_weights = False ; if set True, requires that the mx025 SCRIP file has been generated generate_tripole_tripole_weights = True
This will turn off the generation of various tripole-to-rectilinear weights generation steps that are specific to post-processing.
The tripole-to-tripole regridding assumes that the starting grid resolution (i.e, the grid resolution for which you have existing ICs) is 1/4 deg as explained in the introduction. This requires that a SCRIP file for the 1/4 deg resolution exists. If the file
Ct.mx025_SCRIP.nc
does not exist, then you will first need to generate this file before generating the weights file for the tripole- to-tripole regridding.To generate the needed file at 1/4 deg, first run the script at resolution
mx025
by settingcres=mx025
. Edit the script to use the location wheretripole.mx025.nc
file resides. Run the script. Four files will be generated in the output locationdirout
. These are the SCRIP files for themx025
resolution at each stagger location.The file required for tripole-to-tripole regridding is
Ct.mx025_SCRIP.nc
. Once this file exists, edit the script and setcres=mxnew
. Rerun the script. The 4 SCRIP files for themxnew
resolution will be created and a file containing the regrid weightstripole.mx025.Ct.to.mxnew.Ct.nearestod.nc
will be created in the specified output location.
-
Clone the CICE5_ICgen repo. This repo contains NCL scripts to regrid from 1/4 deg to a lower resolution using the weights file generated above.
-
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 resolutionmxnew
, and the weights filetripole.mx025.Ct.to.mxnew.Ct.nearestod.nc
.To create a new resolution IC for use in the ufs-weather-model regression testing, edit the script to use the
RT IC
location as the source of the initial condition. Specify the date used in regression testing (2016-10-03). Specify the two character strings needed to describe the new resolution (output
) and grid dimensions (outsiz
). Edit the path to the IC file (f025
).To create new ICs for multiple dates (using the Prototype initial conditions), edit the script to use
CPC reanalysis
location. Specify the date desired and set the the two character strings needed to describe the new resolution (output
) and grid dimensions (outsiz
). Edit the path to the IC file (f025
).Run the script. The new IC file will be created in the location specified by
outdir
. -
To create a set of new ICs for multiple dates, batch processing can be done either inside of NCL, or you can call NCL from a script.
You can see an explanation of how to call NCL from a script here. To loop over the dates and directories inside of NCL itself, the script
batch_sis2_cice5.ncl
can be used as an example. -
Examining the IC files created (placeholder)