gridStateVector_mod

link to source code

Dependency Diagrams:

gridStateVector_mod.svg

Direct Dependency Diagram

gridStateVector_mod_rev.svg

Reverse Dependency Diagram

Description

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

Purpose

The grid-point state vector and related information.

Quick access

Types

struct_gduv, struct_gsv

Variables

gsv_conversionvarkindchtomicrograms, gsv_getfield, gsv_getfielduv, gsv_minvalvarkindch, gsv_rhumin

Routines

complementaryuvname(), gsv_3dto4d(), gsv_3dto4dadj(), gsv_add(), gsv_allocate(), gsv_applymasklam(), gsv_checkmpidistribution(), gsv_communicatetimeparams(), gsv_containsnonzerovalues(), gsv_copy(), gsv_copy4dto3d(), gsv_copyheightsfc(), gsv_copymask(), gsv_deallocate(), gsv_dotproduct(), gsv_field3d_hbilin(), gsv_getdatakind(), gsv_getdatestamp(), gsv_getfield3d_r4(), gsv_getfield3d_r8(), gsv_getfield_r48(), gsv_getfielduv_r48(), gsv_getfielduvwrapper_r4(), gsv_getfielduvwrapper_r8(), gsv_getfieldwrapper_r4(), gsv_getfieldwrapper_r8(), gsv_gethco(), gsv_gethco_physics(), gsv_getheightsfc(), gsv_getinfo(), gsv_getlevfromk(), gsv_getmpiidfromk(), gsv_getnumk(), gsv_getnumlev(), gsv_getnumlevfromvarname(), gsv_getoffsetfromvarname(), gsv_getvarnamefromk(), gsv_getvco(), gsv_horizsubsample(), gsv_hpad(), gsv_isallocated(), gsv_isassocheightsfc(), gsv_isinitialized(), gsv_modifydate(), gsv_modifyvarname(), gsv_msgfldextremum(), gsv_msgvarnames(), gsv_power(), gsv_resettimeparams(), gsv_scale(), gsv_scalevertical(), gsv_schurproduct(), gsv_setup(), gsv_smoothhorizontal(), gsv_transposesteptotiles(), gsv_transposesteptovarslevs(), gsv_transposetilestompiglobal(), gsv_transposetilestostep(), gsv_transposetilestovarslevs(), gsv_transposetilestovarslevsad(), gsv_transposevarslevstotiles(), gsv_varexist(), gsv_varkindexist(), gsv_varnameslist(), gsv_zero()

Needed modules

  • mpi (mpi_status_size())

  • codeprecision_mod: MODULE codePrecision_mod (prefix=’pre’ category=’8. Low-level utilities and constants’)

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

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

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

  • 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’)

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

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

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

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

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

Types

  • type  gridstatevector_mod/struct_gduv
    Type fields
    • % null [real ,pointer]

    • % r4 (*,*,*) [real ,pointer]

    • % r8 (*,*,*) [real ,pointer]

  • type  gridstatevector_mod/struct_gsv

    This is the derived type of the statevector object

    Type fields
    • % addheightsfcoffset [logical ]

    • % allkbeg (*) [integer ,pointer]

    • % allkcount (*) [integer ,pointer]

    • % allkend (*) [integer ,pointer]

    • % alllatbeg (*) [integer ,pointer]

    • % alllatend (*) [integer ,pointer]

    • % alllatperpe (*) [integer ,pointer]

    • % alllonbeg (*) [integer ,pointer]

    • % alllonend (*) [integer ,pointer]

    • % alllonperpe (*) [integer ,pointer]

    • % alluvkbeg (*) [integer ,pointer]

    • % alluvkcount (*) [integer ,pointer]

    • % alluvkend (*) [integer ,pointer]

    • % anltime [integer ]

    • % datakind [integer ] :: default value

    • % dateoriginlist (*) [integer ,pointer]

    • % datestamp3d [integer ,pointer]

    • % datestamplist (*) [integer ,pointer]

    • % deet [integer ]

    • % etiket [character ]

    • % extrauvallocated [logical ] :: extra winds (gdUV) are allocated

    • % hco [struct_hco ,pointer]

    • % hco_physics [struct_hco ,pointer]

    • % heightsfcpresent [logical ]

    • % hextrapolatedegree [character ] :: or ‘VALUE’ or ‘MINIMUM’ or ‘NEUTRAL’

    • % hinterpolatedegree [character ] :: or ‘LINEAR’ or ‘CUBIC’ or ‘NEAREST’

    • % horizsubsample [integer ]

    • % ip2list (*) [integer ,pointer]

    • % latperpe [integer ]

    • % latperpemax [integer ]

    • % lonperpe [integer ]

    • % lonperpemax [integer ]

    • % mpi_distribution [character ] :: or ‘Tiles’ or ‘VarsLevs’

    • % mpi_local [logical ]

    • % mykbeg [integer ]

    • % mykcount [integer ]

    • % mykend [integer ]

    • % mylatbeg [integer ]

    • % mylatend [integer ]

    • % mylonbeg [integer ]

    • % mylonend [integer ]

    • % myuvkbeg [integer ]

    • % myuvkcount [integer ]

    • % myuvkend [integer ]

    • % ni [integer ]

    • % nj [integer ]

    • % nk [integer ]

    • % npaslist (*) [integer ,pointer]

    • % numstep [integer ]

    • % oceanmask [struct_ocm ]

    • % onphysicsgrid (*) [logical ,pointer]

    • % uvcomponentpresent [logical ] :: wind component present on this mpi task

    • % varexistlist (vnl_numvarmax) [logical ]

    • % varnumlev (*) [integer ,pointer]

    • % varoffset (*) [integer ,pointer]

    • % vco [struct_vco ,pointer]

Variables

  • gridstatevector_mod/gsv_conversionvarkindchtomicrograms [logical,public]

    activate unit conversion for CH variables

  • gridstatevector_mod/gsv_getfield [public]
  • gridstatevector_mod/gsv_getfielduv [public]
  • gridstatevector_mod/gsv_minvalvarkindch (vnl_numvarmax) [real,public]
  • gridstatevector_mod/gsv_rhumin [real,public]

Subroutines and functions

function  gridstatevector_mod/gsv_getoffsetfromvarname(statevector, varname)
Purpose

Returns the offset for the given variable provided it exists

Arguments
  • statevector [struct_gsv ,in]

  • varname [character ,in]

Return

offset [integer ]

Called from

ens_getoffsetfromvarname(), ens_getkfromlevvarname(), gsv_allocate(), gsv_transposetilestovarslevs(), gsv_transposetilestovarslevsad(), bmd_setup(), s2c_bgcheck_bilin()

Call to

vnl_varlistindex(), utl_abort()

function  gridstatevector_mod/gsv_getvarnamefromk(statevector, kindex)
Purpose

