CESM CAM Correctness Metric

53 views
Skip to first unread message

Matthew Norman

unread,
Nov 6, 2012, 10:54:43 AM11/6/12
to sc...@googlegroups.com
I thought I would go ahead and pass on some more help on the CESM CAM code. Be sure you are able to build CESM F compsets in general and run them successfully ahead of time.

Customization
Just as a reminder on customization, some of the required edits to the default CESM scripts are itemized below. This may not include everything, but these are ones you'll probably have to deal with.
  • You need to change the number of days to be simulated in env_run.xml, line 40 to fit 1 or 1.5 years. (assume 365 days in a year).
  • You need to edit the directories for Titan in $CESM/scripts/ccsm_utils/Machines or create a new machine. You can, of course circumvent or change this process to your liking as long as you can build the code, pass the correctness metric, and view the output. For this section, for many of these scripts, you can perhaps more easily change things after-the-fact inside your case directory, changing files like: env_mach_specific, Macros.titan, case_name.titan.run, the build scripts in Buildconf, and so on. It's your choice where in the process to change files to fit your machine. You can do it before creating a new case or after.
    • config_machines.xml contains the directories to export datasets into, and they must exist. Also, job submission commands make parameters and maximum tasks per node should be set appropriately.
    • env_machopts.titan is where you setup the environment for your job if you happen to have the capability to load modules and what now. You will need netcdf, parallel-netcdf, subversion, and esmf. Not entirely sure about esmf, but you'll need to check and make sure you can build beforehand.
    • Macros.titan is where you set up your flags and what not for building. You'll want to make sure your choice of flags does not cause you to fail the metric test on dry mass conservation.
    • mkbatch.titan is where you construct the job script for job submission.
  • You'll need to change the processor allocations & layout in env_mach_pes.xml to match your machine and almost certainly the job submission and run file case_name.titan.run and case_name.titan.submit.

Correctness Metric
To assess correctness, since there are constraints on the spin-up time in using various tools and the time required to use them (such as AMWG), I decided to use a much simpler test of dry mass conservation. I have a script below that goes to the log files, unzips the atmosphere log file, tests the first and last dry mass estimates, computes the relative change in dry mass, and prints it. As shown below, you run this script from your $CESM/scripts directory, and you pass as a parameter to the script the case directory name you want to check. Bear in mind that if your job does not finish properly, these files will not be in $CESM/scrips/case_dir/logs, but they will be in $CESM/../case_dir/run, and you'll have to check it there, removing the gunzip and gzip parts of the script and passing in the file yourself to meat of the test_dry_mass script.

Your relative change in dry mass (the value printed by test_dry_mass) should not exceed 10^-11. Beware that certain changes in your compiler flags may set this value too large if the instructions are not performed at the right floating point precision. 
____________________________________________

[imn@xxxxxxxxx:/tmp/work/imn/cesm1_0_4/scripts] 8-) ./test_dry_mass case_dir1/
1.68758e-13
[imn@xxxxxxxxx:/tmp/work/imn/cesm1_0_4/scripts] 8-) ./test_dry_mass case_dir2/
1.63206e-13
[imn@xxxxxxxxx:/tmp/work/imn/cesm1_0_4/scripts] 8-) ./test_dry_mass case_dir3/
-5.51732e-14
[imn@xxxxxxxxx:/tmp/work/imn/cesm1_0_4/scripts] 8-) ./test_dry_mass case_dir4/
-4.95055e-14
____________________________________________

test_dry_mass

Matthew Norman

unread,
Nov 6, 2012, 11:04:23 AM11/6/12
to sc...@googlegroups.com
Also, your data (given the default CESM scripts) will be archived in $CESM/../archive/case_name/atm/hist

If you change the scripts, this archive location may change as well.

-Matt

--
You received this message because you are subscribed to the Google Groups "SCC12" group.
To post to this group, send email to sc...@googlegroups.com.
To unsubscribe from this group, send email to scc12+un...@googlegroups.com.
Visit this group at http://groups.google.com/group/scc12?hl=en.
 
 

Reply all
Reply to author
Forward
0 new messages