Skip to article frontmatterSkip to article content

Run

Running MPAS on NSF NCAR Derecho

As in Build, we are on Derecho.

Global

We will use the quasi-uniform 240-km mesh (10242 cells), as in the official virtual tutorial (Section 1.3).

Run directory

First we build out our run directory.

cd $SCRATCH
mkdir mpas-global-240km
cd $_

ln -s /glade/campaign/mmm/wmr/mpas_tutorial/meshes/x1.10242.grid.nc .

ln -s /glade/campaign/mmm/wmr/mpas_tutorial/meshes/x1.10242.graph.info.part.32 .
ln -s ~/MPAS-Model_v8.3/init_atmosphere_model .
cp ~/MPAS-Model_v8.3/namelist.init_atmosphere .
cp ~/MPAS-Model_v8.3/streams.init_atmosphere .

ln -s /glade/campaign/mmm/wmr/mpas_tutorial/meshes/x1.10242.graph.info.part.128 .
ln -s ~/MPAS-Model_v8.3/atmosphere_model .
cp ~/MPAS-Model_v8.3/namelist.atmosphere .
cp ~/MPAS-Model_v8.3/streams.atmosphere .
cp ~/MPAS-Model_v8.3/stream_list.atmosphere.* .
ln -s ~/MPAS-Model_v8.3/src/core_atmosphere/physics/physics_wrf/files/* .

Static file

Now we edit the init_atmosphere config files to set up for generating the static file.

Update namelist.init_atmosphere with these settings:

Table 1:namelist.init_atmosphere settings for static file creation for the global example

parameter [1]value
nhyd_model.config_init_case7 [2]
data_sources.geog_data_path'/glade/work/wrfhelp/WPS_GEOG/' [3]
preproc_stages.config_static_interptrue
preproc_stages.config_native_gwd_statictrue
preproc_stages.config_native_gwd_gsl_staticfalse
preproc_stages.config_vertical_gridfalse
preproc_stages.config_met_interpfalse
preproc_stages.config_input_sstfalse
preproc_stages.config_frac_seaicefalse
decomposition.config_block_decomp_file_prefix'x1.10242.graph.info.part.'

Then, in streams.init_atmosphere, set the input file name template to x1.10242.grid.nc, and the output file name template to x1.10242.static.nc.

Create a job script to run the model initialization program.

init_real.pbs
#!/usr/bin/env bash
# Based on /glade/campaign/mmm/wmr/mpas_tutorial/job_scripts/init_real.pbs

#
# For more information on submitting jobs to Derecho, see this documentation:
# https://ncar-hpc-docs.readthedocs.io/en/latest/pbs/job-scripts/
#

#--- Give our job a reasonable name
#PBS -N init_real

#--- Run in the main queue
#PBS -q main
#PBS -l job_priority=regular

#--- Set the project under which the job will run
#PBS -A UTAM0025

#--- Specify wallclock limit and resources
#PBS -l walltime=00:30:00
#PBS -l select=1:ncpus=128:mpiprocs=32:mem=235gb

source ~/mpas-modules-intel.sh

mpiexec ./init_atmosphere_model

Submit the job.

qsub init_real.pbs
Contingency

Try switching from the main to the develop queue. If that doesn’t help, copy the static file from Kelly.

cp /glade/derecho/scratch/knocasio/mpas-global240km/x1.10242.static.nc .

Initial conditions

20 September 2017, 00 UTC, the day when Hurricane Maria made landfall in Puerto Rico.

First we need WPS intermediate files.

The era5_to_int tool can be used to create intermediate files from the NSF NCAR RDA ERA5 netCDF files on GLADE. But here, to simplify things, we will use an intermediate file that we have already created.

ln -s /glade/u/home/zmoon/mpas-tutorial/global/FILE:2017-09-20_00 .

Update namelist.init_atmosphere with these settings:

Table 2:namelist.init_atmosphere settings for initial conditions for the global example

parametervalue
nhyd_model.config_init_case7
nhyd_model.config_start_time'2017-09-20_00:00:00'
data_sources.config_met_prefix'FILE'
preproc_stages.config_static_interpfalse
preproc_stages.config_native_gwd_staticfalse
preproc_stages.config_native_gwd_gsl_staticfalse
preproc_stages.config_vertical_gridtrue [4]
preproc_stages.config_met_interptrue
preproc_stages.config_input_sstfalse
preproc_stages.config_frac_seaicetrue
decomposition.config_block_decomp_file_prefix'x1.10242.graph.info.part.'

Then, in streams.init_atmosphere, set the input file name template to x1.10242.static.nc (the static file we just created), and the output file name template to x1.10242.init.nc.

Submit the job (same one we used to create the static file):

qsub init_real.pbs
Contingency

Try switching from the main to the develop queue. If that doesn’t help, copy the init file from Kelly.

cp /glade/derecho/scratch/knocasio/mpas-global240km/x1.10242.init.nc .

Run the model

Update namelist.atmosphere with these settings:

Table 3:namelist.atmosphere settings for the global example

parametervalue
nhyd_model.config_dt1200.0
nhyd_model.config_start_time'2017-09-20_00:00:00'
nhyd_model.config_run_duration'3_00:00:00'
physics.config_radtlw_interval'01:00:00'
physics.config_radtsw_interval'01:00:00'
decomposition.config_block_decomp_file_prefix'x1.10242.graph.info.part.'

Then, in streams.atmosphere, set the input file name template to x1.10242.init.nc (the initial conditions file we just created).

Create a job script to run the model.

run_model.pbs
#!/usr/bin/env bash
# Based on /glade/campaign/mmm/wmr/mpas_tutorial/job_scripts/run_model.pbs

#
# For more information on submitting jobs to Derecho, see this documentation:
# https://ncar-hpc-docs.readthedocs.io/en/latest/pbs/job-scripts/
#

#--- Give our job a reasonable name
#PBS -N run_model

#--- Run in the main queue
#PBS -q main
#PBS -l job_priority=regular

#--- Set the project under which the job will run
#PBS -A UTAM0025

#--- Specify wallclock limit and resources
#PBS -l walltime=00:30:00
#PBS -l select=1:ncpus=128:mpiprocs=128:mem=235gb

source ~/mpas-modules-intel.sh

mpiexec ./atmosphere_model

Submit the job.

qsub run_model.pbs

The main model log is log.atmosphere.0000.out. To follow the updates:

tail -f log.atmosphere.0000.out

A successful run will produce various model output files:

Regional

We will use the limited-area domain as in:

created by rotating, moving, and cropping the x5.8060930 global 15–3-km elliptical refinement mesh. It has 6092549 cells (~6M; ~600x the global example).

Made with GeoVista.

Made with GeoVista.

Run directory

First we need to generate the tables for the Thompson microphysics scheme. As when we built the model, we can use an interactive job.

qsub -I -l walltime=3600 -l select=1:ncpus=2:mem=16gb -A UTAM0025 -q develop
source ~/mpas-modules-intel.sh

cd ~/MPAS-Model_v8.3

./build_tables

mv MP_THOMPSON_* src/core_atmosphere/physics/physics_wrf/files/
ln -s src/core_atmosphere/physics/physics_wrf/files/MP_THOMPSON_* .

exit

As before, we first build out our run directory. We use the same MPAS-Model directory, but copy a different mesh.

cd $SCRATCH
mkdir mpas-africa
cd $_

ln -s /glade/u/home/zmoon/mpas-tutorial/africa/Africa.static.nc .

ln -s /glade/u/home/zmoon/mpas-tutorial/africa/Africa.graph.info.part.240 .
ln -s ~/MPAS-Model_v8.3/init_atmosphere_model .
cp ~/MPAS-Model_v8.3/namelist.init_atmosphere .
cp ~/MPAS-Model_v8.3/streams.init_atmosphere .

ln -s /glade/u/home/zmoon/mpas-tutorial/africa/Africa.graph.info.part.5400 .
ln -s ~/MPAS-Model_v8.3/atmosphere_model .
cp ~/MPAS-Model_v8.3/namelist.atmosphere .
cp ~/MPAS-Model_v8.3/streams.atmosphere .
cp ~/MPAS-Model_v8.3/stream_list.atmosphere.* .
ln -s ~/MPAS-Model_v8.3/src/core_atmosphere/physics/physics_wrf/files/* .

Note that we link a regional static file instead of a grid file (we’re skipping static file creation in this example). See Section 5.1 of the official virtual tutorial for some guidance on creating regional static files.

Initial conditions

12 September 2017, 00 UTC, the day when the AEW that would become Hurricane Maria left the African coast.

As in the global example, we will link the needed WPS intermediate file (and those we need for the LBCs as well).

ln -s /glade/derecho/scratch/zmoon/mpas-africa/FILE:* .

Update namelist.init_atmosphere with these settings:

Table 4:namelist.init_atmosphere settings for initial conditions for the regional example

parametervalue
nhyd_model.config_init_case7
nhyd_model.config_start_time'2017-09-12_00:00:00' [5]
data_sources.config_met_prefix'FILE'
data_sources.config_noahmp_staticfalse [6]
preproc_stages.config_static_interpfalse
preproc_stages.config_native_gwd_staticfalse
preproc_stages.config_native_gwd_gsl_staticfalse
preproc_stages.config_vertical_gridtrue
preproc_stages.config_met_interptrue
preproc_stages.config_input_sstfalse
preproc_stages.config_frac_seaicetrue
decomposition.config_block_decomp_file_prefix'Africa.graph.info.part.'

Then, in streams.init_atmosphere, set the input file name template to Africa.static.nc and the output file name template to Africa.init.nc.

Create a job script to run the model initialization program.

init.pbs
#!/usr/bin/env bash
#PBS -N init
#PBS -q main
#PBS -l job_priority=regular
#PBS -A UTAM0025
#PBS -l walltime=01:30:00
#PBS -l select=2:ncpus=128:mpiprocs=120:mem=235gb

source ~/mpas-modules-intel.sh

mpiexec ./init_atmosphere_model

Submit the job.

qsub init.pbs
Contingency

Try switching from the main to the develop queue. If that doesn’t help, link the init file from Kelly.

ln -s /glade/derecho/scratch/knocasio/mpas-africa/Africa.init.nc .

Boundary conditions

Update namelist.init_atmosphere with these settings:

Table 5:namelist.init_atmosphere settings for LBC generation for the regional example

parametervalue
nhyd_model.config_init_case9
nhyd_model.config_start_time'2017-09-12_00:00:00'
nhyd_model.config_stop_time'2017-09-13_12:00:00'
data_sources.config_met_prefix'FILE'
data_sources.config_fg_interval3600 (seconds)
preproc_stages.config_static_interpfalse
preproc_stages.config_native_gwd_staticfalse
preproc_stages.config_native_gwd_gsl_staticfalse
preproc_stages.config_vertical_gridtrue
preproc_stages.config_met_interptrue
preproc_stages.config_input_sstfalse
preproc_stages.config_frac_seaicetrue
decomposition.config_block_decomp_file_prefix'Africa.graph.info.part.'

👆 Compared to Table 4, the differences are that now we are using init case 9, and we need to set a stop time.

Then, in streams.init_atmosphere, set the input file name template to Africa.init.nc, the output file name template to foo.nc (unused, but it can’t be the same as others), and the LBC output interval to 1:00:00 (hourly; consistent with our config_fg_interval).

Submit the job (same one we used to create the initial conditions):

qsub init.pbs

We will again skip creating surface update files.

Contingency

Try switching from the main to the develop queue. If that doesn’t help, link the LBC files from Kelly.

ln -s /glade/derecho/scratch/knocasio/mpas-africa/lbc.*.nc .

Run the model

Update namelist.atmosphere with these settings:

Table 6:namelist.atmosphere settings for the regional example

parametervalue
nhyd_model.config_dt13.0
nhyd_model.config_start_time'2017-09-12_00:00:00'
nhyd_model.config_run_duration'1_12:00:00'
nhyd_model.config_len_disp3000.0 (meters) [7]
limited_area.config_apply_lbcstrue
physics.config_radtlw_interval'00:30:00'
physics.config_radtsw_interval'00:30:00'
physics.config_physics_suite'convection_permitting'
decomposition.config_block_decomp_file_prefix'Africa.graph.info.part.'

👆 Note that we have set a much smaller time step than in the coarse global example, we turn on application of LBCs, we use the default RT interval, and we have selected the convection-permitting physics suite.

Then, in streams.atmosphere

Finally, in stream_list.atmosphere.diagnostics, replace the contents with

stream_list.atmosphere.diagnostics
initial_time
xtime
Time
olrtoa
rainc
rainnc
t_isobaric
uzonal_isobaric
umeridional_isobaric
vorticity_isobaric

Note isobaric diagnostics

👆 In the output diag files, the *_isobaric variables will be on pressure levels, specifically the 27 ERA5 levels from 100 to 1000 hPa.

Create a job script to run the model.

run.pbs
#!/usr/bin/env bash
#PBS -N run
#PBS -q main
#PBS -l job_priority=regular
#PBS -A UTAM0025
#PBS -l walltime=12:00:00
#PBS -l select=45:ncpus=128:mpiprocs=120:mem=235gb

source ~/mpas-modules-intel.sh

mpiexec ./atmosphere_model

👆 Note that the product of the number of nodes (select) and the number of MPI processes per node (mpiprocs) matches our second partition file.

Submit the job.

qsub run.pbs
Footnotes
  1. See Section 7.2 (“Creating real-data ICs”) and Appendix A (“Initialization Namelist Options”) in the user guide for more information about these parameters.

  2. Case 7 is the “real-data initialization” case.

  3. Another geog data path option is /glade/campaign/mmm/wmr/mpas_tutorial/mpas_static/.

  4. We will use the model’s default vertical grid, but note it can be adjusted using the vertical_grid section.

  5. We don’t need to set stop time (nhyd_model.config_stop_time) yet, but we will when we generate LBCs.

  6. Our static file was created with v8.0, before the Noah-MP land model was added to MPAS-A (v8.2), so we have to disable collecting input fields for Noah-MP.

    This is a hidden option; add it to the end of its section (data_sources).

  7. Horizontal length scale for Smagorinsky diffusion (meters). We have to set it because nominalMinDc is 0 in our static file.

    This is a hidden option; add it to the end of its section (nhyd_model).

References
  1. Núñez Ocasio, K. M., Davis, C. A., Moon, Z. L., & Lawton, Q. A. (2024). Moisture Dependence of an African Easterly Wave Within the West African Monsoon System. Journal of Advances in Modeling Earth Systems, 16(6). 10.1029/2023ms004070
  2. Núñez Ocasio, K. M., & Dougherty, E. M. (2024). The Effect of Pseudo-Global Warming on the Weather-Climate System of Africa in a Convection-Permitting Model. Geophysical Research Letters, 51(24). 10.1029/2024gl112341
  3. Núñez Ocasio, K. M., Dougherty, E. M., Moon, Z. L., & Davis, C. A. (2025). Response of African Easterly Waves to a Warming Climate: A Convection‐Permitting Approach. Journal of Advances in Modeling Earth Systems, 17(10). 10.1029/2025ms005146
  4. Núñez Ocasio, K. M., Dougherty, E., & Moon, Z. (2025). Mesoscale Convective Systems in Africa and the Atlantic Ocean Under a Km-Scale Future Climate Scenario. ESS Open Archive. 10.22541/essoar.174547944.43729039/v1