<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>CESM |</title><link>https://yu-cheng.co/tags/cesm/</link><atom:link href="https://yu-cheng.co/tags/cesm/index.xml" rel="self" type="application/rss+xml"/><description>CESM</description><generator>HugoBlox Kit (https://hugoblox.com)</generator><language>en-us</language><lastBuildDate>Wed, 20 Apr 2016 00:00:00 +0000</lastBuildDate><image><url>https://yu-cheng.co/media/icon_hu_87a968e0c4fc153c.png</url><title>CESM</title><link>https://yu-cheng.co/tags/cesm/</link></image><item><title>Workflow of a CCSM4 run</title><link>https://yu-cheng.co/blog/ccsm_workflow/</link><pubDate>Wed, 20 Apr 2016 00:00:00 +0000</pubDate><guid>https://yu-cheng.co/blog/ccsm_workflow/</guid><description>&lt;h3 id="basic-approach-startup-run"&gt;Basic approach, startup run:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a new case using the script under &lt;code&gt;~/CCSM4/scripts&lt;/code&gt;, following the template: PATH, compset, resolution and machine file. Compset B is the fully coupled mode.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; ./create_newcase -case ~/ccsm4/$casename \
-compset B_2000 \
-res 0.9x1.25_gx1v6 \
-mach bluefire
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Go to the $CASEROOT directory, `~/ccsm4/$case&lt;code&gt;, modify the processor layout (&lt;/code&gt;env_mach_pes.xml&lt;code&gt;) or &lt;/code&gt;env_conf.xml` files, then configure and build the model:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; ./configure -case
./$casename.$mach.build
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Create Production test (Optional): This will clone the current case and create a parallel folder &lt;code&gt;../$casename_ERT.x$mach&lt;/code&gt;. Go to the folder, and execute following commands:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; ./$casename_ERT.$mach.build
bsub &amp;lt; $casename_ERT.$mach.test
cat TestStatus
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Once pass the test run, go back to the &lt;code&gt;$CASEROOT&lt;/code&gt;, modify the &lt;code&gt;env_run.xml&lt;/code&gt; as well as &lt;code&gt;%casename.$mach.run&lt;/code&gt;. Using the given &lt;code&gt;xmlchange&lt;/code&gt; script is recommended. The &lt;code&gt;%casename.$mach.run&lt;/code&gt; is the batch submit script. Depending on the machines, it could be executed through &lt;code&gt;bsub&lt;/code&gt; or &lt;code&gt;qsub&lt;/code&gt;. In the &lt;code&gt;env_run.xml&lt;/code&gt; file, one can edit items such as &lt;code&gt;STOP_N&lt;/code&gt;, &lt;code&gt;STOP_OPTION&lt;/code&gt; and &lt;code&gt;RESUBMIT&lt;/code&gt;, to adjust the simulation length, as well as the resubmit frequencies. This modifications don&amp;rsquo;t require rebuilding executables.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3 id="a-branch-or-hybrid-run"&gt;A branch or hybrid run:&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Follow Step 1 in the previous example to create a new case &lt;code&gt;$casename2&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Edit &lt;code&gt;env_conf.xml&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; xmlchange -file env_conf.xml -id RUN_TYPE -val branch
xmlchange -file env_conf.xml -id RUN_REFCASE -val $casename1
xmlchange -file env_conf.xml -id RUN_REFDATE -val 0001-02-01
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For a hybrid run, set &lt;code&gt;RUN_TYPE&lt;/code&gt; to &lt;code&gt;hybrid&lt;/code&gt; instead.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Configure and build the case executable.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; ./configure -case
./$casename.$mach.build
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Copy the necessary restart/initial data into &lt;code&gt;$RUNROOT&lt;/code&gt;, a path similar to &lt;code&gt;.../exe/$casename2/run&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Repeat Step 4 in the previous example.&lt;/p&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;&amp;ndash;&lt;/p&gt;
&lt;h3 id="file-locking-explained"&gt;File locking explained:&lt;/h3&gt;
&lt;p&gt;Locking variables is a feature of CCSM that prevents users from changing variables after they have been resolved (used) in other parts of the scripts system. The variables in env_case are locked when create_newcase is called. The env_conf and env_mach_pes variables are locked when configure is called. The env_build variables are locked when CCSM is built, and the env_run variables are never locked and can be changed anytime. In addition, the Macros file is locked as part of the build step. The &lt;code&gt;$CASEROOT/LockedFiles&lt;/code&gt; directory saves copies of the xml files to facilitate the locking feature.&lt;/p&gt;
&lt;p&gt;&amp;ndash;&lt;/p&gt;
&lt;p&gt;More advanced use cases can be found in Chapter 9 of the
&lt;/p&gt;</description></item></channel></rss>