SABER
type_nicas Module Reference

Subroutines/functions list. More...

Data Types

type  nicas_type
 
interface  test_consistency
 
interface  define_test_vectors
 

Functions/Subroutines

subroutine nicas_alloc (nicas, nam, bpar)
 Allocation. More...
 
subroutine nicas_partial_dealloc (nicas)
 Release memory (partial) More...
 
subroutine nicas_dealloc (nicas)
 Release memory (full) More...
 
subroutine nicas_read (nicas, mpl, nam, geom, bpar)
 Read. More...
 
subroutine nicas_write (nicas, mpl, nam, geom, bpar)
 Write. More...
 
subroutine nicas_send (nicas, mpl, nam, geom, bpar, iproc)
 Send. More...
 
subroutine nicas_receive (nicas, mpl, nam, geom, bpar, iproc)
 Receive. More...
 
subroutine nicas_run_nicas (nicas, mpl, rng, nam, geom, bpar, cmat)
 NICAS driver. More...
 
subroutine nicas_run_nicas_tests (nicas, mpl, rng, nam, geom, bpar, ens)
 NICAS tests driver. More...
 
subroutine nicas_alloc_cv (nicas, mpl, bpar, cv, getsizeonly)
 Allocation. More...
 
subroutine nicas_random_cv (nicas, mpl, rng, bpar, cv)
 Generate a random control vector. More...
 
subroutine nicas_apply (nicas, mpl, nam, geom, bpar, fld)
 Apply NICAS. More...
 
subroutine nicas_apply_from_sqrt (nicas, mpl, nam, geom, bpar, fld)
 Apply NICAS from square-root. More...
 
subroutine nicas_apply_sqrt (nicas, mpl, nam, geom, bpar, cv, fld)
 Apply NICAS square-root. More...
 
subroutine nicas_apply_sqrt_ad (nicas, mpl, nam, geom, bpar, fld, cv)
 Apply NICAS square-root, adjoint. More...
 
subroutine nicas_randomize (nicas, mpl, rng, nam, geom, bpar, ne, ens)
 Randomize NICAS from square-root. More...
 
subroutine nicas_apply_bens (nicas, mpl, nam, geom, bpar, ens, fld)
 Apply localized ensemble covariance. More...
 
subroutine nicas_test_adjoint (nicas, mpl, rng, nam, geom, bpar, ens)
 Test NICAS adjoint. More...
 
subroutine nicas_test_dirac (nicas, mpl, nam, geom, bpar, ens)
 Apply NICAS to diracs. More...
 
subroutine nicas_test_randomization (nicas, mpl, rng, nam, geom, bpar)
 Test NICAS randomization method with respect to theoretical error statistics. More...
 
subroutine nicas_test_consistency (mpl, rng, nam, geom, bpar)
 Test HDIAG-NICAS consistency with a randomization method. More...
 
subroutine nicas_test_optimality (nicas, mpl, rng, nam, geom, bpar)
 Test HDIAG localization optimality with a randomization method. More...
 
subroutine nicas_define_test_vectors (mpl, rng, nam, geom, ntest, fld)
 Define test vectors. More...
 

Variables

integer, parameter nfac_rnd = 9
 Number of ensemble size factors for randomization. More...
 
integer, parameter nfac_opt = 4
 Number of length-scale factors for optimization. More...
 
integer, parameter ntest = 50
 Number of tests. More...
 

Detailed Description

Subroutines/functions list.

Instrumentation functions NICAS data derived type

Function/Subroutine Documentation

◆ nicas_alloc()

subroutine type_nicas::nicas_alloc ( class(nicas_type), intent(inout)  nicas,
type(nam_type), intent(in)  nam,
type(bpar_type), intent(in)  bpar 
)
private

Allocation.

Parameters
[in,out]nicasNICAS data
[in]namNamelist
[in]bparBlock parameters

Definition at line 106 of file type_nicas.F90.

◆ nicas_alloc_cv()

subroutine type_nicas::nicas_alloc_cv ( class(nicas_type), intent(in)  nicas,
type(mpl_type), intent(inout)  mpl,
type(bpar_type), intent(in)  bpar,
type(cv_type), intent(inout)  cv,
logical, intent(in), optional  getsizeonly 
)
private

Allocation.

Parameters
[in]nicasNICAS data
[in,out]mplMPI data
[in]bparBlock parameters
[in,out]cvControl vector
[in]getsizeonlyFlag to get the control variable size only (no allocation)

Definition at line 789 of file type_nicas.F90.

◆ nicas_apply()

