Skip to content

Commit

Permalink
Per #2276, update ascii2nc unit test to specify the -format option. W…
Browse files Browse the repository at this point in the history
…ork on documentation a bit. And minor tweaks to code comments.
  • Loading branch information
MET Tools Test Account committed Oct 18, 2022
1 parent 623c1de commit f15a516
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 7 deletions.
4 changes: 2 additions & 2 deletions docs/Users_Guide/config_options.rst
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,8 @@ The MET_NDBC_STATIONS environment variable can be used to specify a file that
will override the default file. If set it should be a full path to the file.
The default table can be found in the installed
*share/met/table_files/ndbc_stations.xml*. This file contains
XML content for all stations that allows lookups of latitude,longitude,
and in some cases elevation for all stations based on stationId
XML content for all stations that allows lookups of latitude, longitude,
and, in some cases, elevation for all stations based on stationId.

MET_BASE
^^^^^^^^
Expand Down
18 changes: 16 additions & 2 deletions docs/Users_Guide/reformat_point.rst
Original file line number Diff line number Diff line change
Expand Up @@ -414,9 +414,23 @@ ASCII2NC tool

This section describes how to run the ASCII2NC tool. The ASCII2NC tool is used to reformat ASCII point observations into the NetCDF format expected by the Point-Stat tool. For those users wishing to verify against point observations that are not available in PrepBUFR format, the ASCII2NC tool provides a way of incorporating those observations into MET. If the ASCII2NC tool is used to perform a reformatting step, no configuration file is needed. However, for more complex processing, such as summarizing time series observations, a configuration file may be specified. For details on the configuration file options, see :numref:`config_options` and example configuration files distributed with the MET code.

Initial versions of the ASCII2NC tool supported only a simple 11 column ASCII point observation format. It currently supports point observation data in the following formats: the default 11 column format, little_r format, `SURFace RADiation (SURFRAD) <http://www.esrl.noaa.gov/gmd/grad/surfrad/>`_ and Integrated Surface Irradiance Study (ISIS) formats, the Western Wind and Solar Integration Study (WWSIS) format, the `AirNow DailyData_v2, AirNow HourlyData, and AirNow HourlyAQObs formats. <https://www.epa.gov/outdoor-air-quality-data>`_, the `National Data Buoy (NDBC) Standard Meteorlogical Data format. <https://www.ndbc.noaa.gov/measdes.shtml>`_ and the `AErosol RObotic NEtwork (AERONET) versions 2 and 3 format. <http://aeronet.gsfc.nasa.gov/>`_ WWSIS data are available by request from National Renewable Energy Laboratory (NREL) in Boulder, CO.
While initial versions of the ASCII2NC tool only supported a simple 11 column ASCII point observation format, support for several additional formats has been added. It currently supports point observation data in the following formats:

MET version 9.0 adds support for the passing observations to ascii2nc using a Python script with the "-format python" option. An example of running ASCII2NC with Python embedding is included below.
• default 11 column format, as described below

• little_r format

• `SURFace RADiation (SURFRAD) <http://www.esrl.noaa.gov/gmd/grad/surfrad/>`_ and Integrated Surface Irradiance Study (ISIS) formats

• Western Wind and Solar Integration Study (WWSIS) format. WWSIS data are available by request from National Renewable Energy Laboratory (NREL) in Boulder, CO.

• `AirNow DailyData_v2, AirNow HourlyData, and AirNow HourlyAQObs formats <https://www.epa.gov/outdoor-air-quality-data>`_

• `National Data Buoy (NDBC) Standard Meteorlogical Data format <https://www.ndbc.noaa.gov/measdes.shtml>`_

• `AErosol RObotic NEtwork (AERONET) versions 2 and 3 format <http://aeronet.gsfc.nasa.gov/>`_

• Python embedding of point observations as described in :numref:`pyembed-point-obs-data`. See example below in :numref:`ascii2nc-pyembed`.

The default ASCII point observation format consists of one row of data per observation value. Each row of data consists of 11 columns as shown in :numref:`table_reform-point_ascii2nc_format`.

Expand Down
1 change: 1 addition & 0 deletions internal/test_unit/xml/unit_ascii2nc.xml
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,7 @@
<test name="ascii2nc_ndbc">
<exec>&MET_BIN;/ascii2nc</exec>
<param> \
-format ndbc_standard \
&DATA_DIR_OBS;/ndbc/13001.txt \
&DATA_DIR_OBS;/ndbc/13002.txt \
&DATA_DIR_OBS;/ndbc/13008.txt \
Expand Down
6 changes: 3 additions & 3 deletions src/tools/other/ascii2nc/ascii2nc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@
// 018 03-01-21 Fillmore Replace pickle files for temporary
// ascii.
// 019 07/06/22 Howard Soh METplus-Internal #19 Rename main to met_main
// 020 08/26/22 Dave Albo Add AirNow observations.
// 020 08/26/22 Dave Albo MET #2142 Add AirNow observations
// 021 10/03/22 Prestopnik MET #2227 Remove using namespace std from header files
// 022 10/07/22 Dave Albo Add NDBC Buoy data
// 022 10/07/22 Dave Albo MET #2276 Add NDBC Buoy data
//
////////////////////////////////////////////////////////////////////////

Expand Down Expand Up @@ -506,7 +506,7 @@ void usage() {
<< AirnowHandler::getFormatStringDailyV2() << "\", \""
<< AirnowHandler::getFormatStringHourlyAqObs() << "\", \""
<< AirnowHandler::getFormatStringHourly() << "\", \""
<< NdbcHandler::getFormatStringStandard() << "\", \""
<< NdbcHandler::getFormatStringStandard() << "\", \""
<< AeronetHandler::getFormatString() << "\", \""
<< AeronetHandler::getFormatString_v2() << "\", \""
<< AeronetHandler::getFormatString_v3() << "\"";
Expand Down

0 comments on commit f15a516

Please sign in to comment.