PROGRAM text_to_obs

DART project logo

Jump to DART Documentation Main Index
version information for this file:
$Id: text_to_obs.html 6341 2013-07-31 14:24:51Z nancy $

DATA SOURCES / PROGRAMS / DECISIONS / REFERENCES / ERRORS / PLANS / TERMS OF USE

Overview

Text File to DART Converter

If you have observations in spreadsheet or column format, in text, with a single line per observation, then the files this directory are a template for how to convert these observations into a format suitable for DART use.

The workflow is usually:

It is not recommended that you try to mimic the ascii file format by other means; the format is subject to change and the library routines will continue to be supported even if the physical format changes.

If your input data is in some kind of format like netCDF or HDF, then one of the other converters (e.g. the MADIS ones for netCDF) might be a better starting place for adapting code.


DATA SOURCES

This part is up to you. For each observation you will need a location, a data value, a type, a time, and some kind of error estimate. The error estimate can be hardcoded in the converter if they are not available in the input data. See below for more details on selecting an appropriate error value.


PROGRAMS

The text_to_obs.f90 file is the source for the main converter program. Look at the source code where it reads the example data file. You will almost certainly need to change the "read" statement to match your data format. The example code reads each text line into a character buffer and then reads from that buffer to parse up the data items.

To compile and test, go into the work subdirectory and run the quickbuild.csh script to build the converter and a couple of general purpose utilities. advance_time helps with calendar and time computations, and the obs_sequence_tool manipulates DART observation files once they have been created.

To change the observation types, look in the DART/obs_def directory. If you can find an obs_def_XXX_mod.f90 file with an appropriate set of observation types, change the 'use' lines in the converter source to include those types. Then add that filename in the input.nml namelist file to the &preprocess_nml namelist, the 'input_files' variable. Multiple files can be listed. Then run quickbuild.csh again. It remakes the table of supported observation types before trying to recompile the source code.

An example script for converting batches of files is in the shell_scripts directory. A tiny example data file is in the data directory. These are NOT intended to be turnkey scripts; they will certainly need to be customized for your use. There are comments at the top of the script saying what options they include, and should be commented enough to indicate where changes will be likely to need to be made.


DECISIONS YOU MIGHT NEED TO MAKE

See the discussion in the observations introduction page about what options are available for the things you need to specify. These include setting a time, specifying an expected error, setting a location, and an observation type.


KNOWN BUGS

none


FUTURE PLANS

none


Terms of Use

DART software - Copyright 2004 - 2013 UCAR.
This open source software is provided by UCAR, "as is",
without charge, subject to all terms of use at
http://www.image.ucar.edu/DAReS/DART/DART_download

Contact: nancy collins
Revision: $Revision: 6341 $
Source: $URL: https://svn-dares-dart.cgd.ucar.edu/DART/releases/classic/observations/text/text_to_obs.html $
Change Date: $Date: 2013-07-31 08:24:51 -0600 (Wed, 31 Jul 2013) $
Change history:  try "svn log" or "svn diff"