[Dart-dev] [5842] DART/branches/development/models/noah: Simple 1 observation, no model advance perfect_model_obs experiment ran.

nancy at ucar.edu nancy at ucar.edu
Wed Aug 15 22:04:10 MDT 2012


Revision: 5842
Author:   thoar
Date:     2012-08-15 22:04:09 -0600 (Wed, 15 Aug 2012)
Log Message:
-----------
Simple 1 observation, no model advance perfect_model_obs experiment ran.

Modified Paths:
--------------
    DART/branches/development/models/noah/dart_to_noah.f90
    DART/branches/development/models/noah/model_mod.f90
    DART/branches/development/models/noah/noah_to_dart.f90
    DART/branches/development/models/noah/work/input.nml

Added Paths:
-----------
    DART/branches/development/models/noah/shell_scripts/run_pmo.csh
    DART/branches/development/models/noah/shell_scripts/setup_pmo.csh

-------------- next part --------------
Modified: DART/branches/development/models/noah/dart_to_noah.f90
===================================================================
--- DART/branches/development/models/noah/dart_to_noah.f90	2012-08-09 15:08:49 UTC (rev 5841)
+++ DART/branches/development/models/noah/dart_to_noah.f90	2012-08-16 04:04:09 UTC (rev 5842)
@@ -30,11 +30,13 @@
 use    utilities_mod, only : initialize_utilities, timestamp, &
                              find_namelist_in_file, check_namelist_read, &
                              logfileunit, open_file, close_file, &
-                             error_handler, E_MSG
+                             error_handler, E_ERR
 use  assim_model_mod, only : open_restart_read, aread_state_restart, close_restart
-use time_manager_mod, only : time_type, print_time, print_date, operator(-), get_time
+use time_manager_mod, only : time_type, print_time, print_date, get_date, &
+                             set_time, operator(+), operator(-), operator(<=)
 use        model_mod, only : static_init_model, dart_vector_to_model_file, &
-                             get_model_size, get_noah_restart_filename
+                             get_model_size, get_noah_restart_filename, &
+                             get_noah_timestepping
 
 implicit none
 
@@ -49,21 +51,30 @@
 !------------------------------------------------------------------
 
 character (len = 128) :: dart_to_noah_input_file = 'dart_restart'
+character (len = 128) :: noah_reqd_file_list = 'ldasin_files_needed'
 character (len=obstypelength), dimension(40) :: do_not_update_variables = ' '
 logical               :: advance_time_present   = .true.
 
 namelist /dart_to_noah_nml/ dart_to_noah_input_file, &
+                            noah_reqd_file_list,     &
                             do_not_update_variables, &
                             advance_time_present
 
 !----------------------------------------------------------------------
 
 character(len=20)     :: noah_restart_filename
-integer               :: iunit, io, x_size
-type(time_type)       :: model_time, adv_to_time
+integer               :: ifile, nfiles, iunit, io, x_size
+type(time_type)       :: model_time, adv_to_time, mytime
+type(time_type)       :: forcingtimestep, nexttimestep
 real(r8), allocatable :: statevector(:)
 logical               :: verbose              = .FALSE.
+integer               :: kday, khour, noah_timestep, output_timestep
+integer               :: forcing_timestep, restart_frequency_seconds
 
+integer :: year,month,day,hour,minute,second
+character(len=obstypelength) :: datestring
+character(len=128)           :: string1,string2,string3
+
 !----------------------------------------------------------------------
 
 call initialize_utilities(progname='dart_to_noah', output_flag=verbose)
@@ -107,26 +118,94 @@
 call close_restart(iunit)
 
 !----------------------------------------------------------------------
-! write out the new namelist ...
+! write the updated state to the NOAH restart file.
 !----------------------------------------------------------------------
 
+call dart_vector_to_model_file(statevector, noah_restart_filename, model_time)
+
+!----------------------------------------------------------------------
+! Convey adv_to_time to noah by updating kday or khour in the namelist.
+! We should be able to predict the names of the LDASIN files needed -
+!    write these to a file that will be queried by advance_model.csh
+!    so they get staged appropriately.
+!----------------------------------------------------------------------
+
 if ( advance_time_present ) then
