Changes between Version 9 and Version 10 of OfflineInitPdaf
- Timestamp:
- May 18, 2025, 9:20:49 PM (4 hours ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
OfflineInitPdaf
v9 v10 1 = Offline Mode: Initializing PDAF and the ensemble by PDAF_init=1 = Offline Mode: Initializing PDAF = 2 2 3 3 {{{ … … 20 20 The PDAF release provides example code for the offline mode in `tutorial/offline_2D_parallel`. We refer to this code to use it as a basis. 21 21 22 After initializing the parallelization for the assimilation program, the PDAF has to be initialized. Internally to PDAF, the initialization is done by the routine `PDAF_init`. In the tutorial code in `tutorial/offline_2D_parallel`, we collect the initialization of all variables required for the call to `PDAF_init` into the single subroutine `init_pdaf_offline`, which yields a clean code. The file `init_pdaf_offline.F90` in `templates/offline` provides a commented template for this routine, which can be used as the basis of the implementation.22 The routine `PDAF_init` is called to initialize PDAF. This call sets parameters for the data assimilation, chooses the data assimilation method and initializes the ensemble. In the tutorial code in `tutorial/offline_2D_parallel`, we collect the initialization of all variables required for the call to `PDAF_init` into the single subroutine `init_pdaf_offline`, which yields a clean code. The file `init_pdaf_offline.F90` in `templates/offline` provides a commented template for this routine, which can be used as the basis of the implementation. 23 23 24 `PDAF_init` itself calls a user-supplied routine to initialize the ensemble of model states through its interface. In the example, this is the routine in the file `init_ens_offline.F90`.24 `PDAF_init` itself calls a user-supplied call-back routine to initialize the ensemble of model states. In the example, this is the routine in the file `init_ens_offline.F90`. 25 25 26 26 == Using `init_pdaf` == 27 27 28 In the offline mode, the routine `init_pdaf_offline` is executed after the initialization of the parallelization. (Note: In the main program of the example implementation (`main_offine.F90`) we added a call to a routine `initialize` in between for clarity of the implementation. As no real model initialization is conducted, this routine simply initializes the size of the model state. This initialization could also be performed in `init_pdaf_offline`.)28 In the offline mode, the routine `init_pdaf_offline` is executed after the initialization of the parallelization. (Note: In the main program of the example implementation (`main_offine.F90`) we added a call to a routine `initialize` in between for clarity of the implementation. This routine simply initializes the size of the 2-dimensional model grid and then the size of the model state.) 29 29 30 In the routine `init_pdaf_offline` a number of variables are defined that are used in the call to `PDAF_init` as described below in '[#RequiredargumentsforPDAF_init Required arguments for `PDAF_init`]'. (Please note: All names of subroutines that start with `PDAF_` are core routines of PDAF, while subroutines whose name end with `_pdaf` are generally user-supplied call-back routines)There are also a few variables that are initialized in `init_pdaf_offline` but not used in the call to `PDAF_init`. These are variables that are specific for the data assimilation system, but only shared in between the user-supplied routines. For the tutorial example, these variables are described below in the section '[#Othervariablesfortheassimilation Other variables for the assimilation]'.30 In the routine `init_pdaf_offline` a number of variables are defined that are used in the call to `PDAF_init` as described below. There are also a few variables that are initialized in `init_pdaf_offline` but not used in the call to `PDAF_init`. These are variables that are specific for the data assimilation system, but only shared in between the user-supplied routines. For the tutorial example, these variables are described below in the section '[#Othervariablesfortheassimilation Other variables for the assimilation]'. 31 31 32 32 The PDAF offline mode is activated by calling the routine [wiki:OfflineInitPdaf#ActivatingtheofflinemodewithPDAF_set_offline_mode PDAF_set_offline_mode], described below. This routine is usually called at the end of the routine `init_pdaf_offline`.