Returns the variable name from a given kIndex

Arguments
  • statevector [struct_gsv ,in]

  • kindex [integer ,in]

Return

varname [character ]

Called from

adv_statevector_tl(), adv_statevector_ad(), scalestddev(), enkf_letkfanalyses(), epp_printrmsstats(), ens_getvarnamefromk(), gio_readfile(), gio_fileunitstostateunits(), gsv_varnameslist(), gsv_allocate(), gsv_hpad(), gsv_scalevertical(), gsv_transposetilestovarslevs(), gsv_transposetilestovarslevsad(), gsv_smoothhorizontal(), int_hinterp_gsv(), s2c_setupinterpinfo(), s2c_tl(), s2c_ad(), s2c_nl(), checkcolumnstatevectormatch(), midas_extractbmatrixfor1dvar

Call to

utl_abort()

function  gridstatevector_mod/gsv_getlevfromk(statevector, kindex)
Purpose

Returns level index from a given kIndex

Arguments
  • statevector [struct_gsv ,in]

  • kindex [integer ,in]

Return

levindex [integer ]

Called from

adv_statevector_tl(), adv_statevector_ad(), scalestddev(), enkf_letkfanalyses(), epp_printrmsstats(), ens_getlevfromk(), gio_readfile(), gsv_allocate(), gsv_scalevertical(), gsv_transposetilestovarslevs(), gsv_transposetilestovarslevsad(), int_sintcloudtogrid_gsv(), s2c_setupinterpinfo(), s2c_tl(), s2c_ad(), midas_extractbmatrixfor1dvar

Call to

utl_abort()

function  gridstatevector_mod/gsv_getmpiidfromk(statevector, kindex)
Purpose

Returns MPI id from the given kIndex

Arguments
  • statevector [struct_gsv ,in]

  • kindex [integer ,in]

Return

mpiid [integer ]

Called from

gsv_transposetilestovarslevs(), gsv_transposetilestovarslevsad()

Call to

utl_abort()

function  gridstatevector_mod/gsv_varexist([statevector_opt, varname])
Options

statevector_opt [struct_gsv ,in,]

Arguments

varname [character ,in]

Return

varexist [logical ]

Called from

bcsc_setupch(), bmat1d_setupbhi(), bdiff_setup(), ben_setup(), ben_setuponeinstance(), ben_bsqrt(), ben_bsqrtad(), bhi_setup(), bhi_bsqrt(), bhi_bsqrtad(), copytostatevector(), copyfromstatevector(), calczandp_gsv_nl(), calczandp_gsv_tl(), calczandp_gsv_ad(), calcheight_gsv_nl_vcode2100x_r4(), calcheight_gsv_tl(), calcheight_gsv_ad(), calcpressure_gsv_tl(), calcpressure_gsv_ad(), enkf_getmodulatedstate(), ens_varexist(), gio_readfromfile(), gio_readfile(), gio_readtrials(), gio_writetofile(), gsv_varnameslist(), gsv_allocate(), gsv_modifyvarname(), gsv_copy(), gsv_getfield_r48(), gsv_getfield3d_r8(), gsv_getfield3d_r4(), gsv_transposetilestovarslevs(), gsv_transposetilestovarslevsad(), gsv_transposesteptovarslevs(), gsv_varkindexist(), gvt_transform_gsv(), lqtohu_tlm(), lprtopr_gsv(), lvistovis(), uvtovortdiv_gsv(), vortdivtopsichi_gsv(), uvtopsichi_gsv(), ch_bounds(), qlim_saturationlimit_gsv(), qlim_rttovlimit_gsv(), cloudexistinstatevector(), inc_computehighresanalysis(), inc_analpostprocessing(), inc_writeincandanalhighres(), inc_getincrement(), inc_interpolateandadd(), int_hinterp_gsv(), vinterp_gsv_r8(), vinterp_gsv_r4(), lbhi_getcontrolvariableinfo(), lbhi_bsqrt(), lbhi_bsqrtadj(), statevectorinterface(), osd_calcinflation(), ose_compute_hbht_static(), s2c_setupinterpinfo(), s2c_bgcheck_bilin(), midas_diagbmatrix, midas_extractbmatrixfor1dvar, midas_randompert, midas_var

subroutine  gridstatevector_mod/gsv_varnameslist(varnames[, statevector_opt])
Purpose

Lists all variables present in the statevector

Arguments

varnames (*) [character ,inout,pointer]

Options

statevector_opt [struct_gsv ,in,]

Called from

aer_analysiserror(), bmat_sqrtb(), bmat_sqrtbt(), epp_postprocess(), ens_allocate(), ens_copyensmean(), ens_copyensstddev(), ens_copymember(), ens_insertmember(), ens_varnameslist(), ens_readensemble(), ens_writeensemble(), readfromfileandinterptotiles(), readfromfileandtransposetotiles(), readfromfileandinterp1proc(), gio_readtrials(), gio_writetofile(), gsv_msgvarnames(), gsv_copy(), gsv_horizsubsample(), gvt_setupreffromstatevector(), inc_writeincandanalhighres(), inn_gethcovcofromtrlmfile(), int_interp_gsv(), bmd_setup(), s2c_setupinterpinfo(), s2c_tl(), s2c_ad(), s2c_nl(), midas_calcstats

Call to

utl_abort(), gsv_varexist(), gsv_getvarnamefromk()

function  gridstatevector_mod/gsv_msgvarnames(statevector)
Purpose

Return a string of all variables present in the statevector

Arguments

statevector [struct_gsv ,in] :: stateVector for which variable names extracted

Return

string :: allocated string with list of variable names

Call to

gsv_varnameslist()

function  gridstatevector_mod/gsv_msgfldextremum(statevector, varname)
Purpose

Return a string describing span of values (min/max) for the specified field

Arguments
  • statevector [struct_gsv ,in] :: stateVector for which values provided

  • varname [character ,in] :: specified variable name for the calculation

Return

string :: allocated string with min/max values

function  gridstatevector_mod/gsv_getnumlev(statevector, varlevel[, varname_opt])
Purpose

Returns the number of levels for a given type of variable; varLevel can be one of ‘TH’, ‘MM’, ‘SF’, ‘SFMM’, ‘SFTH’, ‘DP’, ‘SS’ or ‘OT’.

Arguments
  • statevector [struct_gsv ,in] :: Input statevector

  • varlevel [character ,in] :: Variable type in ‘TH’, ‘MM’, ‘SF’, ‘SFMM’, ‘SFTH’, ‘DP’, ‘SS’ or ‘OT’

Options

varname_opt [character ,in,] :: Variable name when varLevel=’OT’

Return

nlev [integer ]

Called from

