Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Basic CrocoDash Tutorial: Ocean + Waves + Sea Ice

Set up a regional MOM6 run coupled to the WW3 wave model and CICE sea ice model.

What’s different from the ocean-wave tutorial:

  1. Compset: GWR_JRA instead of CWR_JRA, which adds CICE.

  2. Sea Ice Outflow conditions

  3. Sea Ice initial and boundary conditions

Recall that a typical workflow of utilizing CrocoDash consists of four main steps:

  1. Generate a regional MOM6 domain.

  2. Create the CESM case.

  3. Prepare forcing data.

  4. Build and run the case.

The first step in running CrocoDash is installing it! Please go to https://crocodile-cesm.github.io/CrocoDash/latest/installation.html to install CrocoDash!

SECTION 1: Generate a regional MOM6 domain

We begin by defining a regional MOM6 domain using CrocoDash. To do so, we first generate a horizontal grid. We then generate the topography by remapping an existing bathymetric dataset to our horizontal grid. Finally, we define a vertical grid.

Step 1.1: Horizontal Grid

📖 Grid documentation

Step 1.2: Topography

Step 1.3: Vertical Grid

📖 Grid documentation

SECTION 2: Create the CESM case

After generating the MOM6 domain, the next step is to create a CESM case using CrocoDash. This process is straightforward and involves instantiating the CrocoDash Case object. The Case object requires the following inputs:

  • CESM Source Directory: A local path to a compatible CESM source copy. For the workshop, this is the CESM/ folder of your CROCODILEworkspace install.

  • Case Name: A unique name for the CESM case. For the workshop, cases go in the croc_cases/ folder of your CROCODILEworkspace install, in a folder named after the case.

  • Input Directory: The directory where all necessary input files will be written. You don’t need to put anything in it: CrocoDash creates it and fills it with the grid, bathymetry and forcing files automatically. For the workshop, it’s the croc_input/ folder of your CROCODILEworkspace install.

  • MOM6 Domain Objects: The horizontal grid, topography, and vertical grid created in the previous section.

  • Project ID: (Optional) A project ID, if required by the machine. For the workshop, use UCGD0009.

  • Compset: The set of models to be used in the Case. Standalone Ocean, Ocean-BGC, Ocean-Seaice, Ocean-Wave, etc.

If you installed this notebook with CROCODILEworkspace, these paths and the project ID are already filled in for you in the code below.

Step 2.1: Specify case name and directories:

Begin by specifying the case name and the necessary directory paths. Ensure the CESM root directory points to your own local copy of CESM. Below is an example setup:

Step 2.2: Create the Case

To create the CESM case, instantiate the Case object as shown below. This will automatically set up the CESM case based on the provided inputs: The cesmroot argument specifies the path to your local CESM source directory. The caseroot argument defines the directory where the case will be created. CrocoDash will handle all necessary namelist modifications and XML changes to align with the MOM6 domain objects generated earlier. The job_queue and job_wallclock_time arguments set the PBS queue and the walltime (hh:mm:ss) CESM requests when you submit the run; leave them out to use the machine defaults.

📖 Case documentation

Compset quick-reference

The compset argument controls which model components are active.

What you wantChange in compset=
Ocean only (default)compset="CR_JRA"
+ Waves (WW3)compset="CWR_JRA"
+ Sea ice (CICE6)compset="GWR_JRA"
+ Biogeochemistry (MARBL)add %MARBL-BIO to the MOM6 component, e.g. MOM6%REGIONAL%MARBL-BIO
+ Data runoff (GLOFAS)use CWR_JRA_GLOFAS
+ Data runoff (JRA)use CWR_JRA with DROF%JRA (see runoff notebook)

Note that in this notebook, we are switching from "CR_JRA" to "GWR_JRA" to enable WW3 and CICE.

For a deeper dive into each option:

Section 3: Prepare ocean, wave, and sea ice forcing data

We need to cut out our ocean and waves forcing. The package expects an initial condition and one time-dependent segment per non-land boundary. Naming convention is "east_unprocessed" for segments and "ic_unprocessed" for the initial condition.

In this notebook, we are forcing with the Copernicus Marine “Glorys” reanalysis dataset. There’s a function in the CrocoDash package, called configure_forcings, that generates a bash script to download the correct boundary forcing files for your experiment. First, you will need to create an account with Copernicus, and then call copernicusmarine login to set up your login details on your machine. Then you can run the get_glorys_data.sh bash script.

Step 3.1 Configure Initial Conditions and Forcings

📖 Configure forcings docs · Available datasets

Notice above that we add two new arguments, "ww3_obc_product_name" and "ww3_obc_function_name" for wave boundary conditions. Additionally, we add four arguments for sea ice. restore_ice=True together with cice_product_name and cice_function_name turns on CICE boundary restoring; you must give all three or none. The cice_restart product regrids a global CICE restart (restart_path and its grid file grid_path) onto our domain with a one-cell border. That single file is both CICE’s initial condition and the state the boundary cells are restored toward.

Step 3.3: Process forcing data

In this final step, we call the process_forcings method of CrocoDash to cut out and interpolate the initial condition as well as all boundaries. CrocoDash also updates MOM6/WW3 runtime parameters and CESM xml variables accordingly.

Section 4: Build and run the case

After completing the previous steps, you are ready to build and run your CESM case. Begin by navigating to the case root directory specified during the case creation. Before proceeding, review the user_nl_mom file located in the case directory. This file contains MOM6 parameter settings that were automatically generated by CrocoDash. Carefully examine these parameters and make any necessary adjustments to fine-tune the model for your specific requirements. While CrocoDash aims to provide a solid starting point, further tuning and adjustments are typically necessary to improve the model for your use case.

Once you have reviewed and modified the parameters as needed, you can build and execute the case using the following commands. CESM cases must be built and submitted on the machine you passed as machine when creating the Case. For the workshop, that’s Derecho (not Casper), so the commands start by logging in to Derecho and going to the case directory:

ssh derecho
cd <casedir>/bering_ocn_wav_ice.001
qcmd -A <PROJECT> -- ./case.build
./case.submit