SABER
type_nicas Module Reference

NICAS data derived type. More...

Data Types

type  nicas_type
 

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, io, 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, io, 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 (nicas, mpl, rng, nam, geom, bpar, io)
 Test HDIAG-NICAS consistency with a randomization method. More...
 
subroutine nicas_test_optimality (nicas, mpl, rng, nam, geom, bpar, io)
 Test HDIAG localization optimality with a randomization method. More...
 
subroutine define_test_vectors (mpl, rng, nam, geom, ntest, fld)
 Define test vectors. More...
 

Variables

integer, parameter nfac_rnd = 9
 
integer, parameter nfac_opt = 4
 
integer, parameter ntest = 50
 

Detailed Description

NICAS data derived type.

Function/Subroutine Documentation

◆ define_test_vectors()

subroutine type_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 2068 of file type_nicas.F90.

Here is the caller graph for this function:

◆ 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 78 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 683 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 801 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 1448 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 1004 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 1050 of file type_nicas.F90.

Here is the call graph for this function:

◆ 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 1211 of file type_nicas.F90.

Here is the call graph for this function:

◆ 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 148 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 127 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 736 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 1403 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 173 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 461 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 521 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(io_type), intent(in)  io,
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]ioI/O
[in]ensEnsemble

Definition at line 583 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 393 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 1498 of file type_nicas.F90.

◆ nicas_test_consistency()

subroutine type_nicas::nicas_test_consistency ( 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(io_type), intent(in)  io 
)
private

Test HDIAG-NICAS consistency with a randomization method.

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

Definition at line 1760 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(io_type), intent(in)  io,
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]ioI/O
[in]ensEnsemble

Definition at line 1570 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,
type(io_type), intent(in)  io 
)
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
[in]ioI/O

Definition at line 1887 of file type_nicas.F90.

Here is the call graph for this function:

◆ 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 1629 of file type_nicas.F90.

Here is the call graph for this function:

◆ 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 273 of file type_nicas.F90.

Variable Documentation

◆ nfac_opt

integer, parameter type_nicas::nfac_opt = 4

Definition at line 35 of file type_nicas.F90.

◆ nfac_rnd

integer, parameter type_nicas::nfac_rnd = 9

Definition at line 34 of file type_nicas.F90.

◆ ntest

integer, parameter type_nicas::ntest = 50

Definition at line 36 of file type_nicas.F90.