[Dart-dev] [4319] DART/trunk/observations/NCEP/ascii_to_obs/work: Add a template that works with the multiple-day-at-a-time

nancy at ucar.edu nancy at ucar.edu
Mon Mar 15 14:01:43 MDT 2010


Revision: 4319
Author:   nancy
Date:     2010-03-15 14:01:43 -0600 (Mon, 15 Mar 2010)
Log Message:
-----------
Add a template that works with the multiple-day-at-a-time
script.  Minor updates to the script.  Remove .o and .mod
files if quickbuild finishes ok.

Modified Paths:
--------------
    DART/trunk/observations/NCEP/ascii_to_obs/work/multi_create.csh
    DART/trunk/observations/NCEP/ascii_to_obs/work/quickbuild.csh

Added Paths:
-----------
    DART/trunk/observations/NCEP/ascii_to_obs/work/input.nml.template

-------------- next part --------------
Added: DART/trunk/observations/NCEP/ascii_to_obs/work/input.nml.template
===================================================================
--- DART/trunk/observations/NCEP/ascii_to_obs/work/input.nml.template	                        (rev 0)
+++ DART/trunk/observations/NCEP/ascii_to_obs/work/input.nml.template	2010-03-15 20:01:43 UTC (rev 4319)
@@ -0,0 +1,56 @@
+&ncepobs_nml
+   year       = YYYY,
+   month      = MM,
+   day        = NN,
+   tot_days   = 1,
+   max_num    = 800000,
+   select_obs = 0,
+   ObsBase = '../../prep_bufr/data/YYYYMM/temp_obs.',
+   ADPUPA = .false., 
+   AIRCAR = .false., 
+   AIRCFT = .false., 
+   SATEMP = .false., 
+   SFCSHP = .false., 
+   ADPSFC = .false., 
+   SATWND = .false.,
+   obs_U  = .false., 
+   obs_V  = .false., 
+   obs_T  = .false.,
+   obs_PS = .false.,
+   obs_QV = .false.,
+   daily_file = .true.,
+   lon1   =   0.0,
+   lon2   = 360.0,
+   lat1   = -90.0,
+   lat2   =  90.0  /
+
+&obs_sequence_nml
+   write_binary_obs_sequence = .false.  /
+
+&assim_model_nml
+   write_binary_restart_files = .true.  /
+
+&utilities_nml
+   TERMLEVEL = 1,
+   module_details = .false.,
+   logfilename = 'dart_log.out'  
+   /
+
+&model_nml
+   /
+
+&location_nml
+   /
+
+&obs_kind_nml
+   /
+
+&preprocess_nml
+    input_obs_kind_mod_file = '../../../../obs_kind/DEFAULT_obs_kind_mod.F90',
+   output_obs_kind_mod_file = '../../../../obs_kind/obs_kind_mod.f90',
+     input_obs_def_mod_file = '../../../../obs_def/DEFAULT_obs_def_mod.F90',
+    output_obs_def_mod_file = '../../../../obs_def/obs_def_mod.f90',
+   input_files              = '../../../../obs_def/obs_def_reanalysis_bufr_mod.f90',
+                              '../../../../obs_def/obs_def_altimeter_mod.f90',
+                              '../../../../obs_def/obs_def_gps_mod.f90'  /
+

Modified: DART/trunk/observations/NCEP/ascii_to_obs/work/multi_create.csh
===================================================================
--- DART/trunk/observations/NCEP/ascii_to_obs/work/multi_create.csh	2010-03-15 19:56:26 UTC (rev 4318)
+++ DART/trunk/observations/NCEP/ascii_to_obs/work/multi_create.csh	2010-03-15 20:01:43 UTC (rev 4319)
@@ -1,4 +1,4 @@
-#!/bin/csh  -v
+#!/bin/csh 
 #
 # DART software - Copyright \xA9 2004 - 2010 UCAR. This open source software is
 # provided by UCAR, "as is", without charge, subject to all terms of use at