aer_dayssincelastobs(), aer_computeanlerrorstd(), copytostatevector(), copyfromstatevector(), calcheight_gsv_nl_vcode5xxx(), calcpressure_gsv_nl_vcode2100x(), calcheightcoeff_gsv(), enkf_computevertlocation(), ens_copymember(), ens_insertmember(), multenergynorm(), gsv_allocate(), gsv_scalevertical(), lqtohu(), hutolq_gsv(), lqtohu_tlm(), hutolq_tlm(), lprtopr_gsv(), prtolpr_gsv(), lvistovis(), uvtovortdiv_gsv(), vortdivtopsichi_gsv(), uvtopsichi_gsv(), expch_tlm(), ch_bounds(), gvt_oceanicecontinuous(), gvt_sstspread(), qlim_saturationlimit_gsv(), qlim_rttovlimit_gsv(), vinterp_gsv_r8(), vinterp_gsv_r4(), statevectorinterface(), bmd_setup(), osd_calcinflation(), s2c_setupinterpinfo()

Call to

vco_getnumlev()

function  gridstatevector_mod/gsv_getnumk(statevector)
Purpose

Returns the number of k indexes on the current MPI process

Arguments

statevector [struct_gsv ,in]

Return

numk [integer ]

Called from

adv_statevector_tl(), adv_statevector_ad(), scalestddev(), epp_printrmsstats(), checkcolumnstatevectormatch()

function  gridstatevector_mod/gsv_getdatakind(statevector)
Purpose

Returns the real kind (4 or 8 bytes floating point value) of the input statevector

Arguments

statevector [struct_gsv ,in]

Return

datakind [integer ]

Called from

adv_statevector_tl(), adv_statevector_ad(), bdiff_copytostatevector(), bdiff_copyfromstatevector(), addensmember(), addensmemberad(), copytostatevector(), copyfromstatevector(), bmat_sqrtb(), bmat_sqrtbt(), calcheight_gsv_nl(), czp_calcreturnheight_gsv_nl(), calcpressure_gsv_nl(), czp_calcreturnpressure_gsv_nl(), ens_copymember(), ens_insertmember(), ens_recenter(), gsv_getfield_r48(), gsv_getfielduv_r48(), hutolq_gsv(), lqtohu_tlm(), hutolq_tlm(), lprtopr_gsv(), prtolpr_gsv(), lvistovis(), int_interp_gsv(), int_vinterp_gsv(), vinterp_gsv_r8(), vinterp_gsv_r4(), int_tinterp_gsv(), int_hinterpscalar_gsv(), int_hinterpuv_gsv(), statevectorinterface(), s2c_tl(), s2c_ad()

function  gridstatevector_mod/gsv_getnumlevfromvarname(statevector, varname)
Purpose

Returns the number of levels for a given variable

Arguments
  • statevector [struct_gsv ,in]

  • varname [character ,in]

Return

nlev [integer ]

Called from

writestddev(), writestddevbal(), gsv_copy(), s2c_bgcheck_bilin(), var1d_transfercolumntoygrid(), midas_diagbmatrix

Call to

vnl_varlistindex()

subroutine  gridstatevector_mod/gsv_setup()
Purpose

Initialises the gridstatevector module global structure.

Called from

gsv_allocate(), inn_gethcovcofromtrlmfile(), omf_ominusf(), omf_ominusfens(), midas_adjointtest, midas_analysiserroroi, midas_calcstats, midas_diagbmatrix, midas_diaghbht, midas_enspostprocess, midas_ensembleh, midas_extractbmatrixfor1dvar, midas_gencoeff, midas_letkf, midas_obsimpact, midas_obsselection, midas_pseudosstobs, midas_randompert, midas_sstbias, midas_ssttrial, midas_var, midas_var1d

Call to

msg(), utl_abort(), vnl_varkindfromvarname()

function  gridstatevector_mod/gsv_isinitialized()
Purpose

To verify gsv_setup has already run.

Return

gsvinitialized [logical ]

Called from

inn_gethcovcofromtrlmfile()

function  gridstatevector_mod/gsv_isallocated(statevector)
Purpose

To verify if a stateVector is allocated.

Arguments

statevector [struct_gsv ,in]

Return

isallocated [logical ]

Called from

epp_postprocess(), epp_addrandompert(), ens_copyensmean(), ens_copytoensmean(), ens_copyensstddev(), ens_copymember(), ens_insertmember(), ens_readensemble(), ens_applymasklam(), simvar(), multenergynorm(), gbi_setup(), gbi_stddev_ens(), gio_readtrials(), gvt_setupreffromtrialfiles(), gvt_setupreffromstatevector(), gvt_oceanicecontinuous(), gvt_sstspread(), inc_computehighresanalysis(), inc_writeincrement(), inc_writeanalysis(), inc_interpolateandadd(), int_interp_gsv(), s2c_setupinterpinfo(), s2c_tl(), s2c_ad(), s2c_nl(), midas_ensembleh, midas_letkf

subroutine  gridstatevector_mod/gsv_allocate(statevector, numstep, hco_ptr, vco_ptr[, datestamp_opt[, datestamplist_opt[, mpi_local_opt[, mpi_distribution_opt[, horizsubsample_opt[, varnames_opt[, datakind_opt[, allocheightsfc_opt[, hinterpolatedegree_opt[, hextrapolatedegree_opt[, allocheight_opt[, allocpressure_opt[, besilent_opt]]]]]]]]]]]]])
Purpose

Allocates the struct_gsv memory, sets horizontal and vertical coordinates, sets some options and MPI distribution configurations

Arguments
  • statevector [struct_gsv ,inout] :: statevector to be allocated

  • numstep [integer ,in] :: number of time steps

  • hco_ptr [struct_hco ,in,pointer] :: horizontal structure

  • vco_ptr [struct_vco ,in,pointer] :: vertical structure

Options
  • datestamp_opt [integer ,in,] :: reference datestamp

  • datestamplist_opt (*) [integer ,in,] :: explicit datestamp list

  • mpi_local_opt [logical ,in,] :: if .false. no MPI distribution will be used

  • mpi_distribution_opt [character ,in,] :: MPI distribution strategy in {‘Tiles’, ‘VarsLevs’, ‘None’} default: ‘Tiles’

  • horizsubsample_opt [integer ,in,] :: horizontal subsampling factor (to get a coarser grid)

  • varnames_opt (*) [character ,in,] :: allow specification of variables

  • datakind_opt [integer ,in,] :: real kind (4 or 8 bytes; defaults to 8)

  • allocheightsfc_opt [logical ,in,] :: toggle allocation of surface height field

  • hinterpolatedegree_opt [character ,in,] :: set the horizontal interpolation degree

  • hextrapolatedegree_opt [character ,in,] :: set the horizontal extrapolation degree

  • allocheight_opt [logical ,in,] :: force the allocation of ‘Z_T’ and ‘Z_M’

  • allocpressure_opt [logical ,in,] :: force the allocation of ‘P_T’ and ‘P_M’

  • besilent_opt [logical ,in,] :: limit outputs to listing