subroutine type_nicas::nicas_apply ( class(nicas_type), intent(in)  nicas,
type(mpl_type), intent(inout)  mpl,
type(nam_type), intent(in)  nam,
type(geom_type), intent(in)  geom,
type(bpar_type), intent(in)  bpar,
real(kind_real), dimension(geom%nc0a,geom%nl0,nam%nv), intent(inout)  fld 
)
private

Apply NICAS.

Parameters
[in]nicasNICAS data
[in,out]mplMPI data
[in]namNamelist
[in]geomGeometry
[in]bparBlock parameters
[in,out]fldField

Definition at line 925 of file type_nicas.F90.

◆ nicas_apply_bens()

subroutine type_nicas::nicas_apply_bens ( class(nicas_type), intent(in)  nicas,
type(mpl_type), intent(inout)  mpl,
type(nam_type), intent(in)  nam,
type(geom_type), intent(in)  geom,
type(bpar_type), intent(in)  bpar,
type(ens_type), intent(in)  ens,
real(kind_real), dimension(geom%nc0a,geom%nl0,nam%nv), intent(inout)  fld 
)
private

Apply localized ensemble covariance.

Parameters
[in]nicasNICAS data
[in,out]mplMPI data
[in]namNamelist
[in]geomGeometry
[in]bparBlocal parameters
[in]ensEnsemble
[in,out]fldField

Definition at line 1611 of file type_nicas.F90.

◆ nicas_apply_from_sqrt()

subroutine type_nicas::nicas_apply_from_sqrt ( class(nicas_type), intent(in)  nicas,
type(mpl_type), intent(inout)  mpl,
type(nam_type), intent(in)  nam,
type(geom_type), intent(in)  geom,
type(bpar_type), intent(in)  bpar,
real(kind_real), dimension(geom%nc0a,geom%nl0,nam%nv), intent(inout)  fld 
)
private

Apply NICAS from square-root.

Parameters
[in]nicasNICAS data
[in,out]mplMPI data
[in]namNamelist
[in]geomGeometry
[in]bparBlock parameters
[in,out]fldField

Definition at line 1136 of file type_nicas.F90.

◆ nicas_apply_sqrt()

subroutine type_nicas::nicas_apply_sqrt ( class(nicas_type), intent(in)  nicas,
type(mpl_type), intent(inout)  mpl,
type(nam_type), intent(in)  nam,
type(geom_type), intent(in)  geom,
type(bpar_type), intent(in)  bpar,
type(cv_type), intent(in)  cv,
real(kind_real), dimension(geom%nc0a,geom%nl0,nam%nv), intent(out)  fld 
)
private

Apply NICAS square-root.

Parameters
[in]nicasNICAS data
[in,out]mplMPI data
[in]namNamelist
[in]geomGeometry
[in]bparBlock parameters
[in]cvControl variable
[out]fldField

Definition at line 1190 of file type_nicas.F90.

◆ nicas_apply_sqrt_ad()

subroutine type_nicas::nicas_apply_sqrt_ad ( class(nicas_type), intent(in)  nicas,
type(mpl_type), intent(inout)  mpl,
type(nam_type), intent(in)  nam,
type(geom_type), intent(in)  geom,
type(bpar_type), intent(in)  bpar,
real(kind_real), dimension(geom%nc0a,geom%nl0,nam%nv), intent(in)  fld,
type(cv_type), intent(out)  cv 
)
private

Apply NICAS square-root, adjoint.

Parameters
[in]nicasNICAS data
[in,out]mplMPI data
[in]namNamelist
[in]geomGeometry
[in]bparBlock parameters
[in]fldField
[out]cvControl variable

Definition at line 1358 of file type_nicas.F90.

◆ nicas_dealloc()

subroutine type_nicas::nicas_dealloc ( class(nicas_type), intent(inout)  nicas)
private

Release memory (full)

Parameters
[in,out]nicasNICAS data

Definition at line 194 of file type_nicas.F90.

◆ nicas_define_test_vectors()

subroutine type_nicas::nicas_define_test_vectors ( type(mpl_type), intent(inout)  mpl,
type(rng_type), intent(inout)  rng,
type(nam_type), intent(in)  nam,
type(geom_type), intent(in)  geom,
integer, intent(in)  ntest,
real(kind_real), dimension(geom%nc0a,geom%nl0,nam%nv,ntest), intent(out)  fld 
)
private

Define test vectors.

Parameters
[in,out]mplMPI data
[in,out]rngRandom number generator
[in]namNamelist
[in]geomGeometry
[in]ntestNumber of vectors
[out]fldField

Definition at line 2289 of file type_nicas.F90.

