Changes between Initial Version and Version 1 of PDAF_alloc


Ignore:
Timestamp:
Jun 5, 2025, 12:54:13 PM (2 days ago)
Author:
lnerger
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PDAF_alloc

    v1 v1  
     1= PDAF_alloc =
     2
     3This page documents the routine `PDAF_alloc` which is part of the module `PDAF_utils`.
     4
     5`PDAF_alloc` is used by each DA method in its routine `PDAF_X_alloc` to allocate the arrays provided by PDAF's framework infrastructure.
     6
     7The interface is:
     8{{{
     9SUBROUTINE PDAF_alloc(dim_p, dim_ens, dim_ens_task, dim_es, dim_bias_p, &
     10     dim_lag, statetask, outflag)
     11
     12  INTEGER, INTENT(in) :: dim_p           !< Size of state vector
     13  INTEGER, INTENT(in) :: dim_ens         !< Ensemble size
     14  INTEGER, INTENT(in) :: dim_ens_task    !< Ensemble size handled by a model task
     15  INTEGER, INTENT(in) :: dim_es          !< Dimension of error space (size of Ainv)
     16  INTEGER, INTENT(in) :: dim_bias_p      !< Size of bias vector
     17  INTEGER, INTENT(in) :: dim_lag         !< Smoother lag
     18  INTEGER, INTENT(in) :: statetask       !< ID of model task forecasting a single state
     19  INTEGER, INTENT(inout):: outflag       !< Status flag
     20
     21}}}
     22
     23Notes:
     24* For consistency, PDAF's internal arrays are always allocated, but if they are not used they are allocated with minimum size
     25 * If `dim_es=0`, the array `Ainv` will be allocated with size `(1,1)`
     26 * If `dim_bias_p=0`, the array `bias` will be allocated with size `(1)`
     27 * If `dim_lag=0`, the array `sens` will be allocated with size `(1,1,1)`
     28* The dimensions are usually set in `PDAF_X_init` and then used in `PDAF_X_alloc`.