[Dart-dev] [4561] DART/trunk: Added the output filenames as namelist variables for the obs_seq_coverage

nancy at ucar.edu nancy at ucar.edu
Thu Nov 18 15:38:05 MST 2010


Revision: 4561
Author:   thoar
Date:     2010-11-18 15:38:05 -0700 (Thu, 18 Nov 2010)
Log Message:
-----------
Added the output filenames as namelist variables for the obs_seq_coverage
routines. Decided that both the textfile and netcdf files should be user-
configurable, and that the general terminology should be that this thing
creates a 'mask' of 'observation definitions'. Hence I'm calling these
things obsdef_mask.[txt,nc] files. Changed the followon routines to
use this same naming convention - i.e. changed obs_selection* to
make it obvious.

Modified Paths:
--------------
    DART/trunk/models/wrf/work/input.nml
    DART/trunk/obs_sequence/obs_selection.f90
    DART/trunk/obs_sequence/obs_selection.html
    DART/trunk/obs_sequence/obs_selection.nml
    DART/trunk/obs_sequence/obs_seq_coverage.f90
    DART/trunk/obs_sequence/obs_seq_coverage.nml

-------------- next part --------------
Modified: DART/trunk/models/wrf/work/input.nml
===================================================================
--- DART/trunk/models/wrf/work/input.nml	2010-11-18 22:02:13 UTC (rev 4560)
+++ DART/trunk/models/wrf/work/input.nml	2010-11-18 22:38:05 UTC (rev 4561)
@@ -286,10 +286,16 @@
    verbose    = .false.,
    /
 
+# There is one GIGANTIC difference between the obsdef_mask.txt and .nc
+# The netCDF file intentionally ignores the effect of nTmin/nTmax.
+# The netCDF file has ALL matching stations, regardless of temporal coverage.
+
 &obs_seq_coverage_nml
    obs_sequence_list = 'obs_coverage_list.txt',
    obs_sequence_name = '',        
-   obs_of_interest = 'METAR_U_10_METER_WIND',
+   obs_of_interest   = 'METAR_U_10_METER_WIND',
+   textfile_out      = 'METAR_U_10_METER_WIND_obsdef_mask.txt', 
+   netcdf_out        = 'METAR_U_10_METER_WIND_obsdef_mask.nc', 
    lonlim1    =    0.0,
    lonlim2    =  360.0,
    latlim1    =  -90.0,
@@ -306,7 +312,7 @@
    filename_seq        = 'obs_seq.out', 
    filename_seq_list   = '', 
    filename_out        = 'obs_seq.processed', 
-   selections_file     = 'obs_defs.txt', 
+   selections_file     = 'obsdef_mask.txt', 
    print_only          = .false., 
    gregorian_cal       = .true.,
 /

Modified: DART/trunk/obs_sequence/obs_selection.f90
===================================================================
--- DART/trunk/obs_sequence/obs_selection.f90	2010-11-18 22:02:13 UTC (rev 4560)
+++ DART/trunk/obs_sequence/obs_selection.f90	2010-11-18 22:38:05 UTC (rev 4561)
@@ -87,7 +87,7 @@
 character(len = 129) :: filename_out  = 'obs_seq.processed'
 logical              :: process_file(max_num_input_files)
 
-character(len = 129) :: selections_file = 'obs_def.txt'
+character(len = 129) :: selections_file = 'obsdef_mask.txt'
 
 logical  :: selections_is_obs_seq = .false.
 logical  :: print_only            = .false.

Modified: DART/trunk/obs_sequence/obs_selection.html
===================================================================
--- DART/trunk/obs_sequence/obs_selection.html	2010-11-18 22:02:13 UTC (rev 4560)
+++ DART/trunk/obs_sequence/obs_selection.html	2010-11-18 22:38:05 UTC (rev 4561)
@@ -115,6 +115,11 @@
     <!--  type  --><TD>character(len=129)</TD>
     <!--descript--><TD>The name of the resulting output observation sequence file.
                        Default: 'obs_seq.processed'</TD></TR>
