@@ -7,33 +7,111 @@ subtitle: Running MPAS on NSF NCAR Derecho
77
88We will use the quasi-uniform 240-km mesh (10242 cells),
99as in the [ official virtual tutorial] ( https://www2.mmm.ucar.edu/projects/mpas/tutorial/Virtual2025/ )
10- (section 1.3).
10+ (Section 1.3).
11+
12+ ## Run directory
1113
1214First we build out our run directory.
1315
1416``` {code} bash
1517cd $SCRATCH
1618mkdir mpas-global-240km
1719cd $_
20+
1821ln -s /glade/campaign/mmm/wmr/mpas_tutorial/meshes/x1.10242.grid.nc .
19- ln -s /glade/campaign/mmm/wmr/mpas_tutorial/meshes/x1.10242.graph.info.part.16 .
20- cp /glade/campaign/mmm/wmr/mpas_tutorial/job_scripts/init_real.pbs .
22+
23+ ln -s /glade/campaign/mmm/wmr/mpas_tutorial/meshes/x1.10242.graph.info.part.32 .
24+ ln -s ~/MPAS-Model_v8.3/init_atmosphere_model .
25+ cp ~/MPAS-Model_v8.3/namelist.init_atmosphere .
26+ cp ~/MPAS-Model_v8.3/streams.init_atmosphere .
27+
28+ ln -s /glade/campaign/mmm/wmr/mpas_tutorial/meshes/x1.10242.graph.info.part.128 .
29+ ln -s ~/MPAS-Model_v8.3/atmosphere_model .
30+ cp ~/MPAS-Model_v8.3/namelist.atmosphere .
31+ cp ~/MPAS-Model_v8.3/streams.atmosphere .
32+ cp ~/MPAS-Model_v8.3/stream_list.atmosphere.*
33+ cp ~/MPAS-Model_v8.3/src/core_atmosphere/physics/physics_wrf/files/* .
2134```
2235
23- TODO: above job script is for GNU, gotta update
36+ ## Static file
37+
38+ Now we edit the ` init_atmosphere ` config files to set up for generating the static file.
39+
40+ Update ` namelist.init_atmosphere ` with these settings:
41+
42+ | parameter | value |
43+ | ----------------------------------------------- | ---------------------------------------- |
44+ | ` nhyd_model.config_init_case ` | ` 7 ` [ ^ init-case7 ] |
45+ | ` data_sources.geog_data_path ` | ` '/glade/work/wrfhelp/WPS_GEOG/' ` [ ^ gdp ] |
46+ | ` preproc_stages.config_static_interp ` | ` true ` |
47+ | ` preproc_stages.config_native_gwd_static ` | ` true ` |
48+ | ` preproc_stages.config_native_gwd_gsl_static ` | ` false ` |
49+ | ` preproc_stages.config_vertical_grid ` | ` false ` |
50+ | ` preproc_stages.config_met_interp ` | ` false ` |
51+ | ` preproc_stages.config_input_sst ` | ` false ` |
52+ | ` preproc_stages.config_frac_seaice ` | ` false ` |
53+ | ` decomposition.config_block_decomp_file_prefix ` | ` 'x1.10242.graph.info.part.' ` |
54+
55+ [ ^ init-case7 ] : Case 7 is the "real-data initialization" case.
56+
57+ [ ^ gdp ] : Another geog data path option is ` /glade/campaign/mmm/wmr/mpas_tutorial/mpas_static/ ` .
58+
59+ Then, in ` streams.init_atmosphere ` , set the input file name template to ` x1.10242.grid.nc ` ,
60+ and the output file name template to ` x1.10242.static.nc ` .
61+
62+ Create a job script to run the model initialization program.
63+
64+ ``` {code} bash
65+ :filename: init_real.pbs
66+
67+ #!/usr/bin/env bash
68+ # Based on /glade/campaign/mmm/wmr/mpas_tutorial/job_scripts/init_real.pbs
69+
70+ #
71+ # For more information on submitting jobs to Derecho, see this documentation:
72+ # https://ncar-hpc-docs.readthedocs.io/en/latest/pbs/job-scripts/
73+ #
74+
75+ #--- Give our job a reasonable name
76+ #PBS -N init_real
77+
78+ #--- Run in the main queue
79+ #PBS -q main
80+ #PBS -l job_priority=regular
81+
82+ #--- Set the project under which the job will run
83+ #PBS -A UTAM0025
84+
85+ #--- Specify wallclock limit and resources
86+ #PBS -l walltime=00:30:00
87+ #PBS -l select=1:ncpus=128:mpiprocs=32:mem=235gb
88+
89+ source ~/mpas-modules-intel.sh
90+
91+ mpiexec ./init_atmosphere_model
92+ ```
93+
94+ Submit the job.
2495
2596``` bash
26- qsub init_real.pbs -A UTAM0025
97+ qsub init_real.pbs
2798```
2899
29100:::{tip}
101+ :open: false
30102
31- Get info about running jobs.
103+ Get info about your running jobs:
32104
33105``` bash
34106qstat -u $USER
35107```
36108
109+ Watch it:
110+
111+ ``` bash
112+ watch -n1 qstat -u $USER
113+ ```
114+
37115See more:
38116
39117``` bash
@@ -42,16 +120,142 @@ qstat -u $USER -f -w
42120
43121:::
44122
123+ ## Initial conditions
124+
125+ ** 20 September 2017, 00 UTC** , the day when Hurricane Maria made landfall in Puerto Rico.
126+
127+ First we need [ WPS intermediate files] ( https://www2.mmm.ucar.edu/wrf/OnLineTutorial/Basics/IM_files/ ) .
128+
129+ The [ era5_to_int] ( https://github.com/NCAR/era5_to_int ) tool
130+ can be used to create intermediate files from the NSF NCAR RDA ERA5 netCDF files on GLADE.
131+ But here, to simplify things, we will use an intermediate file that we have already created.
132+
133+ ``` bash
134+ ln -s /glade/u/home/zmoon/mpas-tutorial/FILE:2017-09-20_00 .
135+ ```
136+
137+ :::{tip}
138+ :open: false
139+
140+ You can see what's inside an intermediate file using the ` rd_intermediate ` tool from WPS.
141+ On Derecho, this tool is available at
142+
143+ ```
144+ /glade/u/home/wrfhelp/derecho_pre_compiled_code/wpsv4.5/util/rd_intermediate.exe
145+ ```
146+
147+ (and for other WPS versions as well).
148+ :::
149+
150+ Update ` namelist.init_atmosphere ` with these settings:
151+
152+ | parameter | value |
153+ | ----------------------------------------------- | ----------------------------- |
154+ | ` nhyd_model.config_init_case ` | ` 7 ` |
155+ | ` nhyd_model.config_start_time ` | ` '2017-09-20_00:00:00' ` |
156+ | ` data_sources.config_met_prefix ` | ` 'FILE' ` |
157+ | ` preproc_stages.config_static_interp ` | ` false ` |
158+ | ` preproc_stages.config_native_gwd_static ` | ` false ` |
159+ | ` preproc_stages.config_native_gwd_gsl_static ` | ` false ` |
160+ | ` preproc_stages.config_vertical_grid ` | ` true ` |
161+ | ` preproc_stages.config_met_interp ` | ` true ` |
162+ | ` preproc_stages.config_input_sst ` | ` false ` |
163+ | ` preproc_stages.config_frac_seaice ` | ` true ` |
164+ | ` decomposition.config_block_decomp_file_prefix ` | ` 'x1.10242.graph.info.part.' ` |
165+
166+ Then, in ` streams.init_atmosphere ` , set the input file name template to ` x1.10242.static.nc `
167+ (the static file we just created),
168+ and the output file name template to ` x1.10242.init.nc ` .
169+
170+ Submit the job.
171+
172+ ``` bash
173+ qsub init_real.pbs
174+ ```
175+
176+ ``` {note}
177+ For simulations longer than a few days,
178+ you would likely want to also create SST and sea-ice update files.
179+ This uses init case 8, the "surface field initialization" case.
180+ See Section 3.2 in the [official virtual tutorial](https://www2.mmm.ucar.edu/projects/mpas/tutorial/Virtual2025/).
181+ ```
182+
183+ ## Run the model
184+
185+ Update ` namelist.atmosphere ` with these settings:
186+
187+ | parameter | value |
188+ | ----------------------------------------------- | ----------------------------- |
189+ | ` nhyd_model.config_dt ` | ` 1200.0 ` |
190+ | ` nhyd_model.config_start_time ` | ` '2017-09-20_00:00:00' ` |
191+ | ` nhyd_model.config_run_duration ` | ` '3_00:00:00' ` |
192+ | ` nhyd_model.config_radtlw_interval ` | ` '01:00:00' ` |
193+ | ` nhyd_model.config_radtsw_interval ` | ` '01:00:00' ` |
194+ | ` decomposition.config_block_decomp_file_prefix ` | ` 'x1.10242.graph.info.part.' ` |
195+
196+ Then, in ` streams.atmosphere ` , set the input file name template to ` x1.10242.init.nc `
197+ (the initial conditions file we just created).
198+
199+ Create a job script to run the model.
200+
201+ ``` {code} bash
202+ :filename: run_model.pbs
203+
204+ #!/usr/bin/env bash
205+ # Based on /glade/campaign/mmm/wmr/mpas_tutorial/job_scripts/run_model.pbs
206+
207+ #
208+ # For more information on submitting jobs to Derecho, see this documentation:
209+ # https://ncar-hpc-docs.readthedocs.io/en/latest/pbs/job-scripts/
210+ #
211+
212+ #--- Give our job a reasonable name
213+ #PBS -N run_model
214+
215+ #--- Run in the main queue
216+ #PBS -q main
217+ #PBS -l job_priority=regular
218+
219+ #--- Set the project under which the job will run
220+ #PBS -A UTAM0025
221+
222+ #--- Specify wallclock limit and resources
223+ #PBS -l walltime=00:30:00
224+ #PBS -l select=1:ncpus=128:mpiprocs=128:mem=235gb
225+
226+ source ~/mpas-modules-intel.sh
227+
228+ mpiexec ./atmosphere_model
229+ ```
230+
231+ Submit the job.
232+
233+ ``` bash
234+ qsub run_model.pbs
235+ ```
236+
237+ The main model log is ` log.atmosphere.0000.out ` .
238+ To follow the updates:
239+
240+ ``` bash
241+ tail -f log.atmosphere.0000.out
242+ ```
243+
244+ A successful run will produce various model output files:
245+
246+ - ` diag.*.nc ` (mostly 2-d diagnostic fields; specified in ` stream_list.atmosphere.diagnostics ` )
247+ - ` history.*.nc ` (2- and 3-d prognostic and diagnostic fields; specified in ` stream_list.atmosphere.output ` )
248+ - ` restart.*.nc ` (checkpoints of the model state that we can use for a warm start)
249+
45250# Regional
46251
47252We will use the limited-area domain as in:
48253
49254- https://doi.org/10.1029/2023MS004070
50255- https://doi.org/10.1029/2024GL112341
51- - https://doi.org/10.22541/essoar.174547926.68665522/v1
256+ - https://doi.org/10.1029/2025MS005146
52257- https://doi.org/10.22541/essoar.174547944.43729039/v1
53- - https://github.com/knubez/MPAS-Model/tree/isolevels-v8
54258
55- created by rotating, moving, and cropping the ` x5.8060930 ` global 15-- 3-km elliptical refinement mesh.
259+ created by rotating, moving, and cropping the ` x5.8060930 ` global 15– 3-km elliptical refinement mesh.
56260
57- ## Creating LBCs
261+ ## Boundary conditions
0 commit comments