Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Scripts are available at /global/cfs/cdirs/e3sm/www/Tutorials/2024/scripts/mpas-analysis-practicum. Copy the available scripts to your local directory (from which you will run the scripts) on perlmutter. Open a blank document either on perlmutter or your computer to answer the questions.

Exercise 1

Goal: Run a short MPAS-Analysis over existing data. Learn to check job status, find and interpret analysis plots. Troubleshoot if necessary.

Files have been prepared to give you a good starting point.

...

Goal: Rerun MPAS-Analysis with a modified config file. Learn to add analysis tasks, find the post-processed output files. Learn to troubleshoot (find and logs).

We suggest a few changes that still allow the analysis to run quickly.

Expand
titleExercise 2 instructions
  • copy the template.mpas_analysis_short.cfg into a new config file my_exercise2.cfg

  • modify the output directories (both the baseDirectory and htmlDirectory)

  • make one or two modifications in the tasks. We suggest:

    • changing the year range in either climatology, timeseries, or both. (note that the available range is 2000-2014, go beyond that at your own peril!)

    • adding tasks, such as indexNino34, climatologyMapSchmidtko, or streamfunctionMOC to the execute line.

You can find the list of tasks by running mpas_analysis --list in the terminal window (provided the e3sm-unified environment has been loaded). Some tasks are more time-consuming (e.g. regional profiles, regional time series) and will not be able to run within this 1hr tutorial. If attempting more time-consuming tasks, make sure to update the wall time and/or nodes in your job script (e.g. --time in job_script_template.cfg).

  • modify the mpas-analysis command in job_script_template.slurm to point to your my_exercise2.cfg. Submit by running sbatch job_script_template.slurm.

  • Once the job is done, open the html directory in your browser.

Option 1: if the page does not exist, or is empty, double-check that the html path is consistent with your config file, then proceed to the Troubleshooting section.

Option 2: if the page exists and the plots are present, congratulations! Navigate the available plots and answer the following questions.

Q3.a. What additional plots are present? Note any additional features or differences compared to Q2.b.

  • Beyond the plots produced, the post-processed output is available for your own analysis. In the terminal window, navigate to the analysis directory (the path is specified in your [output]/baseDirectory) and locate some example output files (.nc files):

Q3.b. Find the post-processed seasonal climatology of the ocean mixed layer depth in January-February-March. What is the full path to the relevant netcdf file?

Q3.c. If you included the MOC task, find the longest post-processed timeseries of the meridional overturning circulation (“moc”). What is the full path to the relevant netcdf file?

  • If you have not encountered any technical issues, take time to go through the Troubleshooting section to familiarize yourself with logs.

Exercise 3

...

(optional)

Goal: Examine a more comprehensive analysis (standard or polar options). Learn to find and compare config files.

This exercise does not require compute time; it can be done while waiting for Ex1 and Ex2 simulations, or at your leisure any time.

Expand
titleExercise 3 instructions
  • Choose between the 2 options below, and open the relevant link.

Option 1: standard MPAS-Analysis output

Option2: enhanced output with polar focus

Q4.a First, identify the simulation and period(s) analyzed. What additional plots are present (compared to Exercises 1-2 above)? Are there any that are missing?

Q4.b Find the .cfg file. (hint: check the html landing page). What are the main differences between this config file and the ones you used in the previous exercises? (you can use vimdiff if you have local copies of both scripts).

Q4.c Which lines would you modify to reproduce this analysis for the run provided in this tutorial? Do you expect to modify other files? (hint: consider why we are not running this analysis now)

Exercise 4 (

...

optional)

Goal: Examine an existing model-to-model comparison. Learn to find the complete config files and extra options.

This exercise does not require compute time, so it can be done while waiting for Ex1 and Ex2 simulations, or at your leisure any time.

Expand
titleExercise 4 instructions

Q4.a First, identify the simulation(s) and period(s) analyzed. What are the main differences between these plots and the ones shown previously?

Q4.b Find the .cfg file. (hint: check the html landing page). What are the main differences between this config file and the ones you used in the previous exercises? (you can use vimdiff if you have local copies of both scripts).

Q4.c Find the complete .cfg file. (hint: check the html landing page). In the plots provided, the primary simulation is plotted in black, and the control simulation is plotted in red. Which lines would you modify to switch the color of the control to black, and the primary simulation result to red?

Troubleshooting: when things go wrong…

Expand
titleTroubleshooting instructions
  •  Is the html path correct?
  •  Was the job submitted?

If an error occurred at submission, double-check the options and commands in the job_script. Note the job ID if it got successfully submitted.

  •  Did the job finish successfully?

You can check the job history and status by running the command

Code Block
sacct --starttime 2024-05-08 --format=User,JobID,Jobname,partition,state,time,start,end,elapsed,nnodes

Check the mpas_analysis.o<jobID> file for any runtime information. If it exists, check the mpas_analysis.e<jobID> file for any error information.

  •  Check the logs in baseDirectory/logs

Each task has produced a log. The taskProgress.log shows the progress through the tasks.

In the log directory, you can search quickly for an error by running the command

Code Block
 grep -i error *.log
  •  You can rerun the job with options (e.g. mpas-analysis --purge --verbose my_config.cfg) to provide additional log information.

...