[Dart-dev] DART/branches Revision: 13201

dart at ucar.edu dart at ucar.edu
Tue Jul 23 07:32:07 MDT 2019


thoar at ucar.edu
2019-07-23 07:32:07 -0600 (Tue, 23 Jul 2019)
183
tracking changes from git wrf_hydro_dart. The streamflow_obs_diag
program needed sort routines for more variable types.
Need to add noah and wrf_hydro to the new models/run_test.csh




Modified: DART/branches/rma_wrfHydro/assimilation_code/modules/io/dart_time_io_mod.f90
===================================================================
--- DART/branches/rma_wrfHydro/assimilation_code/modules/io/dart_time_io_mod.f90	2019-07-23 01:48:16 UTC (rev 13200)
+++ DART/branches/rma_wrfHydro/assimilation_code/modules/io/dart_time_io_mod.f90	2019-07-23 13:32:07 UTC (rev 13201)
@@ -30,9 +30,9 @@
 
 ! version controlled file description for error handling, do not edit
 character(len=*), parameter :: source   = &
-   "$URL$"
-character(len=*), parameter :: revision = "$Revision$"
-character(len=*), parameter :: revdate  = "$Date$"
+   '$URL$'
+character(len=*), parameter :: revision = '$Revision$'
+character(len=*), parameter :: revdate  = '$Date$'
 
 character(len=512) :: string1, string2, string3
 
@@ -68,7 +68,7 @@
 
 ncid = nc_open_file_readonly(filename, routine)
 
-ios = nf90_inq_varid(ncid, "time", VarID)
+ios = nf90_inq_varid(ncid, 'time', VarID)
 if (ios /= NF90_NOERR) then
    write(string1,*)'Expecting to be able to read the model time from a "time" variable'
    write(string2,*)'in file "'//trim(filename)//'"'
@@ -93,7 +93,7 @@
 
    ! Since the time variable is known to have only 1 dimension, we know it is the first one.
    ios = nf90_inquire_dimension(ncid, dimIDs(1), len=ntimes)
-   call nc_check(ios, 'read_model_time', 'inquire_dimension for time dimension from "'//trim(filename) )
+   call nc_check(ios, 'read_model_time', 'inquire_dimension for time dimension from "'//trim(filename)//'"')
 
    ! read the last one
    ios = nf90_get_var(ncid, VarID, time_array, start=(/ntimes/), count=(/1/))
@@ -181,7 +181,7 @@
    endif
 else
    call error_handler(E_ERR, 'read_model_time:', &
-    'calendar type "'//trim(dart_calendar)//' unsupported by default read_model_time() routine', &
+    'calendar type "'//trim(dart_calendar)//'" unsupported by default read_model_time() routine', &
                       source, revision, revdate, text2=string3)
 endif
 
@@ -234,9 +234,9 @@
 ! see what kind of calendar dart is currently running with.
 call get_calendar_string(dart_calendar)
 
-ios = nf90_inq_varid(ncid, "time", VarID)
+ios = nf90_inq_varid(ncid, 'time', VarID)
 
-! if the file doesn't already have a "time" variable, we make one
+! if the file doesn't already have a 'time' variable, we make one
 if (ios /= NF90_NOERR) then
 
    call error_handler(E_MSG, routine, 'no variable "time" found in file', &
@@ -244,11 +244,11 @@
 
    ! begin define mode
    ios = nf90_Redef(ncid)
-   call nc_check(ios, routine, "redef")
+   call nc_check(ios, routine, 'redef')
 
    ! check to see if there is a time dimension
    ! if it does not exist create it
-   ios = nf90_inq_dimid(ncid, "time", dimIDs(1))
+   ios = nf90_inq_dimid(ncid, 'time', dimIDs(1))
    if (ios /= NF90_NOERR) then
 
       ! If there is already an unlimited dimension, just make a
@@ -256,10 +256,10 @@
       ! make the time variable 'unlimited'.
 
       if (has_unlimited) then
-         ios = nf90_def_dim(ncid, "time", 1, dimIDs(1))
+         ios = nf90_def_dim(ncid, 'time', 1, dimIDs(1))
          call nc_check(ios, routine, 'def_dim singleton dimension time')
       else
-         ios = nf90_def_dim(ncid, "time", nf90_unlimited, dimIDs(1))
+         ios = nf90_def_dim(ncid, 'time', nf90_unlimited, dimIDs(1))
          call nc_check(ios, routine, 'def_dim unlimited dimension time')
          has_unlimited = .true.
          unlimitedDimID = dimIDs(1)
@@ -270,30 +270,30 @@
    ! make the time variable be dimensioned time(time) which is the
    ! netCDF convention for coordinate variables (variables with the
    ! same name as a dimension).
-   ios = nf90_def_var(ncid, name="time", xtype=nf90_double, dimids=dimIDs(1), varid=VarID)
-   call nc_check(ios, routine, "time def_var")
+   ios = nf90_def_var(ncid, name='time', xtype=nf90_double, dimids=dimIDs(1), varid=VarID)
+   call nc_check(ios, routine, 'time def_var')
 
    ! define time attributes consistent with CF convention
-   ios = nf90_put_att(ncid, VarID, "long_name", "valid time of the model state")
-   call nc_check(ios, routine, "time long_name")
+   ios = nf90_put_att(ncid, VarID, 'long_name', 'valid time of the model state')
+   call nc_check(ios, routine, 'time long_name')
 
    if (dart_calendar == 'NO_CALENDAR') then
-      ios = nf90_put_att(ncid, VarID, "calendar", "none")
-      call nc_check(ios, routine, "calendar long_name")


More information about the Dart-dev mailing list