[Dart-dev] [5843] DART/branches/development/models/noah: Advanced the model 10 steps of 1 hour and got what looks like a good
nancy at ucar.edu
nancy at ucar.edu
Thu Aug 16 12:54:13 MDT 2012
Revision: 5843
Author: thoar
Date: 2012-08-16 12:54:13 -0600 (Thu, 16 Aug 2012)
Log Message:
-----------
Advanced the model 10 steps of 1 hour and got what looks like a good
obs_seq.out and True_State.nc.
Modified Paths:
--------------
DART/branches/development/models/noah/dart_to_noah.f90
DART/branches/development/models/noah/model_mod.f90
DART/branches/development/models/noah/shell_scripts/advance_model.csh
DART/branches/development/models/noah/shell_scripts/setup_pmo.csh
DART/branches/development/models/noah/work/input.nml
DART/branches/development/models/noah/work/quickbuild.csh
Added Paths:
-----------
DART/branches/development/models/noah/work/namelist.hrldas
-------------- next part --------------
Modified: DART/branches/development/models/noah/dart_to_noah.f90
===================================================================
--- DART/branches/development/models/noah/dart_to_noah.f90 2012-08-16 04:04:09 UTC (rev 5842)
+++ DART/branches/development/models/noah/dart_to_noah.f90 2012-08-16 18:54:13 UTC (rev 5843)
@@ -159,7 +159,7 @@
mytime = mytime + nexttimestep
enddo TIMELOOP
- write(*,*)'needed ',nfiles,' iterations to get from model_time to adv_to_time.'
+ write(*,*)'needed ',nfiles,' LDASIN files to get from model_time to adv_to_time.'
iunit = open_file('noah_advance_information.txt',form='formatted',action='write')
call print_date( model_time,'dart_to_noah:noah model date',iunit)
Modified: DART/branches/development/models/noah/model_mod.f90
===================================================================
--- DART/branches/development/models/noah/model_mod.f90 2012-08-16 04:04:09 UTC (rev 5842)
+++ DART/branches/development/models/noah/model_mod.f90 2012-08-16 18:54:13 UTC (rev 5843)
@@ -529,6 +529,11 @@
if ( .not. module_initialized ) call static_init_model
+write(string1,*) 'PROBLEM: cannot advance model with async == 0.'
+write(string2,*) 'async == 2 is a good choice.'
+call error_handler(E_ERR,'adv_1step',string1,source,revision,revdate, &
+ text2=string2)
+
end subroutine adv_1step
Modified: DART/branches/development/models/noah/shell_scripts/advance_model.csh
===================================================================
--- DART/branches/development/models/noah/shell_scripts/advance_model.csh 2012-08-16 04:04:09 UTC (rev 5842)
+++ DART/branches/development/models/noah/shell_scripts/advance_model.csh 2012-08-16 18:54:13 UTC (rev 5843)
@@ -59,8 +59,24 @@
cd $temp_dir || exit 1
# Get the DART input.nml and the NOAH namelist
-cp ../input.nml . || exit 1
+foreach FILE ( GENPARM.TBL SOILPARM.TBL URBPARM.TBL VEGPARM.TBL namelist.hrldas input.nml )
+ cp -v ../$FILE . || exit 2
+end
+
+set MYSTRING = `grep HRLDAS_CONSTANTS_FILE namelist.hrldas`
+set MYSTRING = `echo $MYSTRING | sed -e "s#[=,']# #g"`
+set MYSTRING = `echo $MYSTRING | sed -e 's#"# #g'`
+set NOAHFILE = `echo $MYSTRING[2]`
+ln -sv ../${NOAHFILE} .
+
+# bulletproof against '! '
+# get the directory containing the LDASIN files
+set MYSTRING = `grep LDASINDIR namelist.hrldas`
+set MYSTRING = `echo $MYSTRING | sed -e "s#[=,']# #g"`
+set MYSTRING = `echo $MYSTRING | sed -e 's#"# #g'`
+set LDASINDIR = `echo $MYSTRING[2]`
+
# Loop through each state
set state_copy = 1
set ensemble_member_line = 1
@@ -72,7 +88,8 @@
set ensemble_member = `head -$ensemble_member_line ../$control_file | tail -1`
set input_file = `head -$input_file_line ../$control_file | tail -1`
set output_file = `head -$output_file_line ../$control_file | tail -1`
-
+ set fext = `printf "%04d" $ensemble_member`
+
#-------------------------------------------------------------------
# Block 2: copy/convert the DART state vector to something the
# model can ingest.
@@ -82,9 +99,33 @@
# * convert the DART state vector to model format
#-------------------------------------------------------------------
- ln ../$input_file temp_ic || exit 2
- ../dart_to_model || exit 2
+ echo "converting ensemble member $fext from dart_restart to NOAH restart.nc"
+ ln -sf ../restart.$fext.nc restart.nc || exit 2
+ ln -sf ../$input_file dart_restart || exit 2
+ ../dart_to_noah || exit 2
+
+ # Extract the right forcing timestep from a single forcing file
+ # and create the appropriate 'one-time-use' forcing file for this
+ # ensemble member.
+ # The forcing has to be for the NEXT "FORCING_TIMESTEP", apparently.
+ # FORCING_TIMESTEP is defined in namelist.input
+
+ set numfilestring = `head -3 noah_advance_information.txt | tail -1`
+ set numfilestring = `echo $numfilestring | sed -e "s#[=,']# #g"`
+ set numfilestring = `echo $numfilestring | sed -e 's#"# #g'`
+ @ numfiles = `echo $numfilestring[2]`
+
+ @ ifile = 1
+ while ($ifile <= $numfiles)
+ @ linenum = 3 + $ifile
+ set FNAME = `head -${linenum} noah_advance_information.txt | tail -1`
+ ln -sf ${LDASINDIR}/${FNAME} .
+ @ ifile = $ifile + 1
+ end
+
+ # ncks -d time,1 santarita_2009.$fext.nc ldasin.nc
+
#-------------------------------------------------------------------
# Block 3: advance the model
# In this case, we are saving the run-time messages to
@@ -94,11 +135,8 @@
# Your model will likely be different.
#-------------------------------------------------------------------
- copy all the stuff needed to run noah to this directory ... here ...
- the forcing files for THIS ensemble member
+ ../Noah_hrldas_beta || exit 3
- ./noah_1d_driver >! integrate_model_out_temp${ensemble_member} || exit 3
-
#-------------------------------------------------------------------
# Block 4: Move the updated state vector back to CENTRALDIR
# (temp_ud was created by integrate_model and is in the
@@ -106,9 +144,17 @@
# model output to a DART ics file with the proper name.
#-------------------------------------------------------------------
- ../model_to_dart || exit 4
- mv temp_ud ../$output_file || exit 4
+ set RESTART = `ls -1 RESTART* | tail -1`
+ ln -sf ${RESTART} restart.nc
+ ../noah_to_dart || exit 4
+ \mv -v dart_ics ../$output_file || exit 4
+ \rm restart.nc
+
+ # rename the restart file to reflect the ensemble member ID
+
+ \mv -v ${RESTART} ../restart.$fext.nc
+
@ state_copy++
@ ensemble_member_line = $ensemble_member_line + 3
@ input_file_line = $input_file_line + 3
Modified: DART/branches/development/models/noah/shell_scripts/setup_pmo.csh
===================================================================
--- DART/branches/development/models/noah/shell_scripts/setup_pmo.csh 2012-08-16 04:04:09 UTC (rev 5842)
+++ DART/branches/development/models/noah/shell_scripts/setup_pmo.csh 2012-08-16 18:54:13 UTC (rev 5843)
@@ -48,10 +48,12 @@
${COPY} ${DARTDIR}/shell_scripts/run_pmo.csh . || exit 2
${COPY} ${DARTDIR}/shell_scripts/advance_model.csh . || exit 2
-# need a single noah restart file
+# need a single noah restart file to be used as THE TRUTH.
# the input.nml:model_nml noah_netcdf_filename = 'restart.nc'
+# the assimilate.csh scripts wants an ensemble member node
ln -sv ${NOAHDIR}/Run/hourly_output/RESTART.2004010107_DOMAIN1 restart.nc
+ln -sv restart.nc restart.0001.nc
./noah_to_dart || exit 3
${MOVE} dart_ics perfect_ics || exit 4
Modified: DART/branches/development/models/noah/work/input.nml
===================================================================
--- DART/branches/development/models/noah/work/input.nml 2012-08-16 04:04:09 UTC (rev 5842)
+++ DART/branches/development/models/noah/work/input.nml 2012-08-16 18:54:13 UTC (rev 5843)
@@ -31,9 +31,9 @@
&perfect_model_obs_nml
start_from_restart = .true.,
output_restart = .true.,
- async = 0,
- init_time_days = 0,
- init_time_seconds = 0,
+ async = 2,
+ init_time_days = -1,
+ init_time_seconds = -1,
first_obs_days = -1,
first_obs_seconds = -1,
last_obs_days = -1,
Added: DART/branches/development/models/noah/work/namelist.hrldas
===================================================================
--- DART/branches/development/models/noah/work/namelist.hrldas (rev 0)
+++ DART/branches/development/models/noah/work/namelist.hrldas 2012-08-16 18:54:13 UTC (rev 5843)
@@ -0,0 +1 @@
+link ../src/hrldas-v3.3/Run/namelist.hrldas
\ No newline at end of file
Property changes on: DART/branches/development/models/noah/work/namelist.hrldas
___________________________________________________________________
Added: svn:special
+ *
Modified: DART/branches/development/models/noah/work/quickbuild.csh
===================================================================
--- DART/branches/development/models/noah/work/quickbuild.csh 2012-08-16 04:04:09 UTC (rev 5842)
+++ DART/branches/development/models/noah/work/quickbuild.csh 2012-08-16 18:54:13 UTC (rev 5843)
@@ -50,7 +50,7 @@
\rm -f ../../../obs_def/obs_def_mod.f90
\rm -f ../../../obs_kind/obs_kind_mod.f90
-set MODEL = "noah_1d"
+set MODEL = "noah"
@ n = 1
More information about the Dart-dev
mailing list