[Dart-dev] DART/branches Revision: 12880

dart at ucar.edu dart at ucar.edu
Tue Oct 2 15:23:03 MDT 2018


nancy at ucar.edu
2018-10-02 15:23:03 -0600 (Tue, 02 Oct 2018)
313
make the default netcdf write time routine declare the 
time variable as time(time) like other coordinate variables.  
this allows multiple files to be "stacked" along
the time dimension to create a series.  the previous
version of the code created it as a scalar variable.

changes were code reviewed with tim.




Modified: DART/branches/rma_trunk/assimilation_code/modules/io/dart_time_io_mod.f90
===================================================================
--- DART/branches/rma_trunk/assimilation_code/modules/io/dart_time_io_mod.f90	2018-10-02 21:21:34 UTC (rev 12879)
+++ DART/branches/rma_trunk/assimilation_code/modules/io/dart_time_io_mod.f90	2018-10-02 21:23:03 UTC (rev 12880)
@@ -7,9 +7,10 @@
 module dart_time_io_mod
 
 !> \defgroup dart_time_io_mod dart_time_io_mod
-!> Netcdf reading and writing dart model time.
-!> Temporary module for dart time.
-!>@todo should this go in state_vector_io_mod or io_filename_mod?
+!> Default routines for netCDF reading and writing dart model time.
+!> If your model uses a different name for the time dimension
+!> or has a different way of handing/storing time, it must provide 
+!> a custom read_model_time() and write_model_time() routine.
 !> @{
 
 use types_mod,        only : r8, digits12
@@ -233,8 +234,10 @@
         "write_model_time def_var dimension time")
    endif
 
-   !>@todo NF90_UNLIMITED
-   ios = nf90_def_var(ncid, name="time", xtype=nf90_double, varid=VarID)
+   ! 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, "write_model_time", "time def_var")
 
    ! define time attributes consistent with CF convention


More information about the Dart-dev mailing list