[Dart-dev] DART/branches Revision: 12892
dart at ucar.edu
dart at ucar.edu
Wed Oct 3 08:57:39 MDT 2018
thoar at ucar.edu
2018-10-03 08:57:39 -0600 (Wed, 03 Oct 2018)
97
Adding two new observation converters.
The noah main.sh is simply moved to the right directory.
Added: DART/branches/rma_wrfHydro/models/noah/shell_scripts/main.sh
===================================================================
--- DART/branches/rma_wrfHydro/models/noah/shell_scripts/main.sh (rev 0)
+++ DART/branches/rma_wrfHydro/models/noah/shell_scripts/main.sh 2018-10-03 14:57:39 UTC (rev 12892)
@@ -0,0 +1,196 @@
+#!/bin/bash
+###############################################################
+# Author: Jingjing Liang, on loan to UT Austin
+#
+# This runs NOAH-MP 3.6 and the filter on the UT 'Lonestar5' machine.
+#
+##############################################################
+
+# change here to initialize the Noah-MP DA
+
+startdate='2003-08-12 00:00:00'
+enddate='2004-01-30 00:00:00'
+interval=86400 # seconds,which means a day
+numens=40 # ensemble size -- used during perturbation
+
+obsdir='/work/04270/l_jing/lonestar/DART_CAM/merge/output'
+subout='outfiles'
+
+noahdir='/scratch/04270/l_jing/DART_NoahMP'
+outdir="/scratch/04270/l_jing/DART_NoahMP/output/${subout}"
+DARTDIR="/home1/04270/l_jing/DART_NoahMP"
+ana_pre_dir='/scratch/04270/l_jing/DART_NoahMP/output/outfiles/ana_pre_MOD_GRA'
+inf_dir='/scratch/04270/l_jing/DART_NoahMP/output/outfiles/inf_MOD_GRA'
+subhist='/hist_MOD_GRA'
+subrest='/rest_MOD_GRA'
+sublogs='/logs_MOD_GRA'
+
+################################################################
+
+echo "Begin Noah-MP DA ctime = `date`"
+echo ""
+
+ddays=`expr '(' $(date +%s -d "$enddate") - $(date +%s -d "$startdate") ')' / 86400 + 1`
+dtemp=0
+while (($dtemp<$ddays))
+do
+ #----------------------------------------------------
+ # retrieve model time info
+ cds=`expr $dtemp \* $interval`
+ cyy=`date -d "$startdate $cds seconds" +"%Y"`
+ cmm=`date -d "$startdate $cds seconds" +"%m"`
+ cdd=`date -d "$startdate $cds seconds" +"%d"`
+ # cHH=`date -d "$startdate $cds seconds" +"%H"`
+ cHH='00'
+ echo " "
+ echo "Start DA cycle on ${cyy}-${cmm}-${cdd}:${cHH}"
+
+ #----------------------------------------------------
+ # update date
+ dtemp=`expr $dtemp + 1`
+ nds=`expr $dtemp \* $interval`
+ nyy=`date -d "$startdate $nds seconds" +"%Y"`
+ nmm=`date -d "$startdate $nds seconds" +"%m"`
+ ndd=`date -d "$startdate $nds seconds" +"%d"`
+ # nHH=`date -d "$startdate $nds seconds" +"%H"`
+ nHH='00'
+ echo "Start DA cycle on ${nyy}-${nmm}-${ndd}:${nHH}"
+ #----------------------------------------------------
+ # Noah-MP namelist modify and implementation
+ for(( inst = 1; inst <= ${numens}; inst++ ))
+ do
+ {
+ inst_str=`printf %02d ${inst}`
+ # if [[ $cds -lt 86400 ]]; then
+ if [[ $cds -lt 0 ]]; then
+ cd ${noahdir}/hrldas_${inst_str}
+ inifile1="RESTART.${cyy}${cmm}${cdd}${cHH}_DOMAIN1"
+sed -i "14s:.*:RESTART_FILENAME_REQUESTED = '/scratch/04270/l_jing/DART_NoahMP/hrldas_${inst_str}/output/${inifile1}':" namelist.hrldas
+ else
+ cd ${noahdir}/hrldas_${inst_str}
+ inifile="RESTART.${cyy}${cmm}${cdd}${cHH}_DOMAIN1_${inst_str}"
+sed -i "1,\$s#RESTART_FILENAME_REQUESTED.*\$#RESTART_FILENAME_REQUESTED = \"${outdir}\/${subrest}\/${inifile}\"#g" namelist.hrldas
+ fi
+ sed -i "1,\$s#START_YEAR.*\$#START_YEAR = $cyy #g" namelist.hrldas
+ sed -i "1,\$s#START_MONTH.*\$#START_MONTH = $cmm #g" namelist.hrldas
+ sed -i "1,\$s#START_DAY.*\$#START_DAY = $cdd #g" namelist.hrldas
+ sed -i "1,\$s#START_HOUR.*\$#START_HOUR = $cHH #g" namelist.hrldas
+ ./noahmp_hrldas.exe >noahmp.log_$cyy$cmm$cdd
+ }&
+ done
+
+#-------------------------------------------------------------------------------
+# this part could do the task through array, but needs more time for submit&wait
+# if submit this main.sh as a job, the sentance with LJJ should be used
+ # cd /home1/04270/l_jing/DART_NoahMP/launcher
+ # echo "*****RUNNING******* " > lock
+ # sbatch launcher.slurm
+ # count=1
+ # for (( count=1;count<=100;count++ )) do
+ # if [ -f lock ]
+ # then
+ # echo " WAIT PREVIOUS JOB TO FINISH... "
+ # sleep 10
+ # else
+ # break
+ # fi
More information about the Dart-dev
mailing list