[Dart-dev] [5852] DART/branches/development/models/noah: Implemented the ' do not update' the NOAH restart file given

nancy at ucar.edu nancy at ucar.edu
Thu Aug 30 15:08:52 MDT 2012


Revision: 5852
Author:   thoar
Date:     2012-08-30 15:08:51 -0600 (Thu, 30 Aug 2012)
Log Message:
-----------
Implemented the 'do not update' the NOAH restart file given 
a list of variable names to exclude. The list is defined in
the dart_to_noah_nml namelist by do_not_update_variables

Modified Paths:
--------------
    DART/branches/development/models/noah/dart_to_noah.f90
    DART/branches/development/models/noah/model_mod.f90

-------------- next part --------------
Modified: DART/branches/development/models/noah/dart_to_noah.f90
===================================================================
--- DART/branches/development/models/noah/dart_to_noah.f90	2012-08-17 21:25:45 UTC (rev 5851)
+++ DART/branches/development/models/noah/dart_to_noah.f90	2012-08-30 21:08:51 UTC (rev 5852)
@@ -121,7 +121,8 @@
 ! write the updated state to the NOAH restart file.
 !----------------------------------------------------------------------
 
-call dart_vector_to_model_file(statevector, noah_restart_filename, model_time)
+call dart_vector_to_model_file(statevector, noah_restart_filename, model_time, &
+                               do_not_update_variables)
 
 !----------------------------------------------------------------------
 ! Convey adv_to_time to noah by updating kday or khour in the namelist.

Modified: DART/branches/development/models/noah/model_mod.f90
===================================================================
--- DART/branches/development/models/noah/model_mod.f90	2012-08-17 21:25:45 UTC (rev 5851)
+++ DART/branches/development/models/noah/model_mod.f90	2012-08-30 21:08:51 UTC (rev 5852)
@@ -1712,7 +1712,7 @@
 
 
 
-subroutine dart_vector_to_model_file(state_vector, filename, dart_time)
+subroutine dart_vector_to_model_file(state_vector, filename, dart_time, do_not_update_variables)
 !------------------------------------------------------------------
 ! Writes the current time and state variables from a dart state
 ! vector (1d array) into a noah netcdf restart file.
@@ -1723,6 +1723,7 @@
 real(r8),         intent(in) :: state_vector(:)
 character(len=*), intent(in) :: filename
 type(time_type),  intent(in) :: dart_time
+character(len=*), intent(in) :: do_not_update_variables(:)
 
 integer, dimension(NF90_MAX_VAR_DIMS) :: dimIDs, mystart, mycount
 character(len=NF90_MAX_NAME)          :: varname
@@ -1787,6 +1788,13 @@
    varname = trim(progvar(ivar)%varname)
    string2 = trim(filename)//' '//trim(varname)
 
+   ! If this variable is on the skip list ... skip it.
+
+   SKIPME : do i = 1,size(do_not_update_variables)
+      if (len_trim(do_not_update_variables(i)) < 1) cycle SKIPME
+      if (trim(do_not_update_variables(i)) == trim(varname)) cycle UPDATE
+   enddo SKIPME
+
    ! Ensure netCDF variable is conformable with DART progvar quantity.
 
    call nc_check(nf90_inq_varid(ncFileID, varname, VarID), &


More information about the Dart-dev mailing list