midas_letkf

link to source code

Dependency Diagrams:

midas_letkf.svg

Direct Dependency Diagram

program  midas_letkf
Purpose

Main program for the local ensemble transform Kalman filter (LETKF). Several different variations of the LETKF algorithm have been implemented. Note that the actual calculation of the analyses is in the subroutine enkf_LETKFanalyses. Many aspects of this program are controlled through the namelist block NAMLETKF.

Algorithm

The letkf programs implements several variations of the LETKF ensemble data assimilation algorithm. The following variations can be chosen through the namelist:

  • LETKF: standard LETKF

  • CVLETKF: LETKF with deterministic approach to cross validation using the “gain form” (currently operational)

  • CVLETKF-PERTOBS: LETKF with stochastic approach to cross validation

  • LETKF-Gain: standard LETKF, but using the “gain form”

  • LETKF-Gain-ME: standard LETKF, but using the “modulated ensemble” and “gain form” to account for vertical localization

  • CVLETKF-ME: LETKF with deterministic approach to cross validation using the “modulated ensemble” and “gain form” to account for vertical localization

More detail on the LETKF algorithms with and without cross validation (deterministic and stochastic) can be found in the paper: LETKF with cross validation

Input and Output Files (NWP applicaton)

Description of file

flnml

In - Main namelist file with parameters user may modify

flnml_static

In - The “static” namelist that should not be modified

ensemble/$YYYYMMDDHH_006_$NNNN

In - Background ensemble member files

obsfiles_$FAM/obs$FAM_$NNNN_$NNNN

In - Observation file for each “family” and MPI task

obserr

In - Observation error statistics

$YYYYMMDDHH_000_$NNNN

Out - Analysis ensemble member files

obsfiles_$FAM.updated/obs$FAM_$NNNN_$NNNN

Out - Updated obs file for each “family” and MPI task

Remainder are files related to radiance obs:

stats_$SENSOR_assim

In - Satellite radiance observation errors of difference sensors

stats_tovs

In - Satellite radiance observation errors

stats_tovs_symmetricObsErr

In - User-defined symmetric TOVS errors for all sky

Cmat_$PLATFORM_$SENSOR.dat

In - Inter-channel observation-error correlations

ceres_global.std

In - High-res surface type and water fraction for radiance obs

rtcoef_$PLATFORM_$SENSOR.dat

In - RTTOV coefficient files

rttov_h2o_limits.dat

In - Min/max humidity limits applied to analysis

ozoneclim98

In - Ozone climatology

Synopsis

Below is a summary of the letkf program calling sequence:

  • Initial setups:

    • Read the NAMLETKF namelist and check/modify some values.

    • Various modules are setup: obsFiles_mod, gridStateVector_mod, timeCoord_mod (and set up dates and dateStampList variables for both trials and increments/analyses).

    • Setup horizontal and vertical grid objects from first ensemble member file and determine if this is an NWP or ocean application.

    • Setup obsSpaceData object and read observations from files: inn_setupObs.

    • Setup the observation error statistics in obsSpaceData object: oer_setObsErrors.

    • Allocate and some setup of objects for ensembleObservations_mod.

    • Allocate objects for column_mod and gridStateVector_mod.

    • Allocate ensemble object and read trial ensemble: ens_readEnsemble.

    • Optionally, read a deterministic state for recentering the trial ensemble before the analysis (for special applications using LETKF for deterministic analysis).

    • Compute ensemble mean: ens_computeMean.

  • LETKF computations:

    • Loop over trial members, computing innovation for each, with resulting \(H(xb)\) being stored in ensObs objects both for original ensemble and, optionally, for the modulated ensemble members.

    • Compute some additional quantities in ensObs objects based on \(H(xb)\) values.

    • Compute \(y-H(xb)\) for trial ensemble mean.

    • Additional observation quality control procedures based on quantities computed from trial ensemble.

    • Gather ensObs quantities from all MPI tasks onto all MPI tasks.

    • Allocate and prepare objects for ensembleStateVector_mod used to store the trial and analysis ensembles with temporal resolution of analysis (can be same as temporal resolution for innovation calculation or only a single time step).

    • Setup information for interpolating weights from coarse grid to the full model grid: enkf_setupInterpInfo.

    • Perform LETKF analysis to compute the analysis ensemble: enkf_LETKFanalyses

  • Final steps:

    • Optionally, compute \(H(xa)\) for each member and put values in ensObs object for later output to diag SQLite files.

    • Write out (update) the observation files: obsf_writeFiles.

    • Compute \(y-H(xa)\) for ensemble mean analysis, stored in obsSpaceData.

    • Optionally, do post-processing of the analysis ensemble (same functionality as the ensPostProcess program), or just write out the raw analysis ensemble (for later processing by ensPostProcess).

Options

List of namelist blocks that can affect the letkf program.

  • Some of the other relevant namelist blocks used to configure the letkf analysis are listed in the following table:

Program/Module

Namelist

Description of what is controlled

midas_letkf

NAMLETKF

LETKF algorithm, number of ensemble members and additional parameters for controlling the LETKF analysis

timeCoord_mod

NAMTIME

