[Dart-dev] DART/branches Revision: 12833
dart at ucar.edu
dart at ucar.edu
Tue Sep 18 15:35:21 MDT 2018
nancy at ucar.edu
2018-09-18 15:35:21 -0600 (Tue, 18 Sep 2018)
416
if you are allocating a vars array initialize it to missing_r8 as well.
the copies array has always been initialized, but if code was using the
vars array first and someone tried to print before all the locations were
set to known values, it was possible to print out uninitialized memory
locations. this update ensures all data values in an ensemble
handle are initialized, at a small runtime cost at init time.
Modified: DART/branches/recam/assimilation_code/modules/utilities/ensemble_manager_mod.f90
===================================================================
--- DART/branches/recam/assimilation_code/modules/utilities/ensemble_manager_mod.f90 2018-09-18 16:54:31 UTC (rev 12832)
+++ DART/branches/recam/assimilation_code/modules/utilities/ensemble_manager_mod.f90 2018-09-18 21:35:21 UTC (rev 12833)
@@ -751,10 +751,12 @@
if(ens_handle%transpose_type == 2) then
allocate(ens_handle%vars(ens_handle%num_vars, ens_handle%my_num_copies))
+ ens_handle%vars = MISSING_R8
endif
if(ens_handle%transpose_type == 3) then
allocate(ens_handle%vars(ens_handle%num_vars,1))
+ ens_handle%vars = MISSING_R8
endif
! Set everything to missing value
More information about the Dart-dev
mailing list