-   call dart_vector_to_model_file(statevector, noah_restart_filename, model_time, adv_to_time)
-else
-   call dart_vector_to_model_file(statevector, noah_restart_filename, model_time)
+
+   ! AS long as the output_timestep, forcing_timestep, and noah_timestep are all identical,
+   ! the time in the restart file is the time of the next forcing file needed.
+
+   call get_noah_timestepping(kday, khour, noah_timestep, output_timestep, forcing_timestep, &
+                              restart_frequency_seconds)
+   
+   if ( (noah_timestep == forcing_timestep) .and. &
+        (noah_timestep == output_timestep )) then
+
+   else
+      write(string2,*) 'noah_timestep ', noah_timestep, ' /= forcing_timestep of ',forcing_timestep
+      write(string3,*) 'noah_timestep ', noah_timestep, ' /= output_timestep of ',output_timestep
+      write(string1,*) 'temporarily unsupported configuration'
+      call error_handler(E_ERR,'dart_to_noah',string1,source,revision,revdate,&
+                         text2=string2,text3=string3)
+   endif
+
+   ! figure out how many timesteps between adv_to_time and model_time
+   mytime          = model_time
+   nexttimestep    = set_time(   noah_timestep, 0)
+   forcingtimestep = set_time(forcing_timestep, 0)
+   nfiles = 0
+   TIMELOOP: do while (mytime <= adv_to_time)
+      nfiles = nfiles + 1
+      mytime = mytime + nexttimestep
+   enddo TIMELOOP
+
+   write(*,*)'needed ',nfiles,' iterations 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)
+   call print_date( adv_to_time,'dart_to_noah:noah  advance_to_date',iunit)
+   write(iunit,'(''nfiles = '',i6)') nfiles
+
+   mytime = model_time
+
+   do ifile = 1,nfiles
+      ! The model time is one noah_timestep (which must be equal to RESTART_FREQUENCY_HOURS)
+      ! behind the file names needed.
+
+      mytime = mytime + nexttimestep
+
+      call get_date(mytime,year,month,day,hour,minute,second)
+
+      ! TJH FIXME - what happens to seconds ...
+      if ((minute == 0) .and. (second == 0)) then
+         write(datestring,'(i4.4,3(i2.2))')year,month,day,hour
+      else
+         write(datestring,'(i4.4,4(i2.2))')year,month,day,hour,minute
+      endif
+
+      write(iunit,'(a)')trim(datestring)//'.LDASIN_DOMAIN1'
+   enddo
+
+   call close_file(iunit)
+
+!  We know we need the forcing file for the timestring contained in the restart file.
+!  This is a direct consequence of requiring the noah_timestep to be the same as the restart_frequency. 
+!  determine how many forcing files are needed
+!  determine the setting of kday or khour
+
+!  convey kday or khour in some fashion
+
 endif
 
 !----------------------------------------------------------------------
 ! Log what we think we're doing, and exit.
 !----------------------------------------------------------------------
 
-! TJH FIXME convey adv_to_time to noah ...
+call print_date( model_time,'dart_to_noah:noah model date')
+call print_time( model_time,'dart_to_noah:DART model time')
+call print_date( model_time,'dart_to_noah:noah model date',logfileunit)
+call print_time( model_time,'dart_to_noah:DART model time',logfileunit)
 
-call print_date( model_time,'dart_to_noah:noah  model date')
-call print_time( model_time,'dart_to_noah:DART  model time')
-call print_date( model_time,'dart_to_noah:noah  model date',logfileunit)
-call print_time( model_time,'dart_to_noah:DART  model time',logfileunit)
-
 if ( advance_time_present ) then
    call print_time(adv_to_time,'dart_to_noah:advance_to time')
    call print_date(adv_to_time,'dart_to_noah:advance_to date')

Modified: DART/branches/development/models/noah/model_mod.f90
===================================================================
--- DART/branches/development/models/noah/model_mod.f90	2012-08-09 15:08:49 UTC (rev 5841)
+++ DART/branches/development/models/noah/model_mod.f90	2012-08-16 04:04:09 UTC (rev 5842)
@@ -76,7 +76,8 @@
 ! the model_mod code.
 public :: noah_to_dart_vector, &
           dart_vector_to_model_file, &
