[Dart-dev] DART/branches Revision: 11060
dart at ucar.edu
dart at ucar.edu
Wed Feb 8 16:19:15 MST 2017
hendric at ucar.edu
2017-02-08 16:19:14 -0700 (Wed, 08 Feb 2017)
53
updating forced_lorenz_96 namelists and attributes.
Modified: DART/branches/rma_single_file/models/forced_lorenz_96/model_mod.f90
===================================================================
--- DART/branches/rma_single_file/models/forced_lorenz_96/model_mod.f90 2017-02-08 22:48:55 UTC (rev 11059)
+++ DART/branches/rma_single_file/models/forced_lorenz_96/model_mod.f90 2017-02-08 23:19:14 UTC (rev 11060)
@@ -498,9 +498,7 @@
! netCDF variables for Location
!--------------------------------------------------------------------
-integer :: LocationVarID
-integer :: StateVarDimID, StateVarVarID
-integer :: StateVarID, MemberDimID, TimeDimID
+integer :: LocationVarID, LocationDimID
!--------------------------------------------------------------------
! local variables
@@ -520,7 +518,7 @@
ierr = 0 ! assume normal termination
-model_mod_writes_state_variables = .true.
+model_mod_writes_state_variables = .false.
!--------------------------------------------------------------------
! make sure ncFileID refers to an open netCDF file
@@ -531,15 +529,6 @@
call check(nf90_Redef(ncFileID))
!--------------------------------------------------------------------
-! Determine ID's from stuff already in the netCDF file
-!--------------------------------------------------------------------
-
-! make sure time is unlimited dimid
-
-call check(nf90_inq_dimid(ncFileID,"copy",dimid=MemberDimID))
-call check(nf90_inq_dimid(ncFileID,"time",dimid=TimeDimID))
-
-!--------------------------------------------------------------------
! Write Global Attributes
!--------------------------------------------------------------------
call DATE_AND_TIME(crdate,crtime,crzone,values)
@@ -567,8 +556,8 @@
! Define the model size, state variable dimension ... whatever ...
!--------------------------------------------------------------------
-call check(nf90_def_dim(ncid=ncFileID, name="StateVariable", &
- len=int(model_size,i4), dimid = StateVarDimID))
+call check(nf90_def_dim(ncid=ncFileID, name="location", &
+ len=int(model_size,i4), dimid = LocationDimID))
!--------------------------------------------------------------------
! Define the Location Variable and add Attributes
@@ -577,52 +566,16 @@
! http://www.cgd.ucar.edu/cms/eaton/netcdf/CF-working.html#ctype
!--------------------------------------------------------------------
-call check(NF90_def_var(ncFileID, name=trim(adjustl(LocationName)), xtype=nf90_double, &
- dimids = StateVarDimID, varid=LocationVarID) )
+call check(NF90_def_var(ncFileID, name="location", xtype=nf90_double, &
+ dimids = LocationDimID, varid=LocationVarID) )
call check(nf90_put_att(ncFileID, LocationVarID, "long_name", trim(adjustl(LocationLName))))
call check(nf90_put_att(ncFileID, LocationVarID, "dimension", LocationDims ))
call check(nf90_put_att(ncFileID, LocationVarID, "units", "nondimensional"))
call check(nf90_put_att(ncFileID, LocationVarID, "valid_range", (/ 0.0_r8, 1.0_r8 /)))
-!--------------------------------------------------------------------
-! Define either the "state vector" variables -OR- the "prognostic" variables.
-!--------------------------------------------------------------------
-!if ( output_state_vector ) then
+! Leave define mode so we can fill
+call check(nf90_enddef(ncfileID))
- ! Define the state vector coordinate variable
- call check(nf90_def_var(ncid=ncFileID,name="StateVariable", xtype=nf90_int, &
- dimids=StateVarDimID, varid=StateVarVarID))
- call check(nf90_put_att(ncFileID, StateVarVarID, "long_name", "State Variable ID"))
- call check(nf90_put_att(ncFileID, StateVarVarID, "units", "indexical") )
- call check(nf90_put_att(ncFileID, StateVarVarID, "valid_range", (/ 1, int(model_size,i4) /)))
-
- ! Define the actual state vector
- call check(nf90_def_var(ncid=ncFileID, name="state", xtype=nf90_double, &
- dimids = (/ StateVarDimID, MemberDimID, TimeDimID /), varid=StateVarID))
- call check(nf90_put_att(ncFileID, StateVarID, "long_name", "model state or fcopy"))
-
- ! Leave define mode so we can fill
- call check(nf90_enddef(ncfileID))
-
- ! Fill the state variable coordinate variable
- call check(nf90_put_var(ncFileID, StateVarVarID, (/ (i,i=1,model_size) /) ))
-
-!This is not ready yet ... the model state is replicated. This is an attempt
-! to parse it back into two pieces -- just don't know what to call them, etc.
-!else
-!
-! call check(nf90_def_var(ncid=ncFileID, name="X", xtype=nf90_double, &
-! dimids = (/ , VelJDimID, levDimID, MemberDimID, unlimitedDimID /), &
-! varid = uVarID))
-! call check(nf90_put_att(ncFileID, uVarID, "long_name", "model component"))
-!
-! call check(nf90_def_var(ncid=ncFileID, name="XF", xtype=nf90_real, &
-! dimids = (/ VelIDimID, VelJDimID, levDimID, MemberDimID, unlimitedDimID /), &
-! varid = vVarID))
More information about the Dart-dev
mailing list