Called from

adv_setup(), aer_analysiserror(), aer_dayssincelastobs(), aer_propagateanalysiserror(), bmat1d_setupbens(), bdiff_readbgstdfield(), ben_setuponeinstance(), ensemblediagnostic(), bmat_sqrtb(), bmat_sqrtbt(), ocebg_bgchecksst(), ocebg_getfgeamplification(), bcs_getradiosondeweight(), writestddev(), writestddevbal(), readensemble(), horizcorrelfunction(), calclocalcorrelations(), calclocalvertcorrmatrix(), calcvertmodesspec(), vertmodesfilter(), csl_computebhi(), csl_toolbox(), diff_setup(), enkf_letkfanalyses(), enkf_computevertlocation(), epp_postprocess(), epp_addrandompert(), epp_selectsubsample(), epp_hybridrecentering(), ens_allocate(), ens_copyensmean(), ens_copyensstddev(), ens_readensemble(), ens_writeensemble(), fso_ensemble(), calcfcsterror(), simvar(), gbi_setup(), gbi_stddev_ens(), readfromfileandinterptotiles(), readfromfileandtransposetotiles(), readfromfileandinterp1proc(), gio_getmasklam(), gio_readtrials(), gio_writetofile(), gsv_horizsubsample(), gsv_smoothhorizontal(), gvt_setupreffromtrialfiles(), gvt_setupreffromstatevector(), uvtopsichi_ens(), uvtovortdiv_ens(), gvt_oceanicecontinuous(), gvt_sstspread(), inc_computehighresanalysis(), inc_analpostprocessing(), inc_writeincandanalhighres(), inc_interpolateandadd(), int_interp_gsv(), vinterp_gsv_r8(), vinterp_gsv_r4(), calchorizlocalizationradii(), omf_ominusf(), omf_ominusfens(), oer_seterrbackscatanisice(), osd_calcinflation(), ose_compute_hbht_static(), ose_compute_hbht_ensemble(), obgd_computesstrial(), obgd_getclimatology(), oobs_pseudosst(), sstb_computebias(), sstb_getgriddedbias(), sstb_applysatellitesstbiascorrection(), sstb_getbiasfrompreviousstate(), s2c_setupinterpinfo(), s2c_tl(), s2c_ad(), s2c_nl(), thn_radiosonde(), var1d_transfercolumntoygrid(), midas_adjointtest, midas_diagbmatrix, midas_diaghbht, midas_enspostprocess, midas_ensembleh, midas_extractbmatrixfor1dvar, midas_gencoeff, midas_letkf, midas_obsimpact, midas_obsselection, midas_randompert, midas_var, midas_var1d

Call to

utl_tmg_start(), msg(), gsv_setup(), utl_abort(), gsv_deallocate(), vnl_varlistindex(), gsv_getnumlev(), mmpi_setup_latbands(), mmpi_setup_lonbands(), vnl_varlevelfromvarname(), mmpi_setup_varslevels(), gsv_getvarnamefromk(), gsv_varexist(), gsv_checkmpidistribution(), tim_getstamplist(), gsv_resettimeparams(), gsv_getlevfromk(), complementaryuvname(), gsv_getoffsetfromvarname(), utl_tmg_stop()

subroutine  gridstatevector_mod/gsv_communicatetimeparams(statevector)
Purpose

Ensures all mpi tasks have certain time and other parameters

Arguments

statevector [struct_gsv ,inout]

Called from

ens_readensemble()

Call to

msg()

subroutine  gridstatevector_mod/gsv_resettimeparams(statevector)
Purpose

Resets certain time parameters to “missing” values

Arguments

statevector [struct_gsv ,inout]

Called from

ens_writeensemble(), gsv_allocate()

subroutine  gridstatevector_mod/gsv_checkmpidistribution(statevector)
Purpose

Checks the distribution of latitude and longitude gridpoints over the mpi tasks. If the variation in the number of grid points in either direction is too large, other mpi topologies will be suggested in the listing and the program could potentially abort. The printing to the listing is limited to only the first 5 calls.

Arguments

statevector [struct_gsv ,in]

Called from

gsv_allocate()

Call to

msg(), utl_abort()

function  gridstatevector_mod/complementaryuvname(uv_in)
Purpose

Returns the other wind component name UU -> VV, VV -> UU

Arguments

uv_in [character ,in]

Return

uv_out [character ]

Called from

gsv_allocate()

Call to

utl_abort()

subroutine  gridstatevector_mod/gsv_modifydate(statevector, datestamp[, modifydateorigin_opt])
Purpose

Modifies a statevector reference date

Arguments
  • statevector [struct_gsv ,inout]

  • datestamp [integer ,in]

Options

modifydateorigin_opt [logical ,in,]

Called from

aer_analysiserror(), aer_propagatedslo(), gio_readtrials(), obgd_computesstrial()

Call to

tim_getstamplist()

subroutine  gridstatevector_mod/gsv_modifyvarname(statevector, oldvarname, newvarname)
Purpose

Replaces a variable with a variable of the same vertical level type

Arguments
  • statevector [struct_gsv ,inout]

  • oldvarname [character ,in]

  • newvarname [character ,in]

Called from

ens_modifyvarname(), lprtopr_gsv(), lvistovis()

Call to

gsv_varexist(), utl_abort(), vnl_varlevelfromvarname(), vnl_varlistindex()

subroutine  gridstatevector_mod/gsv_zero(statevector)
Purpose

Zeros all struct_gsv arrays

Arguments

statevector [struct_gsv ,inout]

Called from

aer_analysiserror(), bmat1d_setupbens(), bdiff_readbgstdfield(), ben_getensmean(), ben_bsqrt(), ensemblediagnostic(), bmat_sqrtb(), calclocalcorrelations(), calclocalvertcorrmatrix(), diff_setup(), enkf_letkfanalyses(), enkf_computevertlocation(), epp_postprocess(), epp_hybridrecentering(), gio_readtrials(), gsv_horizsubsample(), gvt_setupreffromtrialfiles(), gvt_setupreffromstatevector(), inc_analpostprocessing(), inc_writeincandanalhighres(), inc_interpolateandadd(), omf_ominusf(), omf_ominusfens(), oer_seterrbackscatanisice(), ose_compute_hbht_static(), s2c_ad(), s2c_nl(), midas_diagbmatrix, midas_diaghbht, midas_ensembleh, midas_extractbmatrixfor1dvar, midas_gencoeff, midas_letkf, midas_obsimpact, midas_obsselection, midas_var, midas_var1d

Call to

utl_abort()

subroutine  gridstatevector_mod/gsv_add(statevector_in, statevector_inout[, scalefactor_opt])
Purpose

