[Dart-dev] [4350] DART/trunk/obs_sequence/obs_seq_to_netcdf.f90: BUGFIX: Fixed logic for the case when multiple input files contribute to
nancy at ucar.edu
nancy at ucar.edu
Tue Apr 20 14:16:35 MDT 2010
Revision: 4350
Author: thoar
Date: 2010-04-20 14:16:35 -0600 (Tue, 20 Apr 2010)
Log Message:
-----------
BUGFIX: Fixed logic for the case when multiple input files contribute to
a single output file with the namelist variable 'append_to_netcdf' == .false.
This situation incorrectly kept creating the output file for every input
file - losing all previous observations.
This has been a problem since version 4271 ... 12 February 2010.
Renamed the output file to be 'obs_epoch_xxx.nc' to reinforce the notion that
the obs_sequence file has no knowledge of any assimilation interval. It's just
a span of time.
The correction results in the following behavior:
'append_to_netcdf' == .true.
The output netcdf file (obs_epoch_xxx.nc) is simply appended.
If it exists before the execution of the program - and the metadata
is compatible with the current execution - the file simply gets bigger.
No matter how many input files are read - they all get appended to
the (possibly pre-existing) output file for that epoch.
'append_to_netcdf' == .false.
Any pre-existing output file is obliterated.
No matter how many input files are read - they all get appended to
the output file appropriate for that epoch.
Modified Paths:
--------------
DART/trunk/obs_sequence/obs_seq_to_netcdf.f90
-------------- next part --------------
Modified: DART/trunk/obs_sequence/obs_seq_to_netcdf.f90
===================================================================
--- DART/trunk/obs_sequence/obs_seq_to_netcdf.f90 2010-04-19 15:58:44 UTC (rev 4349)
+++ DART/trunk/obs_sequence/obs_seq_to_netcdf.f90 2010-04-20 20:16:35 UTC (rev 4350)
@@ -444,7 +444,10 @@
call get_time_range_keys(seq, key_bounds, num_obs_in_epoch, keys)
- ! Append epoch number to output file names
+ !-----------------------------------------------------------------
+ ! Append epoch number to output file names.
+ ! Clear out any existing files unless we are TRYING to append.
+ !-----------------------------------------------------------------
write(ncName,'(''obs_epoch_'',i3.3,''.nc'')')iepoch
@@ -452,6 +455,7 @@
ncunit = NC_Compatibility_Check(ncName, iepoch)
else
ncunit = InitNetCDF(ncName, iepoch)
+ append_to_netcdf = .true.
endif
ngood = 0
More information about the Dart-dev
mailing list