Skip to content

Latest commit

 

History

History
10 lines (6 loc) · 2.63 KB

cm1_instructions.md

File metadata and controls

10 lines (6 loc) · 2.63 KB

Installing the CM1 model

George Bryan’s cloud model is a very powerful, yet compact and relatively simple, numerical model for idealized studies of clouds, convection, and so forth. It has been used in many peer-reviewed publications in recent years. The experience of running it should give you a feel for some of the possibilities (as well as challenges) associated with using numerical models as a research tool.

To set up and run CM1, we can use the college's asha cluster. (Instructions were provided in class for getting an account.) First, download the model from the CM1 website. If logged in to asha, you can use wget or curl to download the source code. General instructions for compiling the model are given on the CM1 webpage. On asha, only a couple additional steps should be needed. First, you need to load the netCDF libraries with module load libraries/netcdf-2022. Then, in the Makefile, uncomment the four lines dealing with netcdf near the top, and uncomment the lines under the "multiple processors, distributed memory (MPI), GNU compiler" option. Then type make to compile the model.

Documentation for how to submit a job on asha is given on the asha website. You will need to copy or rsync your compiled model code on to the scratch drive, then cd into the "run" directory. Make needed changes to the namelist, set up a job submission script (I've provided an example, runcm1.bash), and submit your job with sbatch <nameofscript>. Then the model should be off and running (pending any wait time in the queue.)

Unless you changed the output format, the output will be binary files, which, along with the created .ctl files, can be directly read into GrADS. But you may want to change the output format to netCDF, so you can more easily read and plot the data in python.

If you prefer, you can also compile and run the model on another machine in your research group, or even your own desktop or laptop computer (the runs we'll be doing in class don't require all that much computing power -- I regularly run simulations like these on my laptop.) All you need is a fortran compiler and the netcdf libraries (if you want to write netcdf output). The netcdf libraries can cause some complications (which is why asha serves as a good option), but for most Mac or Linux machines that you would use for research, they are likely already installed. If you haven't done this before and want to, you might need to ask your group’s IT person for the details of your system, or I can try to help.