[Dart-dev] DART/branches Revision: 11053

dart at ucar.edu dart at ucar.edu
Wed Feb 8 15:34:45 MST 2017


hendric at ucar.edu
2017-02-08 15:34:45 -0700 (Wed, 08 Feb 2017)
46
updating lorenz_96 namelists and attributes.




Modified: DART/branches/rma_single_file/models/lorenz_96/model_mod.f90
===================================================================
--- DART/branches/rma_single_file/models/lorenz_96/model_mod.f90	2017-02-08 22:18:08 UTC (rev 11052)
+++ DART/branches/rma_single_file/models/lorenz_96/model_mod.f90	2017-02-08 22:34:45 UTC (rev 11053)
@@ -458,8 +458,7 @@
 ! netCDF variables for Location
 !--------------------------------------------------------------------
 
-integer :: LocationVarID
-integer :: StateVarDimID, StateVarVarID
+integer :: LocationDimID, LocationVarID
 integer :: StateVarID, MemberDimID, TimeDimID
 
 !--------------------------------------------------------------------
@@ -479,7 +478,7 @@
 type(ensemble_type) :: state_handle ! needed for compilation, not used here
 
 ierr = 0                      ! assume normal termination
-model_mod_writes_state_variables = .true. 
+model_mod_writes_state_variables = .false. 
 
 !--------------------------------------------------------------------
 ! we only have a netcdf handle here so we do not know the filename
@@ -502,17 +501,6 @@
               'nc_write_model_atts', 'redef, '//trim(filename))
 
 !--------------------------------------------------------------------
-! Determine ID's from stuff already in the netCDF file
-!--------------------------------------------------------------------
-
-! make sure time is unlimited dimid
-
-call nc_check(nf90_inq_dimid(ncFileID,"copy",dimid=MemberDimID), &
-              'nc_write_model_atts', 'inq_dimid copy, '//trim(filename))
-call nc_check(nf90_inq_dimid(ncFileID,"time",dimid=TimeDimID), &
-              'nc_write_model_atts', 'inq_dimid time, '//trim(filename))
-
-!--------------------------------------------------------------------
 ! Write Global Attributes 
 !--------------------------------------------------------------------
 call DATE_AND_TIME(crdate,crtime,crzone,values)
@@ -539,9 +527,9 @@
 ! Define the model size, state variable dimension ... whatever ...
 !--------------------------------------------------------------------
 
-call nc_check(nf90_def_dim(ncid=ncFileID, name="StateVariable", &
-                           len=int(model_size, i4), dimid = StateVarDimID), &
-                          'nc_write_model_atts', 'def_dim StateVariable, '//trim(filename))
+call nc_check(nf90_def_dim(ncid=ncFileID, name="location", &
+                           len=int(model_size, i4), dimid = LocationDimID), &
+                          'nc_write_model_atts', 'def_dim location, '//trim(filename))
 
 !--------------------------------------------------------------------
 ! Define the Location Variable and add Attributes
@@ -550,8 +538,8 @@
 ! http://www.cgd.ucar.edu/cms/eaton/netcdf/CF-working.html#ctype
 !--------------------------------------------------------------------
 
-call nc_check(NF90_def_var(ncFileID, name=trim(adjustl(LocationName)), xtype=nf90_double, &
-              dimids = StateVarDimID, varid=LocationVarID), &
+call nc_check(NF90_def_var(ncFileID, name="location", xtype=nf90_double, &
+              dimids = LocationDimID, varid=LocationVarID), &
               'nc_write_model_atts', 'check, '//trim(LocationName)//', '//trim(filename))
 call nc_check(nf90_put_att(ncFileID, LocationVarID, "long_name", trim(adjustl(LocationLName))), &
               'nc_write_model_atts', 'put_att long_name, '//trim(filename))
@@ -566,32 +554,10 @@
 ! Define either the "state vector" variables -OR- the "prognostic" variables.
 !--------------------------------------------------------------------
 
-! Define the state vector coordinate variable
-call nc_check(nf90_def_var(ncid=ncFileID,name="StateVariable", xtype=nf90_int, &
-              dimids=StateVarDimID, varid=StateVarVarID), &
-             'nc_write_model_atts', 'def_var StateVariable, '//trim(filename))
-call nc_check(nf90_put_att(ncFileID, StateVarVarID, "long_name", "State Variable ID"), &
-              'nc_write_model_atts', 'put_att long_name, '//trim(filename))
-call nc_check(nf90_put_att(ncFileID, StateVarVarID, "units",     "indexical"), &
-              'nc_write_model_atts', 'put_att units, '//trim(filename))
-call nc_check(nf90_put_att(ncFileID, StateVarVarID, "valid_range", (/ 1, int(model_size, i4) /)), &
-              'nc_write_model_atts', 'put_att valid_range, '//trim(filename)) 
-
-! Define the actual state vector
-call nc_check(nf90_def_var(ncid=ncFileID, name="state", xtype=nf90_double, &
-           dimids = (/ StateVarDimID, MemberDimID, TimeDimID /), varid=StateVarID), &
-           'nc_write_model_atts', 'def_var state, '//trim(filename))
-call nc_check(nf90_put_att(ncFileID, StateVarID, "long_name", "model state or fcopy"), &
-              'nc_write_model_atts', 'put_att long_name, '//trim(filename))
-
 ! Leave define mode so we can fill
 call nc_check(nf90_enddef(ncfileID), &
               'nc_write_model_atts', 'enddef, '//trim(filename))
 
-! Fill the state variable coordinate variable
-call nc_check(nf90_put_var(ncFileID, StateVarVarID, (/ (i,i=1,int(model_size, i4)) /) ), &
-              'nc_write_model_atts', 'put_var state variable coordinate, '//trim(filename))
-
 !--------------------------------------------------------------------
 ! Fill the location variable
 !--------------------------------------------------------------------
@@ -647,50 +613,9 @@
 integer,                intent(in) :: copyindex
 integer,                intent(in) :: timeindex


More information about the Dart-dev mailing list