obsOperatorsChem_mod

link to source code

Dependency Diagrams:

obsOperatorsChem_mod.svg

Direct Dependency Diagram

obsOperatorsChem_mod_rev.svg

Reverse Dependency Diagram

Description

MODULE obsOperatorsChem_mod (prefix=’oopc’ category=’5. Observation operators’)

Purpose

Observation operators for CH obs family, including nonlinear, tangent-linear and adjoint versions, and related setup and input routines.

Quick access

Variables

oopc_addefftempobsfile, oopc_chobsoperators

Routines

oopc_checktype(), oopc_deallocavgkern(), oopc_deallocinfo(), oopc_dealloclevels(), oopc_diagnonly(), oopc_findavgkern(), oopc_getavgkern(), oopc_getlevels(), oopc_gettype(), oopc_readavgkern(), oopc_readavgkernauxfile(), oopc_readlevels(), oopc_readnamchem(), oopc_setupch()

Needed modules

  • earthconstants_mod: MODULE earthConstants_mod (prefix=’ec’ category=’8. Low-level utilities and constants’)

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

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

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

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

  • physicsfunctions_mod: MODULE physicsFunctions_mod (prefix=’phf’ category=’8. Low-level utilities and constants’)

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

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

  • varnamelist_mod: MODULE varNameList_mod (prefix=’vnl’ category=’7. Low-level data objects’)

  • obssubspacedata_mod: MODULE obsSubSpaceData_mod (prefix=’oss’ category=’6. High-level data objects’)

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

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

  • ozoneclim_mod: MODULE ozoneClim_mod (prefix=’ozo’ category=’5. Observation operators’)

  • presprofileoperators_mod: MODULE presProfileOperators_mod (prefix=’ppo’ category=’8. Low-level utilities and constants’)

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

  • bcovarsetupchem_mod: MODULE bCovarSetupChem_mod (prefix=’bcsc’ category=’6. High-level data objects’)

Types

  • type  obsoperatorschem_mod/unknown_type
    Type fields
    • % applygenoper [logical ]

    • % columnbound [real ]

    • % constituentid [integer ]

    • % date [integer ]

    • % height (*) [real ,allocatable]

    • % hhmm [integer ]

    • % hu (*) [real ,allocatable]

    • % iavgkern [integer ]

    • % ixtr (*) [integer ,allocatable]

    • % lat [real ]

    • % layeridentified [logical ]

    • % lon [real ]

    • % modlevindexbot (*) [integer ,allocatable]

    • % modlevindextop (*) [integer ,allocatable]

    • % nmodlev [integer ]

    • % nobslev [integer ]

    • % obs_index [integer ]

    • % obslev (*) [real ,allocatable]

    • % obsspacetrial (*) [real ,allocatable]

    • % operatorcategory [character ]

    • % pp (*) [real ,allocatable]

    • % stnid [character ]

    • % success (*) [logical ,allocatable]

    • % trial (*) [real ,pointer]

    • % tt (*) [real ,allocatable]

    • % varname [character ]

    • % varno [integer ]

    • % vco [integer ]

    • % vlayerbottom (*) [real ,allocatable]

    • % vlayertop (*) [real ,allocatable]

    • % zh (*,*) [real ,allocatable]

    • % zhp (*,*) [real ,allocatable]

  • type  obsoperatorschem_mod/unknown_type
    Type fields
    • % applygenoper [logical ]

    • % iavgkern [integer ]

    • % ixtr (*) [integer ,allocatable]

    • % modlevindexbot (*) [integer ,allocatable]

    • % modlevindextop (*) [integer ,allocatable]

    • % nobslev [integer ]

    • % success (*) [logical ,allocatable]

    • % trial (*) [real ,pointer]

    • % vlayerbottom (*) [real ,allocatable]

    • % vlayertop (*) [real ,allocatable]

    • % zh (*,*) [real ,allocatable]

    • % zhp (*,*) [real ,allocatable]

  • type  obsoperatorschem_mod/unknown_type
    Type fields
    • % element (*) [integer ,allocatable]

    • % ibegin (*) [integer ,allocatable]

    • % lat (*) [real ,allocatable]

    • % n_col (*) [integer ,allocatable]

    • % n_lat (*) [integer ,allocatable]

    • % n_lvl (*) [integer ,allocatable]

    • % n_stnid [integer ]

    • % obssubspace (*) [struct_oss_obsdata ,allocatable]

    • % profelement (*) [integer ,allocatable]

    • % rak (*) [real ,allocatable]

    • % source (*) [integer ,allocatable]

    • % stnids (*) [character ,allocatable]

    • % type_bn (*) [character ,allocatable]

    • % vco (*) [integer ,allocatable]

    • % vlayerbottom (*) [real ,allocatable]

    • % vlayertop (*) [real ,allocatable]

  • type  obsoperatorschem_mod/unknown_type
    Type fields
    • % field (*,*,*) [real ,allocatable]

    • % ivkind [integer ]

    • % lat (*) [real ,allocatable]

    • % lon (*) [real ,allocatable]

    • % nlat [integer ]

    • % nlev [integer ]

    • % nlon [integer ]

    • % vlev (*) [real ,allocatable]