assimilation time window length, temporal resolution of the background state and the analysis

Needed modules

  • version_mod: MODULE version_mod (prefix=’ver’ category=’8. Low-level utilities and constants’)

  • midasmpi_mod: MODULE midasMpi_mod (prefix=’mmpi’ category=’8. Low-level utilities and constants’)

  • mathphysconstants_mod: MODULE mathPhysConstants_mod (prefix=’mpc’ category=’8. Low-level utilities and constants’)

  • filenames_mod: MODULE fileNames_mod (prefix=’fln’ category=’7. Low-level data objects’)

  • ensembleobservations_mod: MODULE ensembleObservations_mod (prefix=’eob’ category=’6. High-level data objects’)

  • ensemblestatevector_mod: MODULE ensembleStateVector_mod (prefix=’ens’ category=’6. High-level data objects’)

  • gridstatevector_mod: MODULE gridStateVector_mod (prefix=’gsv’ category=’6. High-level data objects’)

  • gridstatevectorfileio_mod: MODULE gridStateVectorFileIO_mod (prefix=’gio’ category=’4. Data Object transformations’)

  • columndata_mod: MODULE columnData_mod (prefix=’col’ category=’6. High-level data objects’)

  • tovsnl_mod: MODULE tovsNL_mod (prefix=’tvs’ category=’5. Observation operators’)

  • verticalcoord_mod: MODULE verticalCoord_mod (prefix=’vco’ category=’7. Low-level data objects’)

  • horizontalcoord_mod: MODULE horizontalCoord_mod (prefix=’hco’ category=’7. Low-level data objects’)

  • oceanmask_mod: MODULE oceanMask_mod (prefix=’ocm’ category=’7. Low-level data objects’)

  • timecoord_mod: MODULE timeCoord_mod (prefix=’tim’ category=’7. Low-level data objects’)

  • obstimeinterp_mod: MODULE obsTimeInterp_mod (prefix=’oti’ category=’4. Data Object transformations’)

  • utilities_mod: MODULE utilities_mod (prefix=’utl’ category=’8. Low-level utilities and constants’)

  • ramdisk_mod: MODULE ramDisk_mod (prefix=’ram’ category=’8. Low-level utilities and constants’)

  • statetocolumn_mod: MODULE stateToColumn_mod (prefix=’s2c’ category=’4. Data Object transformations’)

  • obsfiles_mod: MODULE obsFiles_mod (prefix=’obsf’ category=’3. Observation input/output’)

  • obsspacedata_mod: MODULE obsSpaceData_mod (prefix=’obs’ category=’6. High-level data objects’)

  • obserrors_mod: MODULE obsErrors_mod (prefix=’oer’ category=’2. B and R matrices’)

  • obsfilter_mod: MODULE obsFilter_mod (prefix=’filt’ category=’5. Observation operators’)

  • innovation_mod: MODULE innovation_mod (prefix=’inn’ category=’1. High-level functionality’)

  • enkf_mod: MODULE enkf_mod (prefix=’enkf’ category=’1. High-level functionality’)

  • enspostprocess_mod: MODULE ensPostProcess_mod (prefix=’epp’ category=’1. High-level functionality’)

Routines called

ver_printnameandversion(), mmpi_initialize(), utl_tmg_start(), ram_setup(), utl_abort(), obsf_setup(), tim_setup(), tim_getdatestamp(), tim_setdatestamp(), tim_getstamplist(), gsv_setup(), fln_ensfilename(), hco_setupfromfile(), vco_setupfromfile(), vco_getnumlev(), inn_setupobs(), oer_setobserrors(), filt_suprep(), eob_allocate(), obs_numbody(), eob_zero(), eob_setlatlonobs(), col_setup(), col_setvco(), col_allocate(), obs_numheader(), gsv_allocate(), gio_readfromfile(), gsv_zero(), ens_allocate(), ens_readensemble(), utl_tmg_stop(), fln_enstrlfilename(), ens_recenter(), gsv_deallocate(), ens_computemean(), ens_copyensmean(), gsv_copy4dto3d(), gsv_copy(), eob_readfromfiles(), enkf_setupmodulationfactor(), eob_setassflag(), ens_copymember(), gsv_copyheightsfc(), s2c_nl(), inn_computeinnovation(), eob_setyb(), enkf_getmodulatedstate(), gsv_isallocated(), eob_writetofiles(), eob_calcandremovemeanyb(), eob_sethpht(), eob_calcrandpert(), tvs_alloctransmission(), col_getnumlev(), eob_setmeanomp(), eob_setsimobsval(), eob_settypevertcoord(), eob_setvertlocation(), enkf_modifyamsubobserror(), eob_backgroundcheck(), ens_getmask(), eob_removeobsnearland(), eob_setsigisigo(), eob_hubernorm(), enkf_rejecthighlatir(), eob_rejectradnearsfc(), eob_setobserrinv(), eob_allgather(), oti_timebinning(), ens_copy4dto3d(), ens_deallocate(), ens_copy(), enkf_setupinterpinfo(), enkf_letkfanalyses(), gsv_3dto4d(), eob_setya(), obsf_writefiles(), epp_postprocess(), ens_writeensemble()