Background and Prerequisites
If you are not familiar with CESM and running CAM-chem, please go through the following material:
Read the CESM Tutorial coursework and do the exercises: http://www.cesm.ucar.edu/events/tutorials/2019/
Become familiar with CAM-chem by looking through the wiki page: https://wiki.ucar.edu/display/camchem/Home
Read about the Spectral Element dynamical core: https://ncar.github.io/CAM/doc/build/html/cam6_scientific_guide/dynamics.html?highlight=spectral#spectral-element-dynamical-core
See Peter Lauritzen’s lecture on SE at the end of his CESM 2019 Tutorial lecture on Dynamics: http://www.cesm.ucar.edu/events/tutorials/2019/files/Lecture2-lauritzen.pdf
Download MUSICAv0 source code
MUSICAv0 is a configuration of CESM available in CESM2.2. If you will be running MUSICAv0 on your own computer, please check the hardware, OS and software requirements in the CESM2 documentation.
If you are working on cheyenne, or another computer, first get your own copy of the source code (also see CESM2 download instructions):
git clone -b release-cesm2.2.0 https://github.com/ESCOMP/CESM.git my_cesm_sandbox cd my_cesm_sandbox ./manage_externals/checkout_externals
"my_cesm_sandbox" should be a directory in your home or work directory (not scratch, see explanation of glade file spaces on cheyenne). This directory is referred to as $CESM_ROOT.
To test your code, create a newcase with standard resolution of CAM-chem:
> $CESM_ROOT/cime/scripts/create_newcase --case <your_path+$CASENAME> --res f09_f09_mg17 --compset FCnudged --run-unsupported
Replace "<your_path+$CASENAME>" with an existing path and new name for the case (which will be a new directory) without the brackets. Again, "your_path" should be in home or work, not scratch. On cheyenne, by default the model is run from, and output written to, scratch. Now go to the new case directory that was created, and "setup" and "build" your executable:
> cd <your_path+$CASENAME> > ./case.setup > qcmd -- ./case.build
There is a mistake in the default settings for the met field nudging for the f09 resolution CAM-chem compset, so correct the number of model_times_per_day namelist variable before running. Add to the file 'user_nl_cam':
model_times_per_day = 48
If there are other namelist variable values in ./CaseDocs/atm_in you would like to modify, you can put them in 'user_nl_cam'.
Settings for the simulation start date and simulation length are in env_run.xml. The default is to start 2010-01-01 and run for 5 days. You can change env_run to have STOP_OPTION = nmonths and STOP_N = 1, to run 1 month and get the default monthly mean output file (written to /glade/scratch/$USER/$CASENAME/run). If you only run for 5 days you will not get a complete monthly average file (the partial average is written to $CASENAME.cam.rh0.*). You can add a second output file to save daily average, or 6-hourly output, of a few variables to check your results after 5 days. See the CAM-chem wiki page for more an explanation of how to do that. Check the fincl1 list in your atm_in file to see possible variables to include in a fincl2 list.
Now run the model:
Find more explanations and examples on the CAM-chem wiki and the CESM instructions.