Variables

  • obsoperatorschem_mod/oopc_addefftempobsfile [public]
  • obsoperatorschem_mod/oopc_chobsoperators [public]

Subroutines and functions

subroutine  obsoperatorschem_mod/oopc_setupch(kmode)
Purpose

To set up additional information required by constituent obs and not provided in obsSpaceData. Also to assign observation layer top and bottom levels (and averaging kernel matrices). See ‘oopc_CHobsoperators’.

Arguments

kmode [integer ,in] :: Mode of observation operator

Call to

oopc_readnamchem(), oopc_readlevels(), oopc_readavgkern(), utl_abort(), oss_obsdata_alloc(), bcsc_getcovarch()

subroutine  obsoperatorschem_mod/oopc_readnamchem()
Purpose

Read and store miscellaneous flags and constants.

Comment
assim_* arrays could instead be made available to all families

by moving them to a different input namelist (and changing its dimensions settings).

genOperConstraintType

Reference profile type for weighted integration or layer averaging (generalized observation) operator. Relevant for operatorSubType(2,i)=’genOper’. ================================================ ‘Trial’ use trial field xb for mass weighted

increment distribution

‘Diff’ use a combination of the difference of

an external reference xc and the trial field xb, i.e. mass weighted increment distribution as a(xc-xb) + b*xc where a and b depend on the size of sum[(xc-xb)/sig(xb)]^2 over the profile

genOperHCorrlenExpnt

Used with operatorSubType(2,i) =’genOper’ Exponent for partially mitigating the effect of the influence of neighbouring column amonunt obs from background error correlations. Emperically obtained exponent value. Not optimal for all possible local horizontal data densities.

genOperOmAStatsFactor

OmA RMS (or std dev) conservation factor for operatorSubType(2,i) =’genOper’.

assim_fam

List of families to which filt_diagnOnly is to apply.

assim_exclude_flag

Array specifying bits for identifying diagnostic-only observations for observations that would otherwise be assimilated according to the other assim_* arrays

assim_exclude_nflag

Number of bit flags to specify in assim_exclude_flag array

assim_all

Logical indicating if all assimilatable obs of the specified family will be assimilated (default is .true.) When assim_all is .false., account for the setttings of assim_num, assim_varno, assim_stnid, assim_nlev.

assim_num

Relevant when assim_all = ,false. Number combinations (stnid, bufr element, multi/uni-level) identified for assimilation. All others will not be assimilated. OmP and OmA diagnostics and output will still be produced for non-assimilated datasets.

0

none are to be assimilated when assim_all is .false. (default)

>0

sets of (stnid, bufr varno, multi/uni-levels) to be assimilated

assim_varno

Bufr elements of obs sets for assimilation. A value of 0 implies that all are to be used.

assim_stnid

Stnids of obs sets for assimilation. ‘*’ denote wild cards

assim_nlev

0

multi-level and uni-level

1

uni_level

>1

multi-level

tropo_mode

Integer indicating if special treatment is to be given to the troposphere when assimilating total column measurements. Values indicate

0

No special treatment given (default)

1

Values of the adjoint model above obsoper%columnBound set to zero. If specified, generalized innovation operator only applied below obsoper%columnBound in the tangent linear model.

2

Values of tangent linear model and adjoint model above obsoper%columnBound set to zero.

Array index refers to BUFR code element of Table 08046 (iconstituentId) identifying the constituent. Relevant for total column measurements only.

tropo_bound

Integer indicating which column top value to use if tropo_mode is non-zero.

0

Use fixed value of tropo_column_top

1

Use model determination of tropopause

2

Use model determination of PBL

Options 1 and 2 will default to the value set in tropo_column_top if the model derived column top could not be determined. Relevant for total column measurements only.

tropo_column_top

Default value to use for the column boundary (in Pa). Array index refers to BUFR code element of Table 08046 (iconstituentId) identifying the constituent. Relevant for total column measurements only.

obsdata_maxsize

Max allowed size of work arrays (in terms of number of obs) associated to ordered observation indices

modelName

Identifier of forecast model Default: ‘GEM-MACH’ Set to ‘GEM’ for varNames of ‘O3L’, ‘CH4L’, and ‘N2OL’

:operatorSubType(2,i):Operator sub-type name.

Index (2,i) for sub-type to apply for stnid in element (1,i) See related “obsoper@operatorCategory” automatically assigned based on obs BUFR element and obsinfo_chm content.

Operator Sub-type name Description Category ============= ===================================================================== ‘Interp’ ‘default’ Piecewise linear interpolation (default)

‘wgtAvg’ Piecewise weighted averaging interpolator

‘Surface’ ‘default’ No special treatment (default) ‘Integ’ ‘default’ Simple/basic vertical integration (default)

‘genOper’ Weighted vertical integration - see ‘genOper*’ parameters

