pdaf_wrapper Module

A wrapper around 'PDAF'


Uses

  • module~~pdaf_wrapper~~UsesGraph module~pdaf_wrapper pdaf_wrapper PDAF_interfaces_module PDAF_interfaces_module module~pdaf_wrapper->PDAF_interfaces_module iso_fortran_env iso_fortran_env module~pdaf_wrapper->iso_fortran_env module~eat_config eat_config module~pdaf_wrapper->module~eat_config iso_c_binding iso_c_binding module~pdaf_wrapper->iso_c_binding pdaf_mod_filter pdaf_mod_filter module~pdaf_wrapper->pdaf_mod_filter module~eat_config->iso_fortran_env mpi mpi module~eat_config->mpi

Used by

  • module~~pdaf_wrapper~~UsedByGraph module~pdaf_wrapper pdaf_wrapper program~eat_filter_pdaf eat_filter_pdaf program~eat_filter_pdaf->module~pdaf_wrapper

Contents


Variables

TypeVisibility AttributesNameInitial
integer, private :: stderr =error_unit
integer, private :: stdout =output_unit
integer, private :: verbosity =info
integer, public, pointer, contiguous:: iobs(:)=> null()

map observations to state

real(kind=real64), public, pointer, contiguous:: obs(:)=> null()

observation vector

integer, private :: filtertype =6

PDAF filter selection

integer, private :: subtype =0

PDAF subtype selection

real(kind=real64), private :: timenow
integer, private :: doexit
integer, private :: steps
real(kind=real64), private :: rms_obs =0.05

Observation error standard deviation !KB shall be replaced

procedure(cvt_callback_interface), public, pointer, save:: pcvt_callback=> null()

user implemented routine (in Python)


Interfaces

interface

  • private subroutine cvt_callback_interface(cb_type, iter, dim_p, dim_cvec, dim_cvec_ens, ens_p, v_p, Vv_p) bind(c)

    Arguments

    Type IntentOptional AttributesName
    integer(kind=C_INT), intent(in), VALUE:: cb_type
    integer(kind=C_INT), intent(in), VALUE:: iter

    < Iteration of optimization

    integer(kind=C_INT), intent(in), VALUE:: dim_p

    < PE-local observation dimension

    integer(kind=C_INT), intent(in), VALUE:: dim_cvec

    < Dimension of control vector

    integer(kind=C_INT), intent(in), VALUE:: dim_cvec_ens

    < Dimension of control vector

    type(C_PTR), intent(in), VALUE:: ens_p

    < PE-local ensemble

    type(C_PTR), intent(in), VALUE:: v_p

    < PE-local control vector

    type(C_PTR), intent(in), VALUE:: Vv_p

    < PE-local result vector


Subroutines

public subroutine init_pdaf(EAT_COMM_filter, state_size, ensemble_size, model_states, stat)

Initialize various variable and call PDAF_init()

Arguments

Type IntentOptional AttributesName
integer, intent(in), value:: EAT_COMM_filter
integer, intent(in), value:: state_size
integer, intent(in), value:: ensemble_size
real(kind=real64), pointer, contiguous:: model_states(:,:)
integer, intent(out) :: stat

public subroutine assimilation_pdaf() bind(c)

local variables

Arguments

None

public subroutine finish_pdaf() bind(c)

Cleanup and finalize the EAT/PDAF component

Arguments

None

private subroutine init_ens_pdaf(filtertype, dim_p, dim_ens, state_p, Uinv, ens_p, flag)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: filtertype

Type of filter to initialize

integer, intent(in) :: dim_p

PE-local state dimension

integer, intent(in) :: dim_ens

Size of ensemble

real(kind=REAL64), intent(inout) :: state_p(dim_p)

PE-local model state

real(kind=REAL64), intent(inout) :: Uinv(dim_ens-1,dim_ens-1)

Array not referenced for SEIK

real(kind=REAL64), intent(out) :: ens_p(dim_p,dim_ens)

PE-local state ensemble

integer, intent(inout) :: flag

PDAF status flag

private subroutine collect_state_pdaf(dim_p, state_p)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: dim_p
integer, intent(inout) :: state_p(dim_p)

private subroutine distribute_state_pdaf(dim_p, state_p)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: dim_p
integer, intent(inout) :: state_p(dim_p)

private subroutine init_dim_obs_pdaf(step, dim_obs_p)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: step

Current time step

integer, intent(out) :: dim_obs_p

Dimension of observation vector

private subroutine obs_op_pdaf(step, dim_p, dim_obs_p, state_p, m_state_p)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: step

Currrent time step

integer, intent(in) :: dim_p

PE-local dimension of state

integer, intent(in) :: dim_obs_p

Dimension of observed state

real(kind=REAL64), intent(in) :: state_p(dim_p)

PE-local model state

real(kind=REAL64), intent(out) :: m_state_p(dim_obs_p)

PE-local observed state

private subroutine init_obs_pdaf(step, dim_obs_f, observation_f)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: step

Current time step

integer, intent(in) :: dim_obs_f

Dimension of full observation vector

real(kind=REAL64), intent(out) :: observation_f(dim_obs_f)

Full observation vector

private subroutine prepoststep_ens_pdaf(step, dim_p, dim_ens, dim_ens_p, dim_obs_p, state_p, Uinv, ens_p, flag)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: step

Current time step (not relevant for offline mode)

integer, intent(in) :: dim_p

PE-local state dimension

integer, intent(in) :: dim_ens

Size of state ensemble

integer, intent(in) :: dim_ens_p

PE-local size of ensemble

integer, intent(in) :: dim_obs_p

PE-local dimension of observation vector

