CESM page: http://www2.cesm.ucar.edu/models/current
From the CESM page:
"The Community Earth System Model (CESM) is a fully-coupled, global climate model that provides state-of-the-art computer simulations of the Earth's past, present, and future climate states.
CESM is sponsored by the National Science Foundation (NSF) and the U.S. Department of Energy (DOE). Administration of the CESM is maintained by the Climate and Global Dynamics Division (CGD) at the National Center for Atmospheric Research (NCAR)."
CESM 1.2 Compiling and porting instructions
- Get an account so that you can download CESM
- Get the CESM code by running this command from your ~/data or ~/scratch directory
cd ~/data; svn co https://svn-ccsm-release.cgd.ucar.edu/model_versions/cesm1_2_0 cesm1_2_0
- See the CESM User's Guide, section "Downloading CESM" for complete information on correctly getting the code.
- Create a new case. On PACE systems, there isn't an officially supported "platform" for CESM, so we must "Port and Validate CESM on a new platform" (Chapter 5 of the user manual)
- cd cesm1_2_0/scripts/
- ./create_newcase -case test1 -res f45_g37 -compset X -mach userdefined
- The "test1" part denotes the directory that will be created and populated with the build files
- The "f45_g37" denotes the resolution of the model. The files needed for this specific model will have to be downloaded. cd ~/scratch; mkdir CESM/1.2.0/cpl; cd CESM/1.2.0/cpl; svn co https://svn-ccsm-inputdata.cgd.ucar.edu/trunk/inputdata/cpl/cpl6
- The "X" part means that this particular case will be run with the lowest settings possible
- Now, a new case has been created, but many variables required are undefined. We must set the OS, MPILIB, RUNDIR, DIN_LOC_ROOT, COMPILER, EXEROOT, and MAX_TASKS_PER_NODE variables in order to successfully compile the application
- In the env_build.xml file, change...
to to to
- The EXEROOT variable in env_build.xml should be changed to the absolute path of your ~/data or ~/scratch directory (wherever you ran the "svn co ... cesm1_2_0" command). To determine the absolute path of your ~/data or ~/scratch directory, use the readlink command like so
- readlink -f ~/data
- readlink -f ~/scratch
- Copy and paste the result into the EXEROOT variable in env_build.xml.
- In the env_run.xml file, change ...
- If the EXEROOT location in env_build.xml is /nv/path/to/my/exeroot, the RUNDIR should be /nv/path/to/my/dir/run
to the absolute path where you downloaded the input data (from the command svn co https://svn-ccsm-inputdata.cgd.ucar.edu/trunk/inputdata/cpl/cpl6 ).
- We ran the command from directory /panfs/iw-scratch.pace.gatech.edu/volumenumber/myusername/CESM/1.2.0/cpl, so DIN_LOC_ROOT should be set to /panfs/iw-scratch.pace.gatech.edu/volumenumber/myusername/CESM/1.2.0
- In the env_mach_pes.xml file, change ...
- Run ./cesm_setup
- Edit the Macros file
- Change "SLIBS+=# USERDEFINED $(shell $(NETCDF_PATH)/bin/nc-config --flibs)" to "SLIBS+= $(LDFLAGS) -lnetcdff -lnetcdf"
- Change "FFLAGS:= -O -fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none" to "FFLAGS:= -O -fconvert=big-endian -ffree-line-length-none -ffixed-line-length-none -fno-range-check"
- Change "NETCDF_PATH:= USERDEFINED_MUST_EDIT_THIS" to "NETCDF_PATH:= $(NETCDF)"
- CRITICAL: Load the modules needed to successfully compile the application
- module load gcc/4.4.5 openmpi/1.4.3 hdf5/1.8.9 netcdf/4.2
- Execute ./test1.build
- This should print many lines to the screen. A successful compilation will end with "CESM BUILDEXE SCRIPT HAS FINISHED SUCCESSFULLY"
- Check the EXEROOT directory for the cesm.exe program.
- If cesm.exe exists, the build process is complete.
- If the build process fails, fix the problem, then run ./test1.clean_build and run ./test1.build again until all problems are fixed
- Testing cesm.exe
- Submit an interactive job to a queue that you have permission to access, requesting 16 processors: "qsub -I -q your_submission_queue -l nodes=1:ppn=16".
- Remember that we specified MAX_TASKS_PER_NODE=16 in the env_mach_pes.xml file. We need to match that 16 with the number of processors requested by the job we just submitted.
- Wait until the job starts
- Execute cd ~/data/cesm1_2_0/scripts/test1/CaseDocs (the ~/data/cesm1_2_0/ directory is where we created the test1 case)
- Load the modules needed : module load gcc/4.4.5 openmpi/1.4.3 hdf5/1.8.9 netcdf/4.2
- Execute "mpirun -np 16 ../../../../../cesm.exe"