[Dart-dev] [4423] DART/trunk/obs_kind/DEFAULT_obs_kind_mod.F90: Change the write statement for the string 'obs_kind_definitions' back to

nancy at ucar.edu nancy at ucar.edu
Tue Jul 13 10:31:10 MDT 2010


Revision: 4423
Author:   nancy
Date:     2010-07-13 10:31:10 -0600 (Tue, 13 Jul 2010)
Log Message:
-----------
Change the write statement for the string 'obs_kind_definitions' back to
using an explicit format so the chars start in column 1 of the obs_seq file.
The current read code will read a string starting in either col 1 or 2,
but previous read code will only work if the string starts in col 1. 
This change makes this code fully backwards compatible again.

Modified Paths:
--------------
    DART/trunk/obs_kind/DEFAULT_obs_kind_mod.F90

-------------- next part --------------
Modified: DART/trunk/obs_kind/DEFAULT_obs_kind_mod.F90
===================================================================
--- DART/trunk/obs_kind/DEFAULT_obs_kind_mod.F90	2010-07-12 23:14:36 UTC (rev 4422)
+++ DART/trunk/obs_kind/DEFAULT_obs_kind_mod.F90	2010-07-13 16:31:10 UTC (rev 4423)
@@ -668,9 +668,14 @@
 
 is_ascii = ascii_file_format(fform)
 
-! Write the 20 character identifier for verbose formatted output
+! Write the 20 character identifier to indicate the start of a kind table.
+! To maintain complete backwards compatibility with the original read 
+! code this string must start in column 1.  
+! you cannot use: write(ifile, *) 'string'  because the output string
+! will start in col 2.  the string either has to be part of the format
+! argument to write(), or you have to use a separate format statement.
 if (is_ascii) then
-   write(ifile, *) 'obs_kind_definitions'
+   write(ifile,  "('obs_kind_definitions')")   ! see note above!
 else
    write(ifile)    'obs_kind_definitions'
 endif
@@ -739,7 +744,8 @@
 
 is_ascii = ascii_file_format(fform)
 
-! Read the 20 character identifier for verbose formatted output
+! Read the 20 character identifier which identifies the start 
+! of the obstype number/name table for this sequence file.
 if (is_ascii) then
    read(ifile, *) header
 else


More information about the Dart-dev mailing list