◆ nicas_partial_dealloc()

subroutine type_nicas::nicas_partial_dealloc ( class(nicas_type), intent(inout)  nicas)
private

Release memory (partial)

Parameters
[in,out]nicasNICAS data

Definition at line 164 of file type_nicas.F90.

◆ nicas_random_cv()

subroutine type_nicas::nicas_random_cv ( class(nicas_type), intent(in)  nicas,
type(mpl_type), intent(inout)  mpl,
type(rng_type), intent(inout)  rng,
type(bpar_type), intent(in)  bpar,
type(cv_type), intent(out)  cv 
)
private

Generate a random control vector.

Parameters
[in]nicasNICAS data
[in,out]mplMPI data
[in,out]rngRandom number generator
[in]bparBlock parameters
[out]cvControl vector

Definition at line 851 of file type_nicas.F90.

◆ nicas_randomize()

subroutine type_nicas::nicas_randomize ( class(nicas_type), intent(in)  nicas,
type(mpl_type), intent(inout)  mpl,
type(rng_type), intent(inout)  rng,
type(nam_type), intent(in)  nam,
type(geom_type), intent(in)  geom,
type(bpar_type), intent(in)  bpar,
integer, intent(in)  ne,
type(ens_type), intent(inout)  ens 
)
private

Randomize NICAS from square-root.

Parameters
[in]nicasNICAS data
[in,out]mplMPI data
[in,out]rngRandom number generator
[in]namNamelist
[in]geomGeometry
[in]bparBlocal parameters
[in]neNumber of members
[in,out]ensEnsemble

Definition at line 1557 of file type_nicas.F90.

◆ nicas_read()

subroutine type_nicas::nicas_read ( class(nicas_type), intent(inout)  nicas,
type(mpl_type), intent(inout)  mpl,
type(nam_type), intent(in)  nam,
type(geom_type), intent(in)  geom,
type(bpar_type), intent(in)  bpar 
)
private

Read.

Parameters
[in,out]nicasNICAS data
[in,out]mplMPI data
[in]namNamelist
[in]geomGeometry
[in]bparBlock parameters

Definition at line 228 of file type_nicas.F90.

◆ nicas_receive()

subroutine type_nicas::nicas_receive ( class(nicas_type), intent(inout)  nicas,
type(mpl_type), intent(inout)  mpl,
type(nam_type), intent(in)  nam,
type(geom_type), intent(in)  geom,
type(bpar_type), intent(in)  bpar,
integer, intent(in)  iproc 
)
private

Receive.

Parameters
[in,out]nicasNICAS data
[in,out]mplMPI data
[in]namNamelist
[in]geomGeometry
[in]bparBlock parameters
[in]iprocSource task

Definition at line 541 of file type_nicas.F90.

◆ nicas_run_nicas()

subroutine type_nicas::nicas_run_nicas ( class(nicas_type), intent(inout)  nicas,
type(mpl_type), intent(inout)  mpl,
type(rng_type), intent(inout)  rng,
type(nam_type), intent(inout)  nam,
type(geom_type), intent(inout)  geom,
type(bpar_type), intent(in)  bpar,
type(cmat_type), intent(in)  cmat 
)
private

NICAS driver.

Parameters
[in,out]nicasNICAS data
[in,out]mplMPI data
[in,out]rngRandom number generator
[in,out]namNamelist
[in,out]geomGeometry
[in]bparBlock parameters
[in]cmatC matrix data

Definition at line 610 of file type_nicas.F90.

◆ nicas_run_nicas_tests()

subroutine type_nicas::nicas_run_nicas_tests ( class(nicas_type), intent(inout)  nicas,
type(mpl_type), intent(inout)  mpl,
type(rng_type), intent(inout)  rng,
type(nam_type), intent(inout)  nam,
type(geom_type), intent(inout)  geom,
type(bpar_type), intent(in)  bpar,
type(ens_type), intent(in)  ens 
)
private

NICAS tests driver.

Parameters
[in,out]nicasNICAS data
[in,out]mplMPI data
[in,out]rngRandom number generator
[in,out]namNamelist
[in,out]geomGeometry
[in]bparBlock parameters
[in]ensEnsemble

Definition at line 681 of file type_nicas.F90.

◆ nicas_send()

subroutine type_nicas::nicas_send ( class(nicas_type), intent(in)  nicas,
type(mpl_type), intent(inout)  mpl,
type(nam_type), intent(in)  nam,
type(geom_type), intent(in)  geom,
type(bpar_type), intent(in)  bpar,
integer, intent(in)  iproc 
)
private

Send.

