Skip to content
rmontuoro edited this page Apr 17, 2020 · 1 revision

Space Weather Prediction Center Data Polling Component

The DATAPOLL component adds to a generic NUOPC Model the ability to suspend execution until a given event occurs and an 'update' signal carrying the event's time stamp is provided.

DATAPOLL can be added to a NUOPC application's run sequence and set to run at a given run frequency in order to periodically poll for updates. Note that the application's driver must be modified to include this component at build time.

Update signals are provided by means of zero-size lock files carrying the time stamp information in their names: YYYYMMDD_hhmmss.lock. DATAPOLL pauses the run sequence until the signal's time stamp matches the system's current time, or, if set, until the maximum number of polling attempts has been reached.

Component Configuration

DATAPOLL requires a minimal configuration, which includes the following parameters:

  • pollDir: the name of the directory where to look for lock files.
  • pollSec: the time interval, in seconds, between consecutive polling attempts while DATAPOLL is running
  • pollMax: the maximum number of polling attempts allowed before releasing the "hold". Set to a value less or equal to 0 to prevent DATAPOLL from pausing the run sequence execution.

Since these parameters are provided as NUOPC attributes, no configuration/resource file is necessary.

Run Sequence

A run sequence for the SWPC WAM-IPE NEMS application modified to include the DATAPOLL component is shown below as an example.

# EARTH #
EARTH_component_list: ATM IPM MED DATAPOLL
EARTH_attributes::
  Verbosity = max
::

# MED #
MED_model:                      swpc
MED_petlist_bounds:             72 111
MED_attributes::
  Verbosity = max
  DumpFields = false
  DumpRHs = false
::

# ATM #
ATM_model:                      wam
ATM_petlist_bounds:             0 31
ATM_attributes::
  Verbosity = max
::

# IPM #
IPM_model:                      ipe
IPM_petlist_bounds:             32 71
IPM_attributes::
  Verbosity = max
  Diagnostic = 131072
::

DATAPOLL_model:                 datapoll
DATAPOLL_petlist_bounds:        -1 -1
DATAPOLL_attributes::
  Verbosity = max
  pollDir = .            # directory containing YYYYMMDD_hhmmss.lock files, signaling that
                         # new input data is available for the given time stamp
  pollSec = 1            # polling interval
  pollMax = 10000        # max number of polling attempts
::

# Run Sequence #
runSeq::
 @900
   @180.0
     ATM -> MED :remapMethod=redist
     MED
     MED -> IPM :remapMethod=redist
     ATM
     IPM
   @
   DATAPOLL
 @
::

Clone this wiki locally