Adds two statevectors

Arguments
  • statevector_inout [struct_gsv ,inout] :: second operand, will receive the result

  • statevector_in [struct_gsv ,in] :: first operand

Options

scalefactor_opt [real ,in,] :: optional scaling of the second operand prior to the addition

Called from

bmat1d_setupbens(), ensemblediagnostic(), bmat_sqrtb(), enkf_getmodulatedstate(), epp_postprocess(), calcfcsterror(), inc_computehighresanalysis(), inc_writeincandanalhighres(), inc_interpolateandadd(), midas_randompert, midas_var1d

Call to

utl_abort()

subroutine  gridstatevector_mod/gsv_schurproduct(statevector_in, statevector_inout)
Purpose

Applies the Schur product of two statevector

Arguments
  • statevector_inout [struct_gsv ,inout] :: second operand, will receive the result

  • statevector_in [struct_gsv ,in] :: first operand

Called from

ben_bsqrt(), ben_bsqrtad()

Call to

utl_abort()

subroutine  gridstatevector_mod/gsv_copy(statevector_in, statevector_out[, stepindexout_opt[, allowtimemismatch_opt[, allowvarmismatch_opt[, allowvcomismatch_opt[, besilent_opt]]]]])
Purpose

Copies a statevector

Arguments
  • statevector_in [struct_gsv ,in]

  • statevector_out [struct_gsv ,inout]

Options
  • stepindexout_opt [integer ,in,]

  • allowtimemismatch_opt [logical ,in,]

  • allowvarmismatch_opt [logical ,in,]

  • allowvcomismatch_opt [logical ,in,]

  • besilent_opt [logical ,in,]

Called from

bmat_sqrtbt(), bcs_getradiosondeweight(), enkf_computevertlocation(), enkf_getmodulatedstate(), epp_postprocess(), epp_addrandompert(), ens_readensemble(), calcfcsterror(), readfromfileandinterptotiles(), readfromfileandtransposetotiles(), readfromfileandinterp1proc(), gio_readtrials(), gsv_transposetilestovarslevs(), gsv_horizsubsample(), gvt_setupreffromtrialfiles(), gvt_setupreffromstatevector(), inc_computehighresanalysis(), inc_analpostprocessing(), inc_writeincandanalhighres(), inc_interpolateandadd(), int_hinterp_gsv(), vinterp_gsv_r8(), vinterp_gsv_r4(), int_tinterp_gsv(), omf_ominusfens(), s2c_tl(), s2c_ad(), midas_adjointtest, midas_ensembleh, midas_letkf

Call to

hco_equal(), gsv_gethco(), utl_abort(), vco_equal(), gsv_getvco(), gsv_varnameslist(), msg(), gsv_varexist(), gsv_getnumlevfromvarname(), gsv_copymask()

subroutine  gridstatevector_mod/gsv_copymask(statevector_in, statevector_out[, besilent_opt])
Purpose

Copy ocean mask, if it exists.

Arguments
  • statevector_in [struct_gsv ,in]

  • statevector_out [struct_gsv ,inout]

Options

besilent_opt [logical ,in,]

Called from

aer_analysiserror(), aer_dayssincelastobs(), ens_copy(), ens_copy4dto3d(), ens_copymasktogsv(), ens_readensemble(), ens_writeensemble(), gsv_copy(), gsv_transposevarslevstotiles(), gsv_transposetilestovarslevs(), gsv_transposetilestovarslevsad(), gsv_transposesteptovarslevs(), gsv_transposesteptotiles(), gsv_transposetilestostep(), gsv_transposetilestompiglobal(), midas_randompert

Call to

ocm_copymask()

subroutine  gridstatevector_mod/gsv_copy4dto3d(statevector_in, statevector_out)
Purpose

Copies contents of a 4D statevector into a 3D statevector object by extracting the middle time step.

Arguments
  • statevector_in [struct_gsv ,in]

  • statevector_out [struct_gsv ,inout]

Called from

midas_letkf

Call to

utl_abort(), msg()

subroutine  gridstatevector_mod/gsv_copyheightsfc(statevector_in, statevector_out)
Purpose

Copies HeightSfc data from one statevector to another

Arguments
  • statevector_in [struct_gsv ,in]

  • statevector_out [struct_gsv ,inout]

Called from

epp_postprocess(), gbi_setup(), omf_ominusfens(), midas_ensembleh, midas_letkf

Call to

hco_equal(), gsv_gethco(), utl_abort()

subroutine  gridstatevector_mod/gsv_hpad(statevector_in, statevector_out)
Purpose

Copies a statevector to a horizontally larger one and pad with a predefined value of 0 (or 1000 for ‘P0’).

Arguments
  • statevector_in [struct_gsv ,in]

  • statevector_out [struct_gsv ,inout]

Called from

ens_readensemble()

Call to

utl_abort(), gsv_getvarnamefromk()

subroutine  gridstatevector_mod/gsv_power(statevector_inout, power[, scalefactor_opt])
Purpose

Applies the power function

Arguments
  • statevector_inout [struct_gsv ,inout] :: i,j,k,l) = scaleFactor_opt * (statevector_inout(i,j,k,l)**power)

  • power [real ,in]

Options

scalefactor_opt [real ,in,] :: optional scaling applied on the power of the operand

Called from

ben_setuponeinstance(), ensemblediagnostic()

Call to

utl_abort()

subroutine  gridstatevector_mod/gsv_scale(statevector_inout, scalefactor)
Purpose

Applies scaling factor to a statevector

Arguments
  • statevector_inout [struct_gsv ,inout] :: scaleFactor * statevector_inout

  • scalefactor [real ,in]

Called from

calclocalcorrelations(), calclocalvertcorrmatrix(), epp_addrandompert(), midas_diagbmatrix

Call to

utl_abort()

subroutine  gridstatevector_mod/gsv_scalevertical(statevector_inout, scalefactor)
Purpose

Applies a specific scaling to each level

Arguments
  • statevector_inout [struct_gsv ,inout] :: k,:) = scaleFactor(k) * statevector_inout(:,:,k,:)

  • scalefactor (*) [real ,in]

Call to

utl_abort(), vnl_varlevelfromvarname(), gsv_getvarnamefromk(), gsv_getnumlev(), gsv_getlevfromk()

subroutine  gridstatevector_mod/gsv_3dto4d(statevector_inout)
Purpose

Copies the 3D data array to all time steps of the 4D array of the same statevector

Arguments

statevector_inout [struct_gsv ,inout]

Called from

bmat_sqrtb(), midas_letkf

Call to

utl_abort()

subroutine  gridstatevector_mod/gsv_3dto4dadj(statevector_inout)
Purpose

Adjoint code of the 3dto4d copy to all time steps

Arguments

statevector_inout [struct_gsv ,inout]

