HWRF  trunk@4391
Classes | Functions | Variables
hwrf.input Namespace Reference

Obtains input data needed by various subclasses of hwrf.hwrftask.HWRFTask. More...

Detailed Description

Obtains input data needed by various subclasses of hwrf.hwrftask.HWRFTask.

This module implements the functionality described in hwrf.hwrftask.HWRFTask.inputiter(). It takes many HWRF tasks, asks them what input is needed and collates that information. It has a list of many possible input sources, and knows which ones are available from which cluster. It goes through available input sources in priority order, obtaining the input data.

Classes

class  DataCatalog
 Provides the location of a file in an archive, on disk or on a remote server via sftp or ftp. More...
 
class  InputSource
 Fetch data from multiple sources. More...
 

Functions

def in_date_range (t, trange)
 Is this time in the given time range? More...
 
def tempopen (f, m)
 Convenience function that opens a temporary file using tempfile.NamedTemporaryFile. More...
 
def strsrc (d)
 Makes a string version of a dataset+item dict as produced by hwrf_expt.inputiter() or hwrf.hwrftask.HWRFTask.inputiter()
 

Variables

list __all__ = ["DataCatalog","InputSource",'in_date_range']
 Symbols exported by "from hwrf.input import *".
 

Function Documentation

def hwrf.input.in_date_range (   t,
  trange 
)

Is this time in the given time range?

Parameters
tA time as a ten digit number. For example, 1830123118 is December 31, 1830 at 18:00 UTC.
trangeA comma-separated list of time ranges such as this:
  • 2015081412 — 12:00 UTC on August 14, 2015
  • 2015081412-2015082318 — From 12:00 UTC on August 14, 2015 through 18:00 UTC on August 23, 2015
  • 2015081412-2015082318,2011010100-2011123123 — From 12:00 UTC on August 14, 2015 through 18:00 UTC on August 23, 2015 and all of year 2011.
Returns
True if t falls in the range trange, or False otherwise.

Definition at line 29 of file input.py.

Referenced by hwrf.input.DataCatalog.parse().

def hwrf.input.tempopen (   f,
  m 
)

Convenience function that opens a temporary file using tempfile.NamedTemporaryFile.

Definition at line 64 of file input.py.

Referenced by hwrf.input.InputSource.fetch_file().