-          get_noah_restart_filename
+          get_noah_restart_filename, &
+          get_noah_timestepping
 
 ! version controlled file description for error handling, do not edit
 character(len=128), parameter :: &
@@ -108,7 +109,6 @@
 !------------------------------------------------------------------
 
 character(len=128)    :: noah_netcdf_filename   = 'restart.nc'
-character(len=128)    :: noah_namelist_filename = 'namelist.hrldas'
 integer               :: assimilation_period_days     = 0
 integer               :: assimilation_period_seconds  = 60
 real(r8)              :: model_perturbation_amplitude = 0.2
@@ -117,13 +117,15 @@
 integer               :: debug    = 0  ! turn up for more and more debug messages
 character(len=obstypelength) :: noah_variables(MAX_STATE_VARIABLES*NUM_STATE_TABLE_COLUMNS) = ' '
 
-namelist /model_nml/ noah_netcdf_filename, noah_namelist_filename, &
+namelist /model_nml/ noah_netcdf_filename, &
           assimilation_period_days, assimilation_period_seconds,   &
           model_perturbation_amplitude, output_state_vector,       &
           calendar, debug, noah_variables
 
 !------------------------------------------------------------------
 ! Everything needed to recreate the NOAH METADTA_NAMELIST
+! We are going to require that the namelist be in a file whose name
+! is (I believe) standard .... namelist.hrldas
 !
 ! To restart the file, we write a new namelist.
 ! DART needs to write a NOAH-compatible namelist.
@@ -131,6 +133,9 @@
 
 ! ZSOIL, set through the namelist, is the BOTTOM of each soil layer (m)
 ! Values are negative, implying depth below the surface.
+
+character(len=128)    :: noah_namelist_filename = 'namelist.hrldas' ! mandate
+
 real(r8), dimension(nsoldx) :: zsoil
 integer                     :: nsoil
 
@@ -141,8 +146,8 @@
 character(len=256) :: external_lai_filename_template = " "
 character(len=256) :: restart_filename_requested = " "
 integer            :: split_output_count = 1
-integer            :: restart_frequency_hours
-integer            :: output_timestep
+integer            :: restart_frequency_hours = -999
+integer            :: output_timestep  = -999
 integer            :: subwindow_xstart = 1
 integer            :: subwindow_ystart = 1
 integer            :: subwindow_xend = 0
@@ -154,8 +159,8 @@
 integer  :: start_year, start_month, start_day, start_hour, start_min
 integer  :: noah_timestep = -999
 integer  :: forcing_timestep = -999
-
-integer  :: khour, kday
+integer  :: khour = 0
+integer  :: kday  = 0
 real(r8) :: zlvl, zlvl_wind
 
 namelist / NOAHLSM_OFFLINE/ indir, nsoil, zsoil, forcing_timestep, noah_timestep, &
@@ -262,11 +267,11 @@
 
 ! Check to make sure the required NOAH input files exist
 if ( .not. file_exist(noah_netcdf_filename) ) then
-   write(string1,*) 'cannot open file ', trim(noah_netcdf_filename),' for reading.'
+   write(string1,*) 'cannot open NOAH restart file ', trim(noah_netcdf_filename),' for reading.'
    call error_handler(E_ERR,'static_init_model',string1,source,revision,revdate)
 endif
 if ( .not. file_exist(noah_namelist_filename) ) then
-   write(string1,*) 'cannot open file ', trim(noah_namelist_filename),' for reading.'
+   write(string1,*) 'cannot open NOAH namelist file ', trim(noah_namelist_filename),' for reading.'
    call error_handler(E_ERR,'static_init_model',string1,source,revision,revdate)
 endif
 
@@ -285,6 +290,20 @@
    call error_handler(E_ERR,'static_init_model',string1,source,revision,revdate)
 endif
 