Parameters
[in]nicasNICAS data
[in,out]mplMPI data
[in]namNamelist
[in]geomGeometry
[in]bparBlock parameters
[in]iprocDestination task

Definition at line 464 of file type_nicas.F90.

◆ nicas_test_adjoint()

subroutine type_nicas::nicas_test_adjoint ( class(nicas_type), intent(in)  nicas,
type(mpl_type), intent(inout)  mpl,
type(rng_type), intent(inout)  rng,
type(nam_type), intent(in)  nam,
type(geom_type), intent(in)  geom,
type(bpar_type), intent(in)  bpar,
type(ens_type), intent(in)  ens 
)
private

Test NICAS adjoint.

Parameters
[in]nicasNICAS data
[in,out]mplMPI data
[in,out]rngRandom number generator
[in]namNamelist
[in]geomGeometry
[in]bparBlock parameters
[in]ensEnsemble

Definition at line 1670 of file type_nicas.F90.

◆ nicas_test_consistency()

subroutine type_nicas::nicas_test_consistency ( type(mpl_type), intent(inout)  mpl,
type(rng_type), intent(inout)  rng,
type(nam_type), intent(inout)  nam,
type(geom_type), intent(inout)  geom,
type(bpar_type), intent(in)  bpar 
)
private

Test HDIAG-NICAS consistency with a randomization method.

Parameters
[in,out]mplMPI data
[in,out]rngRandom number generator
[in,out]namNamelist variables
[in,out]geomGeometry
[in]bparBlock parameters

Definition at line 1963 of file type_nicas.F90.

◆ nicas_test_dirac()

subroutine type_nicas::nicas_test_dirac ( class(nicas_type), intent(in)  nicas,
type(mpl_type), intent(inout)  mpl,
type(nam_type), intent(in)  nam,
type(geom_type), intent(in)  geom,
type(bpar_type), intent(in)  bpar,
type(ens_type), intent(in)  ens 
)
private

Apply NICAS to diracs.

Parameters
[in]nicasNICAS data
[in,out]mplMPI data
[in]namNamelist
[in]geomGeometry
[in]bparBlock parameters
[in]ensEnsemble

Definition at line 1751 of file type_nicas.F90.

◆ nicas_test_optimality()

subroutine type_nicas::nicas_test_optimality ( class(nicas_type), intent(in)  nicas,
type(mpl_type), intent(inout)  mpl,
type(rng_type), intent(inout)  rng,
type(nam_type), intent(inout)  nam,
type(geom_type), intent(in)  geom,
type(bpar_type), intent(in)  bpar 
)
private

Test HDIAG localization optimality with a randomization method.

Parameters
[in]nicasNICAS data
[in,out]mplMPI data
[in,out]rngRandom number generator
[in,out]namNamelist variables
[in]geomGeometry
[in]bparBlock parameters

Definition at line 2099 of file type_nicas.F90.

◆ nicas_test_randomization()

subroutine type_nicas::nicas_test_randomization ( class(nicas_type), intent(in)  nicas,
type(mpl_type), intent(inout)  mpl,
type(rng_type), intent(inout)  rng,
type(nam_type), intent(inout)  nam,
type(geom_type), intent(in)  geom,
type(bpar_type), intent(in)  bpar 
)
private

Test NICAS randomization method with respect to theoretical error statistics.

Parameters
[in]nicasNICAS data
[in,out]mplMPI data
[in,out]rngRandom number generator
[in,out]namNamelist variables
[in]geomGeometry
[in]bparBlock parameters

Definition at line 1824 of file type_nicas.F90.

◆ nicas_write()

subroutine type_nicas::nicas_write ( class(nicas_type), intent(in)  nicas,
type(mpl_type), intent(inout)  mpl,
type(nam_type), intent(in)  nam,
type(geom_type), intent(in)  geom,
type(bpar_type), intent(in)  bpar 
)
private

Write.

Parameters
[in]nicasNICAS data
[in,out]mplMPI data
[in]namNamelist
[in]geomGeometry
[in]bparBlock parameters

Definition at line 336 of file type_nicas.F90.

Variable Documentation

◆ nfac_opt

integer, parameter type_nicas::nfac_opt = 4

Number of length-scale factors for optimization.

Definition at line 58 of file type_nicas.F90.

◆ nfac_rnd

integer, parameter type_nicas::nfac_rnd = 9

Number of ensemble size factors for randomization.

Definition at line 57 of file type_nicas.F90.

◆ ntest

integer, parameter type_nicas::ntest = 50

Number of tests.

Definition at line 59 of file type_nicas.F90.