ASCII2NC
ASCII2NC cindyhg Thu, 04/25/2019 - 10:05ASCII2NC Functionality
The ASCII2NC tool is used to reformat ASCII point observations into the intermediate NetCDF format that Point-Stat and Ensemble-Stat accept. In METv8.0, ASCII2NC supports five types of input formats: SURFRAD and Integrated Surface Irradiance Study (ISIS), little_r, wwsis, AERONET, and an 11-column MET point format. Only the MET point format will be discussed in this tutorial for which no configuration file is required. However, the ASCII2NC configuration file found in met-8.0/share/met/config/Ascii2NcConfig_default may be used to define how SURFRAD observations should be summarized through time and a mapping of little_r input strings to output message types.
Point Observation Format
The input ASCII MET point observation format contains one observation per line. Each input observation line should consist of the following 11 columns of data:
- Message_Type
- Station_ID
- Valid_Time in YYYYMMDD_HHMMSS format
- Lat in degrees North
- Lon in degrees East
- Elevation in meters above sea level
- Grib_Code as the integer GRIB code value or variable name corresponding to this observation type
- Level as the pressure level in hPa or accumulation interval in hours
- Height in meters above sea level or above ground level
- QC_String corresponding to the quality control value
- Observation_Value in the units prescribed for the grib code
In order to use ASCII2NC, it is the user's responsibility to get their ASCII point observations into this format.
ASCII2NC Usage
View the usage statement for ASCII2NC by simply typing the following:
At a minimum, the input ascii_file and the output netcdf_file must be passed in on the command line. ASCII2NC inspects the input data to determine its format or the user may explicitly specify it using the -format command line option.
Run
Run cindyhg Thu, 04/25/2019 - 10:07Since ASCII2NC simply performs a reformatting step for data in the MET point observation format, no configuration file is needed.
Run ASCII2NC on the command line twice using the following commands:
$MET_TUTORIAL_DATA/input/sample_obs/ascii/sample_ascii_obs.txt \
$MET_TUTORIAL_DATA/output/ascii2nc/tutorial_ascii.nc \
-v 2
$MET_TUTORIAL_DATA/input/sample_obs/ascii/precip24_2010010112.ascii \
$MET_TUTORIAL_DATA/output/ascii2nc/precip24_2010010112.nc \
-v 2
ASCII2NC should perform these refomatting steps very quickly.
Output
Output cindyhg Thu, 04/25/2019 - 10:07When ASCII2NC is finished, you may view the output NetCDF files it wrote using the ncdump utility (if available on your machine). Run the following commands to view the headers of the NetCDF output files:
ncdump -h $MET_TUTORIAL_DATA/output/ascii2nc/precip24_2010010112.nc
The NetCDF header should look nearly identical to the NetCDF output of PB2NC.
After running MADIS2NC to reformat MADIS data, we'll use the NetCDF output of PB2NC to perform Grid-to-Point verification with the Point-Stat tool.