real(kind=REAL64), intent(inout) :: state_p(dim_p)

PE-local forecast/analysis state

real(kind=REAL64), intent(inout) :: Uinv(dim_ens-1,dim_ens-1)

Inverse of matrix U

real(kind=REAL64), intent(inout) :: ens_p(dim_p,dim_ens)

PE-local state ensemble

integer, intent(in) :: flag

PDAF status flag

local variables

private subroutine init_obsvar_pdaf(step, dim_obs_p, obs_p, meanvar)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: step

Current time step

integer, intent(in) :: dim_obs_p

PE-local dimension of observation vector

real(kind=REAL64), intent(in) :: obs_p(dim_obs_p)

PE-local observation vector

real(kind=REAL64), intent(out) :: meanvar

Mean observation error variance

private subroutine next_observation_pdaf(stepnow, nsteps, doexit, time)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: stepnow

Number of the current time step

integer, intent(out) :: nsteps

Number of time steps until next obs

integer, intent(out) :: doexit

Whether to exit forecasting (1 for exit)

real(kind=REAL64), intent(out) :: time

Current model (physical) time

private subroutine add_obs_error_pdaf()

Arguments

None

private subroutine init_obscovar_pdaf()

Arguments

None

private subroutine prodRinvA_pdaf(step, dim_obs_p, rank, obs_p, A_p, C_p)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: step

Current time step

integer, intent(in) :: dim_obs_p

PE-local dimension of obs. vector

integer, intent(in) :: rank

Rank of initial covariance matrix

real(kind=REAL64), intent(in) :: obs_p(dim_obs_p)

PE-local vector of observations

real(kind=REAL64), intent(in) :: A_p(dim_obs_p,rank)

Input matrix from SEEK_ANALYSIS

real(kind=REAL64), intent(out) :: C_p(dim_obs_p,rank)

Output matrix

local variables

private subroutine cvt_pdaf(iter, dim_p, dim_cvec, v_p, Vv_p)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: iter

< Iteration of optimization

integer, intent(in) :: dim_p

< PE-local observation dimension

integer, intent(in) :: dim_cvec

< Dimension of control vector

real, intent(in), TARGET:: v_p(dim_cvec)

< PE-local control vector

real, intent(inout), TARGET:: Vv_p(dim_p)

< PE-local result vector

private subroutine cvt_adj_pdaf(iter, dim_p, dim_cvec, Vv_p, v_p)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: iter

< Iteration of optimization

integer, intent(in) :: dim_p

< PE-local observation dimension

integer, intent(in) :: dim_cvec

< Dimension of control vector

real, intent(in), TARGET:: Vv_p(dim_p)

< PE-local input vector

real, intent(inout), TARGET:: v_p(dim_cvec)

< PE-local result vector

private subroutine cvt_ens_pdaf(iter, dim_p, dim_ens, dim_cvec_ens, ens_p, v_p, Vv_p)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: iter

< Iteration of optimization

integer, intent(in) :: dim_p

< PE-local dimension of state

integer, intent(in) :: dim_ens

< Ensemble size

integer, intent(in) :: dim_cvec_ens

< Dimension of control vector

real, intent(in), TARGET:: ens_p(dim_p,dim_ens)

< PE-local ensemble

real, intent(in), TARGET:: v_p(dim_cvec_ens)

< PE-local control vector

real, intent(inout), TARGET:: Vv_p(dim_p)

< PE-local state increment

private subroutine cvt_adj_ens_pdaf(iter, dim_p, dim_ens, dim_cvec_ens, ens_p, Vv_p, v_p)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: iter

< Iteration of optimization

integer, intent(in) :: dim_p

< PE-local dimension of state

integer, intent(in) :: dim_ens

< Ensemble size

integer, intent(in) :: dim_cvec_ens

< Number of columns in HV_p

real, intent(in), TARGET:: ens_p(dim_p,dim_ens)

< PE-local ensemble

real, intent(in), TARGET:: Vv_p(dim_p)

< PE-local input vector

real, intent(inout), TARGET:: v_p(dim_cvec_ens)

< PE-local result vector

private subroutine obs_op_adj_pdaf(step, dim_p, dim_obs_p, m_state_p, state_p)

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: step

Currrent time step

integer, intent(in) :: dim_p

PE-local dimension of state

integer, intent(in) :: dim_obs_p

Dimension of observed state

real(kind=REAL64), intent(in) :: m_state_p(dim_obs_p)

PE-local observed state

real(kind=REAL64), intent(out) :: state_p(dim_p)

PE-local model state

local variables

private subroutine obs_op_lin_pdaf()

Arguments

None

private subroutine prepoststep_pdaf()

Arguments

None

private subroutine init_3dvar_pdaf()

Arguments

None

private subroutine prepoststep_3dvar_pdaf()

Arguments

None

private subroutine abort(msg)

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: msg

private subroutine init_n_domains_pdaf()

Arguments

None

private subroutine init_dim_l_pdaf()

Arguments

None

private subroutine init_dim_obs_l_pdaf()

Arguments

None

private subroutine g2l_state_pdaf()

Arguments

None

private subroutine g2l_obs_pdaf()

Arguments

None

private subroutine l2g_state_pdaf()

Arguments

None

private subroutine init_obs_l_pdaf()

Arguments

None

private subroutine prodRinvA_l_pdaf()

Arguments

None

private subroutine init_obsvar_l_pdaf()

Arguments

None

private subroutine init_obs_f_pdaf()

Arguments

None

private subroutine obs_op_f_pdaf()

Arguments

None

private subroutine init_dim_obs_f_pdaf()

Arguments

None