DataIngest: Basic Use Case

met_tool_wrapper/DataIngest/DataIngest.conf

Scientific Objective

Download input files and optionally decompress them.

Datasets

Inputs: None

METplus Components

This use case utilizes the METplus DataIngest wrapper to download and decompress input files.

METplus Workflow

Beginning time (VALID_BEG): 2022-07-20 0Z

End time (VALID_END): 2022-07-20 12Z

Increment between beginning and end times (VALID_INCREMENT): 12 hours

Sequence of forecast leads to process (LEAD_SEQ): None

DataIngest is the only tool called in this example. It has two run times. The MADIS data is hourly, so two files are downloaded. The Surfrad data is daily, so one file is downloaded. The MADIS files are compressed with gzip compression, so they are automatically decompressed into NetCDF format.

METplus Configuration

METplus first loads all of the configuration files found in parm/metplus_config, then it loads any configuration files passed to METplus via the command line, i.e. parm/use_cases/met_tool_wrapper/DataIngest/DataIngest.conf

[config]

# Documentation for this use case can be found at
# https://metplus.readthedocs.io/en/latest/generated/met_tool_wrapper/DataIngest/DataIngest.html

# For additional information, please see the METplus Users Guide.
# https://metplus.readthedocs.io/en/latest/Users_Guide

###
# Processes to run
# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#process-list
###

PROCESS_LIST = DataIngest


###
# Time Info
# LOOP_BY options are INIT, VALID, RETRO, and REALTIME
# If set to INIT or RETRO:
#   INIT_TIME_FMT, INIT_BEG, INIT_END, and INIT_INCREMENT must also be set
# If set to VALID or REALTIME:
#   VALID_TIME_FMT, VALID_BEG, VALID_END, and VALID_INCREMENT must also be set
# LEAD_SEQ is the list of forecast leads to process
# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#timing-control
###

LOOP_BY = VALID
VALID_TIME_FMT = %Y%m%d%H
VALID_BEG=2022072000
VALID_END=2022072012
VALID_INCREMENT = 12H

LEAD_SEQ = 0


###
# File I/O
# https://metplus.readthedocs.io/en/latest/Users_Guide/systemconfiguration.html#directory-and-filename-template-info
###

DATA_INGEST_SKIP_IF_OUTPUT_EXISTS = False

DATA_INGEST_1_INPUT_TEMPLATE = https://dtcenter.ucar.edu/dfiles/code/METplus/DataIngest_input/{valid?fmt=%Y/%m/%d}/point/metar/netcdf/{valid?fmt=%Y%m%d_%H%M}.gz
DATA_INGEST_1_OUTPUT_TEMPLATE = {OUTPUT_BASE}/data_ingest/madis_metar/{valid?fmt=%Y%m%d_%H%M}.nc
#DATA_INGEST_1_SKIP_IF_OUTPUT_EXISTS = False
DATA_INGEST_1_AUTO_DECOMPRESS = True
DATA_INGEST_1_USERNAME = anonymous
DATA_INGEST_1_PASSWORD = anonymous

DATA_INGEST_2_INPUT_TEMPLATE = https://dtcenter.ucar.edu/dfiles/code/METplus/DataIngest_input/radiation/surfrad/Boulder_CO/{valid?fmt=%Y}/tbl{valid?fmt=%y%j}.dat
DATA_INGEST_2_OUTPUT_TEMPLATE = {OUTPUT_BASE}/data_ingest/surfrad/tbl{valid?fmt=%Y%m%d}.dat
DATA_INGEST_2_SKIP_IF_OUTPUT_EXISTS = True
DATA_INGEST_2_AUTO_DECOMPRESS = True
#DATA_INGEST_2_USERNAME =
#DATA_INGEST_2_PASSWORD =

MET Configuration

None.

Python Embedding

This use case does not use Python Embedding.

User Scripting

This user case does not call a user-defined script.

Running METplus

Pass the use case configuration file to the run_metplus.py script along with any user-specific system configuration files if desired:

run_metplus.py /path/to/METplus/parm/use_cases/met_tool_wrapper/DataIngest/DataIngest.conf /path/to/user_system.conf

See Running METplus for more information.

Expected Output

A successful run will output the following both to the screen and to the logfile:

INFO: METplus has successfully finished running.

Refer to the value set for OUTPUT_BASE to find where the output data was generated. Output for this use case will be found in data_ingest (relative to OUTPUT_BASE) and will contain the following file:

  • madis_metar/20220720_0000.nc

  • madis_metar/20220720_1200.nc

  • surfrad/tbl20220720.dat

Keywords

Note

  • DataIngestToolUseCase

  • MADISFileUseCase

  • NetCDFFileUseCase

Navigate to the METplus Quick Search for Use Cases page to discover other similar use cases.

Gallery generated by Sphinx-Gallery