View on GitHub

ats641_spring2022

ATS 641, spring 2022 at CSU

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.

Because each research group has their own computing arrangements, you will need to download and compile the model yourself. The website is here. Fortunately, I have found that the model compiles easily on most computer platforms. (Though if you can use something other than Windows, that would be best. We have compiled it on Windows before, but it’s more work than Mac or Linux.) Instructions for compiling are given on the CM1 webpage, but really all you should need to do is uncomment a few lines out of the Makefile that correspond to the type of computer and Fortran compiler you have and type “make”. For example, if you have the gfortran compiler, uncomment the couple of lines under “single processor, gnu compiler”. This compilation should be straightforward and easy.

The one additional feature that can complicated things a bit is writing the output in netCDF format (rather than the default binary format). You will need to know where the netcdf libraries have been compiled on your machine - for most Mac or Linux machines that you would use for research, these libraries are likely already installed. If you haven’t done this before, you might need to ask your group’s IT person for the details of your system, or I can try to help.

Once you have the model compiled and have made any necessary changes to the namelist, cd into the “run” directory, and you just type “./cm1.exe” (without the quotes) to run the model! 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.