‘LayerAvg’ ‘default’ Simple layer averaging (default)

‘genOper’ Weighted vertical layer averaging - see ‘genOper*’ parameters

Notes:

  • ‘genOper’ requires NAMBCHM namelist parameter settings getPhysSpaceStats=.true. and getPhysSpaceHCorrel=.true.

  • Application of averaging kernels is directed only by the content of the obsinfo_chm file ‘SECTION III’

storeOperators

Logical indicating if linear operators are stored for re-use in TL and AD calc. If so, the linear operators will not be re-calculated at different iterations. Not used when tropo_mode>=1

Called from

oopc_setupch()

Call to

utl_abort()

subroutine  obsoperatorschem_mod/oopc_readlevels()
Purpose

To read and to store reference levels (where needed) or top- and bottom-layer boundaries for CH sub-families.

Called from

oopc_setupch()

Call to

utl_abort()

subroutine  obsoperatorschem_mod/oopc_getlevels()
Purpose

To return reference model levels or layer boundaries for an observation. Combination of STNID, element variable number and number of vertical levels to determine association to the observations. Default values for top and bottom layers for total column measurements are to be provided.

Call to

utl_stnid_equal(), bufr_isintegral(), utl_abort()

subroutine  obsoperatorschem_mod/oopc_dealloclevels()
Purpose

To deallocate temporary storage space used for layer info

Call to

oopc_deallocinfo()

subroutine  obsoperatorschem_mod/oopc_readavgkern()
Purpose

To read averaging kernels from auxiliary file or observation file

Called from

oopc_setupch()

Call to

oopc_readavgkernauxfile(), obsf_obssub_read()

subroutine  obsoperatorschem_mod/oopc_readavgkernauxfile()
Purpose

To read and to store averaging kernel matricesfor CH sub-families

Comments
  • Currently implemented for only one latitude band

Called from

oopc_readavgkern()

Call to

utl_abort()

subroutine  obsoperatorschem_mod/oopc_deallocavgkern()
Purpose

To deallocate temporary storage space used for averaging kernels

Call to

oss_obsdata_dealloc(), oopc_deallocinfo()

function  obsoperatorschem_mod/oopc_findavgkern(cstnid, varno, nlev)
Purpose

To find the averaging kernel for an observation if one is specified. Returns 0 if either not found or not specified. Combination of STNID, BUFR element and number of vertical levels to determine association to the observations.

Arguments
  • cstnid [character ,in] :: station id

  • varno [integer ,in] :: BUFR descriptor element

  • nlev [integer ,in] :: number of levels in the observation

Return

istnid [integer ] :: Index of averaging kernel in oopc_avgkern. Zero if not found.

Call to

utl_stnid_equal()

subroutine  obsoperatorschem_mod/oopc_getavgkern(istnid, nlev, ncol, code, avg_kern)
Purpose

To return averaging kernel for an observation.

Arguments
  • istnid [integer ,in] :: index of averaging kernel in oopc_avgkern

  • nlev [integer ,in] :: number of observation levels

  • ncol [integer ,in] :: number of columns for avg kernel info (without the a priori contribution)

  • code [character ,in] :: measurement identifier

  • avg_kern (nlev,ncol + 2) [real ,out]

Call to

utl_abort(), oss_obsdata_get_array2d()

subroutine  obsoperatorschem_mod/oopc_deallocinfo(info)
Purpose

To deallocate struct_oopc_info instance

Arguments

info [struct_oopc_info ,inout]

Called from

oopc_dealloclevels(), oopc_deallocavgkern()

function  obsoperatorschem_mod/oopc_diagnonly(cfamname, cstnid, varno, nobslev, flag)
Purpose

To identify whether or not the obs set identified by the combination of (cstnid,varno,nobslev) will be assimilated or else used for independent verifications after assimilation/minimization

Arguments
  • cfamname [character ,in] :: Family name

  • cstnid [character ,in] :: Input station id

  • varno [integer ,in] :: Obs BUFR number

  • nobslev [integer ,in] :: Number of levels

  • flag [integer ,in] :: observation integer flag

Return

oopc_diagnonly [logical ]

Called from

osd_obsdiagnostics()

Call to

utl_stnid_equal()

function  obsoperatorschem_mod/oopc_checktype(stnidset, typeset, stnid, type_bn)
Purpose

To determine if specified combination of (stnid,type) found in (StnidSet,TypeSet).

Arguments
  • stnidset (*) [character ,in]

  • typeset (*) [character ,in]

  • stnid [character ,in]

  • type_bn [character ,in]

Return

sametype [logical ]

Call to

utl_stnid_equal()

function  obsoperatorschem_mod/oopc_gettype(stnidset, typeset, stnid)
Purpose

To determine “type” for specified “stnid” found in “(StnidSet,Typesef)”.

Arguments
  • stnidset (*) [character ,in]

  • typeset (*) [character ,in]

  • stnid [character ,in]

Return

type

Call to

utl_stnid_equal()