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

Utilities for ensemble-based data assimilation. More...

Detailed Description

Utilities for ensemble-based data assimilation.

This module contains utilities for doing various forms of ensemble-based data assimilation. It manages a two-dimension ensemble-time array of Task objects that know how to run each analysis cycle for each member. This module also provides a way of presenting the previous forecast cycle's ensda objects such that this cycle can use them. This is all built on top of the classes in the hwrf.fcsttask module.

Classes

class  AlwaysRunENSDA
 Used in place of CycleTDRCheck to force ENSDA to always run. More...
 
class  CycleTDRCheck
 Determines if Tail Doppler Radar (TDR) data is available. More...
 
class  DAEnsemble
 Represents a two-dimensional ensemble-vs-time array of hwrf.hwrftask.HWRFTask objects. More...
 
class  FromGFSENKF
 Forecast ensemble member based on the GFS ENKF. More...
 
class  FromPriorCycle
 Represents an ensemble member from the previous forecast cycle. More...
 

Functions

def write_ensda_flag_file (flag_file, run_ensda)
 Writes the stormX.run_ensda flag file. More...
 
def read_ensda_flag_file (flag_file)
 Reads the stormX.run_ensda flag file. More...
 
def enada_pre_object_for (ds, conf, section, next_cycle)
 Generates a CycleTDRCheck or AlwaysRunENSDA based on configuration settings. More...
 

Variables

list __all__
 The symbols exported by "from hwrf.ensda import *". More...
 

Function Documentation

def hwrf.ensda.enada_pre_object_for (   ds,
  conf,
  section,
  next_cycle 
)

Generates a CycleTDRCheck or AlwaysRunENSDA based on configuration settings.

Reads the [config] section ensda_when option to decide what TDR check class should be used.

  • ensda_when="tdr_next_cycle" - create a CycleTDRCheck
  • ensda_when="always" - create an AlwaysRunENSDA
  • ensda_when=anything else - raise an exception
    Parameters
    ds,conf,section,next_cycle- passed to the constructor

Definition at line 896 of file ensda.py.

Referenced by hwrf_expt.init_module().

def hwrf.ensda.read_ensda_flag_file (   flag_file)

Reads the stormX.run_ensda flag file.

This function is used by the scripting and workflow layers to determine if the data assimilation ensemble should be run. Reads the storm*.run_ensda flag file line by line, searching for a single line RUN_ENSDA=YES or RUN_ENSDA=NO. Returns True for YES or False for No, based on the last such line seen. Returns None otherwise.

Definition at line 625 of file ensda.py.

Referenced by scripts.exhwrf_output.main(), and hwrf.ensda.CycleTDRCheck.should_run_ensda().

def hwrf.ensda.write_ensda_flag_file (   flag_file,
  run_ensda 
)

Writes the stormX.run_ensda flag file.

Writs the storm*.run_ensda flag file for this cycle. The purpose of the file is to tell the workflow and scripting layers whether the ensemble needs to be run. The file will contain a single line: RUN_ENSDA=YES or RUN_ENSDA=NO. Will also log a message to the jlogfile at INFO level telling which was written.

Parameters
flag_filethe full path to the flag file
run_ensdaTrue or False: should the ENSDA be run?

Definition at line 606 of file ensda.py.

Referenced by hwrf.ensda.CycleTDRCheck.write_flag_file().

Variable Documentation

hwrf.ensda.__all__
Initial value:
1 = ['DAEnsemble','FromPriorCycle','FromGFSENKF',
2  'write_ensda_flag_file','read_ensda_flag_file',
3  'CycleTDRCheck','AlwaysRunENSDA','enada_pre_object_for']

The symbols exported by "from hwrf.ensda import *".

Definition at line 13 of file ensda.py.