Recent Releases of pdaf
pdaf - V2.3.1
This is mainly a bug-fix release. The bug only concerns the 3D-Var methods.
Bug correction: * Corrected convergence check for the CG+ solver in the 3D-Var methods in case of parallelized control vector.
New functionality: * Added initialization subroutines to initialize quantities of 'thisobs' in PDAF-OMI, e.g. for thisobs%doassim there is now the routine PDAFomisetdoassim. These routines are optional so that no code changes are required. These routines are also provided for the arrays 'idobsp', 'icoeffp' and 'domainsize' which avoid the need to allocate the arrays in the user code. This should make the implementation in programming languages like C easier. A list of the new initialization routines with links to their description is provided in https://pdaf.awi.de/trac/wiki/PDAFomiadditional_functionality.
- Fortran
Published by larsnerger over 1 year ago
pdaf - V2.3
Major Changes and additions: * Addition of support for non-diagonal observation error covariance matrices in PDAF-OMI (see https://pdaf.awi.de/trac/wiki/OMInondiagonalobservationerrorcovariancematrices) * _Introduction of PDAFlocal interface. This simplifies the implementation of the state localization. It also provides support for weighted local increments, e.g. to implement vertical localization or weakly coupled assimilation. (see https://pdaf.awi.de/trac/wiki/PDAFlocaloverview) * _Performance improvements to PDAFomiinitdimobsl. While we already improved the performance in V2.2.1 we found that we can further improve the performance by further restructuring of the code. (In some cases with gfortran and ifort compilers by a factor of 6 to 10.) The previous routine is still present as PDAFomiinitdimobslold. * For even better performance of the initialization of local observations, we added _support for implementing a user-provided alternative to PDAFomiinitdimobsl. The user-provided routine can lead to the best performance since it requires less IF-checks, which are required in the generic code inside PDAFomi. If you have the impression that PDAFomiinitdimobsl is still slow in your case, e.g. because it dominates the run time of the analysis step, we recommend to aim for a user-sided implementation (see https://pdaf.awi.de/trac/wiki/OMIsearchlocal_observations).
Further changes and additions: * Improved parsermpi.F90: Now parsing a slash '/' is possible. This now also allows to parse directory paths. In addition, for string parsing it is checked if the string is truncated upon parsing. All files parsermpi.F90 in the different directories of the PDAF package are updated. * Update of PDAFdiagcrps: The routine now includes parallelization. There is a separate routine PDAFdiagcrpsmpi_ which allows one to specify the communicator in which the operation is performed. * New Makefile in the PDAF root directory. This makefile performs the compilation in the directory build/ and keeps src/ clean. Further, it supports parallel compilation. The previous Makefile in src/ is still present, but will be removed in a future release. If you integrated the compilation of PDAF in some larger build process, we recommend to switch to the new Makefile. (The new makefile requires to the set the variable 'MODULEOPT' in the compiler-specific include file in make.arch/. This variable specifies the compiler option for the directory where compiled .mod files are to be stored) * New routine PDAFomiobservationlocalizationweights_ as convenient way to get a localization weight. Usable for example in the prodRinvA or likelihood routines for non-diagonal R. * New routine PDAFcorrelationfunction to provide the value of correlation functions. Currently, a Gaussian and the 5th-order polynomial by Gaspari&Cohn (1999) are implemented. * Revised timer module: Now MPIWtime is used instead of SYSTEMCLOCK. This appears to yield more consistent timings
Bug fixes: * Replace lower-case letters by upper case in TRTRS library calls. This circumvents a bug in some versions of OPENBLAS, which causes OPENBLAS to only accept upper-case letters for this call. * Revision of ETKF/ESTKF/SEIK analysis step. For domains with dimobsp=0 now the observation operator is called consistently with domains having dimobsp>0. This allows for global MPI operations in the observation operator routine.
- Fortran
Published by larsnerger over 1 year ago
pdaf - V2.2.1
This release mainly provides a bug-fix and performance improvements. All changes relate to PDAF-OMI. The performance of the search lor local observations is improved. Because of this, it should be useful for all users who run localized filters to upgrade to this version.
Major changes - all relating to PDAF-OMI: - We found that the search for local observation (initdimobslpdafomi, PDAFomiinitdimobsl) was sometimes slower in PDAF 2.2 than in PDAF 2.1. We now revised the code for the search. This lead to an overall faster search, thus also faster than in PDAF 2.1. This should be particularly visible when using the geographic distance claculations (thisobs%disttype=2 or =3). - We added a 2D+1D factorized localization. In this, the distance in the horizontal direction (components 1 and 2) is treated separately from the vertical direction (3rd component). The localization weight will be the product of the separate weights for the horizontal and vertical distances. This localization type available for both isoptropic and non-isotropic localization. It is actived by specifying 'thisobs%disttype' (see https://pdaf.awi.de/trac/wiki/OMIobservationmodules#thisobsdisttype) - For non-isotropic localization using the new 2D+1D factorized localization one can specify different weight functions for the horizontal and vertical directions. For isotropic localization, the vertical direction always uses a constant weight. (See https://pdaf.awi.de/trac/wiki/OMIobservationmodules#initdimobslOBSTYPE for information in activating this feature) - It is now possible to call the PDAF analysis step (PDAFputstateX) multiple times while changing the active observations. Thus PDAF-OMI is properly reset. This can be used for applications that do univariate assimilation of different observations. One can use this now one after the other in a single program - The timing output (PDAFprintinfo(3)) was revised for PDAF-OMI. For observation-related operations, now only the timings in the call-back routines in the observation modules are displayed while other OMI-internal timings are shows as a sum (see https://pdaf.awi.de/trac/wiki/PDAFprint_info)
Bug fixes: - In non-isotropic localization in 2 dimensions, the computation of the directiontional cut-off radius was incorrect. This is corected and 2d localization should now yield the same result as in 3D localization in which the radius of the third direction was set to zero - For non-isotropic geographic localization using the heaviside functions an additional cut-off condition in longitude could lead to the effect that some local observations were omitted at high latitudes. This additional cut-off condition is now removed.
- Fortran
Published by larsnerger about 2 years ago
pdaf - PDAF V2.2
Major additions: - New activation of offline mode: The new routine PDAFsetofflinemode allows now to activate the offline mode. With this, one can freely choose a filter sub-type in offline mode and to keep online and offline codes more alike (the old functionality using subtype=5 is still available) - Newly available when using OMI: - Added feature to omit observations if their value is too different from the ensemble mean. This can remove outliers and stabilize the data assimilation process. - Added support for non-isotropic localization. One can set separate localization radii for the different directions in a localization. (see https://pdaf.awi.de/trac/wiki/PDAFomiadditionalfunctionality for documentation on obervation omission and non-isotropic localization) - Added error checking routine PDAFomicheckerror (see https://pdaf.awi.de/trac/wiki/OMIerror_checking)
Code revisions and bug corrections: - Revised local observation statistics. In case of zero observations 'NaN' was shown as average number of observations. This case is now consistently handled. (Before PDAF always assumed that an analysis step is called when observation are actually available. Now it is also correct if all observations are deactivated, e.g. in case of a free ensemble run) - Revised the templates and tutorials for OMI-based implementations and 3D-Vars for better clarity. Now the tutorial codes and templates are fully consistent with each other - Bug corrections: - Correction of hybrid filter LKNETF. Irrespective of which subtype was chosen, always the synchronous update scheme (subtype=4) was executed. Now also the 2-step schemes can be correctly used - tutorial/offline2Dparallel: In callbackobspdafomi.F90 the coordinate array set for localizecovarpdafomi wes not correctly initialized - Corrected PDAFassimilate*si.F90, i.e. 'simple interface' routines (for PF, NETF, LNETF) and PDAFputstatenetfsi.F90. Here unused arguments were specified internally. - PDAF-OMI related corrections - PDAFomigatherobs now works correctly for the combined case that zero observations are available and domain-limited observations (useglobalobs=0) are activated - We corrected an incompatibility of the EnKF and LEnKF with OMI. The result was not consistent if multiple observation types were used in combination with domain-decomposition of the model
- Fortran
Published by larsnerger about 2 years ago
pdaf - PDAF V2.1
Note on change influencing the compatibility with previous versions of PDAF - We moved the memory output option in PDAFprintinfo from value 2 to 10 to avoid mixing timing and memory outputs
Major additions: - Added the hybrid Kalman-Nonlinear Ensemble Transform Filter (LKNETF), see L. Nerger (2022) Data assimilation for nonlinear systems with a hybrid nonlinear-Kalman ensemble transform filter. Q. J. Meteorol. Soc., 148, 620-640 doi:10.1002/qj.4221 - Added debug outputs for PDAF. Using the routine PDAFsetdebugflag one can activate debug output printed by the PDAF code routines. This should help to find issues in the user-supplied call-back routines when implementing PDAF with some model or extending an implementation. The debug option is described at https://pdaf.awi.de/trac/wiki/PDAFdebugging
Changes: - Added output option for globally allocated memory. This can be printed by calling PDAFprintinfo(11) - Modes output option for process-local allocated memory from PDAFprintinfo(2) to PDAFprintinfo(10) - Added option for NETF and LNETF to add random noise perturbations to the analysis ensemble analogous to the PF - Extend available configuration parameters for 3D-Var methods. Now parameters controlling the solver methods can be chosen - Change of behavior for NETF/LNETF/PF in the case that all weights are zero. Now, the weights are reset to 1/ensemble size and a warning is shown (before PDAF exited with an error message) - Add tutorial models without PDAF to allow users perform the implementation themselves following the tutorial description.
Code revisions: - Renamed the localization variables in example codes from localrange to cradius (c='cut-off’) and srange to sradius (s=‘support’) - Changed time stepping code of Lorenz model cases to avoid creation of temporary array by the compiler Bug corrections (the bugs concern rather unusual use cases, so most users wil not encounter these) - Correction of NETF and PF for the case when running with parallelization: For each process domain, only the domain-local observations were assimilated - PDAF-OMI related: - Correction in Lorenz96 with OMI: In obsgppdafomi.F90 an incorrect observation dimension was used in call to PDAFomigatherobs if incomplete observations are used. - Correction using global filters with PDAF-OMI and running with parallelization: The program could get stuck if there were observations available but a process domain exists without observations (dimobsp=0). - Correction of likelihood computation in the global NETF and the PF for multiple observations types when using OMI. Here, the distinction between the total number of observations and the number of observations per observation type was missing - Correction of EnKF/LEnKF with OMI running with parallelization: For the case that for a process domain dimobsp=0, but globally dimobsg>0 the array thisobs%ivarobs_f was allocated with incorrect size
- Fortran
Published by larsnerger about 3 years ago
pdaf - PDAF V2.0
Note on signifcant changes influencing the compatibility with previous versions of PDAF - We modernized the MPI parallelization. With these changes the MPI stub library that we provided before, and which allowed to compile and run PDAF without an MPI library, is no longer usable. Thus, PDAF does not require an MPI library. This should not have an impact on most users given that today MPI is standard on all cluster computers and an MPI library is available and can by easily installed on virtually any Linux, MacOS or Windows system. - We renamed the PDAF library files with prefix PDAF-D_ to the prefix PDAF_ to ensure a consistent naming of the files. If you don't use the Makefile provided in the PDAF package, you likely need to adapt to this change. - The observation generation option (GENOBS) was moved from filtertype=11 to filtertype=100 - Some model implementations (e.g. the Lorenz models) use netcdf for file writing/reading. Here we moved to the NF90 interface. This reuired that the netcdf.mod module file of the netcdf library is installed
Changes: - Added 3D-Var methods - variants: 3D-Var with parameterized covariances, 3D ensemble var (ensemble covariances) and hybrid-var (combined parameterized and ensemble covariances); ensemble perturbations can be transformed using the global ESTKF or the local LESTKF - Added tutorials for 3D-Var methods (codes and slide set with explanations) - Added template files for 3D-Var methods - Added models from Lorenz (2005): model II (state with averaging), model III (two-scale); both with assimilation fully implemented - Added tutoral code showing a multivariate implementation with two model fields (/tutorial/online2Dserialmodel2fields). The tutorial demonstrates an efficient way to handle multiple model fields - Added possibility to reset the MPI world communicator in which PDAF operates (routine PDAFsetcommpdaf). This ensures compatibility with e.g. OI-servers that use processes separate from those used by the model integration. - Added possibility to let the user force that the analysis step is computed at the next call to PDAFassimilate/PDAFputstate (routine PDAFforceanalysis) - Added possibility to overwrite PDAF's ensemble member counting in the flexible parallelization variant and force execution of the analysis (PDAFsetmemberid) - Added routine to reset the value of the forgetting factor. Can be applied during the analysis step, e.g. to give each local analysis domain a different inflation value (PDAFresetforget) - Added diagnostic routine to compute the continuous ranked probability score, CRPS (PDAFdiagcrps) - Code revisions: - Renaming of routines: prefix PDAF-D replaced by PDAF_ - modernized use of MPI: now we use 'USE MPI' instead of 'include mpif.h'. This solves the issue of gfortran 10, which claimed argument mismatches - modernized use of netCDF (with 'use netcdf' instead of 'include netcdf.inc'). This also resolves the issue of gfortran 10 - observation generation (GENOBS) moved to filtertype=100 - PDAFsampleens now works without prior call to PDAFinit (removed memory counting) - removed stub PDAF library since it is not compatible with 'USE mpi'. Thus, compiling PDAF now requires a MPI library to be installed - PDAF-OMI related - Calling deallocateobspdafomi is no longer required - Model bindings for MITgcm and AWI-CM revised for using PDAF-OMI - all model implementations (Lorenz models) now implemented using PDAF-OMI - Added OMI adjoint observation operators for use with 3D-Var methods - Bug corrections: - Correction of initialization of gcoords in tutorial for obsCpdafomi (observations with linear interpolation) - For compatibility with the Cray compiler, all .mod files of the PDAF library are copied to /include - resolved issue of gfortran-10 complaining about argument mismatch by 'USE mpi'
- Fortran
Published by larsnerger about 3 years ago