Called from

bmat_sqrtbt()

Call to

utl_abort()

subroutine  gridstatevector_mod/gsv_deallocate(statevector)
Purpose

Deallocates the struct_gsv memory structure

Arguments

statevector [struct_gsv ,inout]

Called from

adv_setup(), aer_analysiserror(), aer_dayssincelastobs(), aer_propagateanalysiserror(), bmat1d_setupbens(), bdiff_readbgstdfield(), ben_setuponeinstance(), ensemblediagnostic(), bmat_sqrtb(), bmat_sqrtbt(), ocebg_bgchecksst(), ocebg_getfgeamplification(), bcs_getradiosondeweight(), writestddev(), writestddevbal(), readensemble(), horizcorrelfunction(), calclocalcorrelations(), calclocalvertcorrmatrix(), calcvertmodesspec(), vertmodesfilter(), csl_computebhi(), csl_toolbox(), diff_setup(), enkf_letkfanalyses(), enkf_computevertlocation(), epp_addrandompert(), epp_selectsubsample(), epp_hybridrecentering(), ens_readensemble(), ens_writeensemble(), gbi_setup(), gbi_deallocate(), readfromfileandinterptotiles(), readfromfileandtransposetotiles(), readfromfileandinterp1proc(), gio_readtrials(), gio_writetofile(), gsv_allocate(), gsv_horizsubsample(), gsv_smoothhorizontal(), gvt_setupreffromtrialfiles(), gvt_setupreffromstatevector(), uvtopsichi_ens(), uvtovortdiv_ens(), gvt_oceanicecontinuous(), gvt_sstspread(), inc_computehighresanalysis(), inc_analpostprocessing(), inc_writeincandanalhighres(), inc_interpolateandadd(), int_interp_gsv(), vinterp_gsv_r8(), vinterp_gsv_r4(), calchorizlocalizationradii(), omf_ominusfens(), oer_seterrbackscatanisice(), osd_calcinflation(), ose_compute_hbht_ensemble(), obgd_computesstrial(), obgd_getclimatology(), oobs_pseudosst(), sstb_computebias(), sstb_getgriddedbias(), sstb_applysatellitesstbiascorrection(), sstb_getbiasfrompreviousstate(), s2c_setupinterpinfo(), s2c_tl(), s2c_ad(), s2c_nl(), thn_radiosonde(), midas_adjointtest, midas_diagbmatrix, midas_diaghbht, midas_ensembleh, midas_extractbmatrixfor1dvar, midas_letkf, midas_randompert, midas_var, midas_var1d

Call to

utl_abort(), ocm_deallocate()

subroutine  gridstatevector_mod/gsv_getfieldwrapper_r4(statevector, field_r4[, varname_opt])
Purpose

Returns a pointer to the 4D data array. Wrapper for the kind 4 real.

Arguments
  • statevector [struct_gsv ,in]

  • field_r4 (*,*,*,*) [real ,inout,pointer]

Options

varname_opt [character ,in,]

Call to

utl_abort(), gsv_getfield_r48()

subroutine  gridstatevector_mod/gsv_getfieldwrapper_r8(statevector, field_r8[, varname_opt])
Purpose

Returns a pointer to the 4D data array. Wrapper for the kind 8 real.

Arguments
  • statevector [struct_gsv ,in]

  • field_r8 (*,*,*,*) [real ,inout,pointer]

Options

varname_opt [character ,in,]

Call to

utl_abort(), gsv_getfield_r48()

subroutine  gridstatevector_mod/gsv_getfield_r48(statevector[, field_r4_opt[, field_r8_opt[, varname_opt]]])
Purpose

Returns a pointer to the 4D data array. Wrapper pairing the proper real data kind

Arguments

statevector [struct_gsv ,in]

Options
  • field_r4_opt (*,*,*,*) [real ,inout,pointer]

  • field_r8_opt (*,*,*,*) [real ,inout,pointer]

  • varname_opt [character ,in,]

Called from

gsv_getfieldwrapper_r4(), gsv_getfieldwrapper_r8()

Call to

utl_abort(), gsv_varexist(), vnl_varlistindex(), gsv_getdatakind()

subroutine  gridstatevector_mod/gsv_getfield3d_r8(statevector, field3d[, varname_opt[, stepindex_opt]])
Purpose

Returns a pointer to the 3D data array. Wrapper for the kind 8 real.

Arguments
  • statevector [struct_gsv ,in]

  • field3d (*,*,*) [real ,inout,pointer]

Options
  • varname_opt [character ,in,]

  • stepindex_opt [integer ,in,]

Call to

utl_abort(), gsv_varexist(), vnl_varlistindex()

subroutine  gridstatevector_mod/gsv_getfield3d_r4(statevector, field3d[, varname_opt[, stepindex_opt]])
Purpose

Returns a pointer to the 3D data array. Wrapper for the kind 4 real.

Arguments
  • statevector [struct_gsv ,in]

  • field3d (*,*,*) [real ,inout,pointer]

Options
  • varname_opt [character ,in,]

  • stepindex_opt [integer ,in,]

Call to

utl_abort(), gsv_varexist(), vnl_varlistindex()

subroutine  gridstatevector_mod/gsv_getfielduvwrapper_r4(statevector, field_r4, kindex)
Purpose

Returns a pointer to the UV data array. Wrapper for the kind 4 real.

Arguments
  • statevector [struct_gsv ,in]

  • field_r4 (*,*,*) [real ,inout,pointer]

  • kindex [integer ,in]

Call to

gsv_getfielduv_r48()

subroutine  gridstatevector_mod/gsv_getfielduvwrapper_r8(statevector, field_r8, kindex)
Purpose

Returns a pointer to the UV data array. Wrapper for the kind 8 real.

Arguments
  • statevector [struct_gsv ,in]

  • field_r8 (*,*,*) [real ,inout,pointer]

  • kindex [integer ,in]

Call to

gsv_getfielduv_r48()

subroutine  gridstatevector_mod/gsv_getfielduv_r48(statevector[, field_r4_opt[, field_r8_opt, kindex]])
Purpose

Returns a pointer to the UV data array. Wrapper pairing the proper real data kind

Arguments
  • statevector [struct_gsv ,in]

  • kindex [integer ,in]

Options
  • field_r4_opt (*,*,*) [real ,inout,pointer]

  • field_r8_opt (*,*,*) [real ,inout,pointer]

Called from

gsv_getfielduvwrapper_r4(), gsv_getfielduvwrapper_r8()

Call to

gsv_getdatakind(), utl_abort()

function  gridstatevector_mod/gsv_isassocheightsfc(statevector)
Purpose

Returns .true. if HeightSfc is associated

Arguments

statevector [struct_gsv ,in]

Return

isassociated [logical ]

Called from

