[Dart-dev] DART/branches Revision: 10988
dart at ucar.edu
dart at ucar.edu
Thu Feb 2 14:16:57 MST 2017
hendric at ucar.edu
2017-02-02 14:16:57 -0700 (Thu, 02 Feb 2017)
81
removing unneeded print statements and rearranged code in
a more logical order.
Modified: DART/branches/rma_single_file/io/state_space_diag_mod.f90
===================================================================
--- DART/branches/rma_single_file/io/state_space_diag_mod.f90 2017-02-02 20:45:09 UTC (rev 10987)
+++ DART/branches/rma_single_file/io/state_space_diag_mod.f90 2017-02-02 21:16:57 UTC (rev 10988)
@@ -86,11 +86,9 @@
implicit none
private
-public :: init_state_space_diag, &
- init_singlefile_output, &
+public :: init_singlefile_output, &
finalize_singlefile_output, &
write_extra_variable, &
- aoutput_diagnostics, &
get_netcdf_file_type, &
read_singlefile, &
write_singlefile, &
@@ -102,27 +100,13 @@
character(len=32 ), parameter :: revision = "$Revision$"
character(len=128), parameter :: revdate = "$Date$"
-! parameters for input and output
-integer, parameter :: ENS_MEAN = 1
-integer, parameter :: ENS_SPREAD = 2
-integer, parameter :: PRIOR_INF_MEAN = 3
-integer, parameter :: PRIOR_INF_SPREAD = 4
-integer, parameter :: POST_INF_MEAN = 5
-integer, parameter :: POST_INF_SPREAD = 6
-
logical :: module_initialized = .false.
! global storage for error/message string output
character(len=512) :: msgstring
-
!-------------------------------------------------------------------------------
-!#! interface write_singlefile
-!#! module procedure write_singlefile_filter
-!#! module procedure write_singlefile_pmo
-!#! end interface
-
contains
@@ -133,8 +117,11 @@
!> Calls the model for any model specific attributes to be written
!> Leaves the diagnostic file open and passes out a handle: ncFileID (netcdf_file_type)
+subroutine init_singlefile_output(ens_handle, file_handle)
-subroutine init_singlefile_output(ens_handle, file_handle)
+type(ensemble_type), intent(inout) :: ens_handle
+type(file_info_type), intent(inout) :: file_handle
+
! Typical sequence:
! NF90_OPEN ! create netCDF dataset: enter define mode
! NF90_def_dim ! define dimenstions: from name and length
@@ -158,10 +145,6 @@
! location is another one ...
!
-type(ensemble_type), intent(inout) :: ens_handle
-type(file_info_type), intent(inout) :: file_handle
-
-
! Variables for outputing input.nml variable
integer :: metadata_length, nlines, linelen, createmode
character(len=129), allocatable :: textblock(:)
@@ -169,21 +152,19 @@
! Netcdf variables
type(netcdf_file_type) :: ncFileID
-integer :: MemberDimID ! for each "copy" or ensemble member
-integer :: TimeDimID, TimeVarID
-integer :: MetaDataDimID, MetadataVarID
-integer :: nlinesDimID, linelenDimID, nmlVarID
+integer :: MemberDimID
+integer :: TimeDimID, TimeVarID
+integer :: MetaDataDimID, MetadataVarID
+integer :: nlinesDimID, linelenDimID, nmlVarID
-!>todo : for single file output, dart will always have control
-!> of the file formatting
-logical :: local_model_mod_will_write_state_variables
+! For single file output, dart will always have control
+! of the file formatting
+logical :: local_model_mod_will_write_state_variables = .false.
-! local variables including counters and storing names
+! Local variables including counters and storing names
character(len=NF90_MAX_VAR_DIMS) :: fname, copyname
-integer :: icopy, ivar, ret, ens_size
+integer :: icopy, ivar, ret, ens_size, num_output_ens
-integer :: num_output_ens
-
if (my_task_id() == 0) then
if(.not. byteSizesOK()) then
call error_handler(E_ERR,'init_singlefile_output', &
@@ -193,7 +174,7 @@
More information about the Dart-dev
mailing list