@@ -21,32 +21,42 @@
 #BSUB -J createobs
 #BSUB -o createobs.out
 #BSUB -e createobs.err
-#BSUB -q economy
-#BSUB -P 00000000
-#BSUB -W 3:30
+#BSUB -q regular
+#BSUB -P xxxxxxxx
+#BSUB -W 0:20
 #BSUB -n 1
 
+# USER INPUTS - SET HERE
 # Set the year, month, and day range here.
-# These 4 vars are the only user inputs to this script.
-set     year = 2008
-set    month =    0
+# this version of the script doesn't wrap across month boundaries
+set     year = 1999
+set    month =   12
 set startday =    1
 set   endday =   31
 
+# dir to move the output files into - will have YYYYMM appended.
+set destdir = ./ACARS_24_ascii
+
 # if you want to run more than one of these jobs at a time,
 # each must have a different base tempname.
 set tempname = tempdir
 
+# END USER INPUTS
+
 # Loop over days, first to convert, then to clean up
 set day = $startday
 set lastday = $endday
 
+# this version doesn't wrap across months yet.
+set mo = `printf %02d $month`
+
 while ( $day <= $lastday )
 
-   mkdir ${tempname}_${day}
-   cd ${tempname}_${day}
+   set dy = `printf %02d $day`
 
-   set mo = `printf %02d $month`
+   if ( ! -d ${tempname}_${dy}) mkdir ${tempname}_${dy}
+   cd ${tempname}_${dy}
+
    cp -f ../create_real_obs .
    sed -e "s/YYYY/${year}/" \
        -e "s/MM/${mo}/"     \
@@ -67,20 +77,29 @@
 set day = $startday
 set lastday = $endday
 
-# remove the various bits but leave the newly created
-# obs_seq file there.  the script could move it automatically
-# but for now i am going to look at them by hand.  if they run
-# ok for a couple trials, then i will move them to where they
-# belong.  must then set a base dir to move them into.
-# could then remove the dir, although might miss errors that way.
+# remove the various bits, and either list or move the new obs_seq
+# file to a destination directory.  don't remove the tempdirs so
+# you don't miss errors as easily.
+
+set dest = ${destdir}/${year}${mo}
+if ( ! -d ${dest}) mkdir ${dest}
+
 while ( $day <= $lastday )
- rm ${tempname}_${day}/input.nml ${tempname}_${day}/create_real_obs ${tempname}_${day}/dart_log.nml
+ set dy = `printf %02d $day`
 
- # could mv the obs file to the eventual destination dir here
+ # mv the obs file to the eventual destination dir here
+ mv ${tempname}_${dy}/obs_seq${year}${mo}${dy} ${dest}/
+ 
+ # or, just ls it:
+ # ls -l ${tempname}_${dy}/obs_seq${year}${mo}${dy}
+
+ rm ${tempname}_${dy}/input.nml ${tempname}_${dy}/create_real_obs ${tempname}_${dy}/dart_log.nml
  #rmdir ${tempname}_${day} 
  @ day++
 end
 
+ls -l ${dest}
+
 exit 0
 
 # <next few lines under version control, do not edit>

Modified: DART/trunk/observations/NCEP/ascii_to_obs/work/quickbuild.csh
===================================================================
--- DART/trunk/observations/NCEP/ascii_to_obs/work/quickbuild.csh	2010-03-15 19:56:26 UTC (rev 4318)
+++ DART/trunk/observations/NCEP/ascii_to_obs/work/quickbuild.csh	2010-03-15 20:01:43 UTC (rev 4319)
@@ -59,6 +59,9 @@
    endsw
 end
 
+\rm -f *.o *.mod
+\rm -f input.nml.*_default
+
 echo "Success: All DART programs compiled."  
 exit 0
 


More information about the Dart-dev mailing list