+<TR><!--contents--><TD valign=top>selections_file</TD>
+    <!--  type  --><TD>character(len=129)</TD>
+    <!--descript--><TD>The name of the input file containing the mask of observation
+                       definitions (the textfile output of obs_seq_coverage).
+                       Default: 'obsdef_mask.txt'</TD></TR>
 <TR><!--contents--><TD valign=top>print_only</TD>
     <!--  type  --><TD>logical</TD>
     <!--descript--><TD>If .TRUE., do not create an output file, but print a summary of the

Modified: DART/trunk/obs_sequence/obs_selection.nml
===================================================================
--- DART/trunk/obs_sequence/obs_selection.nml	2010-11-18 22:02:13 UTC (rev 4560)
+++ DART/trunk/obs_sequence/obs_selection.nml	2010-11-18 22:38:05 UTC (rev 4561)
@@ -6,7 +6,7 @@
    filename_seq          = 'obs_seq.out', 
    filename_seq_list     = '', 
    filename_out          = 'obs_seq.processed', 
-   selections_file       = 'obs_defs.txt', 
+   selections_file       = 'obsdef_mask.txt', 
    selections_is_obs_seq = .false.,
    print_only            = .false., 
    gregorian_cal         = .true.,

Modified: DART/trunk/obs_sequence/obs_seq_coverage.f90
===================================================================
--- DART/trunk/obs_sequence/obs_seq_coverage.f90	2010-11-18 22:02:13 UTC (rev 4560)
+++ DART/trunk/obs_sequence/obs_seq_coverage.f90	2010-11-18 22:38:05 UTC (rev 4561)
@@ -124,6 +124,8 @@
 ! Namelist with (some scalar) default values
 !-----------------------------------------------------------------------
 
+character(len = 129) :: textfile_out      = 'obsdef_mask.txt'
+character(len = 129) :: netcdf_out        = 'obsdef_mask.nc'
 character(len = 129) :: obs_sequence_name = 'obs_seq.final'
 character(len = 129) :: obs_sequence_list = ''
 character(len = 129) :: obs_of_interest   = 'all'
@@ -139,7 +141,7 @@
 namelist /obs_seq_coverage_nml/ obs_sequence_name, obs_sequence_list, &
                                  lonlim1, lonlim2, latlim1, latlim2, &
                                  nTmin, nTmax, obs_of_interest, &
-                                 verbose, debug
+                                 verbose, debug, textfile_out, netcdf_out
 
 !-----------------------------------------------------------------------
 ! Quantities of interest
@@ -447,10 +449,10 @@
 ! Output a netCDF file of 'all' observations locations and times.
 ! Used to explore what is available.
 
-write(ncName,'(''obs_coverage.nc'')')
-ncunit = InitNetCDF(ncName)
-call WriteNetCDF(ncunit, ncName, stations)
-call CloseNetCDF(ncunit, ncName)
+ncName = adjustl(netcdf_out)
+ncunit = InitNetCDF(trim(ncName))
+call WriteNetCDF(ncunit, trim(ncName), stations)
+call CloseNetCDF(ncunit, trim(ncName))
 
 ! Determine which stations match the temporal selection requirements
 
@@ -1135,7 +1137,7 @@
 integer :: iunit, j
 
 iunit = get_unit()
-open(iunit,file='obs_defs.txt',form='formatted', &
+open(iunit,file=trim(textfile_out), form='formatted', &
                 action='write', position='rewind')
 
 ! num_output is the result of traversing the list of stations and times

Modified: DART/trunk/obs_sequence/obs_seq_coverage.nml
===================================================================
--- DART/trunk/obs_sequence/obs_seq_coverage.nml	2010-11-18 22:02:13 UTC (rev 4560)
+++ DART/trunk/obs_sequence/obs_seq_coverage.nml	2010-11-18 22:38:05 UTC (rev 4561)
@@ -3,6 +3,8 @@
    obs_sequence_list = 'obs_coverage_list.txt',
    obs_sequence_name = '',
    obs_of_interest = 'METAR_U_10_METER_WIND',
+   textfile_out    = 'METAR_U_10_METER_WIND_obsdef_mask.txt',
+   netcdf_out      = 'METAR_U_10_METER_WIND_obsdef_mask.nc',
    lonlim1    =    0.0,
    lonlim2    =  360.0,
    latlim1    =  -90.0,


More information about the Dart-dev mailing list