[Dart-dev] [6502] DART/trunk/models/CESM/shell_scripts: make all the time tests in the assimilate scripts be a positive
nancy at ucar.edu
nancy at ucar.edu
Wed Oct 9 14:42:12 MDT 2013
Revision: 6502
Author: nancy
Date: 2013-10-09 14:42:12 -0600 (Wed, 09 Oct 2013)
Log Message:
-----------
make all the time tests in the assimilate scripts be a positive
test, and return in the else clause instead of a negative test.
add a perfect_model script which is modeled on the assimilate script.
it calls 3 perfect_model scripts which are to be written.
Modified Paths:
--------------
DART/trunk/models/CESM/shell_scripts/cam_assimilate.csh
DART/trunk/models/CESM/shell_scripts/clm_assimilate.csh
DART/trunk/models/CESM/shell_scripts/pop_assimilate.csh
Added Paths:
-----------
DART/trunk/models/CESM/shell_scripts/perfect_model.csh
-------------- next part --------------
Modified: DART/trunk/models/CESM/shell_scripts/cam_assimilate.csh
===================================================================
--- DART/trunk/models/CESM/shell_scripts/cam_assimilate.csh 2013-10-09 20:29:18 UTC (rev 6501)
+++ DART/trunk/models/CESM/shell_scripts/cam_assimilate.csh 2013-10-09 20:42:12 UTC (rev 6502)
@@ -9,9 +9,10 @@
# This block is an attempt to localize all the machine-specific
# changes to this script such that the same script can be used
# on multiple platforms. This will help us maintain the script.
+# Search below for TIMECHECK to see what times this script will
+# assimilate.
echo "`date` -- BEGIN CAM_ASSIMILATE"
-echo "custom version assimilates at 0,6,12,18Z"
set nonomatch # suppress "rm" warnings if wildcard does not match anything
@@ -82,12 +83,13 @@
# If not, return before assimilating.
#-------------------------------------------------------------------------
-if ( $ATM_HOUR != 0 && $ATM_HOUR != 6 && $ATM_HOUR != 12 && $ATM_HOUR != 18) then
+## TIMECHECK:
+if ( $ATM_HOUR == 0 || $ATM_HOUR == 6 || $ATM_HOUR == 12 || $ATM_HOUR == 18) then
+ echo "Hour is $ATM_HOUR so we are assimilating the atmosphere"
+else
echo "Hour is not 0,6,12 or 18Z so we are skipping the atmosphere assimilation"
echo "`date` -- END CAM_ASSIMILATE"
exit 0
-else
- echo "Hour is $ATM_HOUR so we are assimilating the atmosphere"
endif
#-------------------------------------------------------------------------
Modified: DART/trunk/models/CESM/shell_scripts/clm_assimilate.csh
===================================================================
--- DART/trunk/models/CESM/shell_scripts/clm_assimilate.csh 2013-10-09 20:29:18 UTC (rev 6501)
+++ DART/trunk/models/CESM/shell_scripts/clm_assimilate.csh 2013-10-09 20:42:12 UTC (rev 6502)
@@ -9,9 +9,10 @@
# This block is an attempt to localize all the machine-specific
# changes to this script such that the same script can be used
# on multiple platforms. This will help us maintain the script.
+# Search below for TIMECHECK to see what times this script will
+# assimilate.
echo "`date` -- BEGIN CLM_ASSIMILATE"
-echo "this version assimilates only when hour is 0Z"
set nonomatch # suppress "rm" warnings if wildcard does not match anything
@@ -82,21 +83,21 @@
# If not, return before assimilating.
#-------------------------------------------------------------------------
-if ( $LND_HOUR != 0 && $LND_HOUR != 6 && $LND_HOUR != 12 && $LND_HOUR != 18) then
+## TIMECHECK:
+if ( $LND_HOUR == 0 || $LND_HOUR == 6 || $LND_HOUR == 12 || $LND_HOUR == 18 ) then
+ echo "Hour is $LND_HOUR so we are assimilating the land"
+else
echo "Hour is not 0,6,12 or 18Z so we are skipping the land assimilation"
echo "`date` -- END CLM_ASSIMILATE"
exit 0
-else
- echo "Hour is $LND_HOUR so we are assimilating the land"
endif
-# if you want to only assimilate at 0Z each day, substitute the
-# following two lines for the longer test above. we have flux tower
-# observations which need to be assimilated every 6 hours; if you
-# aren't going to assimilate them and are only assimilating some obs type
-# that is only available once a day, you can change to this test instead.
-#if ( $LND_HOUR != 0 ) then
-# echo "Hour is not 0Z so we are skipping the land assimilation"
+# we have flux tower observations which can be assimilated every 6 hours,
+# but if you want to only assimilate at 0Z each day, change the LND_HOUR
+# check to this one:
+# if ( $LND_HOUR == 0 ) then
+# and the message in the else clause to this:
+# echo "Hour is not 0Z so we are skipping the land assimilation"
#-------------------------------------------------------------------------
# Create temporary working directory for the assimilation and go there
Added: DART/trunk/models/CESM/shell_scripts/perfect_model.csh
===================================================================
--- DART/trunk/models/CESM/shell_scripts/perfect_model.csh (rev 0)
+++ DART/trunk/models/CESM/shell_scripts/perfect_model.csh 2013-10-09 20:42:12 UTC (rev 6502)
@@ -0,0 +1,30 @@
+#!/bin/csh
+#
+# DART software - Copyright 2004 - 2013 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$
+
+# This block is an attempt to localize all the machine-specific
+# changes to this script such that the same script can be used
+# on multiple platforms. This will help us maintain the script.
+
+echo "`date` -- BEGIN CESM PERFECT MODEL"
+
+${CASEROOT}/cam_perfect_model.csh
+if ( $status != 0 ) exit $status
+${CASEROOT}/pop_perfect_model.csh
+if ( $status != 0 ) exit $status
+${CASEROOT}/clm_perfect_model.csh
+if ( $status != 0 ) exit $status
+
+echo "`date` -- END CESM PERFECT MODEL"
+
+exit 0
+
+# <next few lines under version control, do not edit>
+# $URL$
+# $Revision$
+# $Date$
+
Property changes on: DART/trunk/models/CESM/shell_scripts/perfect_model.csh
___________________________________________________________________
Added: svn:executable
+ *
Added: svn:mime-type
+ text/plain
Added: svn:keywords
+ Date Rev Author HeadURL Id
Added: svn:eol-style
+ native
Modified: DART/trunk/models/CESM/shell_scripts/pop_assimilate.csh
===================================================================
--- DART/trunk/models/CESM/shell_scripts/pop_assimilate.csh 2013-10-09 20:29:18 UTC (rev 6501)
+++ DART/trunk/models/CESM/shell_scripts/pop_assimilate.csh 2013-10-09 20:42:12 UTC (rev 6502)
@@ -9,9 +9,10 @@
# This block is an attempt to localize all the machine-specific
# changes to this script such that the same script can be used
# on multiple platforms. This will help us maintain the script.
+# Search below for TIMECHECK to see what times this script will
+# assimilate.
echo "`date` -- BEGIN POP_ASSIMILATE"
-echo "this version assimilates only when hour is 0Z"
set nonomatch # suppress "rm" warnings if wildcard does not match anything
@@ -84,8 +85,15 @@
# restart configuration for pop (data_assim or rest).
#-------------------------------------------------------------------------
+## TIMECHECK:
${REMOVE} ${CASEROOT}/user_nl_pop2_*back
-if ( $OCN_HOUR != 0 ) then
+if ( $OCN_HOUR == 0 ) then
+ echo "Hour is $OCN_HOUR so we are assimilating the ocean"
+ foreach nml ( ${CASEROOT}/user_nl_pop2_* )
+ ${MOVE} $nml ${nml}.back
+ sed -e "s/'rest'/'data_assim'/" ${nml}.back >! $nml
+ end
+else
echo "Hour is not 0Z so we are skipping the ocean assimilation"
foreach nml ( ${CASEROOT}/user_nl_pop2_* )
${MOVE} $nml ${nml}.back
@@ -93,12 +101,6 @@
end
echo "`date` -- END POP_ASSIMILATE"
exit 0
-else
- echo "Hour is $OCN_HOUR so we are assimilating the ocean"
- foreach nml ( ${CASEROOT}/user_nl_pop2_* )
- ${MOVE} $nml ${nml}.back
- sed -e "s/'rest'/'data_assim'/" ${nml}.back >! $nml
- end
endif
#-------------------------------------------------------------------------
More information about the Dart-dev
mailing list