[Dart-dev] DART/branches Revision: 12082

dart at ucar.edu dart at ucar.edu
Thu Nov 9 13:28:15 MST 2017


nancy at ucar.edu
2017-11-09 13:28:12 -0700 (Thu, 09 Nov 2017)
70
for write_date have to define the variable before
putting the value.




Modified: DART/branches/recam/models/cam-fv/model_mod.f90
===================================================================
--- DART/branches/recam/models/cam-fv/model_mod.f90	2017-11-09 20:14:30 UTC (rev 12081)
+++ DART/branches/recam/models/cam-fv/model_mod.f90	2017-11-09 20:28:12 UTC (rev 12082)
@@ -27,6 +27,7 @@
 use   state_structure_mod
 use  netcdf_utilities_mod,  only : nc_get_variable, nc_get_variable_size, &
                                    nc_add_attribute_to_variable, &
+                                   nc_define_integer_variable, &
                                    nc_define_real_variable, &
                                    nc_add_global_creation_time, &
                                    nc_add_global_attribute, &
@@ -1245,8 +1246,9 @@
                       source, revision, revdate, text2='creating one')
 
    call nc_redef(ncid)
+   call nc_define_integer_variable(ncid, 'date', 0, routine)
+   call nc_enddef(ncid)
    call nc_put_variable(ncid, 'date', cam_date, 0, routine)
-   call nc_enddef(ncid)
 endif
 
 ! if the file doesn't already have a "datesec" variable, so we make one
@@ -1256,8 +1258,9 @@
                       source, revision, revdate, text2='creating one')
 
    call nc_redef(ncid)
+   call nc_define_integer_variable(ncid, 'datesec', 0, routine)
+   call nc_enddef(ncid)
    call nc_put_variable(ncid, 'datesec', cam_tod,  0, routine)
-   call nc_enddef(ncid)
 endif
 
 end subroutine write_model_time


More information about the Dart-dev mailing list