[Dart-dev] DART/branches Revision: 11526
dart at ucar.edu
dart at ucar.edu
Wed Apr 26 16:22:29 MDT 2017
nancy at ucar.edu
2017-04-26 16:22:28 -0600 (Wed, 26 Apr 2017)
140
update so we can call nc_write_model_atts() which
currently does nothing. it was never called before
so this maintains the same behavior.
Modified: DART/branches/rma_output_files/models/wrf/model_mod.f90
===================================================================
--- DART/branches/rma_output_files/models/wrf/model_mod.f90 2017-04-26 22:20:15 UTC (rev 11525)
+++ DART/branches/rma_output_files/models/wrf/model_mod.f90 2017-04-26 22:22:28 UTC (rev 11526)
@@ -3666,8 +3666,18 @@
!-----------------------------------------------------------------
ierr = 0 ! assume normal termination
-model_mod_writes_state_variables = .true.
+model_mod_writes_state_variables = .false.
+return
+
+!>@todo FIXME
+!> this has design problems because we don't know which domain number this
+!> is being called for, and each has a different grid.
+!>
+!> this was never being called before, so returning early maintains the
+!> same behavior. we can revisit this issue later.
+!>
+
!-----------------------------------------------------------------
! make sure ncFileID refers to an open netCDF file,
! and then put into define mode.
@@ -3682,27 +3692,7 @@
! We need the dimension ID for the number of copies
!-----------------------------------------------------------------
-call nc_check(nf90_inq_dimid(ncid=ncFileID, name="NMLlinelen", dimid=linelenDimID), &
- 'nc_write_model_atts','inq_dimid NMLlinelen')
-call nc_check(nf90_inq_dimid(ncid=ncFileID, name="copy", dimid=MemberDimID), &
- 'nc_write_model_atts','inq_dimid copy')
-call nc_check(nf90_inq_dimid(ncid=ncFileID, name="time", dimid= TimeDimID), &
- 'nc_write_model_atts','inq_dimid time')
-
-if ( TimeDimID /= unlimitedDimId ) then
- write(errstring,*)'Time Dimension ID ',TimeDimID, &
- ' must match Unlimited Dimension ID ',unlimitedDimID
- call error_handler(E_ERR,'nc_write_model_atts', errstring, source, revision, revdate)
-endif
-
!-----------------------------------------------------------------
-! Define the model size, state variable dimension ... whatever ...
-!-----------------------------------------------------------------
-call nc_check(nf90_def_dim(ncid=ncFileID, name="StateVariable", &
- len=wrf%model_size, dimid = StateVarDimID), &
- 'nc_write_model_atts','def_dim StateVariable')
-
-!-----------------------------------------------------------------
! Write Global Attributes
!-----------------------------------------------------------------
call DATE_AND_TIME(crdate,crtime,crzone,values)
@@ -3725,18 +3715,6 @@
! long lines are truncated when read into textblock
!-----------------------------------------------------------------
-call find_textfile_dims(wrf_nml_file, nlines, linelen)
-if (nlines <= 0 .or. linelen <= 0) have_wrf_nml_file = .false.
-
-if (have_wrf_nml_file) then
- allocate(textblock(nlines))
- textblock = ''
-
- call nc_check(nf90_def_dim(ncid=ncFileID, name="nlines", &
- len = nlines, dimid = nlinesDimID), &
- 'nc_write_model_atts', 'def_dim nlines ')
-endif
-
!-----------------------------------------------------------------
! Define the dimensions IDs
!-----------------------------------------------------------------
@@ -4218,133 +4196,6 @@
enddo
-if ( output_state_vector ) then
-
- !-----------------------------------------------------------------
- ! Create attributes for the state vector
- !-----------------------------------------------------------------
-
- call nc_check(nf90_inq_dimid(ncFileID, "metadatalength", metadataID), &
- 'nc_write_model_atts','inq_dimid metadatalength')
-
- call nc_check(nf90_def_dim(ncid=ncFileID, name="WRFStateVariables", &
- len = wrf%dom(1)%number_of_wrf_variables, dimid = wrfStateID), &
- 'nc_write_model_atts','def_dim WRFStateVariables')
-
- call nc_check(nf90_def_dim(ncid=ncFileID, name="WRFVarDimension", &
- len = 3, dimid = wrfDimID), &
- 'nc_write_model_atts','def_dim WRFVarDimensionID')
-
- ! Define the state variable name variable
- call nc_check(nf90_def_var(ncid=ncFileID,name="WRFStateVariables", xtype=nf90_char, &
- dimids=(/ metadataID, wrfStateID /), varid=WRFStateVarID), &
- 'nc_write_model_atts','def_var WRFStateVariables')
-
- call nc_check(nf90_put_att(ncFileID, WRFStateVarID, "long_name", &
- "WRF State Variable Name"), &
- 'nc_write_model_atts','put_att WRFStateVariables long_name')
-
More information about the Dart-dev
mailing list