+! Check to make sure the required NOAH namelist items are set:
+if ( (kday             < 0    ) .or. &
+     (khour            < 0    ) .or. &
+     (forcing_timestep /= 3600) .or. &
+     (noah_timestep    /= 3600) .or. &
+     (output_timestep  /= 3600) .or. &
+     (restart_frequency_hours /= 1) ) then
+   write(string3,*)'the only configuration supported is for hourly timesteps'
+   write(string2,*)'restart_frequency_hours must be equal to the noah_timstep'
+   write(string1,*)'unsupported noah namelist settings'
+   call error_handler(E_ERR,'static_init_model',string1,source,revision,revdate,&
+                            text2=string2,text3=string3)
+endif
+
 call get_hrldas_constants(hrldas_constants_file)
 
 ! The time_step in terms of a time type must also be initialized.
@@ -412,7 +431,7 @@
    progvar(ivar)%indexN      = index1 + varsize - 1
    index1                    = index1 + varsize      ! sets up for next variable
 
-   if ( debug > 8 ) then
+   if ( debug > 99 ) then
       write(logfileunit,*)
       write(logfileunit,*) trim(progvar(ivar)%varname),' variable number ',ivar
       write(logfileunit,*) '  long_name   ',trim(progvar(ivar)%long_name)
@@ -653,8 +672,10 @@
 
 if ( .not. module_initialized ) call static_init_model
 
-get_model_time_step = model_time_step
+! The NOAH model can only be advanced in multiples of the restart frequency.
 
+get_model_time_step = set_time(khour*3600,kday)
+
 end function get_model_time_step
 
 
@@ -1514,8 +1535,10 @@
 
 restart_time = get_state_time(ncid, trim(filename))
 
