Generate hybrid tangent linear model coefficients in OOPS

GenHybridLinearModelCoeffs is an application used for calculating coefficients for a hybrid tangent linear model (H-TLM) over an assimilation window, and writing these to files.

OOPS’s H-TLM implementation, named HybridLinearModel in the code, can be used for any MODEL which has implemented a LinearModel in its interface.

The coefficient files can be read in during a run of the Variational application, in order to use a HybridLinearModel as the LinearModel in 4D-Var. There are further details on how to do this on the page for the HybridLinearModel.

The LinearModel is instantiated via a factory. To make this a HybridLinearModel, the name option in the linear model subconfiguration must be set to HTLM.

Description

The code has been implemented to follow the method in Payne (2021). Within this scope, the user must decide:

  • The initial conditions for the nonlinear model control member (generally a background for the assimilation window of interest).

  • Whether to explicitly provide initial conditions for the nonlinear model ensemble members, or generate them via perturbing the control member.

  • The model used to forecast these initial conditions through the assimilation window of interest and its resolution.

  • The underlying simple linear model and its resolution.

  • The resolution at which to calculate and apply H-TLM coefficients. Note that if this is different from the previous resolution, then the multiresolution H-TLM method will be used, and the residual formulation of this method can optionally be used as well.

  • The number of vertical levels in the columns of influence.

  • The variables which H-TLM coefficients will be calculated for and applied to.

  • The timestep of the H-TLM, which may be a multiple of the simple linear model’s.

  • Whether to do any root-mean-squared-by-level scaling and/or Tikhonov regularization/ridge regression.

The section below contains some more details on each of these choices.

Configuration

The application can be configured using the following options:

  • update geometry: subconfiguration for the MODEL-specific Geometry at which H-TLM coefficients will be calculated and applied (this must match the intended analysis geometry in 4D-Var)

  • hybrid linear model: subconfiguration for the HybridLinearModel:

    • name: must be “HTLM” in order to instantiate a HybridLinearModel via the LinearModel factory

    • simple linear model: subconfiguration for the SimpleLinearModel wrapper:

      • linear model: subconfiguration for the underlying MODEL-specific LinearModel

      • geometry (optional): subconfiguration for the MODEL-specific Geometry of the MODEL-specific LinearModel when using SimpleLinearModelMultiresolution or SimpleLinearModelResidualForm

      • residual form (optional, default false): boolean determining whether SimpleLinearModelResidualForm is used over SimpleLinearModelMultiresolution

    • update tstep: timestep of the HybridLinearModel, as used by CostFct4DVar/CostFctWeak (i.e. the time between HybridLinearModel updates using the coefficients); a duration in ISO 8601 format

    • variables: list of variables, as used by CostFct4DVar/CostFctWeak (i.e. the analysis variables); must be a superset of coefficients.update variables

    • coefficients: subconfiguration for the HybridLinearModelCoeffs class:

      • output: subconfiguration for the writing of coefficients to file, consisting of base filepath (string) and one file per task (boolean; currently, this must be set to true)

      • update variables: list of variables which are updated by the coefficients (having previously been trained on them)

      • influence region size: number of vertical levels in column of influence (must be an odd number to allow centering on the level of interest)

      • time window: subconfiguration for the TimeWindow over which coefficients are applied (i.e. the assimilation window)

      • calculator: subconfiguration for the HtlmCalculator class which calculates the coefficients using the ensemble of nonlinear model differences and ensemble of simple linear models:

        • rms scaling (optional, default false): boolean determining whether or not root-mean-squared-by-level scaling is applied during the calculation; this is to avoid ill-conditioning of the matrices in the problem (see Section 3a of Payne (2021)); currently, the capability for this must be implemented in the MODEL interface, so it is optional; in future, when a MODEL-generic capability is implemented, this feature will be mandatory

        • regularization (optional): subconfiguration for the Tikhonov regularization/ridge regression applied during the calculation; this is to relax the H-TLM towards its underlying simple linear model in particular regions of the model space (see Section 4b of Payne (2021)); this part of the code is currently undergoing changes and documentation will be provided when those are complete

      • ensemble: subconfiguration for the HtlmEnsemble class which runs the ensemble of nonlinear models and ensemble of simple linear models:

        • model: subconfiguration for the MODEL-specific Model

        • model geometry: subconfiguration for the MODEL-specific Geometry of the Model

        • nonlinear control: subconfiguration for the MODEL-specific State that forms the nonlinear control member initial condition

        • nonlinear ensemble: subconfiguration for the nonlinear ensemble initial conditions, which has two options:

          • read: subconfiguration for a StateEnsemble, used if nonlinear ensemble initial conditions are being read in from file, which will contain MODEL-specific elements

          • generate: subconfiguration used of nonlinear ensemble initial conditions are being generated by perturbing the nonlinear control member initial condition:

            • ensemble size: the number of ensemble members

            • background error: subconfiguration for the ModelSpaceCovarianceParameters, which may contain MODEL-specific elements

            • variables: list of variables to perturb

Here is an example configuration for the application:

update geometry:
  # MODEL-specific subconfiguration
hybrid linear model:
  name: HTLM
  simple linear model:
    linear model:
      # MODEL-specific subconfiguration
  update tstep: PT1H
  variables: [x, y, z]
  coefficients:
    output:
      base filepath: path/to/coeffs
      one file per task: true
    update variables: [x, y]
    influence region size: 5
    time window:
      begin: 2024-01-16T06:00:00Z
      length: PT6H
    calculator:
      rms scaling: false
    ensemble:
      model:
        # MODEL-specific subconfiguration
      model geometry:
        # MODEL-specific subconfiguration
      nonlinear control:
        # MODEL-specific subconfiguration
      nonlinear ensemble:
        read:
          # partially MODEL-specific subconfiguration

References

Payne, T. J. (2021). A Hybrid Differential-Ensemble Linear Forecast Model for 4D-Var. Monthly Weather Review, 149, 3-19. DOI:10.1175/MWR-D-20-0088.1