[Dart-dev] DART/branches Revision: 10817

dart at ucar.edu dart at ucar.edu
Mon Dec 19 11:52:02 MST 2016


hendric at ucar.edu
2016-12-19 11:52:00 -0700 (Mon, 19 Dec 2016)
69
adding clamping and units attributes to files created from scratch.




Modified: DART/branches/rma_fixed_filenames/filter/filter_mod.f90
===================================================================
--- DART/branches/rma_fixed_filenames/filter/filter_mod.f90	2016-12-19 18:01:43 UTC (rev 10816)
+++ DART/branches/rma_fixed_filenames/filter/filter_mod.f90	2016-12-19 18:52:00 UTC (rev 10817)
@@ -2194,15 +2194,21 @@
    call set_io_copy_flag(file_info, MEM_START, MEM_START+num_ens-1, READ_COPY)
 endif
 
-if ( output_mean )                       call set_io_copy_flag(file_info, ENS_MEAN,       WRITE_COPY)
-if ( output_sd )                         call set_io_copy_flag(file_info, ENS_SD,         WRITE_COPY)
+if ( output_mean )  &
+   call set_io_copy_flag(file_info, ENS_MEAN, WRITE_COPY)
+if ( output_sd ) &
+   call set_io_copy_flag(file_info, ENS_SD,   WRITE_COPY, has_units=.false.)
 if ( do_prior_inflate ) then
-   if ( inf_initial_from_restart(1)    ) call set_io_copy_flag(file_info, PRIOR_INF_MEAN, READ_COPY)
-   if ( inf_sd_initial_from_restart(1) ) call set_io_copy_flag(file_info, PRIOR_INF_SD,   READ_COPY)
+   if ( inf_initial_from_restart(1)    ) &
+      call set_io_copy_flag(file_info, PRIOR_INF_MEAN, READ_COPY, has_units=.false.)
+   if ( inf_sd_initial_from_restart(1) ) &
+      call set_io_copy_flag(file_info, PRIOR_INF_SD,   READ_COPY, has_units=.false.)
 endif
 if ( do_posterior_inflate ) then
-   if ( inf_initial_from_restart(2)    ) call set_io_copy_flag(file_info, POST_INF_MEAN,  READ_COPY)
-   if ( inf_sd_initial_from_restart(2) ) call set_io_copy_flag(file_info, POST_INF_SD,    READ_COPY)
+   if ( inf_initial_from_restart(2)    ) &
+      call set_io_copy_flag(file_info, POST_INF_MEAN,  READ_COPY, has_units=.false.)
+   if ( inf_sd_initial_from_restart(2) ) &
+      call set_io_copy_flag(file_info, POST_INF_SD,    READ_COPY, has_units=.false.)
 endif
 
 end subroutine set_read_file_info

Modified: DART/branches/rma_fixed_filenames/io/copies_on_off_mod.f90
===================================================================
--- DART/branches/rma_fixed_filenames/io/copies_on_off_mod.f90	2016-12-19 18:01:43 UTC (rev 10816)
+++ DART/branches/rma_fixed_filenames/io/copies_on_off_mod.f90	2016-12-19 18:52:00 UTC (rev 10817)
@@ -269,7 +269,7 @@
 
 valid_copy = .false.
 if(copy <= size_fnames .and. copy > 0) valid_copy = .true.
-print*, "SIZE FNAMES = " , size_fnames, copy, valid_copy
+!#! print*, "SIZE FNAMES = " , size_fnames, copy, valid_copy
 
 end function assert_valid_copy
 

Modified: DART/branches/rma_fixed_filenames/io/direct_netcdf_mod.f90
===================================================================
--- DART/branches/rma_fixed_filenames/io/direct_netcdf_mod.f90	2016-12-19 18:01:43 UTC (rev 10816)
+++ DART/branches/rma_fixed_filenames/io/direct_netcdf_mod.f90	2016-12-19 18:52:00 UTC (rev 10817)
@@ -81,7 +81,7 @@
                                  get_missing_value, get_add_offset, &
                                  get_scale_factor, get_xtype, get_num_domains
 
-use io_filenames_mod,     only : get_restart_filename, &
+use io_filenames_mod,     only : get_restart_filename, copy_has_units, &
                                  stage_metadata_type, get_file_description
 
 use copies_on_off_mod,    only : query_read_copy, query_write_copy!#!, &
@@ -170,7 +170,7 @@
 subroutine read_transpose_single_task(state_ens_handle, name_handle, domain, dart_index)
 
 type(ensemble_type),      intent(inout) :: state_ens_handle
-type(stage_metadata_type), intent(in)    :: name_handle
+type(stage_metadata_type), intent(in)   :: name_handle
 integer,                  intent(in)    :: domain
 integer,                  intent(inout) :: dart_index !< This is for multiple domains
 
@@ -186,7 +186,6 @@
 
 starting_point = dart_index ! position in state_ens_handle%vars
 block_size = 0
-
 ! need to read into a tempory array, then fill up copies
 allocate(vector(get_domain_size(domain)))
 
@@ -198,6 +197,7 @@
    print*, 'query_read_copy ', copy, query_read_copy(name_handle, copy)
    if (query_read_copy(name_handle, copy)) then
       netcdf_filename = get_restart_filename(name_handle, copy, domain)
+      print*, 'reading ', trim(netcdf_filename)
       ret = nf90_open(netcdf_filename, NF90_NOWRITE, ncfile)
       call nc_check(ret, 'direct_netcdf_mod.f90 read_transpose_single_task: opening', netcdf_filename)
    endif
@@ -282,7 +282,7 @@
          !> Should we instead have all copies time in the ensemble handle?
          call get_copy_owner_index(copy, time_owner, time_owner_index)
          call get_ensemble_time(state_ens_handle, time_owner_index, dart_time)
-         ncfile_out = create_and_open_state_output(name_handle, domain, copy, dart_time, write_single_precision)
+         ncfile_out = create_and_open_state_output(name_handle, domain, copy, dart_time, write_single_precision, clamp_variables)
 
       endif
 
@@ -581,7 +581,7 @@
             call get_copy_owner_index(my_copy, time_owner, time_owner_index)
             call get_ensemble_time(state_ens_handle, time_owner_index, dart_time)
 
-            ncfile_out = create_and_open_state_output(name_handle, domain, my_copy, dart_time, write_single_precision)
+            ncfile_out = create_and_open_state_output(name_handle, domain, my_copy, dart_time, write_single_precision, clamp_variables)
          endif


More information about the Dart-dev mailing list