-if (do_output()) call print_time(restart_time,'time in restart file '//trim(filename))
-if (do_output()) call print_date(restart_time,'date in restart file '//trim(filename))
+if ( debug > 99 ) then
+   call print_date(restart_time,'noah_to_dart_vector:date of restart file '//trim(filename))
+   call print_time(restart_time,'noah_to_dart_vector:time of restart file '//trim(filename))
+endif
 
 ! Start counting and filling the state vector one item at a time,
 ! repacking the Nd arrays into a single 1d list of numbers.
@@ -1686,19 +1709,17 @@
 
 
 
-subroutine dart_vector_to_model_file(state_vector, filename, dart_time, adv_to_time)
+subroutine dart_vector_to_model_file(state_vector, filename, dart_time)
 !------------------------------------------------------------------
 ! Writes the current time and state variables from a dart state
 ! vector (1d array) into a noah netcdf restart file.
 !
 ! This is VERY similar to nc_write_model_vars() for this model.
 ! If it were not for the 'copy' dimension, it would be identical, I think.
-! Then there's the part about communicating the adv_to_time ...
 
 real(r8),         intent(in) :: state_vector(:)
 character(len=*), intent(in) :: filename
 type(time_type),  intent(in) :: dart_time
-type(time_type),  intent(in), optional :: adv_to_time
 
 integer, dimension(NF90_MAX_VAR_DIMS) :: dimIDs, mystart, mycount
 character(len=NF90_MAX_NAME)          :: varname
@@ -1736,24 +1757,24 @@
 
 ! make sure the time in the file is the same as the time on the data
 ! we are trying to insert.  we are only updating part of the contents
-! of the clm restart file, and state vector contents from a different
+! of the NOAH restart file, and state vector contents from a different
 ! time won't be consistent with the rest of the file.
 
 file_time = get_state_time(ncFileID, trim(filename), timeindex)
 
 if ( file_time /= dart_time ) then
    call print_time(dart_time,'DART current time',logfileunit)
-   call print_time(file_time,'clm  current time',logfileunit)
+   call print_time(file_time,'NOAH current time',logfileunit)
    call print_time(dart_time,'DART current time')
-   call print_time(file_time,'clm  current time')
+   call print_time(file_time,'NOAH current time')
    write(string1,*)trim(filename),' current time /= model time. FATAL error.'
    call error_handler(E_ERR,'dart_vector_to_model_file',string1,source,revision,revdate)
 endif
 
-if (do_output()) &
-    call print_time(file_time,'time of restart file '//trim(filename))
-if (do_output()) &
-    call print_date(file_time,'date of restart file '//trim(filename))
+if (do_output()) then
+   call print_date(file_time,'dart_vector_to_model_file: date of restart file '//trim(filename))
+   call print_time(file_time,'dart_vector_to_model_file: time of restart file '//trim(filename))
+endif
 
 ! The DART prognostic variables are only defined for a single time.
 ! IF the netCDF variable has a TIME dimension, it must be the last dimension.
@@ -1803,7 +1824,7 @@
    where(dimIDs == TimeDimID) mystart = timeindex
    where(dimIDs == TimeDimID) mycount = 1
 
-   if ( debug > 0 ) then
+   if ( debug > 99 ) then
       write(*,*)'dart_vector_to_model_file '//trim(varname)//' start is ',mystart(1:ncNdims)
       write(*,*)'dart_vector_to_model_file '//trim(varname)//' count is ',mycount(1:ncNdims)
       write(*,*)'dart_vector_to_model_file ',dimnames(1:progvar(ivar)%numdims)
@@ -1868,13 +1889,23 @@
 ! The restart netcdf files have the time of the state.
 ! We are always using the 'most recent' which is, by defn, the last one.
 !
+! The way the HRLDAS driver works is a bit wonky.
+! The time in the restart file is NOT the time at which the state is valid.
+! It is one noah_timestep AHEAD of the valid time.
+!
+! for instance, if the noah_timestep is 3600 seconds, the restart_frequency_hours is 1,
+! and the filename is RESTART.2004010102_DOMAIN1 the 
+!
 !        Time = UNLIMITED ; // (blah_blah_blah currently)
 !        DateStrLen = 19 ;
 !variables:
 !        char Times(Time, DateStrLen) ;
 !
 ! Times =
-!  '2004-01-01_01:00:00' ;
+!  '2004-01-01_02:00:00' ;
+!
+! BUT - the data is for the previous noah_timestep ... i.e. 2004-01-01_01:00:00
+! No kidding.
 
 type(time_type) :: get_state_time
 integer,           intent(in)  :: ncid
@@ -1885,6 +1916,7 @@
 integer               :: year, month, day, hour, minute, second
 integer               :: DimID, VarID, strlen, ntimes
 integer, dimension(2) :: ncstart, nccount
+type(time_type)       :: filetime, timestep
 
 if ( .not. module_initialized ) call static_init_model
 
@@ -1905,31 +1937,29 @@
    call error_handler(E_ERR,'get_state_time', string1, source, revision, revdate)
 endif
 
-! Get the last Time string
+! Get all the Time strings, use the last one.
 
 call nc_check(nf90_inq_varid(ncid, 'Times', VarID), &
                    'get_state_time', 'inq_varid Times '//trim(filename))
 
-! for some reason, this did not work ... its a bit more compact than reading the whole thing.
-!ncstart = (/ 1, ntimes /)
-!nccount = (/ 1,      1 /)
-!call nc_check(nf90_get_var(ncid, VarID, datestring, start=ncstart, count=nccount), &
-!                  'get_state_time', 'get_var Times '//trim(filename))
+allocate(datestring(ntimes))
 
-allocate(datestring(ntimes))
 call nc_check(nf90_get_var(ncid, VarID, datestring), &
                    'get_state_time', 'get_var Times '//trim(filename))
 
-if ( debug > 0 ) write(*,*)'Last time is '//trim(datestring(ntimes))
-
 read(datestring(ntimes),'(i4,5(1x,i2))')year, month, day, hour, minute, second
 
-get_state_time = set_date(year, month, day, hours=hour, minutes=minute, seconds=second)
+timestep       = set_time(noah_timestep, 0)
+filetime       = set_date(year, month, day, hours=hour, minutes=minute, seconds=second)
+get_state_time = filetime - timestep
 
+if (present(timeindex)) timeindex = ntimes
+
+if ( debug > 99 ) write(*,*)'get_state_time: Last time string is '//trim(datestring(ntimes))
+if ( debug > 99 ) call print_date(get_state_time,' get_state_time: means valid time is ')
+
 deallocate(datestring)
 
-if (present(timeindex)) timeindex = ntimes
-
 end function get_state_time
 
 
@@ -2198,8 +2228,19 @@
 
 
 
+subroutine get_noah_timestepping(day,hour,dynamical,output,forcing,restart)
+integer,          intent(out) :: day,hour,dynamical,output,forcing,restart
 
+day       = kday
+hour      = khour
+dynamical = noah_timestep
+output    = output_timestep
+forcing   = forcing_timestep
+restart   = restart_frequency_hours*3600
 
+end subroutine 
+
+
 !===================================================================
 ! End of model_mod
 !===================================================================

Modified: DART/branches/development/models/noah/noah_to_dart.f90
===================================================================
--- DART/branches/development/models/noah/noah_to_dart.f90	2012-08-09 15:08:49 UTC (rev 5841)
+++ DART/branches/development/models/noah/noah_to_dart.f90	2012-08-16 04:04:09 UTC (rev 5842)
@@ -96,8 +96,8 @@
 ! When called with 'end', timestamp will call finalize_utilities()
 !----------------------------------------------------------------------
 
-call print_date(model_time, str='noah_to_dart:noah  model date')
-call print_time(model_time, str='noah_to_dart:DART    model time')
+call print_date(model_time, str='noah_to_dart:DART model date')
+call print_time(model_time, str='noah_to_dart:DART model time')
 call timestamp(string1=source, pos='end')
 
 end program noah_to_dart

Added: DART/branches/development/models/noah/shell_scripts/run_pmo.csh
===================================================================
--- DART/branches/development/models/noah/shell_scripts/run_pmo.csh	                        (rev 0)
+++ DART/branches/development/models/noah/shell_scripts/run_pmo.csh	2012-08-16 04:04:09 UTC (rev 5842)
@@ -0,0 +1,62 @@
+#!/bin/csh
+#
+# DART software - Copyright 2004 - 2011 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
+#
+# $Id$
+#
+# This is an example script for how to run a perfect_model experiment.
+# All the required files have been staged in CENTRALDIR and the namelists
+# have been customized for the experiment. Since perfect_model_obs is a single-
+# threaded program ... and we are only running one instance of NOAH ... we are
+# running this on the command line.
+
+#==============================================================================
+# Set the commands so we can avoid problems with aliases, etc.
+#==============================================================================
+
+set   MOVE = '/usr/local/bin/mv -fv'
+set   COPY = '/usr/local/bin/cp -fv --preserve=timestamps'
+set   LINK = '/usr/local/bin/ln -fvs'
+set REMOVE = '/usr/local/bin/rm -fr'
+
+set   MOVE = '/bin/mv -fv'
+set   COPY = '/bin/cp -fvp'
+set   LINK = '/bin/ln -fvs'
+set REMOVE = '/bin/rm -fr'
+
+#==============================================================================
+# Check to make sure all the required files have been staged in CENTRALDIR
+#==============================================================================
+
+set CENTRALDIR = `pwd`
+
+@ BAIL = 0
+foreach FILE ( wrfinput namelist.hrldas Noah_hrldas_beta SOILPARM.TBL \
+               VEGPARM.TBL GENPARM.TBL URBPARM.TBL obs_seq.in input.nml \
+               perfect_model_obs dart_to_noah noah_to_dart run_pmo.csh \
+               advance_model.csh restart.nc perfect_ics)
+
+   if ( ! -e $FILE ) then
+      echo "$FILE is needed but not present in CENTRALDIR"
+      @ BAIL = 1
+   endif
+
+end
+
+if ( $BAIL > 0 ) then
+   echo "FATAL ERROR ... stage the missing file(s) and try again."
+   echo "FATAL ERROR ... stage the missing file(s) and try again."
+   exit 1
+endif
+
+./perfect_model_obs
+
+exit 0
+
+# <next few lines under version control, do not edit>
+# $URL$
+# $Revision$
+# $Date$
+


Property changes on: DART/branches/development/models/noah/shell_scripts/run_pmo.csh
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author HeadURL Id
Added: svn:eol-style
   + native

Added: DART/branches/development/models/noah/shell_scripts/setup_pmo.csh
===================================================================
--- DART/branches/development/models/noah/shell_scripts/setup_pmo.csh	                        (rev 0)
+++ DART/branches/development/models/noah/shell_scripts/setup_pmo.csh	2012-08-16 04:04:09 UTC (rev 5842)
@@ -0,0 +1,73 @@
+#!/bin/csh
+#
+# DART software - Copyright 2004 - 2011 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
+#
+# $Id$
+#
+# This is an example script for how to stage the files in CENTRALDIR
+# in preparation for a 'perfect model' or OSSE.
+#
+#==============================================================================
+# Set the commands so we can avoid problems with aliases, etc.
+#==============================================================================
+
+set   MOVE = '/usr/local/bin/mv -fv'
+set   COPY = '/usr/local/bin/cp -fv --preserve=timestamps'
+set   LINK = '/usr/local/bin/ln -fvs'
+set REMOVE = '/usr/local/bin/rm -fr'
+
+set   MOVE = '/bin/mv -fv'
+set   COPY = '/bin/cp -fvp'
+set   LINK = '/bin/ln -fvs'
+set REMOVE = '/bin/rm -fr'
+
+#==============================================================================
+# Stage all the required files in CENTRALDIR
+#==============================================================================
+
+set CENTRALDIR = `pwd`
+
+set NOAHDIR = /Users/thoar/svn/DART/devel/models/noah/src/hrldas-v3.3
+set DARTDIR = /Users/thoar/svn/DART/devel/models/noah
+
+${COPY} ${NOAHDIR}/Run/wrfinput.template    wrfinput  || exit 1
+${COPY} ${NOAHDIR}/Run/namelist.hrldas             .  || exit 1
+${COPY} ${NOAHDIR}/Run/Noah_hrldas_beta            .  || exit 1
+${COPY} ${NOAHDIR}/Run/SOILPARM.TBL                .  || exit 1
+${COPY} ${NOAHDIR}/Run/VEGPARM.TBL                 .  || exit 1
+${COPY} ${NOAHDIR}/Run/GENPARM.TBL                 .  || exit 1
+${COPY} ${NOAHDIR}/Run/URBPARM.TBL                 .  || exit 1
+
+${COPY} ${DARTDIR}/work/obs_seq.in                 .  || exit 2
+${COPY} ${DARTDIR}/work/input.nml                  .  || exit 2
+${COPY} ${DARTDIR}/work/perfect_model_obs          .  || exit 2
+${COPY} ${DARTDIR}/work/dart_to_noah               .  || exit 2
+${COPY} ${DARTDIR}/work/noah_to_dart               .  || exit 2
+${COPY} ${DARTDIR}/shell_scripts/run_pmo.csh       .  || exit 2
+${COPY} ${DARTDIR}/shell_scripts/advance_model.csh .  || exit 2
+
+# need a single noah restart file 
+# the input.nml:model_nml noah_netcdf_filename = 'restart.nc'
+
+ln -sv ${NOAHDIR}/Run/hourly_output/RESTART.2004010107_DOMAIN1 restart.nc
+
+./noah_to_dart                || exit 3
+${MOVE} dart_ics perfect_ics  || exit 4
+
+echo
+echo "CENTRALDIR is ${CENTRALDIR}"
+echo "Configure     ${CENTRALDIR}/input.nml"
+echo "Configure     ${CENTRALDIR}/namelist.hrldas"
+echo "Configure     ${CENTRALDIR}/wrfinput"
+echo "execute       ${CENTRALDIR}/run_pmo.csh"
+echo
+
+exit 0
+
+# <next few lines under version control, do not edit>
+# $URL$
+# $Revision$
+# $Date$
+


Property changes on: DART/branches/development/models/noah/shell_scripts/setup_pmo.csh
___________________________________________________________________
Added: svn:executable
   + *
Added: svn:mime-type
   + text/plain
Added: svn:keywords
   + Date Rev Author HeadURL Id
Added: svn:eol-style
   + native

Modified: DART/branches/development/models/noah/work/input.nml
===================================================================
--- DART/branches/development/models/noah/work/input.nml	2012-08-09 15:08:49 UTC (rev 5841)
+++ DART/branches/development/models/noah/work/input.nml	2012-08-16 04:04:09 UTC (rev 5842)
@@ -2,7 +2,6 @@
 
 &model_nml
      noah_netcdf_filename         = 'restart.nc',
-     noah_namelist_filename       = 'namelist.hrldas',
      assimilation_period_days     =    0,
      assimilation_period_seconds  = 3600,
      model_perturbation_amplitude = 0.0,


More information about the Dart-dev mailing list