[Dart-dev] DART/branches Revision: 11396
dart at ucar.edu
dart at ucar.edu
Fri Mar 24 11:38:34 MDT 2017
thoar at ucar.edu
2017-03-24 11:38:33 -0600 (Fri, 24 Mar 2017)
318
Adding the rough outline of the model_mod.html for the bgrid model.
Removed the nuisance parameter 'output_state_vector' from the namelist,
and removed the capability to blast out the state vector as a 1D array
instead of parsing it back into variables. I'm pretty sure we could not
read the 1D array back in, so ...
Modified: DART/branches/rma_trunk/models/bgrid_solo/model_mod.f90
===================================================================
--- DART/branches/rma_trunk/models/bgrid_solo/model_mod.f90 2017-03-24 17:14:07 UTC (rev 11395)
+++ DART/branches/rma_trunk/models/bgrid_solo/model_mod.f90 2017-03-24 17:38:33 UTC (rev 11396)
@@ -160,7 +160,6 @@
integer :: dt_atmos = 3600
real(r8) :: noise_sd = -1.0_r8
integer :: dt_bias = -1
- logical :: output_state_vector = .false. ! output prognostic variables
character(len=256) :: template_file = 'null' ! optional; sets sizes of arrays
! dimensions for the namelist state variable table
@@ -176,7 +175,7 @@
namelist /model_nml/ current_time, override, dt_atmos, &
days, hours, minutes, seconds, noise_sd, &
- dt_bias, output_state_vector, state_variables, &
+ dt_bias, state_variables, &
template_file
!-----------------------------------------------------------------------
@@ -1623,102 +1622,60 @@
"tracers long_name")
endif
-if ( output_state_vector ) then
+!----------------------------------------------------------------------------
+! We need to process the prognostic variables.
+!----------------------------------------------------------------------------
+! TemperatureGrid : surface pressure vars%ps(tis:tie, tjs:tje)
+! : temperature vars%t (tis:tie, tjs:tje, klb:kub)
+! : tracers vars%r (tis:tie, tjs:tje, klb:kub, 1:vars%ntrace)
+! VelocityGrid : u vars%u (vis:vie, vjs:vje, klb:kub)
+! : v vars%v (vis:vie, vjs:tje, klb:kub)
+!----------------------------------------------------------------------------
+! Create the (empty) Variables and the Attributes
+!----------------------------------------------------------------------------
- !----------------------------------------------------------------------------
- ! Create attributes for the state vector
- !----------------------------------------------------------------------------
+call check(nf90_def_var(ncid=ncFileID, name="ps", xtype=nf90_double, &
+ dimids = (/ TmpIDimID, TmpJDimID, MemberDimID, unlimitedDimID /), &
+ varid = psVarID), "ps def_var")
+call check(nf90_put_att(ncFileID, psVarID, "long_name", "surface pressure"), &
+ "ps long_name")
+call check(nf90_put_att(ncFileID, psVarID, "units", "Pa"), &
+ "ps units")
+call check(nf90_put_att(ncFileID, psVarID, "units_long_name", "pascals"), &
+ "ps units_long_name")
- ! Define the state vector coordinate variable
- call check(nf90_def_var(ncid=ncFileID,name="StateVariable", xtype=nf90_int, &
- dimids=StateVarDimID, varid=StateVarVarID), "statevariable def_var")
- call check(nf90_put_att(ncFileID, StateVarVarID, "long_name", "State Variable ID"), &
- "statevariable long_name")
- call check(nf90_put_att(ncFileID, StateVarVarID, "units", "indexical"), &
- "statevariable units")
- call check(nf90_put_att(ncFileID, StateVarVarID, "valid_range", (/ 1, model_size_i4 /)), &
- "statevariable valid_range")
- ! Define the actual state vector
- call check(nf90_def_var(ncid=ncFileID, name="state", xtype=nf90_double, &
- dimids = (/ StateVarDimID, MemberDimID, unlimitedDimID /), &
- varid=StateVarID), "state def_var")
- call check(nf90_put_att(ncFileID, StateVarID, "long_name", "model state or fcopy"), &
- "state long_name")
- call check(nf90_put_att(ncFileID, StateVarId, "vector_to_prog_var","FMS-Bgrid"), &
- "state vector_to_prog_var")
- call check(nf90_put_att(ncFileID, StateVarId, "temperature_units","degrees Kelvin"), &
- "state temperature_units")
- call check(nf90_put_att(ncFileID, StateVarId, "pressure_units","Pa"), &
- "state pressure_units")
- call check(nf90_put_att(ncFileID, StateVarId, "U_units","m/s"),"state U_units")
- call check(nf90_put_att(ncFileID, StateVarId, "V_units","m/s"),"state V_units")
+call check(nf90_def_var(ncid=ncFileID, name="t", xtype=nf90_double, &
+ dimids = (/ TmpIDimID, TmpJDimID, levDimID, MemberDimID, unlimitedDimID /), &
+ varid = tVarID), "t def_var")
+call check(nf90_put_att(ncFileID, tVarID, "long_name", "temperature"), "t long_name")
+call check(nf90_put_att(ncFileID, tVarID, "units", "degrees Kelvin"), "t units")
- ! Leave define mode so we can fill
- call check(nf90_enddef(ncfileID),"state enddef")
- ! Fill the state variable coordinate variable
- call check(nf90_put_var(ncFileID, StateVarVarID, (/ (i,i=1,int(model_size,i4)) /) ), &
- "state put_var")
+call check(nf90_def_var(ncid=ncFileID, name="u", xtype=nf90_double, &
+ dimids = (/ VelIDimID, VelJDimID, levDimID, MemberDimID, unlimitedDimID /), &
+ varid = uVarID), "u def_var")
+call check(nf90_put_att(ncFileID, uVarID, "long_name", "zonal wind component"), &
+ "u long_name")
+call check(nf90_put_att(ncFileID, uVarID, "units", "m/s"), "u units")
-else
- !----------------------------------------------------------------------------
- ! We need to process the prognostic variables.
- !----------------------------------------------------------------------------
- ! TemperatureGrid : surface pressure vars%ps(tis:tie, tjs:tje)
- ! : temperature vars%t (tis:tie, tjs:tje, klb:kub)
More information about the Dart-dev
mailing list