[Dart-dev] DART/branches Revision: 12919

dart at ucar.edu dart at ucar.edu
Fri Oct 26 17:23:19 MDT 2018


thoar at ucar.edu
2018-10-26 17:23:19 -0600 (Fri, 26 Oct 2018)
358
The SMAP converter was using depth in km ... which was wrong.
The depths should be in meters.
Added a couple scripts to aid in the conversion of the jillions of SMAP
orbits ... and automatically converts the actual year to some 
sythetic model year (convert_many.sh).

The makedaily.sh script is only a stub ... 
and may not be needed given convert_many.sh




Modified: DART/branches/cesm_clm/observations/obs_converters/NSIDC/SMAP_L2_to_obs.f90
===================================================================
--- DART/branches/cesm_clm/observations/obs_converters/NSIDC/SMAP_L2_to_obs.f90	2018-10-26 18:04:10 UTC (rev 12918)
+++ DART/branches/cesm_clm/observations/obs_converters/NSIDC/SMAP_L2_to_obs.f90	2018-10-26 23:23:19 UTC (rev 12919)
@@ -310,7 +310,7 @@
 
       err_std = max(obs_val/20.0_r8, 0.01_r8)
  
-      call create_3d_obs(rlat, rlon, depth_m/1000.0_r8, VERTISHEIGHT, obs_val, &
+      call create_3d_obs(rlat, rlon, depth_m, VERTISHEIGHT, obs_val, &
                         SOIL_MOISTURE, err_std, oday, osec, qc, obs)
 
       call add_obs_to_seq(obs_seq, obs, obs_time(icount), prev_obs, prev_time, first_obs)

Added: DART/branches/cesm_clm/observations/obs_converters/NSIDC/shell_scripts/convert_many.sh
===================================================================
--- DART/branches/cesm_clm/observations/obs_converters/NSIDC/shell_scripts/convert_many.sh	                        (rev 0)
+++ DART/branches/cesm_clm/observations/obs_converters/NSIDC/shell_scripts/convert_many.sh	2018-10-26 23:23:19 UTC (rev 12919)
@@ -0,0 +1,182 @@
+#!/bin/bash
+#
+# 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$
+#
+# split the monthly file into "daily" files which start at 12:01Z 
+# the previous day and end at 12:00Z on the day that matches the 
+# day in the filename.
+#
+#===============================================================================
+# LSF directives                bsub < test_batch.csh
+#
+#BSUB -J splitobs
+#BSUB -W 4:00
+#BSUB -o %J.out
+#BSUB -e %J.err
+#BSUB -q geyser
+#BSUB -P P86850054
+#BSUB -n 1
+#===============================================================================
+# PBS directives                qsub test_batch.csh
+#
+#PBS -N testpbs         
+#PBS -l walltime=00:01:10
+#PBS -q economy
+#PBS -l select=1:ncpus=1
+#PBS -A P86850054
+
+# set the first and last days to be split.  can roll over
+# month and year boundaries now!   note that for the first day
+# you need the previous day data available.
+
+let start_year=2015
+let start_month=7
+let start_day=7
+
+let end_year=2015
+let end_month=7
+let end_day=10
+
+EXEDIR='../work'
+DATDIR='../data'
+OUTDIR=/glade/scratch/${USER}/SMAP_obs
+
+# The actual dates in the observation files need to be replaced
+# with the similar dates from 2005.
+
+MODEL_YEAR=2005
+
+# end of things you should have to set in this script
+
+# make sure there is an initial input.nml for advance_time
+# input.nml gets overwritten in the subsequent loop.
+
+\cp -f ${EXEDIR}/input.nml.template input.nml || exit -1
+
+# convert the start and stop times to gregorian days, so we can
+# compute total number of days including rolling over month and
+# year boundaries.  make sure all values have leading 0s if they
+# are < 10.  do the end time first so we can use the same values
+# to set the initial day while we are doing the total day calc.
+
+# these outputs from advance time (with the -g flag) are
+# 2 integers: gregorian_day_number seconds
+# and since we don't set hours, minutes, or seconds, the second
+# number is always 0 and uninteresting for us.
+mon2=`printf %02d $end_month`
+day2=`printf %02d $end_day`
+end_d=(`echo ${end_year}${mon2}${day2} 0 -g | ${EXEDIR}/advance_time`)
+echo "${end_year}${mon2}${day2} is $end_d"
+
+mon2=`printf %02d $start_month`
+day2=`printf %02d $start_day`
+start_d=(`echo ${start_year}${mon2}${day2} 0 -g | ${EXEDIR}/advance_time`)
+echo "${start_year}${mon2}${day2} is $start_d"
+
+# these are a string in the format YYYYMMDDHH
+# do them here to prime the loop below which first takes them apart.
+currday=(`echo ${start_year}${mon2}${day2}  0 | ${EXEDIR}/advance_time`)


More information about the Dart-dev mailing list