[Dart-dev] [4355] DART/trunk/models/POP:
nancy at ucar.edu
nancy at ucar.edu
Wed Apr 21 15:53:29 MDT 2010
Revision: 4355
Author: thoar
Date: 2010-04-21 15:53:29 -0600 (Wed, 21 Apr 2010)
Log Message:
-----------
The assimilate.csh script now transparently handles any prior or
posterior inflation files - if they do not exist, the script
carries on (without BREAKING!). These get renamed as needed.
The logic of the script is that the 'latest'
xxxx_inflation.DATE.restart.endian files are grabbed from the
POP run directory and are linked as the appropriate
xxxx_inflation_ics file.
model_mod has a trivial change to print out the minimum value
of 'max_reg_list_num' - needed when moving to a new grid.
Modified Paths:
--------------
DART/trunk/models/POP/model_mod.f90
DART/trunk/models/POP/shell_scripts/assimilate.csh
-------------- next part --------------
Modified: DART/trunk/models/POP/model_mod.f90
===================================================================
--- DART/trunk/models/POP/model_mod.f90 2010-04-21 21:27:38 UTC (rev 4354)
+++ DART/trunk/models/POP/model_mod.f90 2010-04-21 21:53:29 UTC (rev 4355)
@@ -443,9 +443,9 @@
enddo
enddo
-! DEBUG to determine max_reg_list_num values for new grids ...
-! write(*,*)'u_dipole_num is ',maxval(u_dipole_num)
-! write(*,*)'t_dipole_num is ',maxval(t_dipole_num)
+if (do_output()) write(*,*)'to determine (minimum) max_reg_list_num values for new grids ...'
+if (do_output()) write(*,*)'u_dipole_num is ',maxval(u_dipole_num)
+if (do_output()) write(*,*)'t_dipole_num is ',maxval(t_dipole_num)
! Invert the temporary data structure. The total number of entries will be
! the sum of the number of dipole cells for each regular cell.
Modified: DART/trunk/models/POP/shell_scripts/assimilate.csh
===================================================================
--- DART/trunk/models/POP/shell_scripts/assimilate.csh 2010-04-21 21:27:38 UTC (rev 4354)
+++ DART/trunk/models/POP/shell_scripts/assimilate.csh 2010-04-21 21:53:29 UTC (rev 4355)
@@ -93,26 +93,26 @@
# geometry. I created the file offline for the gx1v6 geometry on bluefire.
# The inflation values are all unity.
#
-# The strategy is to use an inflation file from CENTRALDIR if one exists -
-# if not, grab one from the same place we get the DART bits -
-# if not, grab the default one and hope for the best.
+# The strategy is to use the LATEST inflation file from CENTRALDIR if one exists -
#
-# The thought being: the first time through, CENTRALDIR doesn't have one
-# so it will either be copied from the DART tree or use a vanilla value.
# After an assimilation, the output file will be copied back to CENTRALDIR
# to be used for subsequent assimilations.
#-------------------------------------------------------------------------
-foreach FILE ( prior_inflate_ics )
+foreach FILE ( prior post )
- if ( -e ../${FILE} ) then
- ${LINK} ../${FILE} .
- else if ( -e ${DARTDIR}/${FILE} ) then
- ${LINK} ${DARTDIR}/${FILE} .
+ # These files may or may not exist. This causes some complexity.
+ # So - we look for the 'newest' and use it. And Pray.
+
+ (ls -rt1 ../${FILE}_inflate.*.restart.* | tail -1 >! latestfile) > & /dev/null
+ set nfiles = `cat latestfile | wc -l`
+
+ if ( $nfiles > 0 ) then
+ set latest = `cat latestfile`
+ ${LINK} $latest ${FILE}_inflate_ics
else
- echo "DART auxiliary file $FILE not found ... starting from 1.0"
- set INFLATEFILE = /ptmp/thoar/gx1v6_prior_inflate_restart.be
- ${COPY} ${INFLATEFILE} prior_inflate_ics
+ # MUST HAVE inf_initial_from_restart = .false.
+ echo "WARNING: no incoming ${FILE}_inflate.YYYY-MM-DD-00000.restart.endiansuffix"
endif
end
@@ -238,26 +238,28 @@
${MOVE} obs_seq.final ../obs_seq.${OCN_DATE_EXT}.final
${MOVE} dart_log.out ../dart_log.${OCN_DATE_EXT}.out
-# FIXME: should add something for posterior_inflate_restarts ...
-if ( -e prior_inflate_restart ) then
- # 1) rename file to reflect current date
- # 2) must link generic name to specific date so next day
- # we can just grab the generic name without having to
- # parse the 'day before the current day'
- # 3) move both to CENTRALDIR so the DART INFLATION BLOCK works next time
- ${MOVE} prior_inflate_restart prior_inflate.${OCN_DATE_EXT}.restart.be
- ${LINK} prior_inflate.${OCN_DATE_EXT}.restart.be prior_inflate_ics
- ${MOVE} prior_inflate.${OCN_DATE_EXT}.restart.be prior_inflate_ics ..
-else
- echo "No prior_inflate_restart for ${OCN_DATE_EXT}"
-endif
+# Accomodate any possible inflation files
-if ( -e prior_inflate_diag ) then
- ${MOVE} prior_inflate_diag ../prior_inflate.${OCN_DATE_EXT}.diag
-else
- echo "No prior_inflate_diag for ${OCN_DATE_EXT}"
-endif
+foreach INFLATION ( prior post )
+ if ( -e ${INFLATION}_inflate_restart ) then
+ # 1) rename file to reflect current date
+ # 2) move to CENTRALDIR so the DART INFLATION BLOCK works next time
+
+ ${MOVE} ${INFLATION}_inflate_restart ../${INFLATION}_inflate.${OCN_DATE_EXT}.restart.be
+
+ else
+ echo "No ${INFLATION}_inflate_restart for ${OCN_DATE_EXT}"
+ endif
+
+ if ( -e ${INFLATION}_inflate_diag ) then
+ ${MOVE} ${INFLATION}_inflate_diag ../${INFLATION}_inflate.${OCN_DATE_EXT}.diag
+ else
+ echo "No ${INFLATION}_inflate_diag for ${OCN_DATE_EXT}"
+ endif
+
+end
+
# FIXME: special for trying out non-monotonic task layouts.
setenv PATH "${ORG_PATH}"
setenv LSB_PJL_TASK_GEOMETRY "${ORG_TASK_GEOMETRY}"
More information about the Dart-dev
mailing list