[Dart-dev] DART/branches Revision: 12946

dart at ucar.edu dart at ucar.edu
Thu Jan 3 16:35:56 MST 2019


thoar at ucar.edu
2019-01-03 16:35:56 -0700 (Thu, 03 Jan 2019)
244
First go at some scripting for cesm2_1. 
The originals of these are from Kevin:
/glade/u/home/raeder/DART/rma_recam/models/cam-fv/shell_scripts/cesm2_1_devel
but have been modified in a collaboration of Nancy and Tim.
These have not been run.




Added: DART/branches/recam/models/cam-fv/shell_scripts/cesm2_1/DART_config.template
===================================================================
--- DART/branches/recam/models/cam-fv/shell_scripts/cesm2_1/DART_config.template	                        (rev 0)
+++ DART/branches/recam/models/cam-fv/shell_scripts/cesm2_1/DART_config.template	2019-01-03 23:35:56 UTC (rev 12946)
@@ -0,0 +1,375 @@
+#!/bin/csh
+#
+# DART software - Copyright UCAR. This open source software is provided
+# by UCAR, "as is", without charge, subject to all terms of use at
+# http://www.image.ucar.edu/DAReS/DART/DART_download
+#
+# DART $Id: DART_config.template 12675 2018-06-18 17:12:21Z raeder at ucar.edu $
+
+# ---------------------
+# Purpose
+# ---------------------
+#
+# This script integrates DART with a pre-existing CESM multi-instance case.
+# It must be run from a valid CASEROOT directory and some environment variables
+# must be set (as in cesm#_#/setup_XXX). 
+#
+# CAM is the only model component used for assimilation.
+# CESM starts and stops to allow for CAM to assimilate every 6 hours.
+#
+# This script will try to build the DART executables if they are not found.
+# This might result in a preproc_nml being used, which is wrong for your observation set.
+#
+# There are many CESM binary files in big-endian format, and DART reads
+# some of them, so you MUST compile DART accordingly e.g.,
+# ifort -convert big_endian
+# Contact dart at ucar.edu if you want to use another compiler.
+#
+# ---------------------
+# How to set up the script
+# ---------------------
+#
+# -- Copy and rename this script into the $CASEROOT directory.
+#    > cp DART_config.template $CASEROOT/DART_config
+# -- Ensure DARTROOT references a valid DART directory.
+# -- Examine the whole script to identify things to change for your experiments.
+#    This includes choosing [no_]assimilate.csh.
+# -- Provide any initial inflation files needed by your run
+# -- Run this script.
+#    > ./DART_config | & tee DART_config.out1  
+# -- Edit the DART input.nml, that appears in the ${CASEROOT} directory,
+#    to replace default values with your preferred values.
+#
+# -- Submit the job using ${CASEROOT}/${CASE}.submit
+#
+# ==============================================================================
+# Get the environment of the case - defines number of instances/ensemble size ...
+# Each model component has their own number of instances.
+# ==============================================================================
+
+echo "==================="
+echo "Starting DART_config"
+echo "==================="
+
+# baseobsdir    Part of the directory name containing the obs_seq.out files to be used by the 
+#               assimilation.  Assimilate.csh looks for a directory with the year and month:
+#               $baseobsdir/YYYYMM_6H_CESM.
+#               Will be inherited by CESM#_#_DART_config and inserted into assimilate.csh
+# save_every_Mth_day_restarts       
+#               assimilate.csh uses this to remove extraneous restart sets in the DART context.  
+#               This permits more cycles per job and reduces the data volume that's st_archived.
+
+# DART_SCRIPTS_DIR should be set to the DART directory from which this script was copied,
+# and which contains the setup_ script used to build the CASE, 
+# and the assimilate.csh which will run the assimilation.
+
+setenv DARTROOT               your_dart_path
+setenv DART_SCRIPTS_DIR       $DARTROOT/models/cam-fv/shell_scripts/your_setup_script_dir
+echo "DART_SCRIPTS_DIR = $DART_SCRIPTS_DIR"
+
+# /glade/p/image/Observations/NCEP+ACARS
+setenv BASEOBSDIR             your_observation_path
+
+setenv SAVE_EVERY_MTH_RESTART days_between_archiving_restarts
+
+if ( ! -e ./xmlquery ) then
+   echo "ERROR: $0 must be run from a CASEROOT directory".
+   exit 1
+endif
+
+setenv CASE          `./xmlquery --value CASE`
+setenv CASEROOT      `./xmlquery --value CASEROOT`
+setenv COMPSET       `./xmlquery --value COMPSET`
+setenv EXEROOT       `./xmlquery --value EXEROOT`
+setenv num_instances `./xmlquery --subgroup ATM --value NINST`
+
+# ==============================================================================
+# Turn on the assimilation in CESM
+
+# The assimilation script to be run is determined by 
+# CESM's env_run.xml DATA_ASSIMILATION* variables.
+# If DATA_ASSIMILATION = false (default), then neither {no_}assimilate.csh will be run,
+# and CAM restart files (instead of initial) will be used after the first cycle.
+# So always set DATA_ASSIMILATION = TRUE.
+# DATA_ASSIMILATION_CYCLES says how many cycles to run in each job.  
+# It's wise to set to 1 for the first cycle, so that successfull completion can be
+# verified before using lots of resources.


More information about the Dart-dev mailing list