gio_readfile(), gio_writetofile(), int_hinterp_gsv(), vinterp_gsv_r8(), vinterp_gsv_r4()

function  gridstatevector_mod/gsv_getheightsfc(statevector)
Purpose

Returns an access pointer to HeightSfc

Arguments

statevector [struct_gsv ,in]

Return

field (*,*) [real ,pointer]

Called from

ben_setuponeinstance(), calcheight_gsv_nl_vcode2100x_r4(), calcheight_gsv_nl_vcode2100x_r8(), calcheight_gsv_nl_vcode5xxx(), calcpressure_gsv_nl_vcode2100x(), gio_readfile(), gio_writetofile(), gsv_transposevarslevstotiles(), gsv_transposetilestovarslevs(), gsv_transposetilestovarslevsad(), inc_writeincandanalhighres(), vinterp_gsv_r8(), vinterp_gsv_r4(), int_hinterpscalar_gsv(), s2c_nl()

Call to

utl_abort()

function  gridstatevector_mod/gsv_getdatestamp(statevector[, stepindex_opt])
Purpose

Returns the reference datestamp (or the datestamp of a specified time step.

Arguments

statevector [struct_gsv ,in]

Options

stepindex_opt [integer ,in,]

Return

datestamp [integer ]

Called from

inc_writeincrement(), inc_writeanalysis()

Call to

utl_abort()

function  gridstatevector_mod/gsv_getvco(statevector)
Purpose

Returns an access pointer to the statevector vco (vertical coordinate structure)

Arguments

statevector [struct_gsv ,in]

Return

vco_ptr [struct_vco ,pointer]

Called from

bmat_sqrtb(), bmat_sqrtbt(), calczandp_gsv_nl(), calczandp_gsv_tl(), calczandp_gsv_ad(), calcheight_gsv_nl(), czp_calcreturnheight_gsv_nl(), calcheight_gsv_nl_vcode5xxx(), calcheight_gsv_tl(), calcheight_gsv_ad(), calcpressure_gsv_nl(), czp_calcreturnpressure_gsv_nl(), calcpressure_gsv_nl_vcode5xxx_r8(), calcpressure_gsv_nl_vcode5xxx_r4(), calcpressure_gsv_tl(), calcpressure_gsv_ad(), calcheightcoeff_gsv(), epp_printrmsstats(), ens_readensemble(), ens_writeensemble(), gio_readfile(), gio_readmaskfromfile(), gsv_copy(), gvt_setupreffromstatevector(), qlim_saturationlimit_gsv(), qlim_rttovlimit_gsv(), inc_computehighresanalysis(), inc_analpostprocessing(), inc_writeincandanalhighres(), inn_setupcolumnsontrllev(), vinterp_gsv_r8(), vinterp_gsv_r4()

function  gridstatevector_mod/gsv_gethco(statevector)
Purpose

Returns an access pointer to the statevector hco (horizontal coordinate structure)

Arguments

statevector [struct_gsv ,in]

Return

hco_ptr [struct_hco ,pointer]

Called from

bmat_sqrtb(), bmat_sqrtbt(), gz2alt_r4(), gz2alt_r8(), epp_printrmsstats(), ens_readensemble(), ens_writeensemble(), gio_readfile(), gio_readmaskfromfile(), gsv_copy(), gsv_copyheightsfc(), gvt_setupreffromstatevector(), inc_computehighresanalysis(), inc_analpostprocessing(), inc_writeincandanalhighres()

function  gridstatevector_mod/gsv_gethco_physics(statevector)
Purpose

Returns an access pointer to the statevector physics hco (horizontal coordinate structure)

Arguments

statevector [struct_gsv ,in]

Return

hco_ptr [struct_hco ,pointer]

subroutine  gridstatevector_mod/gsv_transposevarslevstotiles(statevector_in, statevector_out)
Purpose

Transposes the data from mpi_distribution=VarsLevs to Tiles

Arguments
  • statevector_in [struct_gsv ,in]

  • statevector_out [struct_gsv ,inout]

Called from

readfromfileandinterptotiles(), readfromfileandtransposetotiles(), gio_writetofile(), gsv_smoothhorizontal(), int_interp_gsv(), s2c_setupinterpinfo()

Call to

utl_abort(), utl_tmg_start(), gsv_getheightsfc(), gsv_copymask(), utl_tmg_stop()

subroutine  gridstatevector_mod/gsv_transposetilestovarslevs(statevector_in, statevector_out[, besilent_opt])
Purpose

Transposes the data from mpi_distribution=Tiles to VarsLevs

Arguments
  • statevector_in [struct_gsv ,in]

  • statevector_out [struct_gsv ,inout]

Options

besilent_opt [logical ,in,]

Called from

calclocalcorrelations(), gsv_smoothhorizontal(), int_interp_gsv(), calchorizlocalizationradii(), s2c_tl(), s2c_nl()

Call to

msg(), msg_memusage(), gsv_copy(), utl_abort(), utl_tmg_start(), gsv_varexist(), gsv_getvarnamefromk(), gsv_getlevfromk(), gsv_getoffsetfromvarname(), gsv_getmpiidfromk(), gsv_getheightsfc(), gsv_copymask(), utl_tmg_stop()

subroutine  gridstatevector_mod/gsv_transposetilestovarslevsad(statevector_in, statevector_out)
Purpose

Adjoint of Transpose the data from mpi_distribution=Tiles to VarsLevs

Arguments
  • statevector_in [struct_gsv ,in]

  • statevector_out [struct_gsv ,inout]

Called from

s2c_ad()

Call to

utl_tmg_start(), utl_abort(), gsv_varexist(), gsv_getvarnamefromk(), gsv_getlevfromk(), gsv_getoffsetfromvarname(), gsv_getmpiidfromk(), gsv_getheightsfc(), gsv_copymask(), utl_tmg_stop()

subroutine  gridstatevector_mod/gsv_horizsubsample(statevector_in, statevector_out, horizsubsample)
Purpose

Subsamples the horizontal statevector grid by an integral factor and transform accordingly the fields

Arguments
  • statevector_in [struct_gsv ,in]

  • statevector_out [struct_gsv ,out]

  • horizsubsample [integer ,in]

Call to

gsv_deallocate(), gsv_varnameslist(), gsv_allocate(), msg(), gsv_copy(), utl_abort(), gsv_zero()

subroutine  gridstatevector_mod/gsv_transposesteptovarslevs(statevector_1step_r4, statevector_varslevs, stepindexbeg)
Purpose

Transposes the data from a timestep MPI distribution (1 timestep per MPI task) to the mpi_distribution=’VarsLevs’ distribution.

Comment

Step-wise distribution is mostly only used for file I/O. When in such implicit time distribution, it is necessery that mpi_local=.false. and numStep=1.

Arguments
  • statevector_1step_r4 [struct_gsv ,in]

  • statevector_varslevs [struct_gsv ,inout]

  • stepindexbeg [integer ,in]

Called from

gio_readtrials()

Call to

utl_tmg_start(), utl_abort(), msg(), msg_memusage(), gsv_varexist(), gsv_copymask(), ocm_communicatemask(), utl_tmg_stop()

subroutine  gridstatevector_mod/gsv_transposesteptotiles(statevector_1step, statevector_tiles, stepindexbeg)
Purpose

Transposes the data from a timestep MPI distribution (1 timestep per MPI task) to the mpi_distribution=’Tiles’ distribution (4D lat-lon tiles).

Comment

Step-wise distribution is mostly only used for file I/O. When in such implicit time distribution, it is necessery that mpi_local=.false. and numStep=1.

Arguments
  • statevector_1step [struct_gsv ,in]

  • statevector_tiles [struct_gsv ,inout]

  • stepindexbeg [integer ,in]

Called from

gio_readtrials(), gvt_oceanicecontinuous(), gvt_sstspread()

Call to

utl_tmg_start(), utl_abort(), msg(), gsv_copymask(), ocm_communicatemask(), utl_tmg_stop()

subroutine  gridstatevector_mod/gsv_transposetilestostep(statevector_1step, statevector_tiles, stepindexbeg)
Purpose

Transposes the data from a mpi_distribution=’Tiles’ distribution (4D lat-lon tiles) to a timestep MPI distribution (1 timestep per MPI task)

Comment

Step-wise distribution is mostly only used for file I/O. When in such implicit time distribution, it is necessery that mpi_local=.false. and numStep=1.

Arguments
  • statevector_1step [struct_gsv ,inout]

  • statevector_tiles [struct_gsv ,in]

  • stepindexbeg [integer ,in]

Called from

enkf_computevertlocation(), gvt_oceanicecontinuous(), gvt_sstspread(), inc_writeincandanalhighres()

Call to

utl_abort(), msg(), gsv_copymask()

subroutine  gridstatevector_mod/gsv_transposetilestompiglobal(statevector_mpiglobal, statevector_tiles)
Purpose

Does MPI transpose (allGather) from mpi_distribution=’Tiles’ (4D lat-lon tiles) to global 4D stateVector on each MPI task where it is allocated.

Arguments
  • statevector_mpiglobal [struct_gsv ,inout]

  • statevector_tiles [struct_gsv ,in]

Called from

epp_postprocess(), s2c_setupinterpinfo()

Call to

utl_abort(), msg(), gsv_copymask()

function  gridstatevector_mod/gsv_varkindexist(varkind)
Purpose

To check whether any of the variables to be assimilated (i.e. specified in the namelist NAMSTATE) are part of the specified variable kind

Arguments

varkind [character ,in] :: Variable kind (e.g. MT or CH)

Return

kindfound [logical ] :: Logical indicating whether var kind found

Called from

gvt_transform_gsv(), inc_analpostprocessing()

Call to

gsv_varexist(), vnl_varkindfromvarname()

subroutine  gridstatevector_mod/gsv_dotproduct(statevector_a, statevector_b, dotsum)
Purpose

Computes the dot product of two statevectors

Arguments
  • statevector_a [struct_gsv ,in]

  • statevector_b [struct_gsv ,in]

  • dotsum [real ,out]

Call to

utl_abort(), mmpi_allreduce_sumreal8scalar()

subroutine  gridstatevector_mod/gsv_field3d_hbilin(field, nlong, nlat, nlev, xlong, xlat, vlev, fieldout, nlongout, nlatout, nlevout, xlongout, xlatout, vlevout)
Purpose

Horizontal bilinear interpolation from a 3D regular gridded field to another 3D regular gridded field.

This version can be used with fields that are not part of the background state, such as climatologies.

This version does not depend on gridstatevector data types/structures.

Arguments
  • field (nlong,nlat,nlev) [real ,in] :: 3D field

  • nlong [integer ,in,] :: number of latitudes

  • nlat [integer ,in,] :: number of longitudes

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

  • xlong (nlong) [real ,in] :: longitudes (radians)

  • xlat (nlat) [real ,in] :: latitudes (radians)

  • vlev (nlev) [real ,in] :: vertical levels of input field (in pressure)

  • fieldout (nlongout,nlatout,nlevout) [real ,out] :: 3D field

  • nlongout [integer ,in,] :: number or latitudes

  • nlatout [integer ,in,] :: number of target longitudes

  • nlevout [integer ,in,] :: Number of target vertical levels

  • xlongout (nlongout) [real ,in] :: target longitudes (radians)

  • xlatout (nlatout) [real ,in] :: target of target latitudes (radians)

  • vlevout (nlevout) [real ,in] :: Target vertical levels (in pressure)

Called from

bcsc_rdstd(), bcsc_rdstd3d()

subroutine  gridstatevector_mod/gsv_smoothhorizontal(statevector_inout, horizontalscale[, masknegatives_opt[, varname_opt[, bininteger_opt[, binreal_opt[, binrealthreshold_opt]]]]])
Purpose

To apply a horizontal smoothing to all of the fields according to the specified horizontal length scale

Arguments
  • statevector_inout [struct_gsv ,inout,target]

  • horizontalscale [real ,in]

Options
  • masknegatives_opt [logical ,in,]

  • varname_opt [character ,in,]

  • bininteger_opt (*,*,*) [real ,in,pointer]

  • binreal_opt (*,*) [real ,in,pointer]

  • binrealthreshold_opt [real ,in,]

Called from

ben_setuponeinstance(), ocebg_getfgeamplification()

Call to

utl_tmg_start(), msg(), utl_abort(), gsv_allocate(), gsv_transposetilestovarslevs(), gsv_getvarnamefromk(), phf_calcdistancefast(), gsv_transposevarslevstotiles(), gsv_deallocate(), utl_tmg_stop()

subroutine  gridstatevector_mod/gsv_getinfo(statevector, message)
Purpose

Writes out grid state vector parameters

Arguments
  • statevector [struct_gsv ,in]

  • message [character ,in]

subroutine  gridstatevector_mod/gsv_applymasklam(statevector_inout, masklam)
Purpose

To apply a mask to a state vector for LAM grid

Arguments
  • statevector_inout [struct_gsv ,inout]

  • masklam [struct_gsv ,in]

Called from

epp_postprocess(), inc_interpolateandadd()

Call to

msg()

function  gridstatevector_mod/gsv_containsnonzerovalues(statevector)
Purpose

To check if stateVector has any non-zero value.

Arguments

statevector [struct_gsv ,in]

Return

statevectorhasnonzerovalue [logical ]

Called from

calczandp_gsv_tl(), calczandp_gsv_ad(), gvt_setup(), gvt_getstatevectortrial(), lqtohu_tlm(), hutolq_tlm()