= PDAF_alloc = This page documents the routine `PDAF_alloc` which is part of the module `PDAF_utils`. `PDAF_alloc` is used by each DA method in its routine `PDAF_X_alloc` to allocate the arrays provided by PDAF's framework infrastructure. The interface is: {{{ SUBROUTINE PDAF_alloc(dim_p, dim_ens, dim_ens_task, dim_es, dim_bias_p, & dim_lag, statetask, outflag) INTEGER, INTENT(in) :: dim_p !< Size of state vector INTEGER, INTENT(in) :: dim_ens !< Ensemble size INTEGER, INTENT(in) :: dim_ens_task !< Ensemble size handled by a model task INTEGER, INTENT(in) :: dim_es !< Dimension of error space (size of Ainv) INTEGER, INTENT(in) :: dim_bias_p !< Size of bias vector INTEGER, INTENT(in) :: dim_lag !< Smoother lag INTEGER, INTENT(in) :: statetask !< ID of model task forecasting a single state INTEGER, INTENT(inout):: outflag !< Status flag }}} Notes: * For consistency, PDAF's internal arrays are always allocated, but if they are not used they are allocated with minimum size * If `dim_es=0`, the array `Ainv` will be allocated with size `(1,1)` * If `dim_bias_p=0`, the array `bias` will be allocated with size `(1)` * If `dim_lag=0`, the array `sens` will be allocated with size `(1,1,1)` * The dimensions are usually set in `PDAF_X_init` and then used in `PDAF_X_alloc`.