From 894f2fdc941da2c56854855068daf30f68c77b3a Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Wed, 8 May 2024 11:41:36 +0200 Subject: [PATCH 01/83] Add MPI-based timer module and replace old module based on SYSTEM_TIME --- src/Makefile | 2 +- src/PDAF_timer_mpi.F90 | 153 +++++++++++++++++++++++++++++++++++++++++ 2 files changed, 154 insertions(+), 1 deletion(-) create mode 100644 src/PDAF_timer_mpi.F90 diff --git a/src/Makefile b/src/Makefile index f2c766ffc..bc7825fa2 100644 --- a/src/Makefile +++ b/src/Makefile @@ -21,7 +21,7 @@ include ../make.arch/$(PDAF_ARCH).h ###################################################### # Modules used in PDAF -MOD_PDAF = PDAF_timer.o \ +MOD_PDAF = PDAF_timer_mpi.o \ PDAF_memcount.o \ PDAF_mod_filtermpi.o \ PDAF_mod_filter.o diff --git a/src/PDAF_timer_mpi.F90 b/src/PDAF_timer_mpi.F90 new file mode 100644 index 000000000..c55c5f6ec --- /dev/null +++ b/src/PDAF_timer_mpi.F90 @@ -0,0 +1,153 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !MODULE: +MODULE PDAF_timer + +! !DESCRIPTION: +! This module provides methods to perform timings of +! parts of a program execution. It uses the intrinsic +! function SYSTEM\_CLOCK. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2000-11 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + SAVE + + PUBLIC :: PDAF_timeit, PDAF_time_tot, PDAF_time_temp +!EOP + + PRIVATE + REAL, ALLOCATABLE :: t_start(:), t_end(:) + REAL, ALLOCATABLE :: t_total(:), t_temp(:) + +CONTAINS +!------------------------------------------------------------------------------- +!BOP +! +! !ROUTINE: PDAF_timeit - Initialize Counters and time regions +! +! !INTERFACE: + SUBROUTINE PDAF_timeit(timerID, operation) + +! !DESCRIPTION: +! Subroutine to initialize counters and to perform timing of a region +! specified by timerID. +! Usage:\\ +! CALL PDAF\_timeit(N,'ini') - Allocates and initializes N counters\\ +! CALL PDAF\_timeit(M,'new') - Start timing region for counter M\\ +! CALL PDAF\_timeit(M,'old') - End timing region for counter M\\ +! CALL PDAF\_timeit(M,'fin') - Finalized and deallocates all counters\\ + +! !USES: + USE mpi + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(in) :: timerID ! ID of timer + CHARACTER(len=3), INTENT(in) :: operation ! Requested operation +!EOP + +!$OMP MASTER + ! Initialize timers + IF (operation == 'ini') THEN + IF ( .NOT. (ALLOCATED(t_start))) THEN + ALLOCATE(t_start(timerID), t_end(timerID)) + ALLOCATE(t_total(timerID), t_temp(timerID)) + END IF + + t_total = 0.0 + END IF + + ! Begin timing region + IF (operation == 'new') THEN + t_start(timerID) = MPI_Wtime() + END IF + + ! End timing region + IF (operation == 'old') THEN + t_end(timerID) = MPI_Wtime() + t_temp(timerID) = t_end(timerID) - t_start(timerID) + t_total(timerID) = t_total(timerID) + t_temp(timerID) + END IF + + ! Finalize timers + IF (operation == 'fin') THEN + DEALLOCATE(t_start, t_end) + DEALLOCATE(t_total, t_temp) + END IF +!$OMP END MASTER + + END SUBROUTINE PDAF_timeit + +!------------------------------------------------------------------------------- +!BOP +! +! !FUNCTION: PDAF_time_temp - Read out timers for last timing interval +! +! !INTERFACE: + REAL FUNCTION PDAF_time_temp(timerID) + +! !DESCRIPTION: +! Read out the value of the timer in seconds for the last +! passage of the timing region defined by timerID. + +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(in) :: timerID ! ID of timer +!EOP + + PDAF_time_temp = t_temp(timerID) + + END FUNCTION PDAF_time_temp + +!------------------------------------------------------------------------------- +!BOP +! +! !FUNCTION: PDAF_time_tot - Read out total time of a timing region. +! +! !INTERFACE: + REAL FUNCTION PDAF_time_tot(timerID) + +! !DESCRIPTION: +! Read out the accumulated value of the timer in seconds +! for the timing region define by timerID. + +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(in) :: timerID ! ID of timer +!EOP + + PDAF_time_tot = t_total(timerID) + + END FUNCTION PDAF_time_tot + +END MODULE PDAF_timer From 78320e0098f5b83bdfad56f741221af715c410eb Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Fri, 17 May 2024 14:20:50 +0200 Subject: [PATCH 02/83] Replace lower case letter arguments by upper case in calls to TRTRS (This circumvents a bug in the LAPACK implementation of OpenBLAS <0.3.27) --- src/PDAF_estkf_analysis.F90 | 2 +- src/PDAF_lestkf_analysis.F90 | 2 +- src/PDAF_lseik_analysis_trans.F90 | 2 +- src/PDAF_lseik_resample.F90 | 2 +- src/PDAF_seik_analysis_trans.F90 | 2 +- src/PDAF_seik_resample.F90 | 2 +- src/PDAF_seik_resample_newT.F90 | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/PDAF_estkf_analysis.F90 b/src/PDAF_estkf_analysis.F90 index 789e9d381..17e290bff 100644 --- a/src/PDAF_estkf_analysis.F90 +++ b/src/PDAF_estkf_analysis.F90 @@ -731,7 +731,7 @@ SUBROUTINE PDAF_estkf_analysis(step, dim_p, dim_obs_p, dim_ens, rank, & CALL PDAF_timeit(34, 'new') IF (type_sqrt == 1) THEN ! A = (Omega C^(-1)) by solving Ct A = OmegaT for A - CALL trtrsTYPE('l', 't', 'n', rank, dim_ens, & + CALL trtrsTYPE('L', 'T', 'N', rank, dim_ens, & tmp_Ainv, rank, OmegaT, rank, lib_info) ELSE ! TMP_AINV already contains matrix C (no more inversion) diff --git a/src/PDAF_lestkf_analysis.F90 b/src/PDAF_lestkf_analysis.F90 index d3d582024..3f273abe3 100644 --- a/src/PDAF_lestkf_analysis.F90 +++ b/src/PDAF_lestkf_analysis.F90 @@ -572,7 +572,7 @@ SUBROUTINE PDAF_lestkf_analysis(domain_p, step, dim_l, dim_obs_f, dim_obs_l, & OmegaT = OmegaT_in ! A = (Omega C^(-1)) by solving Ct A = OmegaT for A - CALL trtrsTYPE('l', 't', 'n', rank, dim_ens, & + CALL trtrsTYPE('L', 'T', 'N', rank, dim_ens, & tmp_Ainv_l, rank, OmegaT, rank, lib_info) ELSE ! TEMP_AINV already contains matrix C (no more inversion) diff --git a/src/PDAF_lseik_analysis_trans.F90 b/src/PDAF_lseik_analysis_trans.F90 index f4e0fadc2..8fe291ce0 100644 --- a/src/PDAF_lseik_analysis_trans.F90 +++ b/src/PDAF_lseik_analysis_trans.F90 @@ -577,7 +577,7 @@ SUBROUTINE PDAF_lseik_analysis_trans(domain_p, step, dim_l, dim_obs_f, dim_obs_l OmegaT = OmegaT_in ! A = (Omega C^(-1)) by solving Ct A = OmegaT for A - CALL trtrsTYPE('l', 't', 'n', rank, dim_ens, & + CALL trtrsTYPE('L', 'T', 'N', rank, dim_ens, & tmp_Uinv_l, rank, OmegaT, rank, lib_info) ELSE ! TEMP_UINV already contains matrix C (no more inversion) diff --git a/src/PDAF_lseik_resample.F90 b/src/PDAF_lseik_resample.F90 index 16af312c3..10999029a 100644 --- a/src/PDAF_lseik_resample.F90 +++ b/src/PDAF_lseik_resample.F90 @@ -273,7 +273,7 @@ SUBROUTINE PDAF_lseik_resample(domain_p, subtype, dim_l, dim_ens, & OmegaT = OmegaT_in ! A = (Omega C^(-1)) by solving Ct A = OmegaT for A - CALL trtrsTYPE('l', 't', 'n', rank, dim_ens, & + CALL trtrsTYPE('L', 'T', 'N', rank, dim_ens, & tmpUinv_l, rank, OmegaT, rank, lib_info) ELSE ! TMP_UINV already contains matrix C (no more inversion) diff --git a/src/PDAF_seik_analysis_trans.F90 b/src/PDAF_seik_analysis_trans.F90 index d424a2756..9b385cce4 100644 --- a/src/PDAF_seik_analysis_trans.F90 +++ b/src/PDAF_seik_analysis_trans.F90 @@ -719,7 +719,7 @@ SUBROUTINE PDAF_seik_analysis_trans(step, dim_p, dim_obs_p, dim_ens, rank, & CALL PDAF_timeit(34, 'new') IF (type_sqrt == 1) THEN ! A = (Omega C^(-1)) by solving Ct A = OmegaT for A - CALL trtrsTYPE('l', 't', 'n', rank, dim_ens, & + CALL trtrsTYPE('L', 'T', 'N', rank, dim_ens, & tmp_Uinv, rank, OmegaT, rank, lib_info) ELSE ! TMP_UINV already contains matrix C (no more inversion) diff --git a/src/PDAF_seik_resample.F90 b/src/PDAF_seik_resample.F90 index acf944033..69f30f8fa 100644 --- a/src/PDAF_seik_resample.F90 +++ b/src/PDAF_seik_resample.F90 @@ -299,7 +299,7 @@ SUBROUTINE PDAF_seik_resample(subtype, dim_p, dim_ens, rank, Uinv, & CALL PDAF_timeit(34, 'new') IF (type_sqrt == 1) THEN ! A = (Omega C^(-1)) by solving Ct A = OmegaT for A - CALL trtrsTYPE('l', 't', 'n', rank, dim_ens, & + CALL trtrsTYPE('L', 'T', 'N', rank, dim_ens, & tempUinv, rank, OmegaT, rank, lib_info) ELSE ! TMP_UINV already contains matrix C (no more inversion) diff --git a/src/PDAF_seik_resample_newT.F90 b/src/PDAF_seik_resample_newT.F90 index 25581ae39..a47cbfb91 100644 --- a/src/PDAF_seik_resample_newT.F90 +++ b/src/PDAF_seik_resample_newT.F90 @@ -315,7 +315,7 @@ SUBROUTINE PDAF_seik_resample_newT(subtype, dim_p, dim_ens, rank, & CALL PDAF_timeit(34, 'new') IF (type_sqrt == 1) THEN ! A = (Omega C^(-1)) by solving Ct A = OmegaT for A - CALL trtrsTYPE('l', 't', 'n', rank, dim_ens, & + CALL trtrsTYPE('L', 'T', 'N', rank, dim_ens, & tempUinv, rank, OmegaT, rank, lib_info) ELSE ! TMP_UINV already contains matrix C (no more inversion) From 6bdc44135a52b8bcdf5ced4e860d0491cee87dbe Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Tue, 21 May 2024 11:57:28 +0200 Subject: [PATCH 03/83] Adding external/SANGOMA with module providing quicksort --- external/SANGOMA/SANGOMA_quicksort.F90 | 273 +++++++++++++++++++++++++ src/Makefile | 9 +- 2 files changed, 279 insertions(+), 3 deletions(-) create mode 100644 external/SANGOMA/SANGOMA_quicksort.F90 diff --git a/external/SANGOMA/SANGOMA_quicksort.F90 b/external/SANGOMA/SANGOMA_quicksort.F90 new file mode 100644 index 000000000..885688329 --- /dev/null +++ b/external/SANGOMA/SANGOMA_quicksort.F90 @@ -0,0 +1,273 @@ +module SANGOMA_quicksort + +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! +!!! Time-stamp: <2014-11-19 17:57:23 vetra-carvalho> +!!! +!!! Subsection of subroutines needed for the equivalent weights +!!! particle filter code supplied for SANGOMA project by +!!! Sanita Vetra-Carvalho. +!!! +!!! This code was taken from http://rosettacode.org/wiki/Quicksort#Fortran +!!! and is distributed under GNU Free Documentation License 1.2. +!!! see http://www.gnu.org/licenses/fdl-1.2.html and was modified to also return +!!! sorted index of the original array a. +!!! +!!! Collection of subroutines to sort and return a one-dimensional array +!!! as well as corresponding sorted index of the array a. +!!! Copyright (C) 2014 S. Vetra-Carvalho +!!! +!!! This program is free software: you can redistribute it and/or modify +!!! it under the terms of the GNU General Public License as published by +!!! the Free Software Foundation, either version 3 of the License, or +!!! (at your option) any later version. +!!! +!!! This program is distributed in the hope that it will be useful, +!!! but WITHOUT ANY WARRANTY; without even the implied warranty of +!!! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +!!! GNU General Public License for more details. +!!! +!!! You should have received a copy of the GNU General Public License +!!! along with this program. If not, see . +!!! +!!! Email: s.vetra-carvalho @ reading.ac.uk +!!! Mail: School of Mathematical and Physical Sciences, +!!! University of Reading, +!!! Reading, UK +!!! RG6 6BB +!!! +!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! + +contains + +!> subroutine to sort using the quicksort algorithm +!! @param[in,out] a, an array of doubles to be sorted +!! @param[in] na, dimension of the array a + + recursive subroutine quicksort_d(a,na) + + implicit none + + ! DUMMY ARGUMENTS + integer, intent(in) :: na ! nr or items to sort + real, dimension(nA), intent(inout) :: a ! vector to be sorted + + ! LOCAL VARIABLES + integer :: left, right, mid + real :: pivot, temp + integer :: marker + + if (nA > 1) then + ! insertion sort limit of 47 seems best for sorting 10 million + ! integers on Intel i7-980X CPU. Derived data types that use + ! more memory are optimized with smaller values - around 20 for a 16 + ! -byte type. + if (nA > 47) then + ! Do quicksort for large groups + ! Get median of 1st, mid, & last points for pivot (helps reduce + ! long execution time on some data sets, such as already + ! sorted data, over simple 1st point pivot) + mid = (nA+1)/2 + if (a(mid) >= a(1)) then + if (a(mid) <= a(nA)) then + pivot = a(mid) + else if (a(nA) > a(1)) then + pivot = a(nA) + else + pivot = a(1) + end if + else if (a(1) <= a(nA)) then + pivot = a(1) + else if (a(nA) > a(mid)) then + pivot = a(nA) + else + pivot = a(mid) + end if + + left = 0 + right = nA + 1 + + do while (left < right) + right = right - 1 + do while (A(right) > pivot) + right = right - 1 + end do + left = left + 1 + do while (A(left) < pivot) + left = left + 1 + end do + if (left < right) then + temp = A(left) + A(left) = A(right) + A(right) = temp + end if + end do + + if (left == right) then + marker = left + 1 + else + marker = left + end if + + call quicksort_d(A(:marker-1),marker-1) + call quicksort_d(A(marker:),nA-marker+1) + + else + call InsertionSort_d(A,nA) ! Insertion sort for small groups is faster than Quicksort + end if + end if + + end subroutine quicksort_d + + +!> subroutine to sort using the insertionsort algorithm and return indecies +!! @param[in,out] a, an array of doubles to be sorted +!! @param[in] na, dimension of the array a + subroutine InsertionSort_d(a,na) + + ! DUMMY ARGUMENTS + integer, intent(in) :: na !< nr or items to sort + real, dimension(nA), intent(inout) :: a !< vector to be sorted + + ! LOCAL VARIABLES + real :: temp + integer :: i, j + + do i = 2, nA + j = i - 1 + temp = A(i) + do + if (j == 0) exit + if (a(j) <= temp) exit + A(j+1) = A(j) + j = j - 1 + end do + a(j+1) = temp + end do + + end subroutine InsertionSort_d + +!--------------------------------------------------------------------------- +!> Quicksort for real and index array vectors +!! + recursive subroutine quicksort_idx_d(a,idx_a,na) + + implicit none + + ! DUMMY ARGUMENTS + integer, intent(in) :: na !< nr or items to sort + real, dimension(nA), intent(inout) :: a !< vector to be sorted + integer, dimension(nA), intent(inout) :: idx_a !< sorted indecies of a + + ! LOCAL VARIABLES + integer :: left, right, mid + real :: pivot, temp + integer :: marker, idx_temp + integer :: i ! counter + + + ! If this is the original call of the quicksort_d function + ! assign indecies to the array that we are sorting + if (sum(idx_a) .eq. 0) then + do i = 1,na + idx_a(i) = 1 + end do + end if + + if (nA > 1) then + ! insertion sort limit of 47 seems best for sorting 10 million + ! integers on Intel i7-980X CPU. Derived data types that use + ! more memory are optimized with smaller values - around 20 for a 16 + ! -byte type. + if (nA > 47) then + ! Do quicksort for large groups + ! Get median of 1st, mid, & last points for pivot (helps reduce + ! long execution time on some data sets, such as already + ! sorted data, over simple 1st point pivot) + mid = (nA+1)/2 + if (a(mid) >= a(1)) then + if (a(mid) <= a(nA)) then + pivot = a(mid) + else if (a(nA) > a(1)) then + pivot = a(nA) + else + pivot = a(1) + end if + else if (a(1) <= a(nA)) then + pivot = a(1) + else if (a(nA) > a(mid)) then + pivot = a(nA) + else + pivot = a(mid) + end if + + left = 0 + right = nA + 1 + + do while (left < right) + right = right - 1 + do while (A(right) > pivot) + right = right - 1 + end do + left = left + 1 + do while (A(left) < pivot) + left = left + 1 + end do + if (left < right) then + temp = A(left) + idx_temp = idx_a(left) + A(left) = A(right) + idx_a(left) = idx_a(right) + A(right) = temp + idx_a(right) = idx_temp + end if + end do + + if (left == right) then + marker = left + 1 + else + marker = left + end if + + call quicksort_idx_d(A(:marker-1),idx_A(:marker-1),marker-1) + call quicksort_idx_d(A(marker:),idx_A(marker:),nA-marker+1) + + else + call InsertionSort_idx_d(A,idx_a,nA) ! Insertion sort for small groups is faster than Quicksort + end if + end if + + end subroutine quicksort_idx_d + + +!> subroutine to sort using the insertionsort algorithm and return indecies +!! @param[in,out] a, an array of doubles to be sorted +!! @param[in,out] idx_a, an array of integers of sorted indecies +!! @param[in] na, dimension of the array a + subroutine InsertionSort_idx_d(a,idx_a,na) + + ! DUMMY ARGUMENTS + integer, intent(in) :: na !< nr or items to sort + real, dimension(nA), intent(inout) :: a !< vector to be sorted + integer, dimension(nA), intent(inout) :: idx_a !< sorted indecies of a + + ! LOCAL VARIABLES + real :: temp + integer :: i, j + + do i = 2, nA + j = i - 1 + temp = A(i) + do + if (j == 0) exit + if (a(j) <= temp) exit + A(j+1) = A(j) + idx_a(j+1) = idx_a(j) + j = j - 1 + end do + a(j+1) = temp + idx_a(j+1) = i + end do + + end subroutine InsertionSort_idx_d + +end module SANGOMA_quicksort diff --git a/src/Makefile b/src/Makefile index bc7825fa2..b1fd6ded8 100644 --- a/src/Makefile +++ b/src/Makefile @@ -382,6 +382,8 @@ OBJ_PDAF = $(OBJ_PDAFOMI) $(OBJ_PDAF_GEN) $(OBJ_SEIK) $(OBJ_LSEIK) $(OBJ_SEEK) OBJ_PDAF_VAR = $(OBJ_PDAF) $(OBJ_3DVAR) +OBJ_SANGOMA = ../external/SANGOMA/SANGOMA_quicksort.o + # External optimizer libraries OBJ_OPTIM = ../external/CG+_mpi/cgfam.o ../external/CG+_mpi/cgsearch.o \ ../external/CG+/cgfam.o ../external/CG+/cgsearch.o \ @@ -390,10 +392,10 @@ OBJ_OPTIM = ../external/CG+_mpi/cgfam.o ../external/CG+_mpi/cgsearch.o \ ###################################################### -../lib/libpdaf-d.a: $(MOD_PDAF) $(MOD_INTERFACE) $(OBJ_PDAF) +../lib/libpdaf-d.a: $(MOD_PDAF) $(MOD_INTERFACE) $(OBJ_PDAF) $(OBJ_SANGOMA) @echo "++++++ Generate Filter library ++++++" $(AR) -r $(AR_SPEC) $@ \ - $(MOD_PDAF) $(MOD_INTERFACE) $(OBJ_PDAF) + $(MOD_PDAF) $(MOD_INTERFACE) $(OBJ_PDAF) $(OBJ_SANGOMA) $(RANLIB) ../lib/libpdaf-d.a @cp *.mod ../include @@ -409,7 +411,7 @@ pdaf-var: ../lib/libpdaf-var.a .F90.o : - $(FC) $(OPT) $(MPI_INC) $(CPP_DEFS) -c $*.F90 + $(FC) $(OPT) $(MPI_INC) $(CPP_DEFS) -o $*.o -c $*.F90 .f.o : $(FC) -O3 -o $*.o -c $*.f @@ -426,6 +428,7 @@ pdaf-var: ../lib/libpdaf-var.a clean : rm -f *.o *.mod ../lib/libpdaf-d.a ../lib/libpdaf-var.a ../include/*.mod + cd ../external/SANGOMA; rm -f *.o *.mod; cd - cd ../external/CG+; rm -f *.o; cd - cd ../external/CG+_mpi; rm -f *.o; cd - cd ../external/LBFGS; rm -f *.o; cd - From ee49b9f62c02d33a8879ea99e8bd4c2531252d4c Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Tue, 28 May 2024 17:31:22 +0200 Subject: [PATCH 04/83] Replacing PDAF_diag_crps.F90 with the revised version of Yumeng. It does now suppose MPI-paralleliza tion. There is also one variant in which the MPI-specification is given as arguments in the call. Th e old routine is still available as PDAF_diag_CRPS_nompi. The new routines use SANGOMA_quicksort for more efficient sorting. --- src/Makefile | 3 +- src/PDAF_diag_crps.F90 | 281 ++++++++++++++++++++++++++++++--- src/PDAF_interfaces_module.F90 | 57 +++++++ 3 files changed, 321 insertions(+), 20 deletions(-) diff --git a/src/Makefile b/src/Makefile index b1fd6ded8..e33b07ea2 100644 --- a/src/Makefile +++ b/src/Makefile @@ -382,6 +382,7 @@ OBJ_PDAF = $(OBJ_PDAFOMI) $(OBJ_PDAF_GEN) $(OBJ_SEIK) $(OBJ_LSEIK) $(OBJ_SEEK) OBJ_PDAF_VAR = $(OBJ_PDAF) $(OBJ_3DVAR) +# External Routines for SANGOMA tools OBJ_SANGOMA = ../external/SANGOMA/SANGOMA_quicksort.o # External optimizer libraries @@ -392,7 +393,7 @@ OBJ_OPTIM = ../external/CG+_mpi/cgfam.o ../external/CG+_mpi/cgsearch.o \ ###################################################### -../lib/libpdaf-d.a: $(MOD_PDAF) $(MOD_INTERFACE) $(OBJ_PDAF) $(OBJ_SANGOMA) +../lib/libpdaf-d.a: $(MOD_PDAF) $(OBJ_SANGOMA) $(MOD_INTERFACE) $(OBJ_PDAF) @echo "++++++ Generate Filter library ++++++" $(AR) -r $(AR_SPEC) $@ \ $(MOD_PDAF) $(MOD_INTERFACE) $(OBJ_PDAF) $(OBJ_SANGOMA) diff --git a/src/PDAF_diag_crps.F90 b/src/PDAF_diag_crps.F90 index dffef5493..0398cb85d 100644 --- a/src/PDAF_diag_crps.F90 +++ b/src/PDAF_diag_crps.F90 @@ -1,4 +1,4 @@ -! Copyright (c) 2012-2024 Lars Nerger, lars.nerger@awi.de +! Copyright (c) 2012-2023 Lars Nerger, lars.nerger@awi.de ! ! This routine is free software: you can redistribute it and/or modify ! it under the terms of the GNU Lesser General Public License @@ -19,19 +19,254 @@ !! !! This routine computes the continuous ranked probability !! score (CRPS) and its decomposition into uncertainty and -!! resolution: CRPS = RELI + RESOL. In addition the uncertainty +!! potential CRPS: CRPS = RELI + pot_CRPS. In addition the uncertainty !! is computed. +!! Resolution can be computed by RESOL = UNCERT - pot_CRPS. !! A perfectly reliable system gives RELI=0. -!! An informative system gives RESOL << UNCERT. +!! An informative system gives RESOL ~ UNCERT or pot_CRPS << UNCERT. !! !! The computation follows H. Hersbach, Weather and Forecasting -!! 15(2000) 599-570. Here, RESOL is equivalent to CPRS_pot. +!! 15(2000) 599-570. !! !! __Revision history:__ !! * 2021-05 - Lars Nerger - Initial code based on sangoma_ComputeCRPS !! * Later revisions - see repository log +!! * 2024-04 - Yumeng Chen - refactor; add domain decomposition support !! -SUBROUTINE PDAF_diag_CRPS(dim, dim_ens, element, oens, obs, & + +!--------------------------------------------------------------------------- +!> CRPS diagnostic routine with original interface +!! +SUBROUTINE PDAF_diag_crps(dim_p, dim_ens, element, oens, obs, & + CRPS, reli, pot_CRPS, uncert, status)! +#include "typedefs.h" + + USE mpi + USE PDAF_mod_filtermpi, & + ONLY: COMM_filter, mype_filter, npes_filter + USE SANGOMA_quicksort + + IMPLICIT NONE + + ! *** Arguments *** + INTEGER, INTENT(in) :: dim_p !< PE-local state dimension + INTEGER, INTENT(in) :: dim_ens !< Ensemble size + INTEGER, INTENT(in) :: element !< index of element in full state vector + !< If element=0, mean values over dim_p grid points/cases are computed + REAL, INTENT(in) :: oens(dim_p, dim_ens) !< State ensemble + REAL, INTENT(in) :: obs(dim_p) !< Observation / truth + REAL, INTENT(out) :: CRPS !< CRPS + REAL, INTENT(out) :: reli !< Reliability + REAL, INTENT(out) :: pot_CRPS !< potential CRPS + REAL, INTENT(out) :: uncert !< uncertainty + INTEGER, INTENT(out) :: status !< Status flag (0=success) + + CALL PDAF_diag_crps_mpi(dim_p, dim_ens, element, oens, obs, & + COMM_filter, mype_filter, npes_filter, & + CRPS, reli, pot_CRPS, uncert, status)! + +END SUBROUTINE PDAF_diag_crps + +!--------------------------------------------------------------------------- +!> CRPS diagnostic routine including MPI-settings in interface +!! +SUBROUTINE PDAF_diag_crps_mpi(dim_p, dim_ens, element, oens, obs, & + COMM_filter, mype_filter, npes_filter, & + CRPS, reli, pot_CRPS, uncert, status) +#include "typedefs.h" + + USE mpi + USE SANGOMA_quicksort + + IMPLICIT NONE + + ! *** Arguments *** + INTEGER, INTENT(in) :: dim_p !< PE-local state dimension + INTEGER, INTENT(in) :: dim_ens !< Ensemble size + INTEGER, INTENT(in) :: element !< index of element in full state vector + !< If element=0, mean values over dim_p grid points/cases are computed + INTEGER, INTENT(in) :: COMM_filter !< MPI communicator for filter + INTEGER, INTENT(in) :: mype_filter !< rank of MPI communicator + INTEGER, INTENT(in) :: npes_filter !< size of MPI communicator + REAL, INTENT(in) :: oens(dim_p, dim_ens) !< State ensemble + REAL, INTENT(in) :: obs(dim_p) !< Observation / truth + REAL, INTENT(out) :: CRPS !< CRPS + REAL, INTENT(out) :: reli !< Reliability + REAL, INTENT(out) :: pot_CRPS !< potential CRPS + REAL, INTENT(out) :: uncert !< uncertainty + INTEGER, INTENT(out) :: status !< Status flag (0=success) + + ! *** local variables *** + INTEGER :: i, k ! counter + INTEGER :: istart ! starting index of grid point/case + INTEGER :: imax ! end index of grid point/case + INTEGER :: dim ! dimension of the full state vector + INTEGER :: MPIerr + REAL :: wk ! weight for each grid point/case + REAL :: x_a ! truth / verifying analysis (observation) + REAL :: gi ! The difference between i+1-th ensemble member and i-th member + REAL :: oi + REAL :: o0, one_minus_oN + REAL :: o0_p, one_minus_oN_p + REAL :: pval + INTEGER, ALLOCATABLE :: all_dim_p(:) ! dimensions of the local state vector + INTEGER, ALLOCATABLE :: dis_dim_p(:) ! dimensions of the local state vector + REAL, ALLOCATABLE :: one_case(:) ! ensemble in each case, this is variable x in H. Hersbach (2000) + REAL, ALLOCATABLE :: allobs(:) + REAL, ALLOCATABLE :: alpha_p(:), beta_p(:) + REAL, ALLOCATABLE :: alpha(:), beta(:) + + ! initialise the status flag + status = 0 + + ! initialise crps output + crps = 0.0 + reli = 0.0 + pot_CRPS = 0.0 + uncert = 0.0 + + ! allocate arrays for MPI communication + ALLOCATE( all_dim_p(npes_filter), dis_dim_p(npes_filter) ) + ! gather the dimension of the local state vector to all_dim_p + CALL MPI_Allgather(dim_p, 1, MPI_INTEGER, all_dim_p, 1, MPI_INTEGER, COMM_filter, MPIerr) + ! displacement of the received array used for gatherv + dis_dim_p(1) = 0 + DO i = 2, npes_filter + dis_dim_p(i) = dis_dim_p(i - 1) + all_dim_p(i - 1) + END DO + + ! dimension fo the full state vector + dim = SUM(all_dim_p) + + ! Set number of element over which CPRS is computed + IF (element==0) THEN + istart = 1 + imax = dim_p + ! weight for each grid point/case + wk = 1.0/REAL(dim) + ELSEIF (element<=dim) THEN + ! error handling + IF (element < 0) THEN + status = 100 + WRITE(*, '(a, 5x, a, I4, a)') 'PDAF warning:', & + 'PDAF_diag_crps: element(', element, ') argument must be >= 0.' + RETURN + ENDIF + ! + IF (element <= dis_dim_p(mype_filter + 1) .OR. element > dis_dim_p(mype_filter + 1) + dim_p) THEN + istart = 1 + imax = 0 + ELSE + ! index for + istart = element - dis_dim_p(mype_filter + 1) + imax = istart + wk = 1.0 + END IF + ELSE + istart = 1 + imax = 0 + status = 100 + wk = 1.0 + WRITE(*, '(a, 5x, a, I4, a, I4, a)') 'PDAF warning:', & + 'PDAF_diag_crps: element (', element, ') argument must be <= dim_p (', dim_p, ').' + RETURN + END IF + + ! Calculate uncertainty based on Eq 20 in H. Hersbach (2000) + ! Uncertainty is only meaningful when multiple verifying analysis exists + ! because it is calculated based on the distribution of observations + IF (element == 0) THEN + ALLOCATE( allobs(dim), source=0. ) + ! get observations across PEs + CALL MPI_Allgatherv(obs, dim_p, MPI_REALTYPE, allobs, all_dim_p, dis_dim_p, MPI_REALTYPE, COMM_filter, MPIerr) + CALL quicksort_d(allobs, dim) + pval = 0. + DO k = 1, dim - 1 + pval = pval + wk + uncert = uncert + (allobs(k+1) - allobs(k)) * pval*(1.0-pval) + END DO + DEALLOCATE(allobs) + END IF + + ! allocate arrays for CRPS calculation + ALLOCATE(one_case(dim_ens)) + ALLOCATE(alpha_p(0:dim_ens), source=0.) + ALLOCATE(beta_p(0:dim_ens), source=0.) + + ! initialise values used for summation in the loop + one_minus_oN_p = 0. + o0_p = 0. + + ! Loop over grid points/cases + DO k = istart, imax + ! Get observation for current case + x_a = obs(k) + + ! Get sorted ensemble for current case + DO i = 1, dim_ens + one_case(i) = oens(k, i) + END DO + CALL quicksort_d(one_case, dim_ens) + + ! Outlier cases + IF (x_a < one_case(1)) THEN + ! Case 1: obs < all ensemble members + beta_p(0) = beta_p(0) + wk*(one_case(1) - x_a) + o0_p = o0_p + wk + ELSEIF (x_a > one_case(dim_ens)) THEN + ! Case 2: obs > all ensemble members + alpha_p(dim_ens) = alpha_p(dim_ens) + wk*(x_a - one_case(dim_ens)) + one_minus_oN_p = one_minus_oN_p + wk + END IF + + ! Eq. 29 and Eq. 26 in H. Hersbach (2000) + DO i = 1, dim_ens-1 + alpha_p(i) = alpha_p(i) + wk*MAX( MIN(x_a, one_case(i+1)) - one_case(i), 0.0) + beta_p(i) = beta_p(i) + wk*MAX(one_case(i+1) - MAX(x_a, one_case(i)), 0.0) + END DO + END DO + + ALLOCATE(alpha(0:dim_ens), source=0.) + ALLOCATE(beta(0:dim_ens), source=0.) + ! todo: get full alpha and beta + CALL MPI_Allreduce(alpha_p, alpha, dim_ens, MPI_REALTYPE, MPI_SUM, COMM_filter, MPIerr) + CALL MPI_Allreduce(beta_p, beta, dim_ens, MPI_REALTYPE, MPI_SUM, COMM_filter, MPIerr) + CALL MPI_Allreduce(one_minus_oN_p, one_minus_oN, 1, MPI_REALTYPE, MPI_SUM, COMM_filter, MPIerr) + CALL MPI_Allreduce(o0_p, o0, 1, MPI_REALTYPE, MPI_SUM, COMM_filter, MPIerr) + DEALLOCATE(one_case, alpha_p, beta_p) + + ! Complete computation of CPRS, reliability and potential CPRS + ! modify alpha(0) and beta(dim_ens) to accomodate outliers calculation + ! This is equivalent to Eq. 33 in H. Hersbach (2000) + IF (alpha(0) /= 0.0) alpha(0) = beta(0) * (1.0/o0 - 1.0) + IF (beta(dim_ens) /= 0.0) beta(dim_ens) = alpha(dim_ens) * (1.0/one_minus_oN - 1.0) + + DO i = 0, dim_ens + ! The difference between i+1-th ensemble member and i-th member + gi = alpha(i) + beta(i) + IF (gi /= 0.0) THEN + oi = beta(i) / gi + ELSE + oi = 0.0 + END IF + pval = REAL(i) / REAL(dim_ens) + + crps = crps + alpha(i)*pval*pval + beta(i)*(1.0-pval)*(1.0-pval) + reli = reli + gi * (oi - pval)*(oi - pval) + pot_CRPS = pot_CRPS + gi * oi * (1.0-oi) + END DO + + ! **************** + ! *** Clean up *** + ! **************** + DEALLOCATE(alpha, beta) + +END SUBROUTINE PDAF_diag_crps_mpi + +!-------------------------------------------------------- +!> CRPS routine from PDAF until V2.2.1 without parallelization +!! +SUBROUTINE PDAF_diag_CRPS_nompi(dim, dim_ens, element, oens, obs, & CRPS, reli, resol, uncert, status)! IMPLICIT NONE @@ -60,6 +295,14 @@ SUBROUTINE PDAF_diag_CRPS(dim, dim_ens, element, oens, obs, & REAL, ALLOCATABLE :: c_a(:), c_b(:) +! ****************** +! *** Initialize *** +! ****************** + + ! Initialize status flag + status = 0 + + ! ******************** ! *** Compute CRPS *** ! ******************** @@ -139,7 +382,7 @@ SUBROUTINE PDAF_diag_CRPS(dim, dim_ens, element, oens, obs, & resol = 0.0 oi = 0.0 - DO i = 1, dim_ens + DO i = 0, dim_ens gi = c_a(i) + c_b(i) IF (gi /= 0.0) THEN oi = c_a(i) / gi @@ -168,7 +411,7 @@ SUBROUTINE PDAF_diag_CRPS(dim, dim_ens, element, oens, obs, & DEALLOCATE(oneens, c_a, c_b) -END SUBROUTINE PDAF_diag_CRPS +END SUBROUTINE PDAF_diag_CRPS_nompi !-------------------------------------------------------- @@ -192,24 +435,24 @@ SUBROUTINE PDAF_sisort(n, veca) DO j = 2, n - eflag = .FALSE. + eflag = .FALSE. - tmpa = veca(j) + tmpa = veca(j) - sortloop: DO i = j-1, 1, -1 - k = i + sortloop: DO i = j-1, 1, -1 + k = i - IF(veca(i) <= tmpa) THEN - eflag = .TRUE. - EXIT sortloop - END IF + IF(veca(i) <= tmpa) THEN + eflag = .TRUE. + EXIT sortloop + END IF - veca(i+1) = veca(i) - ENDDO sortloop + veca(i+1) = veca(i) + ENDDO sortloop - IF (.NOT.eflag) k=0 + IF (.NOT.eflag) k=0 - veca(k+1) = tmpa + veca(k+1) = tmpa ENDDO diff --git a/src/PDAF_interfaces_module.F90 b/src/PDAF_interfaces_module.F90 index 6a329a53d..092a2554e 100644 --- a/src/PDAF_interfaces_module.F90 +++ b/src/PDAF_interfaces_module.F90 @@ -1050,6 +1050,63 @@ SUBROUTINE PDAF_diag_effsample(dim_sample, weights, effSample) END SUBROUTINE PDAF_diag_effsample END INTERFACE + INTERFACE + SUBROUTINE PDAF_diag_crps(dim_p, dim_ens, element, oens, obs, & + CRPS, reli, pot_CRPS, uncert, status)! + IMPLICIT NONE + INTEGER, INTENT(in) :: dim_p !< PE-local state dimension + INTEGER, INTENT(in) :: dim_ens !< Ensemble size + INTEGER, INTENT(in) :: element !< index of element in full state vector + !< If element=0, mean values over dim_p grid points/cases are computed + REAL, INTENT(in) :: oens(dim_p, dim_ens) !< State ensemble + REAL, INTENT(in) :: obs(dim_p) !< Observation / truth + REAL, INTENT(out) :: CRPS !< CRPS + REAL, INTENT(out) :: reli !< Reliability + REAL, INTENT(out) :: pot_CRPS !< potential CRPS + REAL, INTENT(out) :: uncert !< uncertainty + INTEGER, INTENT(out) :: status !< Status flag (0=success) + END SUBROUTINE PDAF_diag_crps + END INTERFACE + + INTERFACE + SUBROUTINE PDAF_diag_crps_mpi(dim_p, dim_ens, element, oens, obs, & + COMM_filter, mype_filter, npes_filter, & + CRPS, reli, pot_CRPS, uncert, status) + IMPLICIT NONE + INTEGER, INTENT(in) :: dim_p !< PE-local state dimension + INTEGER, INTENT(in) :: dim_ens !< Ensemble size + INTEGER, INTENT(in) :: element !< index of element in full state vector + !< If element=0, mean values over dim_p grid points/cases are computed + INTEGER, INTENT(in) :: COMM_filter !< MPI communicator for filter + INTEGER, INTENT(in) :: mype_filter !< rank of MPI communicator + INTEGER, INTENT(in) :: npes_filter !< size of MPI communicator + REAL, INTENT(in) :: oens(dim_p, dim_ens) !< State ensemble + REAL, INTENT(in) :: obs(dim_p) !< Observation / truth + REAL, INTENT(out) :: CRPS !< CRPS + REAL, INTENT(out) :: reli !< Reliability + REAL, INTENT(out) :: pot_CRPS !< potential CRPS + REAL, INTENT(out) :: uncert !< uncertainty + INTEGER, INTENT(out) :: status !< Status flag (0=success) + END SUBROUTINE PDAF_diag_crps_mpi + END INTERFACE + + INTERFACE + SUBROUTINE PDAF_diag_CRPS_nompi(dim, dim_ens, element, oens, obs, & + CRPS, reli, resol, uncert, status)! + IMPLICIT NONE + INTEGER, INTENT(in) :: dim !< PE-local state dimension + INTEGER, INTENT(in) :: dim_ens !< Ensemble size + INTEGER, INTENT(in) :: element !< ID of element to be used + !< If element=0, mean values over all elements are computed + REAL, INTENT(in) :: oens(dim, dim_ens) !< State ensemble + REAL, INTENT(in) :: obs(dim) !< State ensemble + REAL, INTENT(out) :: CRPS !< CRPS + REAL, INTENT(out) :: reli !< Reliability + REAL, INTENT(out) :: resol !< resolution + REAL, INTENT(out) :: uncert !< uncertainty + INTEGER, INTENT(out) :: status !< Status flag (0=success) + END SUBROUTINE PDAF_diag_CRPS_nompi + END INTERFACE INTERFACE SUBROUTINE PDAF_gather_obs_f(obs_p, obs_f, status) From 437ff83115e4ef0dfb3bcfd60162e3674d19ab9e Mon Sep 17 00:00:00 2001 From: Armin Corbin Date: Thu, 6 Jun 2024 10:03:06 +0200 Subject: [PATCH 05/83] modernized the makefile --- .gitignore | 6 + Depends | 327 +++++++++++++++++++++++++++++++++ Makefile | 490 +++++++++++++++++++++++++++++++++++++++++++++++++ include/.empty | 0 lib/.empty | 0 mkdepends | 272 +++++++++++++++++++++++++++ src/Makefile | 443 -------------------------------------------- 7 files changed, 1095 insertions(+), 443 deletions(-) create mode 100644 .gitignore create mode 100644 Depends create mode 100644 Makefile delete mode 100644 include/.empty delete mode 100644 lib/.empty create mode 100755 mkdepends delete mode 100644 src/Makefile diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..1a2b97e21 --- /dev/null +++ b/.gitignore @@ -0,0 +1,6 @@ +build +lib +include +external/**/*.mod +external/**/*.o +Srcfiles diff --git a/Depends b/Depends new file mode 100644 index 000000000..18839644a --- /dev/null +++ b/Depends @@ -0,0 +1,327 @@ +$(OBJDIR)/PDAF_3dvar_alloc.o: ./src/PDAF_3dvar_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_3dvar_analysis_cvt.o: ./src/PDAF_3dvar_analysis_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_3dvar_costf_cg_cvt.o: ./src/PDAF_3dvar_costf_cg_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_3dvar_costf_cvt.o: ./src/PDAF_3dvar_costf_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_3dvar_init.o: ./src/PDAF_3dvar_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_3dvar_memtime.o: ./src/PDAF_3dvar_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAF_3dvar_optim_cg.o: ./src/PDAF_3dvar_optim_cg.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_3dvar_optim_cgplus.o: ./src/PDAF_3dvar_optim_cgplus.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_3dvar_optim_lbfgs.o: ./src/PDAF_3dvar_optim_lbfgs.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_3dvar_options.o: ./src/PDAF_3dvar_options.F90 +$(OBJDIR)/PDAF_3dvar_update.o: ./src/PDAF_3dvar_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_add_increment.o: ./src/PDAF_add_increment.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_alloc_filters.o: ./src/PDAF_alloc_filters.F90 +$(OBJDIR)/PDAF_allreduce.o: ./src/PDAF_allreduce.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_analysis_utils.o: ./src/PDAF_analysis_utils.F90 $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_assimilate_3dvar.o: ./src/PDAF_assimilate_3dvar.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_en3dvar_estkf.o: ./src/PDAF_assimilate_en3dvar_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_en3dvar_lestkf.o: ./src/PDAF_assimilate_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_enkf.o: ./src/PDAF_assimilate_enkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_enkf_si.o: ./src/PDAF_assimilate_enkf_si.F90 +$(OBJDIR)/PDAF_assimilate_estkf.o: ./src/PDAF_assimilate_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_estkf_si.o: ./src/PDAF_assimilate_estkf_si.F90 +$(OBJDIR)/PDAF_assimilate_etkf.o: ./src/PDAF_assimilate_etkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_etkf_si.o: ./src/PDAF_assimilate_etkf_si.F90 +$(OBJDIR)/PDAF_assimilate_hyb3dvar_estkf.o: ./src/PDAF_assimilate_hyb3dvar_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_hyb3dvar_lestkf.o: ./src/PDAF_assimilate_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_lenkf.o: ./src/PDAF_assimilate_lenkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_lenkf_si.o: ./src/PDAF_assimilate_lenkf_si.F90 +$(OBJDIR)/PDAF_assimilate_lestkf.o: ./src/PDAF_assimilate_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_lestkf_si.o: ./src/PDAF_assimilate_lestkf_si.F90 +$(OBJDIR)/PDAF_assimilate_letkf.o: ./src/PDAF_assimilate_letkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_letkf_si.o: ./src/PDAF_assimilate_letkf_si.F90 +$(OBJDIR)/PDAF_assimilate_lknetf.o: ./src/PDAF_assimilate_lknetf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_lknetf_si.o: ./src/PDAF_assimilate_lknetf_si.F90 +$(OBJDIR)/PDAF_assimilate_lnetf.o: ./src/PDAF_assimilate_lnetf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_lnetf_si.o: ./src/PDAF_assimilate_lnetf_si.F90 +$(OBJDIR)/PDAF_assimilate_lseik.o: ./src/PDAF_assimilate_lseik.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_lseik_si.o: ./src/PDAF_assimilate_lseik_si.F90 +$(OBJDIR)/PDAF_assimilate_netf.o: ./src/PDAF_assimilate_netf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_netf_si.o: ./src/PDAF_assimilate_netf_si.F90 +$(OBJDIR)/PDAF_assimilate_pf.o: ./src/PDAF_assimilate_pf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_pf_si.o: ./src/PDAF_assimilate_pf_si.F90 +$(OBJDIR)/PDAF_assimilate_prepost.o: ./src/PDAF_assimilate_prepost.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_prepost_si.o: ./src/PDAF_assimilate_prepost_si.F90 +$(OBJDIR)/PDAF_assimilate_seek.o: ./src/PDAF_assimilate_seek.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_seek_si.o: ./src/PDAF_assimilate_seek_si.F90 +$(OBJDIR)/PDAF_assimilate_seik.o: ./src/PDAF_assimilate_seik.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_seik_si.o: ./src/PDAF_assimilate_seik_si.F90 +$(OBJDIR)/PDAF_communicate_ens.o: ./src/PDAF_communicate_ens.F90 $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_deallocate.o: ./src/PDAF_deallocate.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_diag_crps.o: ./src/PDAF_diag_crps.F90 $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/SANGOMA_quicksort.o ./src/typedefs.h +$(OBJDIR)/PDAF_diag_effsample.o: ./src/PDAF_diag_effsample.F90 +$(OBJDIR)/PDAF_diag_ensstats.o: ./src/PDAF_diag_ensstats.F90 ./src/typedefs.h +$(OBJDIR)/PDAF_diag_histogram.o: ./src/PDAF_diag_histogram.F90 ./src/typedefs.h +$(OBJDIR)/PDAF_en3dvar_analysis_cvt.o: ./src/PDAF_en3dvar_analysis_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_en3dvar_costf_cg_cvt.o: ./src/PDAF_en3dvar_costf_cg_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_en3dvar_costf_cvt.o: ./src/PDAF_en3dvar_costf_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_en3dvar_optim_cg.o: ./src/PDAF_en3dvar_optim_cg.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_en3dvar_optim_cgplus.o: ./src/PDAF_en3dvar_optim_cgplus.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_en3dvar_optim_lbfgs.o: ./src/PDAF_en3dvar_optim_lbfgs.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_en3dvar_update_estkf.o: ./src/PDAF_en3dvar_update_estkf.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_en3dvar_update_lestkf.o: ./src/PDAF_en3dvar_update_lestkf.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAF_enkf_Tleft.o: ./src/PDAF_enkf_Tleft.F90 $(OBJDIR)/PDAF_memcount.o +$(OBJDIR)/PDAF_enkf_alloc.o: ./src/PDAF_enkf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_enkf_analysis_rlm.o: ./src/PDAF_enkf_analysis_rlm.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h +$(OBJDIR)/PDAF_enkf_analysis_rsm.o: ./src/PDAF_enkf_analysis_rsm.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h +$(OBJDIR)/PDAF_enkf_gather_resid.o: ./src/PDAF_enkf_gather_resid.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_enkf_init.o: ./src/PDAF_enkf_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_enkf_memtime.o: ./src/PDAF_enkf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAF_enkf_obs_ensemble.o: ./src/PDAF_enkf_obs_ensemble.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_enkf_omega.o: ./src/PDAF_enkf_omega.F90 ./src/typedefs.h +$(OBJDIR)/PDAF_enkf_options.o: ./src/PDAF_enkf_options.F90 +$(OBJDIR)/PDAF_enkf_update.o: ./src/PDAF_enkf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_eofcovar.o: ./src/PDAF_eofcovar.F90 $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_estkf_AOmega.o: ./src/PDAF_estkf_AOmega.F90 $(OBJDIR)/PDAF_memcount.o +$(OBJDIR)/PDAF_estkf_OmegaA.o: ./src/PDAF_estkf_OmegaA.F90 $(OBJDIR)/PDAF_memcount.o +$(OBJDIR)/PDAF_estkf_alloc.o: ./src/PDAF_estkf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_estkf_analysis.o: ./src/PDAF_estkf_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_estkf_analysis_fixed.o: ./src/PDAF_estkf_analysis_fixed.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_estkf_init.o: ./src/PDAF_estkf_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_estkf_memtime.o: ./src/PDAF_estkf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAF_estkf_options.o: ./src/PDAF_estkf_options.F90 +$(OBJDIR)/PDAF_estkf_update.o: ./src/PDAF_estkf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_etkf_Tleft.o: ./src/PDAF_etkf_Tleft.F90 $(OBJDIR)/PDAF_memcount.o +$(OBJDIR)/PDAF_etkf_Tright.o: ./src/PDAF_etkf_Tright.F90 $(OBJDIR)/PDAF_memcount.o +$(OBJDIR)/PDAF_etkf_alloc.o: ./src/PDAF_etkf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_etkf_analysis.o: ./src/PDAF_etkf_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_etkf_analysis_T.o: ./src/PDAF_etkf_analysis_T.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_etkf_analysis_fixed.o: ./src/PDAF_etkf_analysis_fixed.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_etkf_init.o: ./src/PDAF_etkf_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_etkf_memtime.o: ./src/PDAF_etkf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAF_etkf_options.o: ./src/PDAF_etkf_options.F90 +$(OBJDIR)/PDAF_etkf_update.o: ./src/PDAF_etkf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_force_analysis.o: ./src/PDAF_force_analysis.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_gather_dim_obs_f.o: ./src/PDAF_gather_dim_obs_f.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_gather_obs_f.o: ./src/PDAF_gather_obs_f.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_gather_obs_f2.o: ./src/PDAF_gather_obs_f2.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_gather_obs_f2_flex.o: ./src/PDAF_gather_obs_f2_flex.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_gather_obs_f_flex.o: ./src/PDAF_gather_obs_f_flex.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_gen_obs.o: ./src/PDAF_gen_obs.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_generate_obs.o: ./src/PDAF_generate_obs.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_generate_obs_si.o: ./src/PDAF_generate_obs_si.F90 +$(OBJDIR)/PDAF_generate_rndmat.o: ./src/PDAF_generate_rndmat.F90 ./src/typedefs.h +$(OBJDIR)/PDAF_genobs_alloc.o: ./src/PDAF_genobs_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_genobs_init.o: ./src/PDAF_genobs_init.F90 +$(OBJDIR)/PDAF_genobs_options.o: ./src/PDAF_genobs_options.F90 +$(OBJDIR)/PDAF_get_assim_flag.o: ./src/PDAF_get_assim_flag.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_get_ensstats.o: ./src/PDAF_get_ensstats.F90 $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_get_globalobs.o: ./src/PDAF_get_globalobs.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_get_localfilter.o: ./src/PDAF_get_localfilter.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_get_memberid.o: ./src/PDAF_get_memberid.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_get_obsmemberid.o: ./src/PDAF_get_obsmemberid.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_get_smootherens.o: ./src/PDAF_get_smootherens.F90 $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_get_state.o: ./src/PDAF_get_state.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_get_state_si.o: ./src/PDAF_get_state_si.F90 +$(OBJDIR)/PDAF_hyb3dvar_analysis_cvt.o: ./src/PDAF_hyb3dvar_analysis_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_hyb3dvar_costf_cg_cvt.o: ./src/PDAF_hyb3dvar_costf_cg_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_hyb3dvar_costf_cvt.o: ./src/PDAF_hyb3dvar_costf_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_hyb3dvar_optim_cg.o: ./src/PDAF_hyb3dvar_optim_cg.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_hyb3dvar_optim_cgplus.o: ./src/PDAF_hyb3dvar_optim_cgplus.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_hyb3dvar_optim_lbfgs.o: ./src/PDAF_hyb3dvar_optim_lbfgs.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_hyb3dvar_update_estkf.o: ./src/PDAF_hyb3dvar_update_estkf.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_hyb3dvar_update_lestkf.o: ./src/PDAF_hyb3dvar_update_lestkf.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAF_incremental.o: ./src/PDAF_incremental.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_incremental_si.o: ./src/PDAF_incremental_si.F90 +$(OBJDIR)/PDAF_inflate_ens.o: ./src/PDAF_inflate_ens.F90 $(OBJDIR)/PDAF_memcount.o +$(OBJDIR)/PDAF_inflate_weights.o: ./src/PDAF_inflate_weights.F90 +$(OBJDIR)/PDAF_init.o: ./src/PDAF_init.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_init_filters.o: ./src/PDAF_init_filters.F90 $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_init_si.o: ./src/PDAF_init_si.F90 +$(OBJDIR)/PDAF_interfaces_module.o: ./src/PDAF_interfaces_module.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_lenkf_alloc.o: ./src/PDAF_lenkf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_lenkf_analysis_rsm.o: ./src/PDAF_lenkf_analysis_rsm.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h +$(OBJDIR)/PDAF_lenkf_init.o: ./src/PDAF_lenkf_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_lenkf_memtime.o: ./src/PDAF_lenkf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAF_lenkf_options.o: ./src/PDAF_lenkf_options.F90 +$(OBJDIR)/PDAF_lenkf_update.o: ./src/PDAF_lenkf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_lestkf_alloc.o: ./src/PDAF_lestkf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_lestkf_analysis.o: ./src/PDAF_lestkf_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_lestkf_analysis_fixed.o: ./src/PDAF_lestkf_analysis_fixed.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_lestkf_init.o: ./src/PDAF_lestkf_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_lestkf_memtime.o: ./src/PDAF_lestkf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAF_lestkf_options.o: ./src/PDAF_lestkf_options.F90 +$(OBJDIR)/PDAF_lestkf_update.o: ./src/PDAF_lestkf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_analysis_utils.o +$(OBJDIR)/PDAF_letkf_alloc.o: ./src/PDAF_letkf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_letkf_analysis.o: ./src/PDAF_letkf_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_letkf_analysis_T.o: ./src/PDAF_letkf_analysis_T.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_letkf_analysis_fixed.o: ./src/PDAF_letkf_analysis_fixed.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_letkf_init.o: ./src/PDAF_letkf_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_letkf_memtime.o: ./src/PDAF_letkf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAF_letkf_options.o: ./src/PDAF_letkf_options.F90 +$(OBJDIR)/PDAF_letkf_update.o: ./src/PDAF_letkf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_analysis_utils.o +$(OBJDIR)/PDAF_lknetf_alloc.o: ./src/PDAF_lknetf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_lknetf_alpha_neff.o: ./src/PDAF_lknetf_alpha_neff.F90 +$(OBJDIR)/PDAF_lknetf_ana_letkfT.o: ./src/PDAF_lknetf_ana_letkfT.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_lknetf_ana_lnetf.o: ./src/PDAF_lknetf_ana_lnetf.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_lknetf_analysis_T.o: ./src/PDAF_lknetf_analysis_T.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_lknetf_compute_gamma.o: ./src/PDAF_lknetf_compute_gamma.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_lknetf_init.o: ./src/PDAF_lknetf_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_lknetf_memtime.o: ./src/PDAF_lknetf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAF_lknetf_options.o: ./src/PDAF_lknetf_options.F90 +$(OBJDIR)/PDAF_lknetf_reset_gamma.o: ./src/PDAF_lknetf_reset_gamma.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_lknetf_set_gamma.o: ./src/PDAF_lknetf_set_gamma.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_lknetf_step_update.o: ./src/PDAF_lknetf_step_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h +$(OBJDIR)/PDAF_lknetf_update.o: ./src/PDAF_lknetf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h +$(OBJDIR)/PDAF_lnetf_alloc.o: ./src/PDAF_lnetf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_lnetf_analysis.o: ./src/PDAF_lnetf_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_lnetf_init.o: ./src/PDAF_lnetf_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_lnetf_memtime.o: ./src/PDAF_lnetf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAF_lnetf_options.o: ./src/PDAF_lnetf_options.F90 +$(OBJDIR)/PDAF_lnetf_smootherT.o: ./src/PDAF_lnetf_smootherT.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_lnetf_update.o: ./src/PDAF_lnetf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h +$(OBJDIR)/PDAF_local_weight.o: ./src/PDAF_local_weight.F90 +$(OBJDIR)/PDAF_local_weights.o: ./src/PDAF_local_weights.F90 +$(OBJDIR)/PDAF_lseik_alloc.o: ./src/PDAF_lseik_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_lseik_analysis.o: ./src/PDAF_lseik_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_lseik_analysis_trans.o: ./src/PDAF_lseik_analysis_trans.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_lseik_init.o: ./src/PDAF_lseik_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_lseik_memtime.o: ./src/PDAF_lseik_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAF_lseik_options.o: ./src/PDAF_lseik_options.F90 +$(OBJDIR)/PDAF_lseik_resample.o: ./src/PDAF_lseik_resample.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_lseik_update.o: ./src/PDAF_lseik_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_analysis_utils.o +$(OBJDIR)/PDAF_memcount.o: ./src/PDAF_memcount.F90 ./src/typedefs.h +$(OBJDIR)/PDAF_mod_filter.o: ./src/PDAF_mod_filter.F90 +$(OBJDIR)/PDAF_mod_filtermpi.o: ./src/PDAF_mod_filtermpi.F90 +$(OBJDIR)/PDAF_mod_lnetf.o: ./src/PDAF_mod_lnetf.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_mvnormalize.o: ./src/PDAF_mvnormalize.F90 ./src/typedefs.h +$(OBJDIR)/PDAF_netf_alloc.o: ./src/PDAF_netf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_netf_analysis.o: ./src/PDAF_netf_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h +$(OBJDIR)/PDAF_netf_init.o: ./src/PDAF_netf_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_netf_memtime.o: ./src/PDAF_netf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAF_netf_options.o: ./src/PDAF_netf_options.F90 +$(OBJDIR)/PDAF_netf_smootherT.o: ./src/PDAF_netf_smootherT.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_netf_update.o: ./src/PDAF_netf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_options_filters.o: ./src/PDAF_options_filters.F90 $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_pf_add_noise.o: ./src/PDAF_pf_add_noise.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_pf_alloc.o: ./src/PDAF_pf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_pf_analysis.o: ./src/PDAF_pf_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h +$(OBJDIR)/PDAF_pf_init.o: ./src/PDAF_pf_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_pf_memtime.o: ./src/PDAF_pf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAF_pf_options.o: ./src/PDAF_pf_options.F90 +$(OBJDIR)/PDAF_pf_resampling.o: ./src/PDAF_pf_resampling.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_pf_update.o: ./src/PDAF_pf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_prepost.o: ./src/PDAF_prepost.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_prepost_si.o: ./src/PDAF_prepost_si.F90 +$(OBJDIR)/PDAF_print_info.o: ./src/PDAF_print_info.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_print_version.o: ./src/PDAF_print_version.F90 $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_3dvar.o: ./src/PDAF_put_state_3dvar.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_en3dvar_estkf.o: ./src/PDAF_put_state_en3dvar_estkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_en3dvar_lestkf.o: ./src/PDAF_put_state_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_enkf.o: ./src/PDAF_put_state_enkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_enkf_si.o: ./src/PDAF_put_state_enkf_si.F90 +$(OBJDIR)/PDAF_put_state_estkf.o: ./src/PDAF_put_state_estkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_estkf_si.o: ./src/PDAF_put_state_estkf_si.F90 +$(OBJDIR)/PDAF_put_state_etkf.o: ./src/PDAF_put_state_etkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_etkf_si.o: ./src/PDAF_put_state_etkf_si.F90 +$(OBJDIR)/PDAF_put_state_generate_obs.o: ./src/PDAF_put_state_generate_obs.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_generate_obs_si.o: ./src/PDAF_put_state_generate_obs_si.F90 +$(OBJDIR)/PDAF_put_state_hyb3dvar_estkf.o: ./src/PDAF_put_state_hyb3dvar_estkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_hyb3dvar_lestkf.o: ./src/PDAF_put_state_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_lenkf.o: ./src/PDAF_put_state_lenkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_lenkf_si.o: ./src/PDAF_put_state_lenkf_si.F90 +$(OBJDIR)/PDAF_put_state_lestkf.o: ./src/PDAF_put_state_lestkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_lestkf_si.o: ./src/PDAF_put_state_lestkf_si.F90 +$(OBJDIR)/PDAF_put_state_letkf.o: ./src/PDAF_put_state_letkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_letkf_si.o: ./src/PDAF_put_state_letkf_si.F90 +$(OBJDIR)/PDAF_put_state_lknetf.o: ./src/PDAF_put_state_lknetf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_lknetf_si.o: ./src/PDAF_put_state_lknetf_si.F90 +$(OBJDIR)/PDAF_put_state_lnetf.o: ./src/PDAF_put_state_lnetf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_lnetf_si.o: ./src/PDAF_put_state_lnetf_si.F90 +$(OBJDIR)/PDAF_put_state_lseik.o: ./src/PDAF_put_state_lseik.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_lseik_si.o: ./src/PDAF_put_state_lseik_si.F90 +$(OBJDIR)/PDAF_put_state_netf.o: ./src/PDAF_put_state_netf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_netf_si.o: ./src/PDAF_put_state_netf_si.F90 +$(OBJDIR)/PDAF_put_state_pf.o: ./src/PDAF_put_state_pf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_pf_si.o: ./src/PDAF_put_state_pf_si.F90 +$(OBJDIR)/PDAF_put_state_prepost.o: ./src/PDAF_put_state_prepost.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_prepost_si.o: ./src/PDAF_put_state_prepost_si.F90 +$(OBJDIR)/PDAF_put_state_seek.o: ./src/PDAF_put_state_seek.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_put_state_seek_si.o: ./src/PDAF_put_state_seek_si.F90 +$(OBJDIR)/PDAF_put_state_seik.o: ./src/PDAF_put_state_seik.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_seik_si.o: ./src/PDAF_put_state_seik_si.F90 +$(OBJDIR)/PDAF_reset_dim_p.o: ./src/PDAF_reset_dim_p.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_reset_forget.o: ./src/PDAF_reset_forget.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_sampleens.o: ./src/PDAF_sampleens.F90 $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_seek_alloc.o: ./src/PDAF_seek_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_seek_analysis.o: ./src/PDAF_seek_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_seek_init.o: ./src/PDAF_seek_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_seek_memtime.o: ./src/PDAF_seek_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_seek_options.o: ./src/PDAF_seek_options.F90 +$(OBJDIR)/PDAF_seek_rediag.o: ./src/PDAF_seek_rediag.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_seek_update.o: ./src/PDAF_seek_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_seik_TtimesA.o: ./src/PDAF_seik_TtimesA.F90 $(OBJDIR)/PDAF_memcount.o +$(OBJDIR)/PDAF_seik_alloc.o: ./src/PDAF_seik_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_seik_analysis.o: ./src/PDAF_seik_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_seik_analysis_newT.o: ./src/PDAF_seik_analysis_newT.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_seik_analysis_trans.o: ./src/PDAF_seik_analysis_trans.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_seik_init.o: ./src/PDAF_seik_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_seik_matrixT.o: ./src/PDAF_seik_matrixT.F90 $(OBJDIR)/PDAF_memcount.o +$(OBJDIR)/PDAF_seik_memtime.o: ./src/PDAF_seik_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAF_seik_omega.o: ./src/PDAF_seik_omega.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_seik_options.o: ./src/PDAF_seik_options.F90 +$(OBJDIR)/PDAF_seik_resample.o: ./src/PDAF_seik_resample.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_seik_resample_newT.o: ./src/PDAF_seik_resample_newT.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_seik_uinv.o: ./src/PDAF_seik_uinv.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_seik_update.o: ./src/PDAF_seik_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_set_comm_pdaf.o: ./src/PDAF_set_comm_pdaf.F90 $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_set_debug_flag.o: ./src/PDAF_set_debug_flag.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_set_ens_pointer.o: ./src/PDAF_set_ens_pointer.F90 $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_set_forget.o: ./src/PDAF_set_forget.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_set_forget_local.o: ./src/PDAF_set_forget_local.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_set_memberid.o: ./src/PDAF_set_memberid.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_set_offline_mode.o: ./src/PDAF_set_offline_mode.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_set_smootherens.o: ./src/PDAF_set_smootherens.F90 $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_smoother.o: ./src/PDAF_smoother.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_smoother_enkf.o: ./src/PDAF_smoother_enkf.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_smoother_lnetf.o: ./src/PDAF_smoother_lnetf.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_smoother_local.o: ./src/PDAF_smoother_local.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_smoother_netf.o: ./src/PDAF_smoother_netf.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_smoother_shift.o: ./src/PDAF_smoother_shift.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_timer.o: ./src/PDAF_timer.F90 +$(OBJDIR)/PDAF_timer_mpi.o: ./src/PDAF_timer_mpi.F90 +$(OBJDIR)/PDAFomi.o: ./src/PDAFomi.F90 $(OBJDIR)/PDAFomi_obs_f.o $(OBJDIR)/PDAFomi_obs_l.o $(OBJDIR)/PDAFomi_obs_op.o +$(OBJDIR)/PDAFomi_assimilate_3dvar.o: ./src/PDAFomi_assimilate_3dvar.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_en3dvar_estkf.o: ./src/PDAFomi_assimilate_en3dvar_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_en3dvar_lestkf.o: ./src/PDAFomi_assimilate_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_global.o: ./src/PDAFomi_assimilate_global.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_global_si.o: ./src/PDAFomi_assimilate_global_si.F90 +$(OBJDIR)/PDAFomi_assimilate_hyb3dvar_estkf.o: ./src/PDAFomi_assimilate_hyb3dvar_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_hyb3dvar_lestkf.o: ./src/PDAFomi_assimilate_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_lenkf.o: ./src/PDAFomi_assimilate_lenkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_lenkf_si.o: ./src/PDAFomi_assimilate_lenkf_si.F90 +$(OBJDIR)/PDAFomi_assimilate_local.o: ./src/PDAFomi_assimilate_local.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_local_si.o: ./src/PDAFomi_assimilate_local_si.F90 +$(OBJDIR)/PDAFomi_callback.o: ./src/PDAFomi_callback.F90 $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAFomi_generate_obs.o: ./src/PDAFomi_generate_obs.F90 $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_obs_f.o: ./src/PDAFomi_obs_f.F90 $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAFomi_obs_l.o: ./src/PDAFomi_obs_l.F90 $(OBJDIR)/PDAFomi_obs_f.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAFomi_obs_op.o: ./src/PDAFomi_obs_op.F90 $(OBJDIR)/PDAFomi_obs_f.o +$(OBJDIR)/PDAFomi_put_state_3dvar.o: ./src/PDAFomi_put_state_3dvar.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_en3dvar_estkf.o: ./src/PDAFomi_put_state_en3dvar_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_en3dvar_lestkf.o: ./src/PDAFomi_put_state_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_generate_obs.o: ./src/PDAFomi_put_state_generate_obs.F90 $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_global.o: ./src/PDAFomi_put_state_global.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_global_si.o: ./src/PDAFomi_put_state_global_si.F90 +$(OBJDIR)/PDAFomi_put_state_hyb3dvar_estkf.o: ./src/PDAFomi_put_state_hyb3dvar_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_hyb3dvar_lestkf.o: ./src/PDAFomi_put_state_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_lenkf.o: ./src/PDAFomi_put_state_lenkf.F90 $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_lenkf_si.o: ./src/PDAFomi_put_state_lenkf_si.F90 +$(OBJDIR)/PDAFomi_put_state_local.o: ./src/PDAFomi_put_state_local.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_local_si.o: ./src/PDAFomi_put_state_local_si.F90 +$(OBJDIR)/SANGOMA_quicksort.o: ./external/SANGOMA/SANGOMA_quicksort.F90 +$(OBJDIR)/blas.o: ./external/CG+/blas.f +$(OBJDIR)/cgfam.o: ./external/CG+/cgfam.f +$(OBJDIR)/cgsearch.o: ./external/CG+/cgsearch.f +$(OBJDIR)/driver1.o: ./external/LBFGS/driver1.f +$(OBJDIR)/driver1.o: ./external/LBFGS/driver1.f90 +$(OBJDIR)/driver2.o: ./external/LBFGS/driver2.f +$(OBJDIR)/driver2.o: ./external/LBFGS/driver2.f90 +$(OBJDIR)/driver3.o: ./external/LBFGS/driver3.f +$(OBJDIR)/driver3.o: ./external/LBFGS/driver3.f90 +$(OBJDIR)/fcn.o: ./external/CG+/fcn.f +$(OBJDIR)/lbfgsb.o: ./external/LBFGS/lbfgsb.f +$(OBJDIR)/linpack.o: ./external/LBFGS/linpack.f +$(OBJDIR)/main.o: ./external/CG+/main.f +$(OBJDIR)/timer.o: ./external/CG+/timer.f +$(OBJDIR)/typedefs.h: ./src/typedefs.h diff --git a/Makefile b/Makefile new file mode 100644 index 000000000..2f85e52e5 --- /dev/null +++ b/Makefile @@ -0,0 +1,490 @@ +# $Id: Makefile 1856 2017-12-06 08:36:03Z lnerger $ + +####################################################### +# Generic Makefile for to build PDAF library # +# To choose the architecture set $PDAF_ARCH # +# # +# Armin Corbin - University of Bonn # +####################################################### + +####################################################### +# definitions for highlighting outputs +bold := $(shell tput bold) +sgr0 := $(shell tput sgr0) + +####################################################### + +# Include machine-specific definitions +# For available include files see directory make.arch +# To choose a file, set PDAF_ARCH either here or by an +# environment variable. +include ./make.arch/$(PDAF_ARCH).h +$(info $(bold)use machine-specific definitions in $(PDAF_ARCH).h$(sgr0)) + +####################################################### + +OBJDIR:=build +INCDIR:=include +LIBDIR:=lib + +SRCDIR:=src +EXTDIR:=external + +####################################################### +# Define objects for PDAF library +####################################################### + +# Modules used in PDAF +SRC_MOD_PDAF = PDAF_timer.F90 \ + PDAF_memcount.F90 \ + PDAF_mod_filtermpi.F90 \ + PDAF_mod_filter.F90 + +# Module file with interface definitions +SRC_MOD_INTERFACE = PDAF_interfaces_module.F90 + +# Generic routines in PDAF +SRC_PDAF_GEN = PDAF_analysis_utils.F90 \ + PDAF_init.F90 \ + PDAF_init_si.F90 \ + PDAF_init_filters.F90 \ + PDAF_alloc_filters.F90 \ + PDAF_print_info.F90 \ + PDAF_print_version.F90 \ + PDAF_communicate_ens.F90 \ + PDAF_set_comm_pdaf.F90 \ + PDAF_options_filters.F90 \ + PDAF_get_state.F90 \ + PDAF_get_state_si.F90 \ + PDAF_incremental.F90 \ + PDAF_incremental_si.F90 \ + PDAF_set_forget.F90 \ + PDAF_set_forget_local.F90 \ + PDAF_add_increment.F90 \ + PDAF_generate_rndmat.F90 \ + PDAF_local_weights.F90 \ + PDAF_local_weight.F90 \ + PDAF_force_analysis.F90 \ + PDAF_set_memberid.F90 \ + PDAF_get_memberid.F90 \ + PDAF_get_obsmemberid.F90 \ + PDAF_smoother_shift.F90 \ + PDAF_smoother.F90 \ + PDAF_smoother_local.F90 \ + PDAF_set_smootherens.F90 \ + PDAF_get_smootherens.F90 \ + PDAF_set_ens_pointer.F90 \ + PDAF_put_state_prepost.F90 \ + PDAF_put_state_prepost_si.F90 \ + PDAF_assimilate_prepost.F90 \ + PDAF_assimilate_prepost_si.F90 \ + PDAF_prepost.F90 \ + PDAF_prepost_si.F90 \ + PDAF_inflate_ens.F90 \ + PDAF_sampleens.F90 \ + PDAF_mvnormalize.F90 \ + PDAF_eofcovar.F90 \ + PDAF_diag_histogram.F90 \ + PDAF_diag_ensstats.F90 \ + PDAF_diag_effsample.F90 \ + PDAF_diag_crps.F90 \ + PDAF_gather_dim_obs_f.F90 \ + PDAF_gather_obs_f.F90 \ + PDAF_gather_obs_f2.F90 \ + PDAF_gather_obs_f_flex.F90 \ + PDAF_gather_obs_f2_flex.F90 \ + PDAF_allreduce.F90 \ + PDAF_deallocate.F90 \ + PDAF_get_assim_flag.F90 \ + PDAF_get_localfilter.F90 \ + PDAF_get_globalobs.F90 \ + PDAF_inflate_weights.F90 \ + PDAFomi_put_state_global.F90 \ + PDAFomi_put_state_global_si.F90 \ + PDAFomi_put_state_local.F90 \ + PDAFomi_put_state_local_si.F90 \ + PDAFomi_assimilate_global.F90 \ + PDAFomi_assimilate_global_si.F90 \ + PDAFomi_assimilate_local.F90 \ + PDAFomi_assimilate_local_si.F90 \ + PDAF_reset_forget.F90 \ + PDAF_get_ensstats.F90 \ + PDAF_set_debug_flag.F90 \ + PDAF_set_offline_mode.F90 + +# Specific PDAF-routines for SEIK +SRC_SEIK = PDAF_seik_init.F90 \ + PDAF_seik_alloc.F90 \ + PDAF_seik_options.F90 \ + PDAF_seik_memtime.F90 \ + PDAF_put_state_seik.F90 \ + PDAF_put_state_seik_si.F90 \ + PDAF_assimilate_seik.F90 \ + PDAF_assimilate_seik_si.F90 \ + PDAF_seik_update.F90 \ + PDAF_seik_analysis.F90 \ + PDAF_seik_resample.F90 \ + PDAF_seik_analysis_newT.F90 \ + PDAF_seik_resample_newT.F90 \ + PDAF_seik_analysis_trans.F90 \ + PDAF_seik_matrixT.F90 \ + PDAF_seik_uinv.F90 \ + PDAF_seik_omega.F90 \ + PDAF_seik_TtimesA.F90 + +# Specific PDAF-routines for local SEIK +SRC_LSEIK = PDAF_lseik_init.F90 \ + PDAF_lseik_alloc.F90 \ + PDAF_lseik_options.F90 \ + PDAF_lseik_memtime.F90 \ + PDAF_put_state_lseik.F90 \ + PDAF_put_state_lseik_si.F90 \ + PDAF_assimilate_lseik.F90 \ + PDAF_assimilate_lseik_si.F90 \ + PDAF_lseik_update.F90 \ + PDAF_lseik_analysis.F90 \ + PDAF_lseik_resample.F90 \ + PDAF_lseik_analysis_trans.F90 + +# Specific PDAF-routines for SEEK +SRC_SEEK = PDAF_seek_init.F90 \ + PDAF_seek_alloc.F90 \ + PDAF_seek_options.F90 \ + PDAF_seek_memtime.F90 \ + PDAF_put_state_seek.F90 \ + PDAF_put_state_seek_si.F90 \ + PDAF_assimilate_seek.F90 \ + PDAF_assimilate_seek_si.F90 \ + PDAF_seek_update.F90 \ + PDAF_seek_analysis.F90 \ + PDAF_seek_rediag.F90 + +# Specific PDAF-routines for EnKF +SRC_ENKF = PDAF_enkf_init.F90 \ + PDAF_enkf_alloc.F90 \ + PDAF_enkf_options.F90 \ + PDAF_enkf_memtime.F90 \ + PDAF_put_state_enkf.F90 \ + PDAF_put_state_enkf_si.F90 \ + PDAF_assimilate_enkf.F90 \ + PDAF_assimilate_enkf_si.F90 \ + PDAF_enkf_update.F90 \ + PDAF_enkf_obs_ensemble.F90 \ + PDAF_enkf_gather_resid.F90 \ + PDAF_enkf_analysis_rlm.F90 \ + PDAF_enkf_analysis_rsm.F90 \ + PDAF_enkf_omega.F90 \ + PDAF_enkf_Tleft.F90 \ + PDAF_smoother_enkf.F90 + +# Specific PDAF-routines for ETKF +SRC_ETKF = PDAF_etkf_init.F90 \ + PDAF_etkf_alloc.F90 \ + PDAF_etkf_options.F90 \ + PDAF_etkf_memtime.F90 \ + PDAF_put_state_etkf.F90 \ + PDAF_put_state_etkf_si.F90 \ + PDAF_assimilate_etkf.F90 \ + PDAF_assimilate_etkf_si.F90 \ + PDAF_etkf_update.F90 \ + PDAF_etkf_analysis.F90 \ + PDAF_etkf_analysis_T.F90 \ + PDAF_etkf_analysis_fixed.F90 \ + PDAF_etkf_Tright.F90 \ + PDAF_etkf_Tleft.F90 + +# Specific PDAF-routines for LETKF +SRC_LETKF = PDAF_letkf_init.F90 \ + PDAF_letkf_alloc.F90 \ + PDAF_letkf_options.F90 \ + PDAF_letkf_memtime.F90 \ + PDAF_put_state_letkf.F90 \ + PDAF_put_state_letkf_si.F90 \ + PDAF_assimilate_letkf.F90 \ + PDAF_assimilate_letkf_si.F90 \ + PDAF_letkf_update.F90 \ + PDAF_letkf_analysis.F90 \ + PDAF_letkf_analysis_T.F90 \ + PDAF_letkf_analysis_fixed.F90 + +# Specific PDAF-routines for ESTKF +SRC_ESTKF = PDAF_estkf_init.F90 \ + PDAF_estkf_alloc.F90 \ + PDAF_estkf_options.F90 \ + PDAF_estkf_memtime.F90 \ + PDAF_put_state_estkf.F90 \ + PDAF_put_state_estkf_si.F90 \ + PDAF_assimilate_estkf.F90 \ + PDAF_assimilate_estkf_si.F90 \ + PDAF_estkf_update.F90 \ + PDAF_estkf_analysis.F90 \ + PDAF_estkf_analysis_fixed.F90 \ + PDAF_estkf_AOmega.F90 \ + PDAF_estkf_OmegaA.F90 + +# Specific PDAF-routines for LESTKF +SRC_LESTKF = PDAF_lestkf_init.F90 \ + PDAF_lestkf_alloc.F90 \ + PDAF_lestkf_options.F90 \ + PDAF_lestkf_memtime.F90 \ + PDAF_put_state_lestkf.F90 \ + PDAF_put_state_lestkf_si.F90 \ + PDAF_assimilate_lestkf.F90 \ + PDAF_assimilate_lestkf_si.F90 \ + PDAF_lestkf_update.F90 \ + PDAF_lestkf_analysis.F90 \ + PDAF_lestkf_analysis_fixed.F90 + +# Specific PDAF-routines for LEnKF +SRC_LENKF = PDAF_lenkf_init.F90 \ + PDAF_lenkf_alloc.F90 \ + PDAF_lenkf_options.F90 \ + PDAF_lenkf_memtime.F90 \ + PDAF_put_state_lenkf.F90 \ + PDAF_put_state_lenkf_si.F90 \ + PDAFomi_put_state_lenkf.F90 \ + PDAFomi_put_state_lenkf_si.F90 \ + PDAF_assimilate_lenkf.F90 \ + PDAF_assimilate_lenkf_si.F90 \ + PDAFomi_assimilate_lenkf.F90 \ + PDAFomi_assimilate_lenkf_si.F90 \ + PDAF_lenkf_update.F90 \ + PDAF_lenkf_analysis_rsm.F90 +# Additional objects used by LEnKF but already specified for EnKF +# PDAF_enkf_gather_resid.F90 +# PDAF_enkf_obs_ensemble.F90 +# PDAF_enkf_omega.F90 +# PDAF_enkf_Tleft.F90 + +# Specific PDAF-routines for NETF +SRC_NETF = PDAF_netf_init.F90 \ + PDAF_netf_alloc.F90 \ + PDAF_netf_options.F90 \ + PDAF_netf_memtime.F90 \ + PDAF_put_state_netf.F90 \ + PDAF_put_state_netf_si.F90 \ + PDAF_assimilate_netf.F90 \ + PDAF_assimilate_netf_si.F90 \ + PDAF_netf_update.F90 \ + PDAF_netf_smootherT.F90 \ + PDAF_netf_analysis.F90 \ + PDAF_smoother_netf.F90 + +# Specific PDAF-routines for LNETF +SRC_LNETF = PDAF_lnetf_init.F90 \ + PDAF_lnetf_alloc.F90 \ + PDAF_lnetf_options.F90 \ + PDAF_lnetf_memtime.F90 \ + PDAF_put_state_lnetf.F90 \ + PDAF_put_state_lnetf_si.F90 \ + PDAF_assimilate_lnetf.F90 \ + PDAF_assimilate_lnetf_si.F90 \ + PDAF_lnetf_update.F90 \ + PDAF_lnetf_analysis.F90 \ + PDAF_lnetf_smootherT.F90 \ + PDAF_smoother_lnetf.F90 + +# Specific PDAF-routines for PF +SRC_PF = PDAF_pf_init.F90 \ + PDAF_pf_alloc.F90 \ + PDAF_pf_options.F90 \ + PDAF_pf_memtime.F90 \ + PDAF_put_state_pf.F90 \ + PDAF_put_state_pf_si.F90 \ + PDAF_assimilate_pf.F90 \ + PDAF_assimilate_pf_si.F90 \ + PDAF_pf_update.F90 \ + PDAF_pf_analysis.F90 \ + PDAF_pf_resampling.F90 \ + PDAF_pf_add_noise.F90 + +# Specific PDAF-routines for LKNETF +SRC_LKNETF = PDAF_lknetf_init.F90 \ + PDAF_lknetf_alloc.F90 \ + PDAF_lknetf_options.F90 \ + PDAF_lknetf_memtime.F90 \ + PDAF_put_state_lknetf.F90 \ + PDAF_put_state_lknetf_si.F90 \ + PDAF_assimilate_lknetf.F90 \ + PDAF_assimilate_lknetf_si.F90 \ + PDAF_lknetf_update.F90 \ + PDAF_lknetf_analysis_T.F90 \ + PDAF_lknetf_step_update.F90 \ + PDAF_lknetf_ana_lnetf.F90 \ + PDAF_lknetf_ana_letkfT.F90 \ + PDAF_lknetf_compute_gamma.F90 \ + PDAF_lknetf_set_gamma.F90 \ + PDAF_lknetf_alpha_neff.F90 \ + PDAF_lknetf_reset_gamma.F90 + +# Specific PDAF-routines for generating observations +SRC_OBSGEN = PDAF_genobs_init.F90 \ + PDAF_genobs_alloc.F90 \ + PDAF_genobs_options.F90 \ + PDAF_put_state_generate_obs.F90 \ + PDAF_put_state_generate_obs_si.F90 \ + PDAFomi_put_state_generate_obs.F90 \ + PDAF_generate_obs.F90 \ + PDAF_generate_obs_si.F90 \ + PDAFomi_generate_obs.F90 \ + PDAF_gen_obs.F90 + +# Specific PDAF-routines for 3DVAR initialization part +SRC_3DVAR_INI = PDAF_3dvar_init.F90 \ + PDAF_3dvar_alloc.F90 \ + PDAF_3dvar_options.F90 \ + PDAF_3dvar_memtime.F90 + +# Specific PDAF-routines for 3DVAR +SRC_3DVAR = PDAF_put_state_3dvar.F90 \ + PDAF_assimilate_3dvar.F90 \ + PDAF_3dvar_update.F90 \ + PDAF_3dvar_analysis_cvt.F90 \ + PDAF_3dvar_optim_lbfgs.F90 \ + PDAF_3dvar_optim_cgplus.F90 \ + PDAF_3dvar_costf_cvt.F90 \ + PDAF_3dvar_costf_cg_cvt.F90 \ + PDAF_3dvar_optim_cg.F90 \ + PDAF_put_state_en3dvar_lestkf.F90 \ + PDAF_assimilate_en3dvar_lestkf.F90 \ + PDAF_en3dvar_update_lestkf.F90 \ + PDAF_put_state_en3dvar_estkf.F90 \ + PDAF_assimilate_en3dvar_estkf.F90 \ + PDAF_en3dvar_update_estkf.F90 \ + PDAF_en3dvar_analysis_cvt.F90 \ + PDAF_en3dvar_optim_lbfgs.F90 \ + PDAF_en3dvar_optim_cgplus.F90 \ + PDAF_en3dvar_optim_cg.F90 \ + PDAF_en3dvar_costf_cvt.F90 \ + PDAF_en3dvar_costf_cg_cvt.F90 \ + PDAF_put_state_hyb3dvar_lestkf.F90 \ + PDAF_assimilate_hyb3dvar_lestkf.F90 \ + PDAF_hyb3dvar_update_lestkf.F90 \ + PDAF_hyb3dvar_analysis_cvt.F90\ + PDAF_put_state_hyb3dvar_estkf.F90 \ + PDAF_assimilate_hyb3dvar_estkf.F90 \ + PDAF_hyb3dvar_update_estkf.F90 \ + PDAF_hyb3dvar_optim_lbfgs.F90 \ + PDAF_hyb3dvar_optim_cgplus.F90 \ + PDAF_hyb3dvar_optim_cg.F90 \ + PDAF_hyb3dvar_costf_cvt.F90 \ + PDAF_hyb3dvar_costf_cg_cvt.F90 \ + PDAFomi_assimilate_3dvar.F90 \ + PDAFomi_assimilate_en3dvar_estkf.F90 \ + PDAFomi_assimilate_en3dvar_lestkf.F90 \ + PDAFomi_assimilate_hyb3dvar_estkf.F90 \ + PDAFomi_assimilate_hyb3dvar_lestkf.F90 \ + PDAFomi_put_state_3dvar.F90 \ + PDAFomi_put_state_en3dvar_estkf.F90 \ + PDAFomi_put_state_en3dvar_lestkf.F90 \ + PDAFomi_put_state_hyb3dvar_estkf.F90 \ + PDAFomi_put_state_hyb3dvar_lestkf.F90 +# Additional file for 3DVar already specified in SRC_3DVAR_ini +# PDAF_3dvar_memtime.F90 + +# Routines for PDAF-OMI +SRC_PDAFOMI = PDAFomi_obs_f.F90 \ + PDAFomi_obs_l.F90 \ + PDAFomi_obs_op.F90 \ + PDAFomi.F90 \ + PDAFomi_callback.F90 + +# collect all PDAF sources +SRC_PDAF = $(SRC_PDAFOMI) $(SRC_PDAF_GEN) $(SRC_SEIK) $(SRC_LSEIK) $(SRC_SEEK) \ + $(SRC_ENKF) $(SRC_ETKF) $(SRC_LETKF) \ + $(SRC_ESTKF) $(SRC_LESTKF) $(SRC_LENKF) $(SRC_NETF) $(SRC_LNETF) \ + $(SRC_LKNETF) $(SRC_PF) $(SRC_OBSGEN) $(SRC_3DVAR_INI) \ + $(OBJ_MOD_PDAF) $(OBJ_MOD_INTERFACE) + +####################################################### +# external sources + +SRC_SANGOMA = $(EXTDIR)/SANGOMA/SANGOMA_quicksort.F90 + +####################################################### +# object files +####################################################### +OBJ_PDAF := $(SRC_PDAF:%.F90=$(OBJDIR)/%.o) + +OBJ_PDAF_VAR = $(SRC_3DVAR:%.F90=$(OBJDIR)/%.o) + +OBJ_SANGOMA = $(OBJDIR)/SANGOMA_quicksort.o + +# External optimizer libraries implicitly build by make +OBJ_OPTIM = $(EXTDIR)/CG+_mpi/cgfam.o $(EXTDIR)/CG+_mpi/cgsearch.o \ + $(EXTDIR)/CG+/cgfam.o $(EXTDIR)/CG+/cgsearch.o \ + $(EXTDIR)/LBFGS/lbfgsb.o $(EXTDIR)/LBFGS/linpack.o \ + $(EXTDIR)/LBFGS/timer.o + +####################################################### +# compiler instructions + +ifeq ($(FC), mpif90) # gfortran +COMPILE.f90 = $(FC) $(OPT) $(MPI_INC) $(CPP_DEFS) -c -o $@ -J $(INCDIR) +else ifeq ($(FC), mpiifort) # intel +COMPILE.f90 = $(FC) $(OPT) $(MPI_INC) $(CPP_DEFS) -c -o $@ -module $(INCDIR) +endif + +####################################################### +.PHONY: all +all: directories libpdaf libpdafvar + +####################################################### + +.PHONY: libpdaf +libpdaf: $(OBJ_PDAF) $(OBJ_SANGOMA) + $(info $(bold)Generate Filter library$(sgr0)) + $(AR) rs $(AR_SPEC) $(LIBDIR)/libpdaf-d.a $(OBJ_PDAF) $(OBJ_SANGOMA) + +.PHONY: libpdafvar +libpdafvar: $(OBJ_PDAF) $(OBJ_PDAF_VAR) $(OBJ_OPTIM) + $(info $(bold)Generate Var Filter library$(sgr0)) + $(AR) rs $(AR_SPEC) $(LIBDIR)/libpdaf-var.a $(OBJ_PDAF) $(OBJ_PDAF_VAR) $(OBJ_OPTIM) + +# use pattern rule to create rules for all object files +$(OBJDIR)/%.o: $(SRCDIR)/%.F90 + $(info $(bold)compile $<$(sgr0)) + $(COMPILE.f90) $< + +# explicite rule for sangoma +$(OBJ_SANGOMA) : $(SRC_SANGOMA) + $(info $(bold)compile external dependency $<$(sgr0)) + $(COMPILE.f90) $< + +####################################################### +MISSINGDIRS:= $(INCDIR) $(OBJDIR) $(LIBDIR) +.PHONY: directories +directories: $(MISSINGDIRS) + +$(MISSINGDIRS): + mkdir -p $@ + +####################################################### +.PHONY: clean +clean : + $(info $(bold)clean PDAF$(sgr0)) + rm -rf $(OBJDIR)/*.o + rm -rf $(INCDIR)/*.mod + rm -rf $(LIBDIR)/libpdaf-d.a + rm -rf $(LIBDIR)/libpdaf-var.a + rm -rf $(EXTDIR)/CG+/*.o + rm -rf $(EXTDIR)/CG+_mpi/*.o + rm -rf $(EXTDIR)/LBFGS/*.o + +.PHONY: veryclean +veryclean: clean + rm -r $(OBJDIR) + rm -r $(INCDIR) + rm -r $(LIBDIR) +####################################################### +.PHONY: listarch +listarch: + @echo Available architecture-specific input files for PDAF_ARCH + @echo --------------------------------------------------------- + @ls -1 ../make.arch | cut -d"." -f1 + +####################################################### +# include file containing dependencies for parallel +# execution of make +# created with ./mkdepends ./src ./external/* '$(OBJDIR)' +include Depends diff --git a/include/.empty b/include/.empty deleted file mode 100644 index e69de29bb..000000000 diff --git a/lib/.empty b/lib/.empty deleted file mode 100644 index e69de29bb..000000000 diff --git a/mkdepends b/mkdepends new file mode 100755 index 000000000..69f2e8442 --- /dev/null +++ b/mkdepends @@ -0,0 +1,272 @@ +#!/usr/bin/perl +use Cwd; +use File::Basename; +# +# This script was found in the NCAR HAO TIE-GCM 2.0 +# +# Make dependencies for gmake. This script outputs the file "Depends", +# which is included in the Makefile. (sub mksrcfiles also outputs local +# file Srcfiles, which is also referred to by Makefile) +# +# AC 06.11.2019: regex is case-insensitive for search of 'use' keyword. +# AC 26.10.2021: last argument is build path +# AC 05.06.2024: ignore case in findmember +# +$date = `date`; chop($date); +$cwd = cwd(); +($prog = $0) =~ s!(.*)/!!; +print STDERR "\n"; +# +my $argc = @ARGV; +for (my $i = 0; $i < $argc-1; $i++) { + $dir = @ARGV[$i]; + push(@file_paths,$dir); +} +$build =@ARGV[$argc-1]; +print "build dir is: $build\n"; +# while (@ARGV) { +# +# $dir = shift(); +# push(@file_paths,$dir); +# } +print "$prog: file_paths = "; foreach $dir (@file_paths) { print "$dir"; } +print "\n"; +# +# Make list of source files (returns src list and makes file ./Srcfiles): +# + %src = &mksrcfiles(@file_paths); +# +# Output file: +# +$outfile_depends = "Depends"; +open(DEPENDS, "> $outfile_depends") or + die "$prog: Can't open output file $outfile_depends\n"; +# +# Get list of all modules declared: +# +%modules = (); +foreach $file (sort keys %src) { + $srcfile = "$src{$file}/$file"; # full path + open(SRCFILE,"< $srcfile") || die "Error opening source file $srcfile\n"; + while () { + if (/^\s*(?i)module (.*)/) { + $modules{$srcfile} .= $1 . ' '; + } + } +# print "modules in srcfile $srcfile:\n $modules{$srcfile}\n"; +} +# +# Build dependencies for each source file: +# +foreach $file (sort keys %src) { + $srcdir = $src{$file}; # directory + $srcfile = "$srcdir/$file"; # full path + $object = "$build/$file"; $object =~ s/\.[fF]$/\.o/; + $object =~ s/\.f90$/\.o/; # for freeform *.f90 source files + $object =~ s/\.F90$/\.o/; # for freeform *.F90 source files that need preprocessor + + undef(@module_deps); # module dependencies for each source file + undef(@include_deps); # include dependencies for each source file + undef(@file_deps); # file dependencies for each source file +# +# Read source file, building list of modules used and files included: +# + open(SRCFILE,"< $srcfile") || die "Error opening source file $srcfile\n"; + while () { +# +# Build list of modules used by this source: + if (/^\s*(?i)use (\w*)/) { + $module = $1; + if ($module =~ /(\w*[^,])[,]/) { $module = $1; } + if (&findmember($module,@module_deps) < 0) { + push(@module_deps,$module); + } + } # use statement +# +# Check for include statements: +# +# Fortran style include statement: + if ( /^\s+include\s+[<"'](.*)[>"']/ ) { + $hdrfile = $1; + $hdrfile = "$src{$hdrfile}/$hdrfile"; + if (&findmember($hdrfile,@include_deps) < 0) { + push(@include_deps,$hdrfile); + } + } +# +# cpp style include statement: + if ( /^#include\s+[<"'](.*)[>"']/ ) { + $hdrfile = $1; + $hdrfile = "$src{$hdrfile}/$hdrfile"; + if (&findmember($hdrfile,@include_deps) < 0) { + push(@include_deps,$hdrfile); + } + } + } # while () + +# print "\nmodule_deps for $srcfile:\n"; +# print " @module_deps\n"; +# +# Find file dependencies: +# + push(@file_deps,$srcfile); # first file dep is its own source file +# +# Add object files containing modules used by the source file: +# + if (@module_deps) { + foreach $module (@module_deps) { + undef($filedep); + foreach $filename (sort keys %src) { + $filepath = "$src{$filename}/$filename"; + @modules_in_src = split(' ',$modules{$filepath}); + if (&findmember($module,@modules_in_src) >= 0) { + $filedep = "$build/$filename"; + $filedep =~ s/\.[fF]$/\.o/; + $filedep =~ s/\.F90$/\.o/; # for freeform *.F90 files + $filedep =~ s/\.f90$/\.o/; # for freeform *.f90 files + push(@file_deps,$filedep); + } + } + if (! $filedep) { +# print STDERR "WARNING: could not find module $module (used by source file $filepath)\n"; + } + } + } # if @module_deps +# print "file_deps for srcfile $srcfile:\n @file_deps\n"; +# +# Add included header files to list of file dependencies: +# + if (@include_deps) { + foreach $hdrfile (@include_deps) { + if (-e $hdrfile) { + push(@file_deps,$hdrfile); + } else { +# print STDERR "WARNING: could not find header file $hdrfile (included by source file $srcfile)\n"; + } + } + } + + close($srcfile); +# +# Remove any "self" (redundant) dependencies, +# (i.e., file.o not a dependency of file.o). +# This avoids circular dependency warnings from the compiler. +# + undef(@deps_final); # final file dependencies for each source file + foreach $dep (@file_deps) { + if ($dep ne $object and basename($dep) ne $object) { + push(@deps_final,$dep); + } + } + +# print "----------------------------------------------------------------\n"; +# print "File = $file\n"; +# print "Path = $srcfile\n"; +# print "Object = $object\n"; +# print "\n"; +# print "Include dependencies = @include_deps\n"; +# print "Module dependencies = @module_deps\n"; +# print "File dependencies = @file_deps\n"; + +# +# Write Depends file: + print DEPENDS "$object: @deps_final\n"; +# print "$object: @deps_final\n"; + +} # each source file + +# print STDERR "$prog: Wrote dependency file $outfile_depends\n"; +# +# Write Srcfiles file: +# foreach $file (sort keys %src) { print SRCFILES "$file\n"; } +# print "$prog: Wrote source list file $outfile_srcs\n"; +# print STDERR "\n"; + +exit; + +#------------------------------------------------------------------------- +sub findmember { +# +# Given a string $member, and a list @list, search for $member in @list +# and if found return index of $member in @list, otherwise return -1: +# +# (Note this routine also in $TGCMROOT/bin/util.pl) +# + local ($member,@list) = @_; + local ($offset); + $offset = 0; + foreach $ele (@list) { + if (lc($ele) eq lc($member)) { + return $offset + } + $offset++; + } + $offset = -1; + return $offset; +} +#------------------------------------------------------------------------- +sub usage { +die < $outfile_srcs") or + die "$prog: Can't open output file $outfile_srcs\n"; +# +# Make list of source files (*.F, *.c, *.F90): +# (header files are not included in SRCFILES) +# + %src = (); + foreach $dir (@paths) { + $nfiles = 0; + @filenames = (glob("$dir/*.[Ffc]"), glob("$dir/*.F90"), glob("$dir/*.f90")); + foreach $filename (@filenames) { + $file = basename($filename); + if ($file =~ /^,/) { + print "$prog: Not using comma-prefixed source file $filename\n"; + } else { + $filename =~ s!.*/!!; # remove part before last slash + if (! $src{$filename}) { + $src{$filename} = "$dir"; # use first occurrence + $nfiles = $nfiles+1; + } + } + } + print STDERR "$prog: Found $nfiles source files in $dir\n"; + } + print STDERR "\n"; + foreach $file (sort keys %src) { print SRCFILES "$file\n"; } + close SRCFILES; +# +# Add list of header files (*.h) to %src for the rest of mkdepends: +# + foreach $dir (@paths) { + $nhdrs = 0; + @hdrnames = glob("$dir/*.h"); + foreach $hdrname (@hdrnames) { + $file = basename($hdrname); + if ($file =~ /^,/) { + print "$prog: Not using comma-prefixed header file $hdrname\n"; + } else { + $hdrname =~ s!.*/!!; # remove part before last slash + if (! $src{$hdrname}) { + $src{$hdrname} = "$dir"; # use first occurrence + $nhdrs = $nhdrs+1; + } + } + } + print STDERR "$prog: Found $nhdrs header files in $dir\n"; + } # foreach $dir (@paths) + print STDERR "\n"; + return %src; +} diff --git a/src/Makefile b/src/Makefile deleted file mode 100644 index e33b07ea2..000000000 --- a/src/Makefile +++ /dev/null @@ -1,443 +0,0 @@ -# $Id: Makefile 1856 2017-12-06 08:36:03Z lnerger $ - -####################################################### -# Generic Makefile for to build PDAF library # -# To choose the architecture set $PDAF_ARCH # -####################################################### - -.SUFFIXES: .F90 .f .o - -###################################################### - -# Include machine-specific definitions -# For available include files see directory make.arch -# To choose a file, set PDAF_ARCH either here or by an -# environment variable. -include ../make.arch/$(PDAF_ARCH).h - - -###################################################### -# Define objects for PDAF library -###################################################### - -# Modules used in PDAF -MOD_PDAF = PDAF_timer_mpi.o \ - PDAF_memcount.o \ - PDAF_mod_filtermpi.o \ - PDAF_mod_filter.o - -# Module file with interface definitions -MOD_INTERFACE = PDAF_interfaces_module.o - -# Generic routines in PDAF -OBJ_PDAF_GEN = PDAF_analysis_utils.o \ - PDAF_init.o \ - PDAF_init_si.o \ - PDAF_init_filters.o \ - PDAF_alloc_filters.o \ - PDAF_print_info.o \ - PDAF_print_version.o \ - PDAF_communicate_ens.o \ - PDAF_set_comm_pdaf.o \ - PDAF_options_filters.o \ - PDAF_get_state.o \ - PDAF_get_state_si.o \ - PDAF_incremental.o \ - PDAF_incremental_si.o \ - PDAF_set_forget.o \ - PDAF_set_forget_local.o \ - PDAF_add_increment.o \ - PDAF_generate_rndmat.o \ - PDAF_local_weights.o \ - PDAF_local_weight.o \ - PDAF_force_analysis.o \ - PDAF_set_memberid.o \ - PDAF_get_memberid.o \ - PDAF_get_obsmemberid.o \ - PDAF_smoother_shift.o \ - PDAF_smoother.o \ - PDAF_smoother_local.o \ - PDAF_set_smootherens.o \ - PDAF_get_smootherens.o \ - PDAF_set_ens_pointer.o \ - PDAF_put_state_prepost.o \ - PDAF_put_state_prepost_si.o \ - PDAF_assimilate_prepost.o \ - PDAF_assimilate_prepost_si.o \ - PDAF_prepost.o \ - PDAF_prepost_si.o \ - PDAF_inflate_ens.o \ - PDAF_sampleens.o \ - PDAF_mvnormalize.o \ - PDAF_eofcovar.o \ - PDAF_diag_histogram.o \ - PDAF_diag_ensstats.o \ - PDAF_diag_effsample.o \ - PDAF_diag_crps.o \ - PDAF_gather_dim_obs_f.o \ - PDAF_gather_obs_f.o \ - PDAF_gather_obs_f2.o \ - PDAF_gather_obs_f_flex.o \ - PDAF_gather_obs_f2_flex.o \ - PDAF_allreduce.o \ - PDAF_deallocate.o \ - PDAF_get_assim_flag.o \ - PDAF_get_localfilter.o \ - PDAF_get_globalobs.o \ - PDAF_inflate_weights.o \ - PDAFomi_put_state_global.o \ - PDAFomi_put_state_global_si.o \ - PDAFomi_put_state_local.o \ - PDAFomi_put_state_local_si.o \ - PDAFomi_assimilate_global.o \ - PDAFomi_assimilate_global_si.o \ - PDAFomi_assimilate_local.o \ - PDAFomi_assimilate_local_si.o \ - PDAF_reset_forget.o \ - PDAF_get_ensstats.o \ - PDAF_set_debug_flag.o \ - PDAF_set_offline_mode.o - -# Specific PDAF-routines for SEIK -OBJ_SEIK = PDAF_seik_init.o \ - PDAF_seik_alloc.o \ - PDAF_seik_options.o \ - PDAF_seik_memtime.o \ - PDAF_put_state_seik.o \ - PDAF_put_state_seik_si.o \ - PDAF_assimilate_seik.o \ - PDAF_assimilate_seik_si.o \ - PDAF_seik_update.o \ - PDAF_seik_analysis.o \ - PDAF_seik_resample.o \ - PDAF_seik_analysis_newT.o \ - PDAF_seik_resample_newT.o \ - PDAF_seik_analysis_trans.o \ - PDAF_seik_matrixT.o \ - PDAF_seik_uinv.o \ - PDAF_seik_omega.o \ - PDAF_seik_TtimesA.o - -# Specific PDAF-routines for local SEIK -OBJ_LSEIK = PDAF_lseik_init.o \ - PDAF_lseik_alloc.o \ - PDAF_lseik_options.o \ - PDAF_lseik_memtime.o \ - PDAF_put_state_lseik.o \ - PDAF_put_state_lseik_si.o \ - PDAF_assimilate_lseik.o \ - PDAF_assimilate_lseik_si.o \ - PDAF_lseik_update.o \ - PDAF_lseik_analysis.o \ - PDAF_lseik_resample.o \ - PDAF_lseik_analysis_trans.o - -# Specific PDAF-routines for SEEK -OBJ_SEEK = PDAF_seek_init.o \ - PDAF_seek_alloc.o \ - PDAF_seek_options.o \ - PDAF_seek_memtime.o \ - PDAF_put_state_seek.o \ - PDAF_put_state_seek_si.o \ - PDAF_assimilate_seek.o \ - PDAF_assimilate_seek_si.o \ - PDAF_seek_update.o \ - PDAF_seek_analysis.o \ - PDAF_seek_rediag.o - -# Specific PDAF-routines for EnKF -OBJ_ENKF = PDAF_enkf_init.o \ - PDAF_enkf_alloc.o \ - PDAF_enkf_options.o \ - PDAF_enkf_memtime.o \ - PDAF_put_state_enkf.o \ - PDAF_put_state_enkf_si.o \ - PDAF_assimilate_enkf.o \ - PDAF_assimilate_enkf_si.o \ - PDAF_enkf_update.o \ - PDAF_enkf_obs_ensemble.o \ - PDAF_enkf_gather_resid.o \ - PDAF_enkf_analysis_rlm.o \ - PDAF_enkf_analysis_rsm.o \ - PDAF_enkf_omega.o \ - PDAF_enkf_Tleft.o \ - PDAF_smoother_enkf.o - -# Specific PDAF-routines for ETKF -OBJ_ETKF = PDAF_etkf_init.o \ - PDAF_etkf_alloc.o \ - PDAF_etkf_options.o \ - PDAF_etkf_memtime.o \ - PDAF_put_state_etkf.o \ - PDAF_put_state_etkf_si.o \ - PDAF_assimilate_etkf.o \ - PDAF_assimilate_etkf_si.o \ - PDAF_etkf_update.o \ - PDAF_etkf_analysis.o \ - PDAF_etkf_analysis_T.o \ - PDAF_etkf_analysis_fixed.o \ - PDAF_etkf_Tright.o \ - PDAF_etkf_Tleft.o - -# Specific PDAF-routines for LETKF -OBJ_LETKF = PDAF_letkf_init.o \ - PDAF_letkf_alloc.o \ - PDAF_letkf_options.o \ - PDAF_letkf_memtime.o \ - PDAF_put_state_letkf.o \ - PDAF_put_state_letkf_si.o \ - PDAF_assimilate_letkf.o \ - PDAF_assimilate_letkf_si.o \ - PDAF_letkf_update.o \ - PDAF_letkf_analysis.o \ - PDAF_letkf_analysis_T.o \ - PDAF_letkf_analysis_fixed.o - -# Specific PDAF-routines for ESTKF -OBJ_ESTKF = PDAF_estkf_init.o \ - PDAF_estkf_alloc.o \ - PDAF_estkf_options.o \ - PDAF_estkf_memtime.o \ - PDAF_put_state_estkf.o \ - PDAF_put_state_estkf_si.o \ - PDAF_assimilate_estkf.o \ - PDAF_assimilate_estkf_si.o \ - PDAF_estkf_update.o \ - PDAF_estkf_analysis.o \ - PDAF_estkf_analysis_fixed.o \ - PDAF_estkf_AOmega.o \ - PDAF_estkf_OmegaA.o - -# Specific PDAF-routines for LESTKF -OBJ_LESTKF = PDAF_lestkf_init.o \ - PDAF_lestkf_alloc.o \ - PDAF_lestkf_options.o \ - PDAF_lestkf_memtime.o \ - PDAF_put_state_lestkf.o \ - PDAF_put_state_lestkf_si.o \ - PDAF_assimilate_lestkf.o \ - PDAF_assimilate_lestkf_si.o \ - PDAF_lestkf_update.o \ - PDAF_lestkf_analysis.o \ - PDAF_lestkf_analysis_fixed.o - -# Specific PDAF-routines for LEnKF -OBJ_LENKF = PDAF_lenkf_init.o \ - PDAF_lenkf_alloc.o \ - PDAF_lenkf_options.o \ - PDAF_lenkf_memtime.o \ - PDAF_put_state_lenkf.o \ - PDAF_put_state_lenkf_si.o \ - PDAFomi_put_state_lenkf.o \ - PDAFomi_put_state_lenkf_si.o \ - PDAF_assimilate_lenkf.o \ - PDAF_assimilate_lenkf_si.o \ - PDAFomi_assimilate_lenkf.o \ - PDAFomi_assimilate_lenkf_si.o \ - PDAF_lenkf_update.o \ - PDAF_lenkf_analysis_rsm.o -# Additional objects used by LEnKF but already specified for EnKF -# PDAF_enkf_gather_resid.o -# PDAF_enkf_obs_ensemble.o -# PDAF_enkf_omega.o -# PDAF_enkf_Tleft.o - -# Specific PDAF-routines for NETF -OBJ_NETF = PDAF_netf_init.o \ - PDAF_netf_alloc.o \ - PDAF_netf_options.o \ - PDAF_netf_memtime.o \ - PDAF_put_state_netf.o \ - PDAF_put_state_netf_si.o \ - PDAF_assimilate_netf.o \ - PDAF_assimilate_netf_si.o \ - PDAF_netf_update.o \ - PDAF_netf_smootherT.o \ - PDAF_netf_analysis.o \ - PDAF_smoother_netf.o - -# Specific PDAF-routines for LNETF -OBJ_LNETF = PDAF_lnetf_init.o \ - PDAF_lnetf_alloc.o \ - PDAF_lnetf_options.o \ - PDAF_lnetf_memtime.o \ - PDAF_put_state_lnetf.o \ - PDAF_put_state_lnetf_si.o \ - PDAF_assimilate_lnetf.o \ - PDAF_assimilate_lnetf_si.o \ - PDAF_lnetf_update.o \ - PDAF_lnetf_analysis.o \ - PDAF_lnetf_smootherT.o \ - PDAF_smoother_lnetf.o - -# Specific PDAF-routines for PF -OBJ_PF = PDAF_pf_init.o \ - PDAF_pf_alloc.o \ - PDAF_pf_options.o \ - PDAF_pf_memtime.o \ - PDAF_put_state_pf.o \ - PDAF_put_state_pf_si.o \ - PDAF_assimilate_pf.o \ - PDAF_assimilate_pf_si.o \ - PDAF_pf_update.o \ - PDAF_pf_analysis.o \ - PDAF_pf_resampling.o \ - PDAF_pf_add_noise.o - -# Specific PDAF-routines for LKNETF -OBJ_LKNETF = PDAF_lknetf_init.o \ - PDAF_lknetf_alloc.o \ - PDAF_lknetf_options.o \ - PDAF_lknetf_memtime.o \ - PDAF_put_state_lknetf.o \ - PDAF_put_state_lknetf_si.o \ - PDAF_assimilate_lknetf.o \ - PDAF_assimilate_lknetf_si.o \ - PDAF_lknetf_update.o \ - PDAF_lknetf_analysis_T.o \ - PDAF_lknetf_step_update.o \ - PDAF_lknetf_ana_lnetf.o \ - PDAF_lknetf_ana_letkfT.o \ - PDAF_lknetf_compute_gamma.o \ - PDAF_lknetf_set_gamma.o \ - PDAF_lknetf_alpha_neff.o \ - PDAF_lknetf_reset_gamma.o - -# Specific PDAF-routines for generating observations -OBJ_OBSGEN = PDAF_genobs_init.o \ - PDAF_genobs_alloc.o \ - PDAF_genobs_options.o \ - PDAF_put_state_generate_obs.o \ - PDAF_put_state_generate_obs_si.o \ - PDAFomi_put_state_generate_obs.o \ - PDAF_generate_obs.o \ - PDAF_generate_obs_si.o \ - PDAFomi_generate_obs.o \ - PDAF_gen_obs.o - -# Specific PDAF-routines for 3DVAR initialization part -OBJ_3DVAR_INI = PDAF_3dvar_init.o \ - PDAF_3dvar_alloc.o \ - PDAF_3dvar_options.o \ - PDAF_3dvar_memtime.o - -# Specific PDAF-routines for 3DVAR -OBJ_3DVAR = PDAF_put_state_3dvar.o \ - PDAF_assimilate_3dvar.o \ - PDAF_3dvar_update.o \ - PDAF_3dvar_analysis_cvt.o \ - PDAF_3dvar_optim_lbfgs.o \ - PDAF_3dvar_optim_cgplus.o \ - PDAF_3dvar_costf_cvt.o \ - PDAF_3dvar_costf_cg_cvt.o \ - PDAF_3dvar_optim_cg.o \ - PDAF_put_state_en3dvar_lestkf.o \ - PDAF_assimilate_en3dvar_lestkf.o \ - PDAF_en3dvar_update_lestkf.o \ - PDAF_put_state_en3dvar_estkf.o \ - PDAF_assimilate_en3dvar_estkf.o \ - PDAF_en3dvar_update_estkf.o \ - PDAF_en3dvar_analysis_cvt.o \ - PDAF_en3dvar_optim_lbfgs.o \ - PDAF_en3dvar_optim_cgplus.o \ - PDAF_en3dvar_optim_cg.o \ - PDAF_en3dvar_costf_cvt.o \ - PDAF_en3dvar_costf_cg_cvt.o \ - PDAF_put_state_hyb3dvar_lestkf.o \ - PDAF_assimilate_hyb3dvar_lestkf.o \ - PDAF_hyb3dvar_update_lestkf.o \ - PDAF_hyb3dvar_analysis_cvt.o\ - PDAF_put_state_hyb3dvar_estkf.o \ - PDAF_assimilate_hyb3dvar_estkf.o \ - PDAF_hyb3dvar_update_estkf.o \ - PDAF_hyb3dvar_optim_lbfgs.o \ - PDAF_hyb3dvar_optim_cgplus.o \ - PDAF_hyb3dvar_optim_cg.o \ - PDAF_hyb3dvar_costf_cvt.o \ - PDAF_hyb3dvar_costf_cg_cvt.o \ - PDAFomi_assimilate_3dvar.o \ - PDAFomi_assimilate_en3dvar_estkf.o \ - PDAFomi_assimilate_en3dvar_lestkf.o \ - PDAFomi_assimilate_hyb3dvar_estkf.o \ - PDAFomi_assimilate_hyb3dvar_lestkf.o \ - PDAFomi_put_state_3dvar.o \ - PDAFomi_put_state_en3dvar_estkf.o \ - PDAFomi_put_state_en3dvar_lestkf.o \ - PDAFomi_put_state_hyb3dvar_estkf.o \ - PDAFomi_put_state_hyb3dvar_lestkf.o -# Additional file for 3DVar already specified in OBJ_3DVAR_ini -# PDAF_3dvar_memtime.o - -# Routines for PDAF-OMI -OBJ_PDAFOMI = PDAFomi_obs_f.o \ - PDAFomi_obs_l.o \ - PDAFomi_obs_op.o \ - PDAFomi.o \ - PDAFomi_callback.o - -OBJ_PDAF = $(OBJ_PDAFOMI) $(OBJ_PDAF_GEN) $(OBJ_SEIK) $(OBJ_LSEIK) $(OBJ_SEEK) \ - $(OBJ_ENKF) $(OBJ_ETKF) $(OBJ_LETKF) \ - $(OBJ_ESTKF) $(OBJ_LESTKF) $(OBJ_LENKF) $(OBJ_NETF) $(OBJ_LNETF) \ - $(OBJ_LKNETF) $(OBJ_PF) $(OBJ_OBSGEN) $(OBJ_3DVAR_INI) - -OBJ_PDAF_VAR = $(OBJ_PDAF) $(OBJ_3DVAR) - -# External Routines for SANGOMA tools -OBJ_SANGOMA = ../external/SANGOMA/SANGOMA_quicksort.o - -# External optimizer libraries -OBJ_OPTIM = ../external/CG+_mpi/cgfam.o ../external/CG+_mpi/cgsearch.o \ - ../external/CG+/cgfam.o ../external/CG+/cgsearch.o \ - ../external/LBFGS/lbfgsb.o ../external/LBFGS/linpack.o \ - ../external/LBFGS/timer.o - -###################################################### - -../lib/libpdaf-d.a: $(MOD_PDAF) $(OBJ_SANGOMA) $(MOD_INTERFACE) $(OBJ_PDAF) - @echo "++++++ Generate Filter library ++++++" - $(AR) -r $(AR_SPEC) $@ \ - $(MOD_PDAF) $(MOD_INTERFACE) $(OBJ_PDAF) $(OBJ_SANGOMA) - $(RANLIB) ../lib/libpdaf-d.a - @cp *.mod ../include - -../lib/libpdaf-var.a: $(MOD_PDAF) $(MOD_INTERFACE) $(OBJ_PDAF_VAR) $(OBJ_OPTIM) - @echo "++++++ Generate Filter library ++++++" - $(AR) -r $(AR_SPEC) $@ \ - $(MOD_PDAF) $(MOD_INTERFACE) $(OBJ_PDAF) $(OBJ_PDAF_VAR) $(OBJ_OPTIM) - $(RANLIB) ../lib/libpdaf-var.a - @cp *.mod ../include - -# Short alias for ../lib/libpdaf-var.a -pdaf-var: ../lib/libpdaf-var.a - - -.F90.o : - $(FC) $(OPT) $(MPI_INC) $(CPP_DEFS) -o $*.o -c $*.F90 - -.f.o : - $(FC) -O3 -o $*.o -c $*.f - -# For older compilers one might need to separate the -# preprocessing from the compilation as defined below: -#.F90.o : -# $(CPP) -P -C $(MPI_INC) $(CPP_DEFS) $*.F90 $*.f90 -# $(FC) $(OPT) $(MPI_INC) -c $*.F90 -# @rm -f $*.f90 - -###################################################### -# Cleans - -clean : - rm -f *.o *.mod ../lib/libpdaf-d.a ../lib/libpdaf-var.a ../include/*.mod - cd ../external/SANGOMA; rm -f *.o *.mod; cd - - cd ../external/CG+; rm -f *.o; cd - - cd ../external/CG+_mpi; rm -f *.o; cd - - cd ../external/LBFGS; rm -f *.o; cd - - -###################################################### -# List arch files - -listarch: - @echo Available architecture-specific input files for PDAF_ARCH - @echo --------------------------------------------------------- - @ls -1 ../make.arch | cut -d"." -f1 From 1072137276e9c8364d037087c48a6447280bff06 Mon Sep 17 00:00:00 2001 From: Armin Corbin Date: Thu, 6 Jun 2024 10:24:40 +0200 Subject: [PATCH 06/83] only create library if dependencies have changed --- Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 2f85e52e5..433f1a139 100644 --- a/Makefile +++ b/Makefile @@ -429,15 +429,18 @@ endif .PHONY: all all: directories libpdaf libpdafvar +.PHONY: libpdaf +libpdaf: $(LIBDIR)/libpdaf-d.a + +.PHONY: libpdafvar +libpdafvar: $(LIBDIR)/libpdaf-var.a ####################################################### -.PHONY: libpdaf -libpdaf: $(OBJ_PDAF) $(OBJ_SANGOMA) +$(LIBDIR)/libpdaf-d.a: $(OBJ_PDAF) $(OBJ_SANGOMA) $(info $(bold)Generate Filter library$(sgr0)) $(AR) rs $(AR_SPEC) $(LIBDIR)/libpdaf-d.a $(OBJ_PDAF) $(OBJ_SANGOMA) -.PHONY: libpdafvar -libpdafvar: $(OBJ_PDAF) $(OBJ_PDAF_VAR) $(OBJ_OPTIM) +$(LIBDIR)/libpdaf-var.a: $(OBJ_PDAF) $(OBJ_PDAF_VAR) $(OBJ_OPTIM) $(info $(bold)Generate Var Filter library$(sgr0)) $(AR) rs $(AR_SPEC) $(LIBDIR)/libpdaf-var.a $(OBJ_PDAF) $(OBJ_PDAF_VAR) $(OBJ_OPTIM) From 462d762201c8eec4cde50e5ab030dedfd3ac89df Mon Sep 17 00:00:00 2001 From: Armin Corbin Date: Thu, 6 Jun 2024 10:44:50 +0200 Subject: [PATCH 07/83] restored original Makefile --- Makefile | 4 +- src/Makefile | 443 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 444 insertions(+), 3 deletions(-) create mode 100644 src/Makefile diff --git a/Makefile b/Makefile index 433f1a139..c0d49b2f5 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ SRCDIR:=src EXTDIR:=external ####################################################### -# Define objects for PDAF library +# List of sources for PDAF library ####################################################### # Modules used in PDAF @@ -396,9 +396,7 @@ SRC_PDAF = $(SRC_PDAFOMI) $(SRC_PDAF_GEN) $(SRC_SEIK) $(SRC_LSEIK) $(SRC_SEEK) $(SRC_LKNETF) $(SRC_PF) $(SRC_OBSGEN) $(SRC_3DVAR_INI) \ $(OBJ_MOD_PDAF) $(OBJ_MOD_INTERFACE) -####################################################### # external sources - SRC_SANGOMA = $(EXTDIR)/SANGOMA/SANGOMA_quicksort.F90 ####################################################### diff --git a/src/Makefile b/src/Makefile new file mode 100644 index 000000000..e33b07ea2 --- /dev/null +++ b/src/Makefile @@ -0,0 +1,443 @@ +# $Id: Makefile 1856 2017-12-06 08:36:03Z lnerger $ + +####################################################### +# Generic Makefile for to build PDAF library # +# To choose the architecture set $PDAF_ARCH # +####################################################### + +.SUFFIXES: .F90 .f .o + +###################################################### + +# Include machine-specific definitions +# For available include files see directory make.arch +# To choose a file, set PDAF_ARCH either here or by an +# environment variable. +include ../make.arch/$(PDAF_ARCH).h + + +###################################################### +# Define objects for PDAF library +###################################################### + +# Modules used in PDAF +MOD_PDAF = PDAF_timer_mpi.o \ + PDAF_memcount.o \ + PDAF_mod_filtermpi.o \ + PDAF_mod_filter.o + +# Module file with interface definitions +MOD_INTERFACE = PDAF_interfaces_module.o + +# Generic routines in PDAF +OBJ_PDAF_GEN = PDAF_analysis_utils.o \ + PDAF_init.o \ + PDAF_init_si.o \ + PDAF_init_filters.o \ + PDAF_alloc_filters.o \ + PDAF_print_info.o \ + PDAF_print_version.o \ + PDAF_communicate_ens.o \ + PDAF_set_comm_pdaf.o \ + PDAF_options_filters.o \ + PDAF_get_state.o \ + PDAF_get_state_si.o \ + PDAF_incremental.o \ + PDAF_incremental_si.o \ + PDAF_set_forget.o \ + PDAF_set_forget_local.o \ + PDAF_add_increment.o \ + PDAF_generate_rndmat.o \ + PDAF_local_weights.o \ + PDAF_local_weight.o \ + PDAF_force_analysis.o \ + PDAF_set_memberid.o \ + PDAF_get_memberid.o \ + PDAF_get_obsmemberid.o \ + PDAF_smoother_shift.o \ + PDAF_smoother.o \ + PDAF_smoother_local.o \ + PDAF_set_smootherens.o \ + PDAF_get_smootherens.o \ + PDAF_set_ens_pointer.o \ + PDAF_put_state_prepost.o \ + PDAF_put_state_prepost_si.o \ + PDAF_assimilate_prepost.o \ + PDAF_assimilate_prepost_si.o \ + PDAF_prepost.o \ + PDAF_prepost_si.o \ + PDAF_inflate_ens.o \ + PDAF_sampleens.o \ + PDAF_mvnormalize.o \ + PDAF_eofcovar.o \ + PDAF_diag_histogram.o \ + PDAF_diag_ensstats.o \ + PDAF_diag_effsample.o \ + PDAF_diag_crps.o \ + PDAF_gather_dim_obs_f.o \ + PDAF_gather_obs_f.o \ + PDAF_gather_obs_f2.o \ + PDAF_gather_obs_f_flex.o \ + PDAF_gather_obs_f2_flex.o \ + PDAF_allreduce.o \ + PDAF_deallocate.o \ + PDAF_get_assim_flag.o \ + PDAF_get_localfilter.o \ + PDAF_get_globalobs.o \ + PDAF_inflate_weights.o \ + PDAFomi_put_state_global.o \ + PDAFomi_put_state_global_si.o \ + PDAFomi_put_state_local.o \ + PDAFomi_put_state_local_si.o \ + PDAFomi_assimilate_global.o \ + PDAFomi_assimilate_global_si.o \ + PDAFomi_assimilate_local.o \ + PDAFomi_assimilate_local_si.o \ + PDAF_reset_forget.o \ + PDAF_get_ensstats.o \ + PDAF_set_debug_flag.o \ + PDAF_set_offline_mode.o + +# Specific PDAF-routines for SEIK +OBJ_SEIK = PDAF_seik_init.o \ + PDAF_seik_alloc.o \ + PDAF_seik_options.o \ + PDAF_seik_memtime.o \ + PDAF_put_state_seik.o \ + PDAF_put_state_seik_si.o \ + PDAF_assimilate_seik.o \ + PDAF_assimilate_seik_si.o \ + PDAF_seik_update.o \ + PDAF_seik_analysis.o \ + PDAF_seik_resample.o \ + PDAF_seik_analysis_newT.o \ + PDAF_seik_resample_newT.o \ + PDAF_seik_analysis_trans.o \ + PDAF_seik_matrixT.o \ + PDAF_seik_uinv.o \ + PDAF_seik_omega.o \ + PDAF_seik_TtimesA.o + +# Specific PDAF-routines for local SEIK +OBJ_LSEIK = PDAF_lseik_init.o \ + PDAF_lseik_alloc.o \ + PDAF_lseik_options.o \ + PDAF_lseik_memtime.o \ + PDAF_put_state_lseik.o \ + PDAF_put_state_lseik_si.o \ + PDAF_assimilate_lseik.o \ + PDAF_assimilate_lseik_si.o \ + PDAF_lseik_update.o \ + PDAF_lseik_analysis.o \ + PDAF_lseik_resample.o \ + PDAF_lseik_analysis_trans.o + +# Specific PDAF-routines for SEEK +OBJ_SEEK = PDAF_seek_init.o \ + PDAF_seek_alloc.o \ + PDAF_seek_options.o \ + PDAF_seek_memtime.o \ + PDAF_put_state_seek.o \ + PDAF_put_state_seek_si.o \ + PDAF_assimilate_seek.o \ + PDAF_assimilate_seek_si.o \ + PDAF_seek_update.o \ + PDAF_seek_analysis.o \ + PDAF_seek_rediag.o + +# Specific PDAF-routines for EnKF +OBJ_ENKF = PDAF_enkf_init.o \ + PDAF_enkf_alloc.o \ + PDAF_enkf_options.o \ + PDAF_enkf_memtime.o \ + PDAF_put_state_enkf.o \ + PDAF_put_state_enkf_si.o \ + PDAF_assimilate_enkf.o \ + PDAF_assimilate_enkf_si.o \ + PDAF_enkf_update.o \ + PDAF_enkf_obs_ensemble.o \ + PDAF_enkf_gather_resid.o \ + PDAF_enkf_analysis_rlm.o \ + PDAF_enkf_analysis_rsm.o \ + PDAF_enkf_omega.o \ + PDAF_enkf_Tleft.o \ + PDAF_smoother_enkf.o + +# Specific PDAF-routines for ETKF +OBJ_ETKF = PDAF_etkf_init.o \ + PDAF_etkf_alloc.o \ + PDAF_etkf_options.o \ + PDAF_etkf_memtime.o \ + PDAF_put_state_etkf.o \ + PDAF_put_state_etkf_si.o \ + PDAF_assimilate_etkf.o \ + PDAF_assimilate_etkf_si.o \ + PDAF_etkf_update.o \ + PDAF_etkf_analysis.o \ + PDAF_etkf_analysis_T.o \ + PDAF_etkf_analysis_fixed.o \ + PDAF_etkf_Tright.o \ + PDAF_etkf_Tleft.o + +# Specific PDAF-routines for LETKF +OBJ_LETKF = PDAF_letkf_init.o \ + PDAF_letkf_alloc.o \ + PDAF_letkf_options.o \ + PDAF_letkf_memtime.o \ + PDAF_put_state_letkf.o \ + PDAF_put_state_letkf_si.o \ + PDAF_assimilate_letkf.o \ + PDAF_assimilate_letkf_si.o \ + PDAF_letkf_update.o \ + PDAF_letkf_analysis.o \ + PDAF_letkf_analysis_T.o \ + PDAF_letkf_analysis_fixed.o + +# Specific PDAF-routines for ESTKF +OBJ_ESTKF = PDAF_estkf_init.o \ + PDAF_estkf_alloc.o \ + PDAF_estkf_options.o \ + PDAF_estkf_memtime.o \ + PDAF_put_state_estkf.o \ + PDAF_put_state_estkf_si.o \ + PDAF_assimilate_estkf.o \ + PDAF_assimilate_estkf_si.o \ + PDAF_estkf_update.o \ + PDAF_estkf_analysis.o \ + PDAF_estkf_analysis_fixed.o \ + PDAF_estkf_AOmega.o \ + PDAF_estkf_OmegaA.o + +# Specific PDAF-routines for LESTKF +OBJ_LESTKF = PDAF_lestkf_init.o \ + PDAF_lestkf_alloc.o \ + PDAF_lestkf_options.o \ + PDAF_lestkf_memtime.o \ + PDAF_put_state_lestkf.o \ + PDAF_put_state_lestkf_si.o \ + PDAF_assimilate_lestkf.o \ + PDAF_assimilate_lestkf_si.o \ + PDAF_lestkf_update.o \ + PDAF_lestkf_analysis.o \ + PDAF_lestkf_analysis_fixed.o + +# Specific PDAF-routines for LEnKF +OBJ_LENKF = PDAF_lenkf_init.o \ + PDAF_lenkf_alloc.o \ + PDAF_lenkf_options.o \ + PDAF_lenkf_memtime.o \ + PDAF_put_state_lenkf.o \ + PDAF_put_state_lenkf_si.o \ + PDAFomi_put_state_lenkf.o \ + PDAFomi_put_state_lenkf_si.o \ + PDAF_assimilate_lenkf.o \ + PDAF_assimilate_lenkf_si.o \ + PDAFomi_assimilate_lenkf.o \ + PDAFomi_assimilate_lenkf_si.o \ + PDAF_lenkf_update.o \ + PDAF_lenkf_analysis_rsm.o +# Additional objects used by LEnKF but already specified for EnKF +# PDAF_enkf_gather_resid.o +# PDAF_enkf_obs_ensemble.o +# PDAF_enkf_omega.o +# PDAF_enkf_Tleft.o + +# Specific PDAF-routines for NETF +OBJ_NETF = PDAF_netf_init.o \ + PDAF_netf_alloc.o \ + PDAF_netf_options.o \ + PDAF_netf_memtime.o \ + PDAF_put_state_netf.o \ + PDAF_put_state_netf_si.o \ + PDAF_assimilate_netf.o \ + PDAF_assimilate_netf_si.o \ + PDAF_netf_update.o \ + PDAF_netf_smootherT.o \ + PDAF_netf_analysis.o \ + PDAF_smoother_netf.o + +# Specific PDAF-routines for LNETF +OBJ_LNETF = PDAF_lnetf_init.o \ + PDAF_lnetf_alloc.o \ + PDAF_lnetf_options.o \ + PDAF_lnetf_memtime.o \ + PDAF_put_state_lnetf.o \ + PDAF_put_state_lnetf_si.o \ + PDAF_assimilate_lnetf.o \ + PDAF_assimilate_lnetf_si.o \ + PDAF_lnetf_update.o \ + PDAF_lnetf_analysis.o \ + PDAF_lnetf_smootherT.o \ + PDAF_smoother_lnetf.o + +# Specific PDAF-routines for PF +OBJ_PF = PDAF_pf_init.o \ + PDAF_pf_alloc.o \ + PDAF_pf_options.o \ + PDAF_pf_memtime.o \ + PDAF_put_state_pf.o \ + PDAF_put_state_pf_si.o \ + PDAF_assimilate_pf.o \ + PDAF_assimilate_pf_si.o \ + PDAF_pf_update.o \ + PDAF_pf_analysis.o \ + PDAF_pf_resampling.o \ + PDAF_pf_add_noise.o + +# Specific PDAF-routines for LKNETF +OBJ_LKNETF = PDAF_lknetf_init.o \ + PDAF_lknetf_alloc.o \ + PDAF_lknetf_options.o \ + PDAF_lknetf_memtime.o \ + PDAF_put_state_lknetf.o \ + PDAF_put_state_lknetf_si.o \ + PDAF_assimilate_lknetf.o \ + PDAF_assimilate_lknetf_si.o \ + PDAF_lknetf_update.o \ + PDAF_lknetf_analysis_T.o \ + PDAF_lknetf_step_update.o \ + PDAF_lknetf_ana_lnetf.o \ + PDAF_lknetf_ana_letkfT.o \ + PDAF_lknetf_compute_gamma.o \ + PDAF_lknetf_set_gamma.o \ + PDAF_lknetf_alpha_neff.o \ + PDAF_lknetf_reset_gamma.o + +# Specific PDAF-routines for generating observations +OBJ_OBSGEN = PDAF_genobs_init.o \ + PDAF_genobs_alloc.o \ + PDAF_genobs_options.o \ + PDAF_put_state_generate_obs.o \ + PDAF_put_state_generate_obs_si.o \ + PDAFomi_put_state_generate_obs.o \ + PDAF_generate_obs.o \ + PDAF_generate_obs_si.o \ + PDAFomi_generate_obs.o \ + PDAF_gen_obs.o + +# Specific PDAF-routines for 3DVAR initialization part +OBJ_3DVAR_INI = PDAF_3dvar_init.o \ + PDAF_3dvar_alloc.o \ + PDAF_3dvar_options.o \ + PDAF_3dvar_memtime.o + +# Specific PDAF-routines for 3DVAR +OBJ_3DVAR = PDAF_put_state_3dvar.o \ + PDAF_assimilate_3dvar.o \ + PDAF_3dvar_update.o \ + PDAF_3dvar_analysis_cvt.o \ + PDAF_3dvar_optim_lbfgs.o \ + PDAF_3dvar_optim_cgplus.o \ + PDAF_3dvar_costf_cvt.o \ + PDAF_3dvar_costf_cg_cvt.o \ + PDAF_3dvar_optim_cg.o \ + PDAF_put_state_en3dvar_lestkf.o \ + PDAF_assimilate_en3dvar_lestkf.o \ + PDAF_en3dvar_update_lestkf.o \ + PDAF_put_state_en3dvar_estkf.o \ + PDAF_assimilate_en3dvar_estkf.o \ + PDAF_en3dvar_update_estkf.o \ + PDAF_en3dvar_analysis_cvt.o \ + PDAF_en3dvar_optim_lbfgs.o \ + PDAF_en3dvar_optim_cgplus.o \ + PDAF_en3dvar_optim_cg.o \ + PDAF_en3dvar_costf_cvt.o \ + PDAF_en3dvar_costf_cg_cvt.o \ + PDAF_put_state_hyb3dvar_lestkf.o \ + PDAF_assimilate_hyb3dvar_lestkf.o \ + PDAF_hyb3dvar_update_lestkf.o \ + PDAF_hyb3dvar_analysis_cvt.o\ + PDAF_put_state_hyb3dvar_estkf.o \ + PDAF_assimilate_hyb3dvar_estkf.o \ + PDAF_hyb3dvar_update_estkf.o \ + PDAF_hyb3dvar_optim_lbfgs.o \ + PDAF_hyb3dvar_optim_cgplus.o \ + PDAF_hyb3dvar_optim_cg.o \ + PDAF_hyb3dvar_costf_cvt.o \ + PDAF_hyb3dvar_costf_cg_cvt.o \ + PDAFomi_assimilate_3dvar.o \ + PDAFomi_assimilate_en3dvar_estkf.o \ + PDAFomi_assimilate_en3dvar_lestkf.o \ + PDAFomi_assimilate_hyb3dvar_estkf.o \ + PDAFomi_assimilate_hyb3dvar_lestkf.o \ + PDAFomi_put_state_3dvar.o \ + PDAFomi_put_state_en3dvar_estkf.o \ + PDAFomi_put_state_en3dvar_lestkf.o \ + PDAFomi_put_state_hyb3dvar_estkf.o \ + PDAFomi_put_state_hyb3dvar_lestkf.o +# Additional file for 3DVar already specified in OBJ_3DVAR_ini +# PDAF_3dvar_memtime.o + +# Routines for PDAF-OMI +OBJ_PDAFOMI = PDAFomi_obs_f.o \ + PDAFomi_obs_l.o \ + PDAFomi_obs_op.o \ + PDAFomi.o \ + PDAFomi_callback.o + +OBJ_PDAF = $(OBJ_PDAFOMI) $(OBJ_PDAF_GEN) $(OBJ_SEIK) $(OBJ_LSEIK) $(OBJ_SEEK) \ + $(OBJ_ENKF) $(OBJ_ETKF) $(OBJ_LETKF) \ + $(OBJ_ESTKF) $(OBJ_LESTKF) $(OBJ_LENKF) $(OBJ_NETF) $(OBJ_LNETF) \ + $(OBJ_LKNETF) $(OBJ_PF) $(OBJ_OBSGEN) $(OBJ_3DVAR_INI) + +OBJ_PDAF_VAR = $(OBJ_PDAF) $(OBJ_3DVAR) + +# External Routines for SANGOMA tools +OBJ_SANGOMA = ../external/SANGOMA/SANGOMA_quicksort.o + +# External optimizer libraries +OBJ_OPTIM = ../external/CG+_mpi/cgfam.o ../external/CG+_mpi/cgsearch.o \ + ../external/CG+/cgfam.o ../external/CG+/cgsearch.o \ + ../external/LBFGS/lbfgsb.o ../external/LBFGS/linpack.o \ + ../external/LBFGS/timer.o + +###################################################### + +../lib/libpdaf-d.a: $(MOD_PDAF) $(OBJ_SANGOMA) $(MOD_INTERFACE) $(OBJ_PDAF) + @echo "++++++ Generate Filter library ++++++" + $(AR) -r $(AR_SPEC) $@ \ + $(MOD_PDAF) $(MOD_INTERFACE) $(OBJ_PDAF) $(OBJ_SANGOMA) + $(RANLIB) ../lib/libpdaf-d.a + @cp *.mod ../include + +../lib/libpdaf-var.a: $(MOD_PDAF) $(MOD_INTERFACE) $(OBJ_PDAF_VAR) $(OBJ_OPTIM) + @echo "++++++ Generate Filter library ++++++" + $(AR) -r $(AR_SPEC) $@ \ + $(MOD_PDAF) $(MOD_INTERFACE) $(OBJ_PDAF) $(OBJ_PDAF_VAR) $(OBJ_OPTIM) + $(RANLIB) ../lib/libpdaf-var.a + @cp *.mod ../include + +# Short alias for ../lib/libpdaf-var.a +pdaf-var: ../lib/libpdaf-var.a + + +.F90.o : + $(FC) $(OPT) $(MPI_INC) $(CPP_DEFS) -o $*.o -c $*.F90 + +.f.o : + $(FC) -O3 -o $*.o -c $*.f + +# For older compilers one might need to separate the +# preprocessing from the compilation as defined below: +#.F90.o : +# $(CPP) -P -C $(MPI_INC) $(CPP_DEFS) $*.F90 $*.f90 +# $(FC) $(OPT) $(MPI_INC) -c $*.F90 +# @rm -f $*.f90 + +###################################################### +# Cleans + +clean : + rm -f *.o *.mod ../lib/libpdaf-d.a ../lib/libpdaf-var.a ../include/*.mod + cd ../external/SANGOMA; rm -f *.o *.mod; cd - + cd ../external/CG+; rm -f *.o; cd - + cd ../external/CG+_mpi; rm -f *.o; cd - + cd ../external/LBFGS; rm -f *.o; cd - + +###################################################### +# List arch files + +listarch: + @echo Available architecture-specific input files for PDAF_ARCH + @echo --------------------------------------------------------- + @ls -1 ../make.arch | cut -d"." -f1 From acd2faff23e7f0f94179809a29c62228c87e3232 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Thu, 6 Jun 2024 13:53:09 +0200 Subject: [PATCH 08/83] Move mkdepends into external/mkdepends/ --- mkdepends => external/mkdepends/mkdepends | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename mkdepends => external/mkdepends/mkdepends (100%) diff --git a/mkdepends b/external/mkdepends/mkdepends similarity index 100% rename from mkdepends rename to external/mkdepends/mkdepends From 99ffc5fefadab7d533f71d6a19eff98dfa2c45da Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Thu, 6 Jun 2024 13:57:09 +0200 Subject: [PATCH 09/83] Add option for 'mpifort' --- Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Makefile b/Makefile index c0d49b2f5..25374d522 100644 --- a/Makefile +++ b/Makefile @@ -421,6 +421,8 @@ ifeq ($(FC), mpif90) # gfortran COMPILE.f90 = $(FC) $(OPT) $(MPI_INC) $(CPP_DEFS) -c -o $@ -J $(INCDIR) else ifeq ($(FC), mpiifort) # intel COMPILE.f90 = $(FC) $(OPT) $(MPI_INC) $(CPP_DEFS) -c -o $@ -module $(INCDIR) +else ifeq ($(FC), mpifort) # intel +COMPILE.f90 = $(FC) $(OPT) $(MPI_INC) $(CPP_DEFS) -c -o $@ -module $(INCDIR) endif ####################################################### From 4dc411d588d3fb8fa390d9f5e506c40fc475c2ed Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Mon, 17 Jun 2024 19:20:21 +0200 Subject: [PATCH 10/83] Correction --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 25374d522..436b1f82d 100644 --- a/Makefile +++ b/Makefile @@ -394,7 +394,7 @@ SRC_PDAF = $(SRC_PDAFOMI) $(SRC_PDAF_GEN) $(SRC_SEIK) $(SRC_LSEIK) $(SRC_SEEK) $(SRC_ENKF) $(SRC_ETKF) $(SRC_LETKF) \ $(SRC_ESTKF) $(SRC_LESTKF) $(SRC_LENKF) $(SRC_NETF) $(SRC_LNETF) \ $(SRC_LKNETF) $(SRC_PF) $(SRC_OBSGEN) $(SRC_3DVAR_INI) \ - $(OBJ_MOD_PDAF) $(OBJ_MOD_INTERFACE) + $(SRC_MOD_PDAF) $(SRC_MOD_INTERFACE) # external sources SRC_SANGOMA = $(EXTDIR)/SANGOMA/SANGOMA_quicksort.F90 From 71005c1eb2765c10a852134b778f8cf414ebcd58 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Wed, 19 Jun 2024 10:18:54 +0200 Subject: [PATCH 11/83] Correct calls to U_obs_op in case in ETKF/ESTKF/SEIK for domains with dim_obs_p=0 when OMI is used. Now the number of calls is consistent with domains having dim_obs_p>0. This allows for global MPI operations in the observation operator --- src/PDAF_estkf_analysis.F90 | 48 ++++++++++++++++++++++++----- src/PDAF_estkf_analysis_fixed.F90 | 50 ++++++++++++++++++++++++++----- src/PDAF_etkf_analysis.F90 | 50 ++++++++++++++++++++++++++----- src/PDAF_etkf_analysis_T.F90 | 49 +++++++++++++++++++++++++----- src/PDAF_etkf_analysis_fixed.F90 | 50 ++++++++++++++++++++++++++----- src/PDAF_seik_analysis.F90 | 50 ++++++++++++++++++++++++++----- src/PDAF_seik_analysis_newT.F90 | 50 ++++++++++++++++++++++++++----- src/PDAF_seik_analysis_trans.F90 | 50 ++++++++++++++++++++++++++----- 8 files changed, 334 insertions(+), 63 deletions(-) diff --git a/src/PDAF_estkf_analysis.F90 b/src/PDAF_estkf_analysis.F90 index 17e290bff..531b0be74 100644 --- a/src/PDAF_estkf_analysis.F90 +++ b/src/PDAF_estkf_analysis.F90 @@ -293,6 +293,34 @@ SUBROUTINE PDAF_estkf_analysis(step, dim_p, dim_obs_p, dim_ens, rank, & CALL PDAF_timeit(51, 'old') END IF + ELSE IF (dim_obs_p == 0) THEN + + ! For OMI we need to call observation operator also for dim_obs_p=0 + ! in order to initialize the pointer to the observation types + ! Further the observation operator has to be executed in cases + ! in which the operation include a global communication + IF (.NOT.observe_ens) THEN + IF (omi_n_obstypes>0) THEN + ALLOCATE(HXbar_p(1)) + obs_member = 0 + + ! [Hx_1 ... Hx_N] + CALL U_obs_op(step, dim_p, dim_obs_p, state_p, HXbar_p) + + DEALLOCATE(HXbar_p) + ELSE + ALLOCATE(HL_p(1,1)) + DO member = 1, dim_ens + ! Store member index to make it accessible with PDAF_get_obsmemberid + obs_member = member + + ! [Hx_1 ... Hx_N] + CALL U_obs_op(step, dim_p, dim_obs_p, ens_p(:, member), HL_p(:, member)) + END DO + DEALLOCATE(HL_p) + END IF + END IF + END IF haveobsB CALL PDAF_timeit(12, 'old') @@ -411,14 +439,20 @@ SUBROUTINE PDAF_estkf_analysis(step, dim_p, dim_obs_p, dim_ens, rank, & ! For OMI we need to call observation operator also for dim_obs_p=0 ! in order to initialize the pointer to the observation types + ! Further the observation operator has to be executed in cases + ! in which the operation includes a global communication IF (omi_n_obstypes>0) THEN - ALLOCATE(HL_p(1, 1)) - obs_member = 1 - - ! [Hx_1 ... Hx_N] - CALL U_obs_op(step, dim_p, dim_obs_p, ens_p(:, 1), HL_p(:, 1)) - - DEALLOCATE(HL_p) + IF (.NOT.observe_ens) THEN + ALLOCATE(HL_p(1,1)) + DO member = 1, dim_ens + ! Store member index to make it accessible with PDAF_get_obsmemberid + obs_member = member + + ! [Hx_1 ... Hx_N] + CALL U_obs_op(step, dim_p, dim_obs_p, ens_p(:, member), HL_p(:, member)) + END DO + DEALLOCATE(HL_p) + END IF END IF END IF haveobsA diff --git a/src/PDAF_estkf_analysis_fixed.F90 b/src/PDAF_estkf_analysis_fixed.F90 index 9cebb60f7..c5534f324 100644 --- a/src/PDAF_estkf_analysis_fixed.F90 +++ b/src/PDAF_estkf_analysis_fixed.F90 @@ -268,6 +268,34 @@ SUBROUTINE PDAF_estkf_analysis_fixed(step, dim_p, dim_obs_p, dim_ens, rank, & CALL PDAF_timeit(51, 'old') END IF + ELSE IF (dim_obs_p == 0) THEN + + ! For OMI we need to call observation operator also for dim_obs_p=0 + ! in order to initialize the pointer to the observation types + ! Further the observation operator has to be executed in cases + ! in which the operation include a global communication + IF (.NOT.observe_ens) THEN + IF (omi_n_obstypes>0) THEN + ALLOCATE(HXbar_p(1)) + obs_member = 0 + + ! [Hx_1 ... Hx_N] + CALL U_obs_op(step, dim_p, dim_obs_p, state_p, HXbar_p) + + DEALLOCATE(HXbar_p) + ELSE + ALLOCATE(HL_p(1,1)) + DO member = 1, dim_ens + ! Store member index to make it accessible with PDAF_get_obsmemberid + obs_member = member + + ! [Hx_1 ... Hx_N] + CALL U_obs_op(step, dim_p, dim_obs_p, ens_p(:, member), HL_p(:, member)) + END DO + DEALLOCATE(HL_p) + END IF + END IF + END IF haveobsB CALL PDAF_timeit(12, 'old') @@ -385,15 +413,21 @@ SUBROUTINE PDAF_estkf_analysis_fixed(step, dim_p, dim_obs_p, dim_ens, rank, & Ainv_p = 0.0 ! For OMI we need to call observation operator also for dim_obs_p=0 - ! in order to initialize pointer to observation type + ! in order to initialize the pointer to the observation types + ! Further the observation operator has to be executed in cases + ! in which the operation includes a global communication IF (omi_n_obstypes>0) THEN - ALLOCATE(HL_p(1, 1)) - obs_member = 1 - - ! [Hx_1 ... Hx_N] - CALL U_obs_op(step, dim_p, dim_obs_p, ens_p(:, 1), HL_p(:, 1)) - - DEALLOCATE(HL_p) + IF (.NOT.observe_ens) THEN + ALLOCATE(HL_p(1,1)) + DO member = 1, dim_ens + ! Store member index to make it accessible with PDAF_get_obsmemberid + obs_member = member + + ! [Hx_1 ... Hx_N] + CALL U_obs_op(step, dim_p, dim_obs_p, ens_p(:, member), HL_p(:, member)) + END DO + DEALLOCATE(HL_p) + END IF END IF END IF haveobsA diff --git a/src/PDAF_etkf_analysis.F90 b/src/PDAF_etkf_analysis.F90 index 681f27759..f0be4c4fc 100644 --- a/src/PDAF_etkf_analysis.F90 +++ b/src/PDAF_etkf_analysis.F90 @@ -272,6 +272,34 @@ SUBROUTINE PDAF_etkf_analysis(step, dim_p, dim_obs_p, dim_ens, & CALL PDAF_timeit(51, 'old') END IF + ELSE IF (dim_obs_p == 0) THEN + + ! For OMI we need to call observation operator also for dim_obs_p=0 + ! in order to initialize the pointer to the observation types + ! Further the observation operator has to be executed in cases + ! in which the operation include a global communication + IF (.NOT.observe_ens) THEN + IF (omi_n_obstypes>0) THEN + ALLOCATE(HXbar_p(1)) + obs_member = 0 + + ! [Hx_1 ... Hx_N] + CALL U_obs_op(step, dim_p, dim_obs_p, state_p, HXbar_p) + + DEALLOCATE(HXbar_p) + ELSE + ALLOCATE(HZ_p(1,1)) + DO member = 1, dim_ens + ! Store member index to make it accessible with PDAF_get_obsmemberid + obs_member = member + + ! [Hx_1 ... Hx_N] + CALL U_obs_op(step, dim_p, dim_obs_p, ens_p(:, member), HZ_p(:, member)) + END DO + DEALLOCATE(HZ_p) + END IF + END IF + END IF haveobsB CALL PDAF_timeit(12, 'old') @@ -384,15 +412,21 @@ SUBROUTINE PDAF_etkf_analysis(step, dim_p, dim_obs_p, dim_ens, & Usqrt = 0.0 ! For OMI we need to call observation operator also for dim_obs_p=0 - ! in order to initialize pointer to observation type + ! in order to initialize the pointer to the observation types + ! Further the observation operator has to be executed in cases + ! in which the operation includes a global communication IF (omi_n_obstypes>0) THEN - ALLOCATE(HZ_p(1, 1)) - obs_member = 1 - - ! [Hx_1 ... Hx_N] - CALL U_obs_op(step, dim_p, dim_obs_p, ens_p(:, 1), HZ_p(:, 1)) - - DEALLOCATE(HZ_p) + IF (.NOT.observe_ens) THEN + ALLOCATE(HZ_p(1,1)) + DO member = 1, dim_ens + ! Store member index to make it accessible with PDAF_get_obsmemberid + obs_member = member + + ! [Hx_1 ... Hx_N] + CALL U_obs_op(step, dim_p, dim_obs_p, ens_p(:, member), HZ_p(:, member)) + END DO + DEALLOCATE(HZ_p) + END IF END IF END IF haveobsA diff --git a/src/PDAF_etkf_analysis_T.F90 b/src/PDAF_etkf_analysis_T.F90 index c13573690..889ae50bd 100644 --- a/src/PDAF_etkf_analysis_T.F90 +++ b/src/PDAF_etkf_analysis_T.F90 @@ -274,6 +274,33 @@ SUBROUTINE PDAF_etkf_analysis_T(step, dim_p, dim_obs_p, dim_ens, & CALL PDAF_timeit(51, 'old') END IF + ELSE IF (dim_obs_p == 0) THEN + + ! For OMI we need to call observation operator also for dim_obs_p=0 + ! in order to initialize the pointer to the observation types + ! Further the observation operator has to be executed in cases + ! in which the operation include a global communication + IF (.NOT.observe_ens) THEN + IF (omi_n_obstypes>0) THEN + ALLOCATE(HXbar_p(1)) + obs_member = 0 + + ! [Hx_1 ... Hx_N] + CALL U_obs_op(step, dim_p, dim_obs_p, state_p, HXbar_p) + + DEALLOCATE(HXbar_p) + ELSE + ALLOCATE(HZ_p(1,1)) + DO member = 1, dim_ens + ! Store member index to make it accessible with PDAF_get_obsmemberid + obs_member = member + + ! [Hx_1 ... Hx_N] + CALL U_obs_op(step, dim_p, dim_obs_p, ens_p(:, member), HZ_p(:, member)) + END DO + DEALLOCATE(HZ_p) + END IF + END IF END IF haveobsB CALL PDAF_timeit(12, 'old') @@ -386,15 +413,21 @@ SUBROUTINE PDAF_etkf_analysis_T(step, dim_p, dim_obs_p, dim_ens, & Asqrt = 0.0 ! For OMI we need to call observation operator also for dim_obs_p=0 - ! in order to initialize pointer to observation type + ! in order to initialize the pointer to the observation types + ! Further the observation operator has to be executed in cases + ! in which the operation includes a global communication IF (omi_n_obstypes>0) THEN - ALLOCATE(HZ_p(1, 1)) - obs_member = 1 - - ! [Hx_1 ... Hx_N] - CALL U_obs_op(step, dim_p, dim_obs_p, ens_p(:, 1), HZ_p(:, 1)) - - DEALLOCATE(HZ_p) + IF (.NOT.observe_ens) THEN + ALLOCATE(HZ_p(1,1)) + DO member = 1, dim_ens + ! Store member index to make it accessible with PDAF_get_obsmemberid + obs_member = member + + ! [Hx_1 ... Hx_N] + CALL U_obs_op(step, dim_p, dim_obs_p, ens_p(:, member), HZ_p(:, member)) + END DO + DEALLOCATE(HZ_p) + END IF END IF END IF haveobsA diff --git a/src/PDAF_etkf_analysis_fixed.F90 b/src/PDAF_etkf_analysis_fixed.F90 index 2e7bdf934..cc530e0da 100644 --- a/src/PDAF_etkf_analysis_fixed.F90 +++ b/src/PDAF_etkf_analysis_fixed.F90 @@ -261,6 +261,34 @@ SUBROUTINE PDAF_etkf_analysis_fixed(step, dim_p, dim_obs_p, dim_ens, & CALL PDAF_timeit(51, 'old') END IF + ELSE IF (dim_obs_p == 0) THEN + + ! For OMI we need to call observation operator also for dim_obs_p=0 + ! in order to initialize the pointer to the observation types + ! Further the observation operator has to be executed in cases + ! in which the operation include a global communication + IF (.NOT.observe_ens) THEN + IF (omi_n_obstypes>0) THEN + ALLOCATE(HXbar_p(1)) + obs_member = 0 + + ! [Hx_1 ... Hx_N] + CALL U_obs_op(step, dim_p, dim_obs_p, state_p, HXbar_p) + + DEALLOCATE(HXbar_p) + ELSE + ALLOCATE(HZ_p(1,1)) + DO member = 1, dim_ens + ! Store member index to make it accessible with PDAF_get_obsmemberid + obs_member = member + + ! [Hx_1 ... Hx_N] + CALL U_obs_op(step, dim_p, dim_obs_p, ens_p(:, member), HZ_p(:, member)) + END DO + DEALLOCATE(HZ_p) + END IF + END IF + END IF haveobsB CALL PDAF_timeit(12, 'old') @@ -373,15 +401,21 @@ SUBROUTINE PDAF_etkf_analysis_fixed(step, dim_p, dim_obs_p, dim_ens, & Asqrt = 0.0 ! For OMI we need to call observation operator also for dim_obs_p=0 - ! in order to initialize pointer to observation type + ! in order to initialize the pointer to the observation types + ! Further the observation operator has to be executed in cases + ! in which the operation includes a global communication IF (omi_n_obstypes>0) THEN - ALLOCATE(HZ_p(1, 1)) - obs_member = 1 - - ! [Hx_1 ... Hx_N] - CALL U_obs_op(step, dim_p, dim_obs_p, ens_p(:, 1), HZ_p(:, 1)) - - DEALLOCATE(HZ_p) + IF (.NOT.observe_ens) THEN + ALLOCATE(HZ_p(1,1)) + DO member = 1, dim_ens + ! Store member index to make it accessible with PDAF_get_obsmemberid + obs_member = member + + ! [Hx_1 ... Hx_N] + CALL U_obs_op(step, dim_p, dim_obs_p, ens_p(:, member), HZ_p(:, member)) + END DO + DEALLOCATE(HZ_p) + END IF END IF END IF haveobsA diff --git a/src/PDAF_seik_analysis.F90 b/src/PDAF_seik_analysis.F90 index 5f12713f8..1da78c9c2 100644 --- a/src/PDAF_seik_analysis.F90 +++ b/src/PDAF_seik_analysis.F90 @@ -256,6 +256,34 @@ SUBROUTINE PDAF_seik_analysis(step, dim_p, dim_obs_p, dim_ens, rank, & CALL PDAF_timeit(51, 'old') END IF + ELSE IF (dim_obs_p == 0) THEN + + ! For OMI we need to call observation operator also for dim_obs_p=0 + ! in order to initialize the pointer to the observation types + ! Further the observation operator has to be executed in cases + ! in which the operation include a global communication + IF (.NOT.observe_ens) THEN + IF (omi_n_obstypes>0) THEN + ALLOCATE(m_state_p(1)) + obs_member = 0 + + ! [Hx_1 ... Hx_N] + CALL U_obs_op(step, dim_p, dim_obs_p, state_p, m_state_p) + + DEALLOCATE(m_state_p) + ELSE + ALLOCATE(HL_p(1,1)) + DO member = 1, dim_ens + ! Store member index to make it accessible with PDAF_get_obsmemberid + obs_member = member + + ! [Hx_1 ... Hx_N] + CALL U_obs_op(step, dim_p, dim_obs_p, ens_p(:, member), HL_p(:, member)) + END DO + DEALLOCATE(HL_p) + END IF + END IF + END IF haveobsB CALL PDAF_timeit(12, 'old') @@ -369,15 +397,21 @@ SUBROUTINE PDAF_seik_analysis(step, dim_p, dim_obs_p, dim_ens, rank, & Uinv_p = 0.0 ! For OMI we need to call observation operator also for dim_obs_p=0 - ! in order to initialize pointer to observation type + ! in order to initialize the pointer to the observation types + ! Further the observation operator has to be executed in cases + ! in which the operation includes a global communication IF (omi_n_obstypes>0) THEN - ALLOCATE(HL_p(1, 1)) - obs_member = 1 - - ! [Hx_1 ... Hx_N] - CALL U_obs_op(step, dim_p, dim_obs_p, ens_p(:, 1), HL_p(:, 1)) - - DEALLOCATE(HL_p) + IF (.NOT.observe_ens) THEN + ALLOCATE(HL_p(1,1)) + DO member = 1, dim_ens + ! Store member index to make it accessible with PDAF_get_obsmemberid + obs_member = member + + ! [Hx_1 ... Hx_N] + CALL U_obs_op(step, dim_p, dim_obs_p, ens_p(:, member), HL_p(:, member)) + END DO + DEALLOCATE(HL_p) + END IF END IF END IF haveobsA diff --git a/src/PDAF_seik_analysis_newT.F90 b/src/PDAF_seik_analysis_newT.F90 index 3520c2753..1c22d2366 100644 --- a/src/PDAF_seik_analysis_newT.F90 +++ b/src/PDAF_seik_analysis_newT.F90 @@ -257,6 +257,34 @@ SUBROUTINE PDAF_seik_analysis_newT(step, dim_p, dim_obs_p, dim_ens, rank, & CALL PDAF_timeit(51, 'old') END IF + ELSE IF (dim_obs_p == 0) THEN + + ! For OMI we need to call observation operator also for dim_obs_p=0 + ! in order to initialize the pointer to the observation types + ! Further the observation operator has to be executed in cases + ! in which the operation include a global communication + IF (.NOT.observe_ens) THEN + IF (omi_n_obstypes>0) THEN + ALLOCATE(m_state_p(1)) + obs_member = 0 + + ! [Hx_1 ... Hx_N] + CALL U_obs_op(step, dim_p, dim_obs_p, state_p, m_state_p) + + DEALLOCATE(m_state_p) + ELSE + ALLOCATE(HL_p(1,1)) + DO member = 1, dim_ens + ! Store member index to make it accessible with PDAF_get_obsmemberid + obs_member = member + + ! [Hx_1 ... Hx_N] + CALL U_obs_op(step, dim_p, dim_obs_p, ens_p(:, member), HL_p(:, member)) + END DO + DEALLOCATE(HL_p) + END IF + END IF + END IF haveobsB CALL PDAF_timeit(12, 'old') @@ -370,15 +398,21 @@ SUBROUTINE PDAF_seik_analysis_newT(step, dim_p, dim_obs_p, dim_ens, rank, & Uinv_p = 0.0 ! For OMI we need to call observation operator also for dim_obs_p=0 - ! in order to initialize pointer to observation type + ! in order to initialize the pointer to the observation types + ! Further the observation operator has to be executed in cases + ! in which the operation includes a global communication IF (omi_n_obstypes>0) THEN - ALLOCATE(HL_p(1, 1)) - obs_member = 1 - - ! [Hx_1 ... Hx_N] - CALL U_obs_op(step, dim_p, dim_obs_p, ens_p(:, 1), HL_p(:, 1)) - - DEALLOCATE(HL_p) + IF (.NOT.observe_ens) THEN + ALLOCATE(HL_p(1,1)) + DO member = 1, dim_ens + ! Store member index to make it accessible with PDAF_get_obsmemberid + obs_member = member + + ! [Hx_1 ... Hx_N] + CALL U_obs_op(step, dim_p, dim_obs_p, ens_p(:, member), HL_p(:, member)) + END DO + DEALLOCATE(HL_p) + END IF END IF END IF haveobsA diff --git a/src/PDAF_seik_analysis_trans.F90 b/src/PDAF_seik_analysis_trans.F90 index 9b385cce4..25fd47aa4 100644 --- a/src/PDAF_seik_analysis_trans.F90 +++ b/src/PDAF_seik_analysis_trans.F90 @@ -287,6 +287,34 @@ SUBROUTINE PDAF_seik_analysis_trans(step, dim_p, dim_obs_p, dim_ens, rank, & CALL PDAF_timeit(51, 'old') END IF + ELSE IF (dim_obs_p == 0) THEN + + ! For OMI we need to call observation operator also for dim_obs_p=0 + ! in order to initialize the pointer to the observation types + ! Further the observation operator has to be executed in cases + ! in which the operation include a global communication + IF (.NOT.observe_ens) THEN + IF (omi_n_obstypes>0) THEN + ALLOCATE(HXbar_p(1)) + obs_member = 0 + + ! [Hx_1 ... Hx_N] + CALL U_obs_op(step, dim_p, dim_obs_p, state_p, HXbar_p) + + DEALLOCATE(HXbar_p) + ELSE + ALLOCATE(HL_p(1,1)) + DO member = 1, dim_ens + ! Store member index to make it accessible with PDAF_get_obsmemberid + obs_member = member + + ! [Hx_1 ... Hx_N] + CALL U_obs_op(step, dim_p, dim_obs_p, ens_p(:, member), HL_p(:, member)) + END DO + DEALLOCATE(HL_p) + END IF + END IF + END IF haveobsB CALL PDAF_timeit(12, 'old') @@ -402,15 +430,21 @@ SUBROUTINE PDAF_seik_analysis_trans(step, dim_p, dim_obs_p, dim_ens, rank, & Uinv_p = 0.0 ! For OMI we need to call observation operator also for dim_obs_p=0 - ! in order to initialize pointer to observation type + ! in order to initialize the pointer to the observation types + ! Further the observation operator has to be executed in cases + ! in which the operation includes a global communication IF (omi_n_obstypes>0) THEN - ALLOCATE(HL_p(1, 1)) - obs_member = 1 - - ! [Hx_1 ... Hx_N] - CALL U_obs_op(step, dim_p, dim_obs_p, ens_p(:, 1), HL_p(:, 1)) - - DEALLOCATE(HL_p) + IF (.NOT.observe_ens) THEN + ALLOCATE(HL_p(1,1)) + DO member = 1, dim_ens + ! Store member index to make it accessible with PDAF_get_obsmemberid + obs_member = member + + ! [Hx_1 ... Hx_N] + CALL U_obs_op(step, dim_p, dim_obs_p, ens_p(:, member), HL_p(:, member)) + END DO + DEALLOCATE(HL_p) + END IF END IF END IF haveobsA From ae0af4e23b1b8fdc577dad92e6c610bae70cdb90 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Wed, 26 Jun 2024 08:39:26 +0200 Subject: [PATCH 12/83] Move directory specification where .mod files are placed into make.include file (necessary as on the Cray always 'ftn' is used, but might refer to ifort, cray-ftn, or gfortran) --- Makefile | 8 +--- make.arch/Albedo_mpiifort_impi.h | 3 ++ make.arch/HLRN4_mpifort_ompi.h | 5 ++- make.arch/HLRN4_mpiifort_impi.h | 3 ++ make.arch/Levante_mpiifort_impi.h | 12 ++---- make.arch/cray-xd1_pg_mpich.h | 58 ---------------------------- make.arch/cray_cce_mpi.h | 3 ++ make.arch/cray_cce_mvapich.h | 3 ++ make.arch/cray_ifort.h | 5 ++- make.arch/cray_intel_mpi.h | 3 ++ make.arch/cray_mpiifort_impi.h | 3 ++ make.arch/ibm_blizzard.h | 50 ------------------------ make.arch/ibm_xlf_mpi.h | 3 ++ make.arch/linux_gfortran_openmpi.h | 3 ++ make.arch/linux_ifort_impi.h | 3 ++ make.arch/linux_ifort_mvapich2.h | 3 ++ make.arch/linux_ifort_sgi.h | 57 --------------------------- make.arch/linux_ifort_sgimpt.h | 58 ---------------------------- make.arch/linux_mpiifort_impi.h | 3 ++ make.arch/linux_pgi_openmpi.h | 57 --------------------------- make.arch/macos_gfortran_openmpi.h | 3 ++ make.arch/macos_gfortran_snglprec.h | 3 ++ make.arch/nec_sxace.h | 3 ++ make.arch/osx_gfortran_openmpi.h | 3 ++ make.arch/osx_gfortran_snglprec.h | 3 ++ make.arch/sgi-irix_mpi.h | 57 --------------------------- make.arch/sun_studio.h | 57 --------------------------- make.arch/windows_gfortran.h | 57 --------------------------- make.arch/windows_gfortran_openmpi.h | 3 ++ 29 files changed, 63 insertions(+), 469 deletions(-) delete mode 100644 make.arch/cray-xd1_pg_mpich.h delete mode 100644 make.arch/ibm_blizzard.h delete mode 100644 make.arch/linux_ifort_sgi.h delete mode 100644 make.arch/linux_ifort_sgimpt.h delete mode 100644 make.arch/linux_pgi_openmpi.h delete mode 100644 make.arch/sgi-irix_mpi.h delete mode 100644 make.arch/sun_studio.h delete mode 100644 make.arch/windows_gfortran.h diff --git a/Makefile b/Makefile index 436b1f82d..b3514e773 100644 --- a/Makefile +++ b/Makefile @@ -417,13 +417,7 @@ OBJ_OPTIM = $(EXTDIR)/CG+_mpi/cgfam.o $(EXTDIR)/CG+_mpi/cgsearch.o \ ####################################################### # compiler instructions -ifeq ($(FC), mpif90) # gfortran -COMPILE.f90 = $(FC) $(OPT) $(MPI_INC) $(CPP_DEFS) -c -o $@ -J $(INCDIR) -else ifeq ($(FC), mpiifort) # intel -COMPILE.f90 = $(FC) $(OPT) $(MPI_INC) $(CPP_DEFS) -c -o $@ -module $(INCDIR) -else ifeq ($(FC), mpifort) # intel -COMPILE.f90 = $(FC) $(OPT) $(MPI_INC) $(CPP_DEFS) -c -o $@ -module $(INCDIR) -endif +COMPILE.f90 = $(FC) $(OPT) $(MPI_INC) $(CPP_DEFS) -c -o $@ $(MODULEOPT) $(INCDIR) ####################################################### .PHONY: all diff --git a/make.arch/Albedo_mpiifort_impi.h b/make.arch/Albedo_mpiifort_impi.h index 4832c82a6..a1d508acb 100644 --- a/make.arch/Albedo_mpiifort_impi.h +++ b/make.arch/Albedo_mpiifort_impi.h @@ -41,6 +41,9 @@ AR_SPEC = # Specifications for ranlib RAN_SPEC = +# Specification for directory holding modules (-module for Intel, -J for GNU) +MODULEOPT = -module + # Include path for MPI header file MPI_INC = diff --git a/make.arch/HLRN4_mpifort_ompi.h b/make.arch/HLRN4_mpifort_ompi.h index affbfb3d5..6ce21f865 100644 --- a/make.arch/HLRN4_mpifort_ompi.h +++ b/make.arch/HLRN4_mpifort_ompi.h @@ -3,7 +3,7 @@ # for building PDAF. # # # # Variant for HLRN-IV # -# (ifort with Intel MPI using wrapper mpiifort) # +# (ifort with Intel MPI using wrapper mpifort) # # # # In the case of compilation without MPI, a dummy # # implementation of MPI, like provided in the # @@ -47,6 +47,9 @@ AR_SPEC = # Specifications for ranlib RAN_SPEC = +# Specification for directory holding modules (-module for Intel, -J for GNU) +MODULEOPT = -module + # Include path for MPI header file MPI_INC = diff --git a/make.arch/HLRN4_mpiifort_impi.h b/make.arch/HLRN4_mpiifort_impi.h index 5d9410647..f80c69b69 100644 --- a/make.arch/HLRN4_mpiifort_impi.h +++ b/make.arch/HLRN4_mpiifort_impi.h @@ -47,6 +47,9 @@ AR_SPEC = # Specifications for ranlib RAN_SPEC = +# Specification for directory holding modules (-module for Intel, -J for GNU) +MODULEOPT = -module + # Include path for MPI header file MPI_INC = diff --git a/make.arch/Levante_mpiifort_impi.h b/make.arch/Levante_mpiifort_impi.h index 305c789e2..e31010fbd 100644 --- a/make.arch/Levante_mpiifort_impi.h +++ b/make.arch/Levante_mpiifort_impi.h @@ -37,14 +37,6 @@ LINK_LIBS =-L/sw/spack-levante/intel-oneapi-mkl-2022.0.1-ttdktf/mkl/2022.0.1/lib -Wl,-rpath,/sw/spack-levante/intel-oneapi-mkl-2022.0.1-ttdktf/mkl/2022.0.1/lib/intel64 \ -Wl,-rpath,/sw/spack-levante/netcdf-fortran-4.5.3-l2ulgp/lib -#LINK_LIBS =-L/sw/spack-levante/intel-oneapi-mkl-2022.0.1-ttdktf/mkl/2022.0.1/lib/intel64 \ -# -Wl,-rpath,/sw/spack-levante/intel-oneapi-mkl-2022.0.1-ttdktf/mkl/2022.0.1/lib/intel64 \ -# -Wl,-rpath,/sw/spack-levante/netcdf-fortran-4.5.3-k6xq5g/lib - -#LINK_LIBS = -L/sw/spack-levante/intel-oneapi-mkl-2022.0.1-ttdktf/mkl/2022.0.1/lib/intel64 - -#LINK_LIBS = -Wl,-rpath,/sw/spack-levante/intel-oneapi-mkl-2022.0.1-ttdktf/mkl/2022.0.1/lib/intel64 \ -# -Wl,-rpath,/sw/spack-levante/netcdf-fortran-4.5.3-k6xq5g/lib # Specifications for the archiver AR_SPEC = @@ -52,8 +44,12 @@ AR_SPEC = # Specifications for ranlib RAN_SPEC = +# Specification for directory holding modules (-module for Intel, -J for GNU) +MODULEOPT = -module + # Include path for MPI header file MPI_INC = # dummy MPI for PDAF versions < 2 + # Object for nullMPI - if compiled without MPI library OBJ_MPI = # needed when running without MPI for PDAF versions < 2 diff --git a/make.arch/cray-xd1_pg_mpich.h b/make.arch/cray-xd1_pg_mpich.h deleted file mode 100644 index 09aa1d7ae..000000000 --- a/make.arch/cray-xd1_pg_mpich.h +++ /dev/null @@ -1,58 +0,0 @@ -###################################################### -# Include file with machine-specific definitions # -# for building PDAF. # -# # -# Variant for Cray XD1 with PG fortran compiler # -# with MPI (MPICH) at AWI. # -# # -# In the case of compilation without MPI, a dummy # -# implementation of MPI, like provided in the # -# directory nullmpi/ has to be linked when building # -# an executable. # -###################################################### -# $Id: cray-xd1_pg_mpich.h 1565 2015-02-28 17:04:41Z lnerger $ - - -# Compiler, Linker, and Archiver -FC = mpif90 -LD = mpif90 -AR = ar -RANLIB = ranlib - -# C preprocessor -# (only required, if preprocessing is not performed via the compiler) -CPP = /usr/bin/cpp - -# Definitions for CPP -# Define USE_PDAF to include PDAF -# Define BLOCKING_MPI_EXCHANGE to use blocking MPI commands to exchange data between model and PDAF -# (if the compiler does not support get_command_argument() -# from Fortran 2003 you should define F77 here.) -CPP_DEFS = -DUSE_PDAF - -# Optimization specs for compiler -# (You should explicitly define double precision for floating point -# variables in the compilation) -OPT= -O3 -r8 - -# Optimization specifications for Linker -OPT_LNK = $(OPT) - -# Linking libraries (BLAS, LAPACK, if required: MPI) -LINK_LIBS = -llapack -lblas -lm -lmpich - -# Specifications for the archiver -AR_SPEC = - -# Specifications for ranlib -RAN_SPEC = - -# Include path for MPI header file -MPI_INC = - -# Object for nullMPI - if compiled without MPI library -OBJ_MPI= - -# NetCDF (only required for Lorenz96) -NC_LIB = -NC_INC = diff --git a/make.arch/cray_cce_mpi.h b/make.arch/cray_cce_mpi.h index 35ac1f507..e6335c219 100644 --- a/make.arch/cray_cce_mpi.h +++ b/make.arch/cray_cce_mpi.h @@ -47,6 +47,9 @@ AR_SPEC = # Specifications for ranlib RAN_SPEC = +# Specification for directory holding modules (-module for Intel or Cray, -J for GNU) +MODULEOPT = -module + # Include path for MPI header file MPI_INC = diff --git a/make.arch/cray_cce_mvapich.h b/make.arch/cray_cce_mvapich.h index 70429df23..dd686b0a3 100644 --- a/make.arch/cray_cce_mvapich.h +++ b/make.arch/cray_cce_mvapich.h @@ -47,6 +47,9 @@ AR_SPEC = # Specifications for ranlib RAN_SPEC = +# Specification for directory holding modules (-module for Intel, -J for GNU) +MODULEOPT = -module + # Include path for MPI header file MPI_INC = diff --git a/make.arch/cray_ifort.h b/make.arch/cray_ifort.h index e0fef63ee..9761135d8 100644 --- a/make.arch/cray_ifort.h +++ b/make.arch/cray_ifort.h @@ -38,8 +38,6 @@ OPT_LNK = $(OPT) # Linking libraries (BLAS, LAPACK, if required: MPI) LINK_LIBS = -mkl -qopenmp -#-Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_intel_thread.a $(MKLROOT)/lib/intel64/libmkl_core.a -Wl,--end-group -openmp -lpthread -lm - # Specifications for the archiver AR_SPEC = @@ -47,6 +45,9 @@ AR_SPEC = # Specifications for ranlib RAN_SPEC = +# Specification for directory holding modules (-module for Intel, -J for GNU) +MODULEOPT = -module + # Include path for MPI header file MPI_INC = -Idummympi diff --git a/make.arch/cray_intel_mpi.h b/make.arch/cray_intel_mpi.h index 208d14adf..ae28bfbde 100644 --- a/make.arch/cray_intel_mpi.h +++ b/make.arch/cray_intel_mpi.h @@ -47,6 +47,9 @@ AR_SPEC = # Specifications for ranlib RAN_SPEC = +# Specification for directory holding modules (-module for Intel, -J for GNU) +MODULEOPT = -module + # Include path for MPI header file MPI_INC = diff --git a/make.arch/cray_mpiifort_impi.h b/make.arch/cray_mpiifort_impi.h index cf505c78c..0c9be3ece 100644 --- a/make.arch/cray_mpiifort_impi.h +++ b/make.arch/cray_mpiifort_impi.h @@ -47,6 +47,9 @@ AR_SPEC = # Specifications for ranlib RAN_SPEC = +# Specification for directory holding modules (-module for Intel, -J for GNU) +MODULEOPT = -module + # Include path for MPI header file MPI_INC = diff --git a/make.arch/ibm_blizzard.h b/make.arch/ibm_blizzard.h deleted file mode 100644 index a6aee71a0..000000000 --- a/make.arch/ibm_blizzard.h +++ /dev/null @@ -1,50 +0,0 @@ -###################################################### -# Include file with machine-specific definitions # -# for building PDAF with the dummy model example. # -# # -# Variant for blizzard at DKRZ # -# # -# Thanks to Jan Saynisch, GFZ Potsdam, for this. # -# # -###################################################### -# $Id: ibm_blizzard.h 854 2010-02-02 13:56:53Z lnerger $ - -# Compiler, Linker, and Archiver -FC = mpxlf -LD = mpxlf -AR = ar -RANLIB = ranlib - -# C preprocessor -# (only required, if preprocessing is not performed via the compiler) -CPP = /usr/bin/cpp - -# Definitions for CPP -# Define USE_PDAF to activate PDAF -# (if the compiler does not support get_command_argument() -# from Fortran 2003 you should define F77 here.) -CPP_DEFS = -WF,-DUSE_PDAF - - -# Optimization specs for compiler -OPT= -q64 -O3 -qrealsize=8 -qextname -qlibessl - -# Optimization specifications for Linker -OPT_LNK = $(OPT) - -# Linking libraries (BLAS, LAPACK, if required: MPI) -LINK_LIBS = -L/sw/aix53/lapack-3.2.0/lib -llapack -lessl - -# Specifications for the archiver -AR_SPEC = -X64 - -# Include path for MPI header file -MPI_INC = - -# Object for nullMPI - if compiled without MPI library -OBJ_MPI= - -# NetCDF (only required for Lorenz96) -NC_LIB = -NC_INC = - diff --git a/make.arch/ibm_xlf_mpi.h b/make.arch/ibm_xlf_mpi.h index 982ca0997..f0c27c8d9 100644 --- a/make.arch/ibm_xlf_mpi.h +++ b/make.arch/ibm_xlf_mpi.h @@ -47,6 +47,9 @@ AR_SPEC = -X64 # Specifications for ranlib RAN_SPEC = +# Specification for directory holding modules (-module for Intel, -J for GNU) +MODULEOPT = -I_DONT_KNOW + # Include path for MPI header file MPI_INC = -I/usr/lpp/ppe.poe/include diff --git a/make.arch/linux_gfortran_openmpi.h b/make.arch/linux_gfortran_openmpi.h index d77523795..67e28ba94 100644 --- a/make.arch/linux_gfortran_openmpi.h +++ b/make.arch/linux_gfortran_openmpi.h @@ -48,6 +48,9 @@ AR_SPEC = # Specifications for ranlib RAN_SPEC = +# Specification for directory holding modules (-module for Intel, -J for GNU) +MODULEOPT = -J + # Include path for MPI header file MPI_INC = diff --git a/make.arch/linux_ifort_impi.h b/make.arch/linux_ifort_impi.h index 5d9410647..f80c69b69 100644 --- a/make.arch/linux_ifort_impi.h +++ b/make.arch/linux_ifort_impi.h @@ -47,6 +47,9 @@ AR_SPEC = # Specifications for ranlib RAN_SPEC = +# Specification for directory holding modules (-module for Intel, -J for GNU) +MODULEOPT = -module + # Include path for MPI header file MPI_INC = diff --git a/make.arch/linux_ifort_mvapich2.h b/make.arch/linux_ifort_mvapich2.h index fce005b16..8fbe6980b 100644 --- a/make.arch/linux_ifort_mvapich2.h +++ b/make.arch/linux_ifort_mvapich2.h @@ -47,6 +47,9 @@ AR_SPEC = # Specifications for ranlib RAN_SPEC = +# Specification for directory holding modules (-module for Intel, -J for GNU) +MODULEOPT = -module + # Include path for MPI header file MPI_INC = diff --git a/make.arch/linux_ifort_sgi.h b/make.arch/linux_ifort_sgi.h deleted file mode 100644 index 26eb54179..000000000 --- a/make.arch/linux_ifort_sgi.h +++ /dev/null @@ -1,57 +0,0 @@ -###################################################### -# Include file with machine-specific definitions # -# for building PDAF. # -# # -# Variant for HLRN-II (SGI Altix ICE with Linux # -# and ifort and MVAPICH 2) # -# # -# In the case of compilation without MPI, a dummy # -# implementation of MPI, like provided in the # -# directory nullmpi/ has to be linked when building # -# an executable. # -###################################################### -# $Id: linux_ifort_mvapich2.h 1187 2011-09-16 08:14:28Z lnerger $ - - -# Compiler, Linker, and Archiver -FC = ifort -LD = $(FC) -AR = ar -RANLIB = ranlib - -# C preprocessor -# (only required, if preprocessing is not performed via the compiler) -CPP = /usr/bin/cpp - -# Definitions for CPP -# Define USE_PDAF to include PDAF -# (if the compiler does not support get_command_argument() -# from Fortran 2003 you should define F77 here.) -CPP_DEFS = -DUSE_PDAF - -# Optimization specs for compiler -# (You should explicitly define double precision for floating point -# variables in the compilation) -OPT= -O3 -xHOST -r8 - -# Optimization specifications for Linker -OPT_LNK = $(OPT) - -# Linking libraries (BLAS, LAPACK, if required: MPI) -LINK_LIBS = -Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_intel_thread.a $(MKLROOT)/lib/intel64/libmkl_core.a -Wl,--end-group -openmp -lpthread -lm - -# Specifications for the archiver -AR_SPEC = - -# Specifications for ranlib -RAN_SPEC = - -# Include path for MPI header file -MPI_INC = -Idummympi - -# Object for nullMPI - if compiled without MPI library -OBJ_MPI = nullmpi.o - -# NetCDF (only required for Lorenz96) -NC_LIB = -NC_INC = diff --git a/make.arch/linux_ifort_sgimpt.h b/make.arch/linux_ifort_sgimpt.h deleted file mode 100644 index 0591cd3e4..000000000 --- a/make.arch/linux_ifort_sgimpt.h +++ /dev/null @@ -1,58 +0,0 @@ -###################################################### -# Include file with machine-specific definitions # -# for building PDAF. # -# # -# Variant for HLRN-II (SGI Altix ICE with Linux # -# and ifort and MVAPICH 2) # -# # -# In the case of compilation without MPI, a dummy # -# implementation of MPI, like provided in the # -# directory nullmpi/ has to be linked when building # -# an executable. # -###################################################### -# $Id: linux_ifort_mvapich2.h 1187 2011-09-16 08:14:28Z lnerger $ - - -# Compiler, Linker, and Archiver -FC = mpif90 -LD = $(FC) -AR = ar -RANLIB = ranlib - -# C preprocessor -# (only required, if preprocessing is not performed via the compiler) -CPP = /usr/bin/cpp - -# Definitions for CPP -# Define USE_PDAF to include PDAF -# Define BLOCKING_MPI_EXCHANGE to use blocking MPI commands to exchange data between model and PDAF -# (if the compiler does not support get_command_argument() -# from Fortran 2003 you should define F77 here.) -CPP_DEFS = -DUSE_PDAF - -# Optimization specs for compiler -# (You should explicitly define double precision for floating point -# variables in the compilation) -OPT= -O3 -xHOST -r8 - -# Optimization specifications for Linker -OPT_LNK = $(OPT) - -# Linking libraries (BLAS, LAPACK, if required: MPI) -LINK_LIBS = -Wl,--start-group $(MKLROOT)/lib/intel64/libmkl_intel_lp64.a $(MKLROOT)/lib/intel64/libmkl_intel_thread.a $(MKLROOT)/lib/intel64/libmkl_core.a -Wl,--end-group -openmp -lpthread -lm - -# Specifications for the archiver -AR_SPEC = - -# Specifications for ranlib -RAN_SPEC = - -# Include path for MPI header file -MPI_INC = - -# Object for nullMPI - if compiled without MPI library -OBJ_MPI = - -# NetCDF (only required for Lorenz96) -NC_LIB = -NC_INC = diff --git a/make.arch/linux_mpiifort_impi.h b/make.arch/linux_mpiifort_impi.h index 5d9410647..f80c69b69 100644 --- a/make.arch/linux_mpiifort_impi.h +++ b/make.arch/linux_mpiifort_impi.h @@ -47,6 +47,9 @@ AR_SPEC = # Specifications for ranlib RAN_SPEC = +# Specification for directory holding modules (-module for Intel, -J for GNU) +MODULEOPT = -module + # Include path for MPI header file MPI_INC = diff --git a/make.arch/linux_pgi_openmpi.h b/make.arch/linux_pgi_openmpi.h deleted file mode 100644 index 933d34763..000000000 --- a/make.arch/linux_pgi_openmpi.h +++ /dev/null @@ -1,57 +0,0 @@ -###################################################### -# Include file with machine-specific definitions # -# for building PDAF. # -# # -# Variant for Linux with PGI Compiler and OpenMPI # -# at DKRZ (tornado.dkrz.de) # -# # -# In the case of compilation without MPI, a dummy # -# implementation of MPI, like provided in the # -# directory nullmpi/ has to be linked when building # -# an executable. # -###################################################### -# $Id: linux_pgi_openmpi.h 1580 2015-06-07 08:15:58Z lnerger $ - - -# Compiler, Linker, and Archiver -FC = mpif90 -LD = $(FC) -AR = ar -RANLIB = ranlib - -# C preprocessor -# (only required, if preprocessing is not performed via the compiler) -CPP = /usr/bin/cpp - -# Definitions for CPP -# Define BLOCKING_MPI_EXCHANGE to use blocking MPI commands to exchange data between model and PDAF -# (if the compiler does not support get_command_argument() -# from Fortran 2003 you should define F77 here.) -CPP_DEFS = -DUSE_PDAF - -# Optimization specs for compiler -# (You should explicitly define double precision for floating point -# variables in the compilation) -OPT= -O3 -fast -Mr8 -Mr8intrinsics -Mbyteswapio -Mpreprocess - -# Optimization specifications for Linker -OPT_LNK = $(OPT) - -# Linking libraries (BLAS, LAPACK, if required: MPI) -LINK_LIBS = -L/sw/sles9-x64/acml-3.6.0/pgi64/lib -lacml -lacml_mv -Bstatic - -# Specifications for the archiver -AR_SPEC = - -# Specifications for ranlib -RAN_SPEC = - -# Include path for MPI header file -MPI_INC = - -# Object for nullMPI - if compiled without MPI library -OBJ_MPI = - -# NetCDF (only required for Lorenz96) -NC_LIB = -NC_INC = diff --git a/make.arch/macos_gfortran_openmpi.h b/make.arch/macos_gfortran_openmpi.h index a8e96be78..dde0f4841 100644 --- a/make.arch/macos_gfortran_openmpi.h +++ b/make.arch/macos_gfortran_openmpi.h @@ -49,6 +49,9 @@ AR_SPEC = # Specifications for ranlib RAN_SPEC = +# Specification for directory holding modules (-module for Intel, -J for GNU) +MODULEOPT = -J + # Include path for MPI header file MPI_INC = diff --git a/make.arch/macos_gfortran_snglprec.h b/make.arch/macos_gfortran_snglprec.h index c7e3d925e..8fa56b6b8 100644 --- a/make.arch/macos_gfortran_snglprec.h +++ b/make.arch/macos_gfortran_snglprec.h @@ -49,6 +49,9 @@ AR_SPEC = # Specifications for ranlib RAN_SPEC = +# Specification for directory holding modules (-module for Intel, -J for GNU) +MODULEOPT = -J + # Include path for MPI header file MPI_INC = diff --git a/make.arch/nec_sxace.h b/make.arch/nec_sxace.h index 87812773c..c0b11ac76 100644 --- a/make.arch/nec_sxace.h +++ b/make.arch/nec_sxace.h @@ -45,6 +45,9 @@ AR_SPEC = # Specifications for ranlib RAN_SPEC = +# Specification for directory holding modules (-module for Intel, -J for GNU) +MODULEOPT = -module + # Include path for MPI header file MPI_INC = -Idummympi diff --git a/make.arch/osx_gfortran_openmpi.h b/make.arch/osx_gfortran_openmpi.h index 7243c6a74..ce19b31be 100644 --- a/make.arch/osx_gfortran_openmpi.h +++ b/make.arch/osx_gfortran_openmpi.h @@ -48,6 +48,9 @@ AR_SPEC = # Specifications for ranlib RAN_SPEC = +# Specification for directory holding modules (-module for Intel, -J for GNU) +MODULEOPT = -J + # Include path for MPI header file MPI_INC = diff --git a/make.arch/osx_gfortran_snglprec.h b/make.arch/osx_gfortran_snglprec.h index f67cd653f..42b00e896 100644 --- a/make.arch/osx_gfortran_snglprec.h +++ b/make.arch/osx_gfortran_snglprec.h @@ -48,6 +48,9 @@ AR_SPEC = # Specifications for ranlib RAN_SPEC = +# Specification for directory holding modules (-module for Intel, -J for GNU) +MODULEOPT = -J + # Include path for MPI header file MPI_INC = diff --git a/make.arch/sgi-irix_mpi.h b/make.arch/sgi-irix_mpi.h deleted file mode 100644 index 6f6868ffd..000000000 --- a/make.arch/sgi-irix_mpi.h +++ /dev/null @@ -1,57 +0,0 @@ -###################################################### -# Include file with machine-specific definitions # -# for building PDAF. # -# # -# Variant for SGI Origin 2000 at AWI using MPI. # -# # -# In the case of compilation without MPI, a dummy # -# implementation of MPI, like provided in the # -# directory nullmpi/ has to be linked when building # -# an executable. # -###################################################### -# $Id: sgi-irix_mpi.h 1565 2015-02-28 17:04:41Z lnerger $ - - -# Compiler, Linker, and Archiver -FC = f90 -LD = f90 -AR = ar -RANLIB = ranlib - -# C preprocessor -# (only required, if preprocessing is not performed via the compiler) -CPP = /lib/cpp - -# Definitions for CPP -# Define USE_PDAF to include PDAF -# Define BLOCKING_MPI_EXCHANGE to use blocking MPI commands to exchange data between model and PDAF -# (if the compiler does not support get_command_argument() -# from Fortran 2003 you should define F77 here.) -CPP_DEFS = -DF77 - -# Optimization specs for compiler -# (You should explicitly define double precision for floating point -# variables in the compilation) -OPT= -r8 -O3 - -# Optimization specifications for Linker -OPT_LNK = $(OPT) - -# Linking libraries (BLAS, LAPACK, if required: MPI) -LINK_LIBS = -lblas -lscs -lmpi - -# Specifications for the archiver -AR_SPEC = - -# Specifications for ranlib -RAN_SPEC = - -# Include path for MPI header file -MPI_INC = - -# Object for nullMPI - if compiled without MPI library -OBJ_MPI = - -# NetCDF (only required for Lorenz96) -NC_LIB = -NC_INC = diff --git a/make.arch/sun_studio.h b/make.arch/sun_studio.h deleted file mode 100644 index f7535e6ae..000000000 --- a/make.arch/sun_studio.h +++ /dev/null @@ -1,57 +0,0 @@ -###################################################### -# Include file with machine-specific definitions # -# for building PDAF. # -# # -# Variant for Sun with Sun Studio 12 Compiler at AWI # -# without MPI. # -# # -# In the case of compilation without MPI, a dummy # -# implementation of MPI, like provided in the # -# directory nullmpi/ has to be linked when building # -# an executable. # -###################################################### -# $Id: sun_studio.h 850 2010-02-02 09:53:06Z lnerger $ - - -# Compiler, Linker, and Archiver -FC = f90 -LD = f90 -AR = ar -RANLIB = ranlib - -# C preprocessor -# (only required, if preprocessing is not performed via the compiler) -CPP = /usr/ccs/lib/cpp - -# Definitions for CPP -# Define USE_PDAF to include PDAF -# (if the compiler does not support get_command_argument() -# from Fortran 2003 you should define F77 here.) -CPP_DEFS = - -# Optimization specs for compiler -# (You should explicitly define double precision for floating point -# variables in the compilation) -OPT= -fast -xtypemap=real:64 -m64 - -# Optimization specifications for Linker -OPT_LNK = $(OPT) - -# Linking libraries (BLAS, LAPACK, if required: MPI) -LINK_LIBS = -xlic_lib=sunperf - -# Specifications for the archiver -AR_SPEC = - -# Specifications for ranlib -RAN_SPEC = - -# Include path for MPI header file -MPI_INC = -Idummympi - -# Object for nullMPI - if compiled without MPI library -OBJ_MPI = nullmpi.o - -# NetCDF (only required for Lorenz96) -NC_LIB = -NC_INC = diff --git a/make.arch/windows_gfortran.h b/make.arch/windows_gfortran.h deleted file mode 100644 index df50a1f38..000000000 --- a/make.arch/windows_gfortran.h +++ /dev/null @@ -1,57 +0,0 @@ -###################################################### -# Include file with machine-specific definitions # -# for building PDAF. # -# # -# Variant for Windows with gfortran using Cygwin # -# without MPI. # -# # -# In the case of compilation without MPI, a dummy # -# implementation of MPI, like provided in the # -# directory nullmpi/ has to be linked when building # -# an executable. # -###################################################### -# $Id: linux_gfortran.h 1235 2012-01-19 08:38:11Z lnerger $ - - -# Compiler, Linker, and Archiver -FC = gfortran -LD = gfortran -AR = ar -RANLIB = ranlib - -# C preprocessor -# (only required, if preprocessing is not performed via the compiler) -CPP = /usr/bin/cpp - -# Definitions for CPP -# Define USE_PDAF to include PDAF -# (if the compiler does not support get_command_argument() -# from Fortran 2003 you should define F77 here.) -CPP_DEFS = -DUSE_PDAF - -# Optimization specs for compiler -# (You should explicitly define double precision for floating point -# variables in the compilation) -OPT = -O3 -fdefault-real-8 - -# Optimization specifications for Linker -OPT_LNK = $(OPT) - -# Linking libraries (BLAS, LAPACK, if required: MPI) -LINK_LIBS =-L/usr/lib -llapack -lblas -lm - -# Specifications for the archiver -AR_SPEC = - -# Specifications for ranlib -RAN_SPEC = - -# Include path for MPI header file -MPI_INC = -Idummympi - -# Object for nullMPI - if compiled without MPI library -OBJ_MPI = nullmpi.o - -# NetCDF (only required for Lorenz96) -NC_LIB = -L/usr/lib -lnetcdf -lnetcdff -NC_INC = -I/usr/include diff --git a/make.arch/windows_gfortran_openmpi.h b/make.arch/windows_gfortran_openmpi.h index 1796d27ae..552fded77 100644 --- a/make.arch/windows_gfortran_openmpi.h +++ b/make.arch/windows_gfortran_openmpi.h @@ -48,6 +48,9 @@ AR_SPEC = # Specifications for ranlib RAN_SPEC = +# Specification for directory holding modules (-module for Intel, -J for GNU) +MODULEOPT = -module + # Include path for MPI header file MPI_INC = From 0e0973bbd26508a748149b75270aa0462aeb6476 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Tue, 23 Jul 2024 17:43:48 +0200 Subject: [PATCH 13/83] Add PDAFomi_assimilate_local variant for use with non-diagonal R matrices. In this case, the routine profRinvA_l is specified by the user. Thus, the multiplicaation with any form of R and be implemeented. --- src/PDAFomi_assimilate_local_nondiagR.F90 | 132 +++++++++++++++++++ src/PDAFomi_assimilate_local_nondiagR_si.F90 | 83 ++++++++++++ 2 files changed, 215 insertions(+) create mode 100644 src/PDAFomi_assimilate_local_nondiagR.F90 create mode 100644 src/PDAFomi_assimilate_local_nondiagR_si.F90 diff --git a/src/PDAFomi_assimilate_local_nondiagR.F90 b/src/PDAFomi_assimilate_local_nondiagR.F90 new file mode 100644 index 000000000..02dbb089b --- /dev/null +++ b/src/PDAFomi_assimilate_local_nondiagR.F90 @@ -0,0 +1,132 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_assimilate_local_nondiagR --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFomi_assimilate_local_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, prodRinvA_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + next_observation_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2020-11 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from full state + l2g_state_pdaf, & ! Init full state from local state + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + obs_op_f_pdaf, & ! Full observation operator + init_dim_obs_l_pdaf ! Initialize local dimimension of obs. vector + EXTERNAL :: prodRinvA_l_pdaf ! Provide product of inverse of R with matrix A + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize full observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_g2l_obs_cb, & ! Restrict full obs. vector to local analysis domain + PDAFomi_prodRinvA_l_cb, & ! Provide product R^-1 A on local analysis domain + PDAFomi_likelihood_l_cb ! Compute likelihood and apply localization + EXTERNAL :: PDAFomi_prodRinvA_hyb_l_cb, & ! Product R^-1 A on local analysis domain with hybrid weight + PDAFomi_likelihood_hyb_l_cb ! Compute likelihood and apply localization with tempering + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_local -- START' + + IF (TRIM(filterstr) == 'LSEIK') THEN + CALL PDAF_assimilate_lseik(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + prepoststep_pdaf, prodRinvA_l_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & + next_observation_pdaf, outflag) + ELSE IF (TRIM(filterstr) == 'LETKF') THEN + CALL PDAF_assimilate_letkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + prepoststep_pdaf, prodRinvA_l_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & + next_observation_pdaf, outflag) + ELSE IF (TRIM(filterstr) == 'LESTKF') THEN + CALL PDAF_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + prepoststep_pdaf, prodRinvA_l_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & + next_observation_pdaf, outflag) + ELSE IF (TRIM(filterstr) == 'LNETF') THEN + WRITE (*,*) 'PDAF-ERROR: Non-diagonal R matrix is not supported for LNETF' + outflag=200 + ELSE IF (TRIM(filterstr) == 'LKNETF') THEN + WRITE (*,*) 'PDAF-ERROR: Non-diagonal R matrix is not supported for LKNETF' + outflag=200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_local -- END' + +END SUBROUTINE PDAFomi_assimilate_local_nondiagR diff --git a/src/PDAFomi_assimilate_local_nondiagR_si.F90 b/src/PDAFomi_assimilate_local_nondiagR_si.F90 new file mode 100644 index 000000000..7974ec44d --- /dev/null +++ b/src/PDAFomi_assimilate_local_nondiagR_si.F90 @@ -0,0 +1,83 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_assimilate_local_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFomi_assimilate_local_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2021-10 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from full state + l2g_state_pdaf ! Init full state from local state + EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain + obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain + init_dim_obs_l_pdafomi ! Get dimension of obs. vector for local analysis domain + EXTERNAL :: prodRinvA_l_pdafomi ! Provide product of inverse of R with matrix A + + + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFomi_assimilate_local +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFomi_assimilate_local_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, & + next_observation_pdaf, outflag) + +END SUBROUTINE PDAFomi_assimilate_local_si From bdd8d5c83a1c285b441be31fcb7752570f9f30c3 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Fri, 26 Jul 2024 17:00:27 +0200 Subject: [PATCH 14/83] Bug correction in verbosity flag for localization --- src/PDAFomi_obs_l.F90 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/PDAFomi_obs_l.F90 b/src/PDAFomi_obs_l.F90 index b96f41345..6e710da63 100644 --- a/src/PDAFomi_obs_l.F90 +++ b/src/PDAFomi_obs_l.F90 @@ -3822,7 +3822,11 @@ SUBROUTINE PDAFomi_weights_l(verbose, nobs_l, ncols, locweight, cradius, sradius ! Control verbosity of PDAF_local_weight - IF (verbose==1) verbose_w = 1 + IF (verbose==1) THEN + verbose_w = 1 + ELSE + verbose_w = 0 + END IF IF (locweight /= 4) THEN ! All localizations except regulated weight based on variance at From 7a61f4812030dd285ead50b66713c146386011b0 Mon Sep 17 00:00:00 2001 From: Johannes Keller Date: Fri, 19 Jul 2024 17:03:59 +0200 Subject: [PATCH 15/83] parser_mpi.F90: Add check whether string-input has been cut For inputs longer than 100 characters, only the first 100 characters are used as input, which may lead to unwanted behavior (f.e. when the input string is a path). This check aborts the execution, whenever the input string was longer than 100 characters. --- templates/classical/online/parser_mpi.F90 | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/templates/classical/online/parser_mpi.F90 b/templates/classical/online/parser_mpi.F90 index 61de723e6..0e975532e 100644 --- a/templates/classical/online/parser_mpi.F90 +++ b/templates/classical/online/parser_mpi.F90 @@ -57,6 +57,8 @@ MODULE parser ! ! !USES: USE mpi + USE mod_parallel_pdaf, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -190,6 +192,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -209,6 +213,21 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for cut strings longer than 100 characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, a)') "called handle=", string + WRITE (*,'(2x, a, a)') "parsed handle=", str1 + WRITE (*,'(2x, a, a)') "parsed input(cut)=", str2 + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN READ(str2, *) parsed_string From 1c0f23fd9d2297eab8df7000941f1249349c45a8 Mon Sep 17 00:00:00 2001 From: Johannes Keller Date: Fri, 19 Jul 2024 17:05:46 +0200 Subject: [PATCH 16/83] parser_mpi.F90: Format specifier `(a)` for string command-line input For paths, the `READ` function supplied with the default format specifier `*` reads the input only up to the first appearance of the character `/`. --- templates/classical/online/parser_mpi.F90 | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/templates/classical/online/parser_mpi.F90 b/templates/classical/online/parser_mpi.F90 index 0e975532e..f6cbc8fe1 100644 --- a/templates/classical/online/parser_mpi.F90 +++ b/templates/classical/online/parser_mpi.F90 @@ -230,7 +230,9 @@ SUBROUTINE parse_string(handle, charvalue) #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO From 3fab32f7dfd067d4a93636c85d64122d72900fd7 Mon Sep 17 00:00:00 2001 From: Johannes Keller Date: Tue, 23 Jul 2024 13:02:50 +0200 Subject: [PATCH 17/83] add `TRIM` function and blank spaces in error message see https://github.com/larsnerger/PDAF_devel/pull/8#pullrequestreview-2190714383 --- templates/classical/online/parser_mpi.F90 | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/templates/classical/online/parser_mpi.F90 b/templates/classical/online/parser_mpi.F90 index f6cbc8fe1..091a324ec 100644 --- a/templates/classical/online/parser_mpi.F90 +++ b/templates/classical/online/parser_mpi.F90 @@ -214,15 +214,16 @@ SUBROUTINE parse_string(handle, charvalue) CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) - ! Add check for cut strings longer than 100 characters + ! Add check for inadmissible strings longer than 100 + ! characters CALL get_command_argument(i, str1_check) CALL get_command_argument(i+1, str2_check) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, a)') "called handle=", string - WRITE (*,'(2x, a, a)') "parsed handle=", str1 - WRITE (*,'(2x, a, a)') "parsed input(cut)=", str2 + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF From 81d23b766ebfb61da260615b825cd1ca339fb9c6 Mon Sep 17 00:00:00 2001 From: Johannes Keller Date: Tue, 23 Jul 2024 13:23:04 +0200 Subject: [PATCH 18/83] distribute `parser_mpi.F90` check in `tutorial/` --- .../offline_2D_parallel/parser_mpi.F90 | 25 +++++++++++++++++-- .../online_2D_parallelmodel/parser_mpi.F90 | 25 +++++++++++++++++-- .../parser_mpi.F90 | 25 +++++++++++++++++-- .../parser_mpi.F90 | 25 +++++++++++++++++-- .../online_2D_serialmodel/parser_mpi.F90 | 25 +++++++++++++++++-- tutorial/offline_2D_parallel/parser_mpi.F90 | 24 +++++++++++++++++- tutorial/offline_2D_serial/parser_mpi.F90 | 24 +++++++++++++++++- .../online_2D_parallelmodel/parser_mpi.F90 | 24 +++++++++++++++++- .../parser_mpi.F90 | 24 +++++++++++++++++- .../parser_mpi.F90 | 24 +++++++++++++++++- tutorial/online_2D_serialmodel/parser_mpi.F90 | 24 +++++++++++++++++- .../parser_mpi.F90 | 24 +++++++++++++++++- 12 files changed, 276 insertions(+), 17 deletions(-) diff --git a/tutorial/classical/offline_2D_parallel/parser_mpi.F90 b/tutorial/classical/offline_2D_parallel/parser_mpi.F90 index e4caa6f1a..54978a94e 100644 --- a/tutorial/classical/offline_2D_parallel/parser_mpi.F90 +++ b/tutorial/classical/offline_2D_parallel/parser_mpi.F90 @@ -57,7 +57,8 @@ MODULE parser ! ! !USES: USE mpi - + USE mod_parallel, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -191,6 +192,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -210,9 +213,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO diff --git a/tutorial/classical/online_2D_parallelmodel/parser_mpi.F90 b/tutorial/classical/online_2D_parallelmodel/parser_mpi.F90 index e4caa6f1a..d0e53e71d 100644 --- a/tutorial/classical/online_2D_parallelmodel/parser_mpi.F90 +++ b/tutorial/classical/online_2D_parallelmodel/parser_mpi.F90 @@ -57,7 +57,8 @@ MODULE parser ! ! !USES: USE mpi - + USE mod_parallel_model, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -191,6 +192,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -210,9 +213,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar/parser_mpi.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar/parser_mpi.F90 index e4caa6f1a..d0e53e71d 100644 --- a/tutorial/classical/online_2D_parallelmodel_fullpar/parser_mpi.F90 +++ b/tutorial/classical/online_2D_parallelmodel_fullpar/parser_mpi.F90 @@ -57,7 +57,8 @@ MODULE parser ! ! !USES: USE mpi - + USE mod_parallel_model, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -191,6 +192,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -210,9 +213,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 index e4caa6f1a..d0e53e71d 100644 --- a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 +++ b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 @@ -57,7 +57,8 @@ MODULE parser ! ! !USES: USE mpi - + USE mod_parallel_model, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -191,6 +192,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -210,9 +213,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO diff --git a/tutorial/classical/online_2D_serialmodel/parser_mpi.F90 b/tutorial/classical/online_2D_serialmodel/parser_mpi.F90 index e4caa6f1a..7eff019be 100644 --- a/tutorial/classical/online_2D_serialmodel/parser_mpi.F90 +++ b/tutorial/classical/online_2D_serialmodel/parser_mpi.F90 @@ -57,7 +57,8 @@ MODULE parser ! ! !USES: USE mpi - + USE mod_parallel_pdaf, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -191,6 +192,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -210,9 +213,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO diff --git a/tutorial/offline_2D_parallel/parser_mpi.F90 b/tutorial/offline_2D_parallel/parser_mpi.F90 index 4269eed43..f738ded7e 100644 --- a/tutorial/offline_2D_parallel/parser_mpi.F90 +++ b/tutorial/offline_2D_parallel/parser_mpi.F90 @@ -53,6 +53,8 @@ MODULE parser use mpi + USE mod_parallel_pdaf, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -187,6 +189,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -206,9 +210,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO diff --git a/tutorial/offline_2D_serial/parser_mpi.F90 b/tutorial/offline_2D_serial/parser_mpi.F90 index 4269eed43..f738ded7e 100644 --- a/tutorial/offline_2D_serial/parser_mpi.F90 +++ b/tutorial/offline_2D_serial/parser_mpi.F90 @@ -53,6 +53,8 @@ MODULE parser use mpi + USE mod_parallel_pdaf, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -187,6 +189,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -206,9 +210,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO diff --git a/tutorial/online_2D_parallelmodel/parser_mpi.F90 b/tutorial/online_2D_parallelmodel/parser_mpi.F90 index 4269eed43..8a1056e26 100644 --- a/tutorial/online_2D_parallelmodel/parser_mpi.F90 +++ b/tutorial/online_2D_parallelmodel/parser_mpi.F90 @@ -53,6 +53,8 @@ MODULE parser use mpi + USE mod_parallel_model, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -187,6 +189,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -206,9 +210,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO diff --git a/tutorial/online_2D_parallelmodel_fullpar/parser_mpi.F90 b/tutorial/online_2D_parallelmodel_fullpar/parser_mpi.F90 index 4269eed43..8a1056e26 100644 --- a/tutorial/online_2D_parallelmodel_fullpar/parser_mpi.F90 +++ b/tutorial/online_2D_parallelmodel_fullpar/parser_mpi.F90 @@ -53,6 +53,8 @@ MODULE parser use mpi + USE mod_parallel_model, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -187,6 +189,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -206,9 +210,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO diff --git a/tutorial/online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 b/tutorial/online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 index 4269eed43..8a1056e26 100644 --- a/tutorial/online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 +++ b/tutorial/online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 @@ -53,6 +53,8 @@ MODULE parser use mpi + USE mod_parallel_model, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -187,6 +189,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -206,9 +210,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO diff --git a/tutorial/online_2D_serialmodel/parser_mpi.F90 b/tutorial/online_2D_serialmodel/parser_mpi.F90 index 4269eed43..f738ded7e 100644 --- a/tutorial/online_2D_serialmodel/parser_mpi.F90 +++ b/tutorial/online_2D_serialmodel/parser_mpi.F90 @@ -53,6 +53,8 @@ MODULE parser use mpi + USE mod_parallel_pdaf, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -187,6 +189,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -206,9 +210,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO diff --git a/tutorial/online_2D_serialmodel_2fields/parser_mpi.F90 b/tutorial/online_2D_serialmodel_2fields/parser_mpi.F90 index 4269eed43..f738ded7e 100644 --- a/tutorial/online_2D_serialmodel_2fields/parser_mpi.F90 +++ b/tutorial/online_2D_serialmodel_2fields/parser_mpi.F90 @@ -53,6 +53,8 @@ MODULE parser use mpi + USE mod_parallel_pdaf, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -187,6 +189,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -206,9 +210,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO From 6e8ac72b224ff9ff16fa38730761bb987c8277b9 Mon Sep 17 00:00:00 2001 From: Johannes Keller Date: Tue, 23 Jul 2024 13:27:53 +0200 Subject: [PATCH 19/83] distribute `parser_mpi.F90` check in `templates/` --- templates/classical/offline/parser_mpi.F90 | 27 +++++++++++++++++--- templates/offline_omi/parser_mpi.F90 | 24 ++++++++++++++++- templates/online_omi/parser_mpi.F90 | 24 ++++++++++++++++- templates/online_omi_flexible/parser_mpi.F90 | 24 ++++++++++++++++- 4 files changed, 93 insertions(+), 6 deletions(-) diff --git a/templates/classical/offline/parser_mpi.F90 b/templates/classical/offline/parser_mpi.F90 index 709c0e5c8..5af88c362 100644 --- a/templates/classical/offline/parser_mpi.F90 +++ b/templates/classical/offline/parser_mpi.F90 @@ -57,10 +57,11 @@ MODULE parser ! ! !USES: USE mpi - + USE mod_parallel, & + ONLY: abort_parallel IMPLICIT NONE SAVE - + ! !PUBLIC MEMBER FUNCTIONS: PUBLIC :: parse CHARACTER(len=32), PUBLIC :: handle ! handle for command line parser @@ -191,6 +192,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -210,9 +213,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO diff --git a/templates/offline_omi/parser_mpi.F90 b/templates/offline_omi/parser_mpi.F90 index 4269eed43..f738ded7e 100644 --- a/templates/offline_omi/parser_mpi.F90 +++ b/templates/offline_omi/parser_mpi.F90 @@ -53,6 +53,8 @@ MODULE parser use mpi + USE mod_parallel_pdaf, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -187,6 +189,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -206,9 +210,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO diff --git a/templates/online_omi/parser_mpi.F90 b/templates/online_omi/parser_mpi.F90 index 4269eed43..f738ded7e 100644 --- a/templates/online_omi/parser_mpi.F90 +++ b/templates/online_omi/parser_mpi.F90 @@ -53,6 +53,8 @@ MODULE parser use mpi + USE mod_parallel_pdaf, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -187,6 +189,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -206,9 +210,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO diff --git a/templates/online_omi_flexible/parser_mpi.F90 b/templates/online_omi_flexible/parser_mpi.F90 index 4269eed43..f738ded7e 100644 --- a/templates/online_omi_flexible/parser_mpi.F90 +++ b/templates/online_omi_flexible/parser_mpi.F90 @@ -53,6 +53,8 @@ MODULE parser use mpi + USE mod_parallel_pdaf, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -187,6 +189,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -206,9 +210,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO From adef63f1ca89c8ce47a2d7dc22a4f74cbe9180b3 Mon Sep 17 00:00:00 2001 From: Johannes Keller Date: Tue, 23 Jul 2024 13:30:13 +0200 Subject: [PATCH 20/83] distribute `parser_mpi.F90` check in `testsuite/` --- testsuite/src/main/parser_mpi.F90 | 25 +++++++++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/testsuite/src/main/parser_mpi.F90 b/testsuite/src/main/parser_mpi.F90 index 886442cd9..797d7f7c4 100644 --- a/testsuite/src/main/parser_mpi.F90 +++ b/testsuite/src/main/parser_mpi.F90 @@ -57,7 +57,8 @@ MODULE parser ! ! !USES: USE mpi - + USE mod_parallel, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -191,6 +192,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -210,9 +213,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO From 01ca14941637cf2ecb76fb8478d1cb9a2d8e7564 Mon Sep 17 00:00:00 2001 From: Johannes Keller Date: Tue, 23 Jul 2024 13:34:03 +0200 Subject: [PATCH 21/83] distribute `parser_mpi.F90` check in `models/` --- models/classical/lorenz05b/parser_mpi.F90 | 24 +++++++++++++++++++++- models/classical/lorenz05c/parser_mpi.F90 | 24 +++++++++++++++++++++- models/classical/lorenz63/parser_mpi.F90 | 24 +++++++++++++++++++++- models/classical/lorenz96/parser_mpi.F90 | 24 +++++++++++++++++++++- models/lorenz05b/parser_mpi.F90 | 24 +++++++++++++++++++++- models/lorenz05c/parser_mpi.F90 | 24 +++++++++++++++++++++- models/lorenz63/parser_mpi.F90 | 24 +++++++++++++++++++++- models/lorenz96/parser_mpi.F90 | 25 ++++++++++++++++++++++- 8 files changed, 185 insertions(+), 8 deletions(-) diff --git a/models/classical/lorenz05b/parser_mpi.F90 b/models/classical/lorenz05b/parser_mpi.F90 index fadaf0ccd..ba17e1e80 100644 --- a/models/classical/lorenz05b/parser_mpi.F90 +++ b/models/classical/lorenz05b/parser_mpi.F90 @@ -57,6 +57,8 @@ MODULE parser ! ! !USES: USE mpi + USE mod_parallel, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -191,6 +193,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -210,9 +214,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO diff --git a/models/classical/lorenz05c/parser_mpi.F90 b/models/classical/lorenz05c/parser_mpi.F90 index fadaf0ccd..ba17e1e80 100644 --- a/models/classical/lorenz05c/parser_mpi.F90 +++ b/models/classical/lorenz05c/parser_mpi.F90 @@ -57,6 +57,8 @@ MODULE parser ! ! !USES: USE mpi + USE mod_parallel, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -191,6 +193,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -210,9 +214,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO diff --git a/models/classical/lorenz63/parser_mpi.F90 b/models/classical/lorenz63/parser_mpi.F90 index fd31ab325..edfb99e9c 100644 --- a/models/classical/lorenz63/parser_mpi.F90 +++ b/models/classical/lorenz63/parser_mpi.F90 @@ -57,6 +57,8 @@ MODULE parser ! ! !USES: USE mpi + USE mod_parallel, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -191,6 +193,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -210,9 +214,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO diff --git a/models/classical/lorenz96/parser_mpi.F90 b/models/classical/lorenz96/parser_mpi.F90 index fd31ab325..edfb99e9c 100644 --- a/models/classical/lorenz96/parser_mpi.F90 +++ b/models/classical/lorenz96/parser_mpi.F90 @@ -57,6 +57,8 @@ MODULE parser ! ! !USES: USE mpi + USE mod_parallel, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -191,6 +193,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -210,9 +214,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO diff --git a/models/lorenz05b/parser_mpi.F90 b/models/lorenz05b/parser_mpi.F90 index fadaf0ccd..ba17e1e80 100644 --- a/models/lorenz05b/parser_mpi.F90 +++ b/models/lorenz05b/parser_mpi.F90 @@ -57,6 +57,8 @@ MODULE parser ! ! !USES: USE mpi + USE mod_parallel, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -191,6 +193,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -210,9 +214,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO diff --git a/models/lorenz05c/parser_mpi.F90 b/models/lorenz05c/parser_mpi.F90 index fadaf0ccd..ba17e1e80 100644 --- a/models/lorenz05c/parser_mpi.F90 +++ b/models/lorenz05c/parser_mpi.F90 @@ -57,6 +57,8 @@ MODULE parser ! ! !USES: USE mpi + USE mod_parallel, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -191,6 +193,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -210,9 +214,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO diff --git a/models/lorenz63/parser_mpi.F90 b/models/lorenz63/parser_mpi.F90 index fd31ab325..edfb99e9c 100644 --- a/models/lorenz63/parser_mpi.F90 +++ b/models/lorenz63/parser_mpi.F90 @@ -57,6 +57,8 @@ MODULE parser ! ! !USES: USE mpi + USE mod_parallel, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -191,6 +193,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -210,9 +214,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO diff --git a/models/lorenz96/parser_mpi.F90 b/models/lorenz96/parser_mpi.F90 index 75810b0aa..edfb99e9c 100644 --- a/models/lorenz96/parser_mpi.F90 +++ b/models/lorenz96/parser_mpi.F90 @@ -57,6 +57,9 @@ MODULE parser ! ! !USES: USE mpi + USE mod_parallel, & + ONLY: abort_parallel + IMPLICIT NONE SAVE @@ -190,6 +193,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -209,9 +214,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO From 583d30eb857cd8c8992f645057868b96d6d8aeaa Mon Sep 17 00:00:00 2001 From: Johannes Keller Date: Tue, 23 Jul 2024 13:42:25 +0200 Subject: [PATCH 22/83] distribute `parser_mpi.F90` check in `tutorial/3dvar` --- .../3dvar/offline_2D_serial/parser_mpi.F90 | 24 ++++++++++++++++++- .../online_2D_parallelmodel/parser_mpi.F90 | 24 ++++++++++++++++++- .../online_2D_serialmodel/parser_mpi.F90 | 24 ++++++++++++++++++- 3 files changed, 69 insertions(+), 3 deletions(-) diff --git a/tutorial/3dvar/offline_2D_serial/parser_mpi.F90 b/tutorial/3dvar/offline_2D_serial/parser_mpi.F90 index 4269eed43..f738ded7e 100644 --- a/tutorial/3dvar/offline_2D_serial/parser_mpi.F90 +++ b/tutorial/3dvar/offline_2D_serial/parser_mpi.F90 @@ -53,6 +53,8 @@ MODULE parser use mpi + USE mod_parallel_pdaf, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -187,6 +189,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -206,9 +210,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO diff --git a/tutorial/3dvar/online_2D_parallelmodel/parser_mpi.F90 b/tutorial/3dvar/online_2D_parallelmodel/parser_mpi.F90 index 4269eed43..8a1056e26 100644 --- a/tutorial/3dvar/online_2D_parallelmodel/parser_mpi.F90 +++ b/tutorial/3dvar/online_2D_parallelmodel/parser_mpi.F90 @@ -53,6 +53,8 @@ MODULE parser use mpi + USE mod_parallel_model, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -187,6 +189,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -206,9 +210,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO diff --git a/tutorial/3dvar/online_2D_serialmodel/parser_mpi.F90 b/tutorial/3dvar/online_2D_serialmodel/parser_mpi.F90 index 4269eed43..f738ded7e 100644 --- a/tutorial/3dvar/online_2D_serialmodel/parser_mpi.F90 +++ b/tutorial/3dvar/online_2D_serialmodel/parser_mpi.F90 @@ -53,6 +53,8 @@ MODULE parser use mpi + USE mod_parallel_pdaf, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -187,6 +189,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -206,9 +210,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO From c7794cfdfa5ac439023118eda89b6671efae7e57 Mon Sep 17 00:00:00 2001 From: Johannes Keller Date: Tue, 23 Jul 2024 13:45:25 +0200 Subject: [PATCH 23/83] distribute `parser_mpi.F90` check in `tutorial` (final one) --- .../offline_2D_serial/parser_mpi.F90 | 25 +++++++++++++++++-- 1 file changed, 23 insertions(+), 2 deletions(-) diff --git a/tutorial/classical/offline_2D_serial/parser_mpi.F90 b/tutorial/classical/offline_2D_serial/parser_mpi.F90 index e4caa6f1a..54978a94e 100644 --- a/tutorial/classical/offline_2D_serial/parser_mpi.F90 +++ b/tutorial/classical/offline_2D_serial/parser_mpi.F90 @@ -57,7 +57,8 @@ MODULE parser ! ! !USES: USE mpi - + USE mod_parallel, & + ONLY: abort_parallel IMPLICIT NONE SAVE @@ -191,6 +192,8 @@ SUBROUTINE parse_string(handle, charvalue) ! *** local variables *** CHARACTER(len=100) :: string CHARACTER(len=100) :: parsed_string + CHARACTER(len=110) :: str1_check + CHARACTER(len=110) :: str2_check LOGICAL :: modified ! *** Initialize *** @@ -210,9 +213,27 @@ SUBROUTINE parse_string(handle, charvalue) DO i = 1, command_argument_count() - 1 CALL get_command_argument(i, str1) CALL get_command_argument(i+1, str2) + + ! Add check for inadmissible strings longer than 100 + ! characters + CALL get_command_argument(i, str1_check) + CALL get_command_argument(i+1, str2_check) + IF (mype == 0) THEN + IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN + WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." + WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + call abort_parallel() + END IF + END IF + + #endif IF (str1 == TRIM(string)) THEN - READ(str2, *) parsed_string + ! Format specifier is needed for reading paths. Using + ! `*` as format specifier, reading stops at a `/` + READ(str2, '(a)') parsed_string modified = .TRUE. END IF ENDDO From 2327c9b432682b3908b334834b320fcaf9df4e13 Mon Sep 17 00:00:00 2001 From: Johannes Keller Date: Wed, 24 Jul 2024 13:18:28 +0200 Subject: [PATCH 24/83] compilation error fix: adding leading space count for X descriptor Error message: ``` 221 | WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) | 1 Error: GNU Extension: X descriptor requires leading space count at (1) ``` --- models/classical/lorenz05b/parser_mpi.F90 | 6 +++--- models/classical/lorenz05c/parser_mpi.F90 | 6 +++--- models/classical/lorenz63/parser_mpi.F90 | 6 +++--- models/classical/lorenz96/parser_mpi.F90 | 6 +++--- models/lorenz05b/parser_mpi.F90 | 6 +++--- models/lorenz05c/parser_mpi.F90 | 6 +++--- models/lorenz63/parser_mpi.F90 | 6 +++--- models/lorenz96/parser_mpi.F90 | 6 +++--- templates/classical/offline/parser_mpi.F90 | 6 +++--- templates/classical/online/parser_mpi.F90 | 6 +++--- templates/offline_omi/parser_mpi.F90 | 6 +++--- templates/online_omi/parser_mpi.F90 | 6 +++--- templates/online_omi_flexible/parser_mpi.F90 | 6 +++--- testsuite/src/main/parser_mpi.F90 | 6 +++--- tutorial/3dvar/offline_2D_serial/parser_mpi.F90 | 6 +++--- tutorial/3dvar/online_2D_parallelmodel/parser_mpi.F90 | 6 +++--- tutorial/3dvar/online_2D_serialmodel/parser_mpi.F90 | 6 +++--- tutorial/classical/offline_2D_parallel/parser_mpi.F90 | 6 +++--- tutorial/classical/offline_2D_serial/parser_mpi.F90 | 6 +++--- tutorial/classical/online_2D_parallelmodel/parser_mpi.F90 | 6 +++--- .../online_2D_parallelmodel_fullpar/parser_mpi.F90 | 6 +++--- .../online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 | 6 +++--- tutorial/classical/online_2D_serialmodel/parser_mpi.F90 | 6 +++--- tutorial/offline_2D_parallel/parser_mpi.F90 | 6 +++--- tutorial/offline_2D_serial/parser_mpi.F90 | 6 +++--- tutorial/online_2D_parallelmodel/parser_mpi.F90 | 6 +++--- tutorial/online_2D_parallelmodel_fullpar/parser_mpi.F90 | 6 +++--- .../online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 | 6 +++--- tutorial/online_2D_serialmodel/parser_mpi.F90 | 6 +++--- tutorial/online_2D_serialmodel_2fields/parser_mpi.F90 | 6 +++--- 30 files changed, 90 insertions(+), 90 deletions(-) diff --git a/models/classical/lorenz05b/parser_mpi.F90 b/models/classical/lorenz05b/parser_mpi.F90 index ba17e1e80..f1ed34aa7 100644 --- a/models/classical/lorenz05b/parser_mpi.F90 +++ b/models/classical/lorenz05b/parser_mpi.F90 @@ -222,9 +222,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/models/classical/lorenz05c/parser_mpi.F90 b/models/classical/lorenz05c/parser_mpi.F90 index ba17e1e80..f1ed34aa7 100644 --- a/models/classical/lorenz05c/parser_mpi.F90 +++ b/models/classical/lorenz05c/parser_mpi.F90 @@ -222,9 +222,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/models/classical/lorenz63/parser_mpi.F90 b/models/classical/lorenz63/parser_mpi.F90 index edfb99e9c..d4008aca4 100644 --- a/models/classical/lorenz63/parser_mpi.F90 +++ b/models/classical/lorenz63/parser_mpi.F90 @@ -222,9 +222,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/models/classical/lorenz96/parser_mpi.F90 b/models/classical/lorenz96/parser_mpi.F90 index edfb99e9c..d4008aca4 100644 --- a/models/classical/lorenz96/parser_mpi.F90 +++ b/models/classical/lorenz96/parser_mpi.F90 @@ -222,9 +222,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/models/lorenz05b/parser_mpi.F90 b/models/lorenz05b/parser_mpi.F90 index ba17e1e80..f1ed34aa7 100644 --- a/models/lorenz05b/parser_mpi.F90 +++ b/models/lorenz05b/parser_mpi.F90 @@ -222,9 +222,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/models/lorenz05c/parser_mpi.F90 b/models/lorenz05c/parser_mpi.F90 index ba17e1e80..f1ed34aa7 100644 --- a/models/lorenz05c/parser_mpi.F90 +++ b/models/lorenz05c/parser_mpi.F90 @@ -222,9 +222,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/models/lorenz63/parser_mpi.F90 b/models/lorenz63/parser_mpi.F90 index edfb99e9c..d4008aca4 100644 --- a/models/lorenz63/parser_mpi.F90 +++ b/models/lorenz63/parser_mpi.F90 @@ -222,9 +222,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/models/lorenz96/parser_mpi.F90 b/models/lorenz96/parser_mpi.F90 index edfb99e9c..d4008aca4 100644 --- a/models/lorenz96/parser_mpi.F90 +++ b/models/lorenz96/parser_mpi.F90 @@ -222,9 +222,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/templates/classical/offline/parser_mpi.F90 b/templates/classical/offline/parser_mpi.F90 index 5af88c362..6c42d82f8 100644 --- a/templates/classical/offline/parser_mpi.F90 +++ b/templates/classical/offline/parser_mpi.F90 @@ -221,9 +221,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/templates/classical/online/parser_mpi.F90 b/templates/classical/online/parser_mpi.F90 index 091a324ec..0344f8665 100644 --- a/templates/classical/online/parser_mpi.F90 +++ b/templates/classical/online/parser_mpi.F90 @@ -221,9 +221,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/templates/offline_omi/parser_mpi.F90 b/templates/offline_omi/parser_mpi.F90 index f738ded7e..0b814ab44 100644 --- a/templates/offline_omi/parser_mpi.F90 +++ b/templates/offline_omi/parser_mpi.F90 @@ -218,9 +218,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/templates/online_omi/parser_mpi.F90 b/templates/online_omi/parser_mpi.F90 index f738ded7e..0b814ab44 100644 --- a/templates/online_omi/parser_mpi.F90 +++ b/templates/online_omi/parser_mpi.F90 @@ -218,9 +218,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/templates/online_omi_flexible/parser_mpi.F90 b/templates/online_omi_flexible/parser_mpi.F90 index f738ded7e..0b814ab44 100644 --- a/templates/online_omi_flexible/parser_mpi.F90 +++ b/templates/online_omi_flexible/parser_mpi.F90 @@ -218,9 +218,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/testsuite/src/main/parser_mpi.F90 b/testsuite/src/main/parser_mpi.F90 index 797d7f7c4..c3e9d1693 100644 --- a/testsuite/src/main/parser_mpi.F90 +++ b/testsuite/src/main/parser_mpi.F90 @@ -221,9 +221,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/tutorial/3dvar/offline_2D_serial/parser_mpi.F90 b/tutorial/3dvar/offline_2D_serial/parser_mpi.F90 index f738ded7e..0b814ab44 100644 --- a/tutorial/3dvar/offline_2D_serial/parser_mpi.F90 +++ b/tutorial/3dvar/offline_2D_serial/parser_mpi.F90 @@ -218,9 +218,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/tutorial/3dvar/online_2D_parallelmodel/parser_mpi.F90 b/tutorial/3dvar/online_2D_parallelmodel/parser_mpi.F90 index 8a1056e26..efa8b5e74 100644 --- a/tutorial/3dvar/online_2D_parallelmodel/parser_mpi.F90 +++ b/tutorial/3dvar/online_2D_parallelmodel/parser_mpi.F90 @@ -218,9 +218,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/tutorial/3dvar/online_2D_serialmodel/parser_mpi.F90 b/tutorial/3dvar/online_2D_serialmodel/parser_mpi.F90 index f738ded7e..0b814ab44 100644 --- a/tutorial/3dvar/online_2D_serialmodel/parser_mpi.F90 +++ b/tutorial/3dvar/online_2D_serialmodel/parser_mpi.F90 @@ -218,9 +218,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/tutorial/classical/offline_2D_parallel/parser_mpi.F90 b/tutorial/classical/offline_2D_parallel/parser_mpi.F90 index 54978a94e..a0f3619d6 100644 --- a/tutorial/classical/offline_2D_parallel/parser_mpi.F90 +++ b/tutorial/classical/offline_2D_parallel/parser_mpi.F90 @@ -221,9 +221,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/tutorial/classical/offline_2D_serial/parser_mpi.F90 b/tutorial/classical/offline_2D_serial/parser_mpi.F90 index 54978a94e..a0f3619d6 100644 --- a/tutorial/classical/offline_2D_serial/parser_mpi.F90 +++ b/tutorial/classical/offline_2D_serial/parser_mpi.F90 @@ -221,9 +221,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/tutorial/classical/online_2D_parallelmodel/parser_mpi.F90 b/tutorial/classical/online_2D_parallelmodel/parser_mpi.F90 index d0e53e71d..6c40684e3 100644 --- a/tutorial/classical/online_2D_parallelmodel/parser_mpi.F90 +++ b/tutorial/classical/online_2D_parallelmodel/parser_mpi.F90 @@ -221,9 +221,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar/parser_mpi.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar/parser_mpi.F90 index d0e53e71d..6c40684e3 100644 --- a/tutorial/classical/online_2D_parallelmodel_fullpar/parser_mpi.F90 +++ b/tutorial/classical/online_2D_parallelmodel_fullpar/parser_mpi.F90 @@ -221,9 +221,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 index d0e53e71d..6c40684e3 100644 --- a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 +++ b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 @@ -221,9 +221,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/tutorial/classical/online_2D_serialmodel/parser_mpi.F90 b/tutorial/classical/online_2D_serialmodel/parser_mpi.F90 index 7eff019be..321f6dbb6 100644 --- a/tutorial/classical/online_2D_serialmodel/parser_mpi.F90 +++ b/tutorial/classical/online_2D_serialmodel/parser_mpi.F90 @@ -221,9 +221,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/tutorial/offline_2D_parallel/parser_mpi.F90 b/tutorial/offline_2D_parallel/parser_mpi.F90 index f738ded7e..0b814ab44 100644 --- a/tutorial/offline_2D_parallel/parser_mpi.F90 +++ b/tutorial/offline_2D_parallel/parser_mpi.F90 @@ -218,9 +218,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/tutorial/offline_2D_serial/parser_mpi.F90 b/tutorial/offline_2D_serial/parser_mpi.F90 index f738ded7e..0b814ab44 100644 --- a/tutorial/offline_2D_serial/parser_mpi.F90 +++ b/tutorial/offline_2D_serial/parser_mpi.F90 @@ -218,9 +218,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/tutorial/online_2D_parallelmodel/parser_mpi.F90 b/tutorial/online_2D_parallelmodel/parser_mpi.F90 index 8a1056e26..efa8b5e74 100644 --- a/tutorial/online_2D_parallelmodel/parser_mpi.F90 +++ b/tutorial/online_2D_parallelmodel/parser_mpi.F90 @@ -218,9 +218,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/tutorial/online_2D_parallelmodel_fullpar/parser_mpi.F90 b/tutorial/online_2D_parallelmodel_fullpar/parser_mpi.F90 index 8a1056e26..efa8b5e74 100644 --- a/tutorial/online_2D_parallelmodel_fullpar/parser_mpi.F90 +++ b/tutorial/online_2D_parallelmodel_fullpar/parser_mpi.F90 @@ -218,9 +218,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/tutorial/online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 b/tutorial/online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 index 8a1056e26..efa8b5e74 100644 --- a/tutorial/online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 +++ b/tutorial/online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 @@ -218,9 +218,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/tutorial/online_2D_serialmodel/parser_mpi.F90 b/tutorial/online_2D_serialmodel/parser_mpi.F90 index f738ded7e..0b814ab44 100644 --- a/tutorial/online_2D_serialmodel/parser_mpi.F90 +++ b/tutorial/online_2D_serialmodel/parser_mpi.F90 @@ -218,9 +218,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF diff --git a/tutorial/online_2D_serialmodel_2fields/parser_mpi.F90 b/tutorial/online_2D_serialmodel_2fields/parser_mpi.F90 index f738ded7e..0b814ab44 100644 --- a/tutorial/online_2D_serialmodel_2fields/parser_mpi.F90 +++ b/tutorial/online_2D_serialmodel_2fields/parser_mpi.F90 @@ -218,9 +218,9 @@ SUBROUTINE parse_string(handle, charvalue) IF (mype == 0) THEN IF (.NOT. TRIM(str2_check) == TRIM(str2)) THEN WRITE (*,'(2x, a)') "PARSER: ERROR, command line input too long." - WRITE (*,'(2x, a, x, a)') "called handle=", TRIM(string) - WRITE (*,'(2x, a, x, a)') "parsed handle=", TRIM(str1) - WRITE (*,'(2x, a, x, a)') "parsed input(cut)=", TRIM(str2) + WRITE (*,'(2x, a, 1x, a)') "called handle=", TRIM(string) + WRITE (*,'(2x, a, 1x, a)') "parsed handle=", TRIM(str1) + WRITE (*,'(2x, a, 1x, a)') "parsed input(cut)=", TRIM(str2) call abort_parallel() END IF END IF From 84354f7d05a50d79459e0fc9bd3b9f281d367f2a Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Fri, 26 Jul 2024 17:15:28 +0200 Subject: [PATCH 25/83] Change order of compilation so that mod_parallel_pdaf is compiled before parser_mpi because the new check for the string lengths uses abort_parallel --- templates/online_omi/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/templates/online_omi/Makefile b/templates/online_omi/Makefile index 6492ebe1a..5d5c4ce2e 100644 --- a/templates/online_omi/Makefile +++ b/templates/online_omi/Makefile @@ -31,15 +31,15 @@ EXE = PDAF_online .SUFFIXES: .F90 .o # Modules used for the model part -MODULES = mod_model.o \ +MODULES = mod_parallel_pdaf.o \ + mod_model.o \ parser_mpi.o # Model routines OBJ_MODEL = main.o # Moduls used for PDAF -MOD_ASSIM = mod_parallel_pdaf.o \ - mod_assimilation.o +MOD_ASSIM = mod_assimilation.o # Routines of observation handling (PDAF-OMI) OBJ_USER_PDAFOMI = obs_OBSTYPE_pdafomi_TEMPLATE.o \ From 89c05fefb37178dcdb7f5499d31881a3fd7033b8 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Fri, 26 Jul 2024 17:24:57 +0200 Subject: [PATCH 26/83] COrect verbosity flag also in PDAFomi_weights_l_sgnl --- src/PDAFomi_obs_l.F90 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/PDAFomi_obs_l.F90 b/src/PDAFomi_obs_l.F90 index 6e710da63..667365fd6 100644 --- a/src/PDAFomi_obs_l.F90 +++ b/src/PDAFomi_obs_l.F90 @@ -3981,7 +3981,11 @@ SUBROUTINE PDAFomi_weights_l_sgnl(verbose, nobs_l, ncols, locweight, cradius, sr ! Control verbosity of PDAF_local_weight - IF (verbose==1) verbose_w = 1 + IF (verbose==1) THEN + verbose_w = 1 + ELSE + verbose_w = 0 + END IF IF (locweight /= 4) THEN ! All localizations except regulated weight based on variance at From 9b37bbef5f589f5c05c6497da2a86f1aa8e1ac79 Mon Sep 17 00:00:00 2001 From: Armin Corbin Date: Wed, 24 Jul 2024 13:39:30 +0200 Subject: [PATCH 27/83] integrated PDAFomi_assimilate_local_nondiagR.F90 into PDAF. Pulled OMI observation localization weights into a new subroutine --- Makefile | 2 + src/PDAF_interfaces_module.F90 | 26 ++++ src/PDAFomi_assimilate_local_nondiagR_si.F90 | 6 +- src/PDAFomi_obs_f.F90 | 28 +++- src/PDAFomi_obs_l.F90 | 150 +++++++++++-------- 5 files changed, 144 insertions(+), 68 deletions(-) diff --git a/Makefile b/Makefile index b3514e773..f7dcacb13 100644 --- a/Makefile +++ b/Makefile @@ -106,7 +106,9 @@ SRC_PDAF_GEN = PDAF_analysis_utils.F90 \ PDAFomi_assimilate_global.F90 \ PDAFomi_assimilate_global_si.F90 \ PDAFomi_assimilate_local.F90 \ + PDAFomi_assimilate_local_nondiagR.F90 \ PDAFomi_assimilate_local_si.F90 \ + PDAFomi_assimilate_local_nondiagR_si.F90 \ PDAF_reset_forget.F90 \ PDAF_get_ensstats.F90 \ PDAF_set_debug_flag.F90 \ diff --git a/src/PDAF_interfaces_module.F90 b/src/PDAF_interfaces_module.F90 index 092a2554e..48d4d8f7f 100644 --- a/src/PDAF_interfaces_module.F90 +++ b/src/PDAF_interfaces_module.F90 @@ -1211,6 +1211,26 @@ SUBROUTINE PDAFomi_assimilate_local(U_collect_state, U_distribute_state, & END SUBROUTINE PDAFomi_assimilate_local END INTERFACE + INTERFACE + SUBROUTINE PDAFomi_assimilate_local_nondiagR(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_prepoststep, U_init_n_domains_p, U_init_dim_l, & + U_init_dim_obs_l, U_prodRinvA_l, U_g2l_state, U_l2g_state, U_next_observation, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_distribute_state, & ! Routine to distribute a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain + U_g2l_state, & ! Get state on local ana. domain from full state + U_l2g_state, & ! Init full state from state on local analysis domain + U_prepoststep, & ! User supplied pre/poststep routine + U_next_observation ! Provide time step and time of next observation + END SUBROUTINE PDAFomi_assimilate_local_nondiagR + END INTERFACE + INTERFACE SUBROUTINE PDAFomi_put_state_local_si(flag) INTEGER, INTENT(out) :: flag ! Status flag @@ -1223,6 +1243,12 @@ SUBROUTINE PDAFomi_assimilate_local_si(flag) END SUBROUTINE PDAFomi_assimilate_local_si END INTERFACE + INTERFACE + SUBROUTINE PDAFomi_assimilate_local_nondiagR_si(flag) + INTEGER, INTENT(out) :: flag ! Status flag + END SUBROUTINE PDAFomi_assimilate_local_nondiagR_si + END INTERFACE + INTERFACE SUBROUTINE PDAFomi_put_state_global_si(flag) INTEGER, INTENT(out) :: flag ! Status flag diff --git a/src/PDAFomi_assimilate_local_nondiagR_si.F90 b/src/PDAFomi_assimilate_local_nondiagR_si.F90 index 7974ec44d..9ccee8872 100644 --- a/src/PDAFomi_assimilate_local_nondiagR_si.F90 +++ b/src/PDAFomi_assimilate_local_nondiagR_si.F90 @@ -18,10 +18,10 @@ !$Id$ !BOP ! -! !ROUTINE: PDAFomi_assimilate_local_si --- Interface to transfer state to PDAF +! !ROUTINE: PDAFomi_assimilate_local_nondiagR_si --- Interface to transfer state to PDAF ! ! !INTERFACE: -SUBROUTINE PDAFomi_assimilate_local_si(outflag) +SUBROUTINE PDAFomi_assimilate_local_nondiagR_si(outflag) ! !DESCRIPTION: ! Interface routine called from the model during the @@ -80,4 +80,4 @@ SUBROUTINE PDAFomi_assimilate_local_si(outflag) init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, & next_observation_pdaf, outflag) -END SUBROUTINE PDAFomi_assimilate_local_si +END SUBROUTINE PDAFomi_assimilate_local_nondiagR_si diff --git a/src/PDAFomi_obs_f.F90 b/src/PDAFomi_obs_f.F90 index a86eba2ab..75823efcc 100644 --- a/src/PDAFomi_obs_f.F90 +++ b/src/PDAFomi_obs_f.F90 @@ -147,6 +147,11 @@ MODULE PDAFomi_obs_f !$OMP THREADPRIVATE(debug) + INTERFACE PDAFomi_gather_obs + MODULE PROCEDURE PDAFomi_gather_obs_radius_array + MODULE PROCEDURE PDAFomi_gather_obs_radius_scalar + END INTERFACE + !------------------------------------------------------------------------------- @@ -174,7 +179,26 @@ MODULE PDAFomi_obs_f !! * 2020-03 - Lars Nerger - Initial code from restructuring observation routines !! * Later revisions - see repository log !! - SUBROUTINE PDAFomi_gather_obs(thisobs, dim_obs_p, obs_p, ivar_obs_p, ocoord_p, & + + SUBROUTINE PDAFomi_gather_obs_radius_array(thisobs, dim_obs_p, obs_p, ivar_obs_p, ocoord_p, & + ncoord, lradius, dim_obs_f) + + IMPLICIT NONE + ! *** Arguments *** + TYPE(obs_f), INTENT(inout) :: thisobs !< Data type with full observation + INTEGER, INTENT(in) :: dim_obs_p !< Number of process-local observation + REAL, INTENT(in) :: obs_p(:) !< Vector of process-local observations + REAL, INTENT(in) :: ivar_obs_p(:) !< Vector of process-local inverse observation error variance + REAL, INTENT(in) :: ocoord_p(:,:) !< Array of process-local observation coordinates + INTEGER, INTENT(in) :: ncoord !< Number of rows of coordinate array + REAL, DIMENSION(:), INTENT(in) :: lradius !< Localization radius (the maximum radius used in this process domain) + INTEGER, INTENT(out) :: dim_obs_f !< Full number of observations + + call PDAFomi_gather_obs_radius_scalar(thisobs, dim_obs_p, obs_p, ivar_obs_p, ocoord_p, & + ncoord, maxval(lradius), dim_obs_f) + END SUBROUTINE PDAFomi_gather_obs_radius_array + + SUBROUTINE PDAFomi_gather_obs_radius_scalar(thisobs, dim_obs_p, obs_p, ivar_obs_p, ocoord_p, & ncoord, lradius, dim_obs_f) IMPLICIT NONE @@ -501,7 +525,7 @@ SUBROUTINE PDAFomi_gather_obs(thisobs, dim_obs_p, obs_p, ivar_obs_p, ocoord_p, & WRITE (*,*) '++ OMI-debug: ', debug, 'PDAFomi_gather_obs -- END' END IF - END SUBROUTINE PDAFomi_gather_obs + END SUBROUTINE PDAFomi_gather_obs_radius_scalar diff --git a/src/PDAFomi_obs_l.F90 b/src/PDAFomi_obs_l.F90 index 667365fd6..62142b6fa 100644 --- a/src/PDAFomi_obs_l.F90 +++ b/src/PDAFomi_obs_l.F90 @@ -1158,81 +1158,31 @@ SUBROUTINE PDAFomi_init_obsvar_l(thisobs_l, thisobs, meanvar_l, cnt_obs_l) END SUBROUTINE PDAFomi_init_obsvar_l - - !------------------------------------------------------------------------------- -!> Compute product of inverse of R with some matrix +!> Compute weights for localization !! !! The routine is called during the analysis step -!! on each local analysis domain. It has to -!! compute the product of the inverse of the local -!! observation error covariance matrix with -!! the matrix of locally observed ensemble -!! perturbations. -!! -!! Next to computing the product, a localizing -!! weighting ("observation localization") can be -!! applied to matrix A. -!! -!! This implementation assumes a diagonal observation -!! error covariance matrix, and supports varying -!! observation error variances. -!! -!! The routine can be applied with either all observations -!! of different types at once, or separately for each -!! observation type. +!! on each local analysis domain. !! -!! __Revision history:__ -!! * 2019-06 - Lars Nerger - Initial code from restructuring observation routines -!! * Later revisions - see repository log -!! - SUBROUTINE PDAFomi_prodRinvA_l(thisobs_l, thisobs, nobs_all, ncols, & - A_l, C_l, verbose) + SUBROUTINE PDAFomi_observation_localization_weights(thisobs_l, thisobs, ncols, & + A_l, weight, verbose) - IMPLICIT NONE + IMPLICIT NONE ! *** Arguments *** TYPE(obs_l), INTENT(inout) :: thisobs_l !< Data type with local observation TYPE(obs_f), INTENT(inout) :: thisobs !< Data type with full observation - INTEGER, INTENT(in) :: nobs_all !< Dimension of local obs. vector (all obs. types) INTEGER, INTENT(in) :: ncols !< Rank of initial covariance matrix - REAL, INTENT(inout) :: A_l(:, :) !< Input matrix (thisobs_l%dim_obs_l, ncols) - REAL, INTENT(out) :: C_l(:, :) !< Output matrix (thisobs_l%dim_obs_l, ncols) + REAL, INTENT(in) :: A_l(:, :) !< Input matrix (thisobs_l%dim_obs_l, ncols) INTEGER, INTENT(in) :: verbose !< Verbosity flag + REAL, dimension(thisobs_l%dim_obs_l), INTENT(out) :: weight !> Localization weights ! *** local variables *** - INTEGER :: i, j ! Index of observation component - REAL, ALLOCATABLE :: weight(:) ! Localization weights + INTEGER :: i ! Index of observation component REAL, ALLOCATABLE :: weight_v(:) ! Localization weights for vertical (for locweight_v>0) - INTEGER :: idummy ! Dummy to access nobs_all - INTEGER :: off ! row offset in A_l and C_l - - -! ********************** -! *** INITIALIZATION *** -! ********************** - - doassim: IF (thisobs%doassim == 1) THEN - - ! Initialize dummy to prevent compiler warning - idummy = nobs_all - - ! Initialize offset - off = thisobs_l%off_obs_l ! Screen output - IF (debug>0) THEN - WRITE (*,*) '++ OMI-debug: ', debug, & - 'PDAFomi_prodrinva_l -- START Multiply with inverse R and and apply localization' - WRITE (*,*) '++ OMI-debug prodrinva_l: ', debug, ' thisobs_l%locweight', thisobs_l%locweight - IF (thisobs_l%locweight_v>0) & - WRITE (*,*) '++ OMI-debug prodrinva_l: ', debug, ' thisobs_l%locweight_v', thisobs_l%locweight_v - WRITE (*,*) '++ OMI-debug prodRinvA_l: ', debug, ' thisobs%dim_obs_l', thisobs_l%dim_obs_l - WRITE (*,*) '++ OMI-debug prodRinvA_l: ', debug, ' thisobs%ivar_obs_l', thisobs_l%ivar_obs_l - WRITE (*,*) '++ OMI-debug prodRinvA_l: ', debug, ' Input matrix A_l', A_l - END IF - IF (verbose == 1) THEN WRITE (*, '(a, 5x, a, 1x, i3)') & 'PDAFomi', '--- Domain localization for obs. type ID',thisobs%obsid @@ -1282,8 +1232,6 @@ SUBROUTINE PDAFomi_prodRinvA_l(thisobs_l, thisobs, nobs_all, ncols, & ! *** Initialize weight array - ALLOCATE(weight(thisobs_l%dim_obs_l)) - CALL PDAFomi_weights_l(verbose, thisobs_l%dim_obs_l, ncols, thisobs_l%locweight, & thisobs_l%cradius_l, thisobs_l%sradius_l, & A_l, thisobs_l%ivar_obs_l, thisobs_l%distance_l, weight) @@ -1323,7 +1271,83 @@ SUBROUTINE PDAFomi_prodRinvA_l(thisobs_l, thisobs, nobs_all, ncols, & END IF END DO END IF lw2 + END SUBROUTINE + +!------------------------------------------------------------------------------- +!> Compute product of inverse of R with some matrix +!! +!! The routine is called during the analysis step +!! on each local analysis domain. It has to +!! compute the product of the inverse of the local +!! observation error covariance matrix with +!! the matrix of locally observed ensemble +!! perturbations. +!! +!! Next to computing the product, a localizing +!! weighting ("observation localization") can be +!! applied to matrix A. +!! +!! This implementation assumes a diagonal observation +!! error covariance matrix, and supports varying +!! observation error variances. +!! +!! The routine can be applied with either all observations +!! of different types at once, or separately for each +!! observation type. +!! +!! __Revision history:__ +!! * 2019-06 - Lars Nerger - Initial code from restructuring observation routines +!! * Later revisions - see repository log +!! + SUBROUTINE PDAFomi_prodRinvA_l(thisobs_l, thisobs, nobs_all, ncols, & + A_l, C_l, verbose) + + IMPLICIT NONE + +! *** Arguments *** + TYPE(obs_l), INTENT(inout) :: thisobs_l !< Data type with local observation + TYPE(obs_f), INTENT(inout) :: thisobs !< Data type with full observation + INTEGER, INTENT(in) :: nobs_all !< Dimension of local obs. vector (all obs. types) + INTEGER, INTENT(in) :: ncols !< Rank of initial covariance matrix + REAL, INTENT(inout) :: A_l(:, :) !< Input matrix (thisobs_l%dim_obs_l, ncols) + REAL, INTENT(out) :: C_l(:, :) !< Output matrix (thisobs_l%dim_obs_l, ncols) + INTEGER, INTENT(in) :: verbose !< Verbosity flag + + +! *** local variables *** + INTEGER :: i, j ! Index of observation component + REAL, ALLOCATABLE :: weight(:) ! Localization weights + INTEGER :: idummy ! Dummy to access nobs_all + INTEGER :: off ! row offset in A_l and C_l + + +! ********************** +! *** INITIALIZATION *** +! ********************** + + doassim: IF (thisobs%doassim == 1) THEN + + ! Initialize dummy to prevent compiler warning + idummy = nobs_all + + ! Initialize offset + off = thisobs_l%off_obs_l + + ! Screen output + IF (debug>0) THEN + WRITE (*,*) '++ OMI-debug: ', debug, & + 'PDAFomi_prodrinva_l -- START Multiply with inverse R and and apply localization' + WRITE (*,*) '++ OMI-debug prodrinva_l: ', debug, ' thisobs_l%locweight', thisobs_l%locweight + IF (thisobs_l%locweight_v>0) & + WRITE (*,*) '++ OMI-debug prodrinva_l: ', debug, ' thisobs_l%locweight_v', thisobs_l%locweight_v + WRITE (*,*) '++ OMI-debug prodRinvA_l: ', debug, ' thisobs%dim_obs_l', thisobs_l%dim_obs_l + WRITE (*,*) '++ OMI-debug prodRinvA_l: ', debug, ' thisobs%ivar_obs_l', thisobs_l%ivar_obs_l + WRITE (*,*) '++ OMI-debug prodRinvA_l: ', debug, ' Input matrix A_l', A_l + END IF + ALLOCATE(weight(thisobs_l%dim_obs_l)) + call PDAFomi_observation_localization_weights(thisobs_l, thisobs, ncols, A_l, & + weight, verbose) ! *** Apply weight @@ -1337,13 +1361,13 @@ SUBROUTINE PDAFomi_prodRinvA_l(thisobs_l, thisobs, nobs_all, ncols, & END DO ! *** -1 - ! *** C = R A + ! *** C = R A DO j = 1, ncols DO i = 1, thisobs_l%dim_obs_l C_l(i+off, j) = thisobs_l%ivar_obs_l(i) * A_l(i+off, j) END DO END DO - + ELSE doweighting ! *** Apply weight to matrix R only @@ -1352,7 +1376,7 @@ SUBROUTINE PDAFomi_prodRinvA_l(thisobs_l, thisobs, nobs_all, ncols, & C_l(i+off, j) = thisobs_l%ivar_obs_l(i) * weight(i) * A_l(i+off, j) END DO END DO - + END IF doweighting ! *** Clean up *** From 3de72172ad99adfc14edeb640416182029148e0e Mon Sep 17 00:00:00 2001 From: Armin Corbin Date: Thu, 25 Jul 2024 15:36:06 +0200 Subject: [PATCH 28/83] extracted computation of gaspari and cohn into an extra module, so it can be easily used from other routines --- Depends | 5 +- Makefile | 3 +- src/PDAF_analytical_correlation_functions.F90 | 217 ++++++++++++++++++ src/PDAF_local_weight.F90 | 23 +- 4 files changed, 231 insertions(+), 17 deletions(-) create mode 100644 src/PDAF_analytical_correlation_functions.F90 diff --git a/Depends b/Depends index 18839644a..732ff0924 100644 --- a/Depends +++ b/Depends @@ -13,6 +13,7 @@ $(OBJDIR)/PDAF_add_increment.o: ./src/PDAF_add_increment.F90 $(OBJDIR)/PDAF_mod_ $(OBJDIR)/PDAF_alloc_filters.o: ./src/PDAF_alloc_filters.F90 $(OBJDIR)/PDAF_allreduce.o: ./src/PDAF_allreduce.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h $(OBJDIR)/PDAF_analysis_utils.o: ./src/PDAF_analysis_utils.F90 $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_analytical_correlation_functions.o: ./src/PDAF_analytical_correlation_functions.F90 ./src/typedefs.h $(OBJDIR)/PDAF_assimilate_3dvar.o: ./src/PDAF_assimilate_3dvar.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_assimilate_en3dvar_estkf.o: ./src/PDAF_assimilate_en3dvar_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_assimilate_en3dvar_lestkf.o: ./src/PDAF_assimilate_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o @@ -170,7 +171,7 @@ $(OBJDIR)/PDAF_lnetf_memtime.o: ./src/PDAF_lnetf_memtime.F90 $(OBJDIR)/PDAF_time $(OBJDIR)/PDAF_lnetf_options.o: ./src/PDAF_lnetf_options.F90 $(OBJDIR)/PDAF_lnetf_smootherT.o: ./src/PDAF_lnetf_smootherT.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h $(OBJDIR)/PDAF_lnetf_update.o: ./src/PDAF_lnetf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h -$(OBJDIR)/PDAF_local_weight.o: ./src/PDAF_local_weight.F90 +$(OBJDIR)/PDAF_local_weight.o: ./src/PDAF_local_weight.F90 $(OBJDIR)/PDAF_analytical_correlation_functions.o $(OBJDIR)/PDAF_local_weights.o: ./src/PDAF_local_weights.F90 $(OBJDIR)/PDAF_lseik_alloc.o: ./src/PDAF_lseik_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_lseik_analysis.o: ./src/PDAF_lseik_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h @@ -291,6 +292,8 @@ $(OBJDIR)/PDAFomi_assimilate_hyb3dvar_lestkf.o: ./src/PDAFomi_assimilate_hyb3dva $(OBJDIR)/PDAFomi_assimilate_lenkf.o: ./src/PDAFomi_assimilate_lenkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAFomi_assimilate_lenkf_si.o: ./src/PDAFomi_assimilate_lenkf_si.F90 $(OBJDIR)/PDAFomi_assimilate_local.o: ./src/PDAFomi_assimilate_local.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_local_nondiagR.o: ./src/PDAFomi_assimilate_local_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_local_nondiagR_si.o: ./src/PDAFomi_assimilate_local_nondiagR_si.F90 $(OBJDIR)/PDAFomi_assimilate_local_si.o: ./src/PDAFomi_assimilate_local_si.F90 $(OBJDIR)/PDAFomi_callback.o: ./src/PDAFomi_callback.F90 $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi_generate_obs.o: ./src/PDAFomi_generate_obs.F90 $(OBJDIR)/PDAFomi.o diff --git a/Makefile b/Makefile index f7dcacb13..096359ed3 100644 --- a/Makefile +++ b/Makefile @@ -45,6 +45,7 @@ SRC_MOD_INTERFACE = PDAF_interfaces_module.F90 # Generic routines in PDAF SRC_PDAF_GEN = PDAF_analysis_utils.F90 \ + PDAF_analytical_correlation_functions.F90 \ PDAF_init.F90 \ PDAF_init_si.F90 \ PDAF_init_filters.F90 \ @@ -485,5 +486,5 @@ listarch: ####################################################### # include file containing dependencies for parallel # execution of make -# created with ./mkdepends ./src ./external/* '$(OBJDIR)' +# created with ./external/mkdepends/mkdepends ./src ./external/* '$(OBJDIR)' include Depends diff --git a/src/PDAF_analytical_correlation_functions.F90 b/src/PDAF_analytical_correlation_functions.F90 new file mode 100644 index 000000000..dbb477a32 --- /dev/null +++ b/src/PDAF_analytical_correlation_functions.F90 @@ -0,0 +1,217 @@ +module analytical_correlation_functions + + implicit none + + ! Referenes Gaspari & cohn: + ! + ! https://link.springer.com/chapter/10.1007/978-3-662-47100-5_15#Sec8 + ! + ! https://rmets.onlinelibrary.wiley.com/doi/pdf/10.1256/qj.05.08 (C1 und C2) + ! + ! https://link.springer.com/content/pdf/10.1007/s00190-007-0195-4.pdf?pdf=inline%20link (41) and (42) + type :: gaspari_cohn_1 + real, dimension(4,6), private :: B + real, dimension(4), private :: d + real, private :: a = huge(1.) + real, public :: R = huge(1.) + contains + procedure, pass(this) :: init => gaspari_cohn_1_init + procedure, pass(this), private :: gaspari_cohn_1_evaluate_scalar + procedure, pass(this), private :: gaspari_cohn_1_evaluate_array + procedure, pass(this) :: gaspari_cohn_1_evaluate_norm_scalar + procedure, pass(this) :: gaspari_cohn_1_evaluate_norm_array + generic :: evaluate => gaspari_cohn_1_evaluate_norm_scalar, gaspari_cohn_1_evaluate_norm_array + end type + + contains + + subroutine gaspari_cohn_1_init(this,a,R) + implicit none + + class(gaspari_cohn_1) :: this + real, intent(in) :: a + real, intent(in) :: R + + if(this%R/=R) then + this%R=R + end if + if(this%a/=a) then + this%a=a + + this%B(1,6)=-16.*(3.-8.*a + 7.*a**2)/3. + this%B(1,5)=+16.*(1.-2.*a + 2.*a**2) + this%B(1,4)=+10.*(1.-4.*a + 8.*a**2) + this%B(1,3)=-40.*(1.-2.*a + 8.*a**2)/3. + this%B(1,2)=0. + this%B(1,1)=2. + 6.*a + 44.*a**2 + + this%B(2,6)=+16.*(1.-6.*a + 5.*a**2)/3. + this%B(2,5)=-8.*(2. - 10.*a + 8.*a**2) + this%B(2,4)=+10. + this%B(2,3)=+20.*(2.-22.*a + 20.*a**2)/3. + this%B(2,2)=-5.*(4. - 26.*a + 36.*a**2) + this%B(2,1)= 8.-35.*a + 102.*a**2 + + this%B(3,6)=+16.*a*(2.-3.*a)/3. + this%B(3,5)=-16.*a*(3.-4.*a) + this%B(3,4)=+40.*a*(1.-a) + this%B(3,3)=+40.*a*(9.-10.*a)/3. + this%B(3,2)=-10.*a*(27.-22.*a) + this%B(3,1)=a*(189.-122.*a) + + this%B(4,6)=+16.*a**2/3. + this%B(4,5)=-32.*a**2 + this%B(4,4)=+40.*a**2 + this%B(4,3)=+320.*a**2/3 + this%B(4,2)=-320.*a**2 + this%B(4,1)=+256.*a**2 + + this%d(1) = 0. + this%d(2) = (-4. + 29.*a - 42.*a**2)/6. + this%d(3) = -a*(243. - 230.*a)/6. + this%d(4) = -128.*a**2/3. + end if + + end subroutine + + function gaspari_cohn_1_evaluate_norm_array(this,tau) result(c) + + implicit none + + ! arguments + class(gaspari_cohn_1) :: this + real, dimension(:), intent(in) :: tau + + ! result + real, dimension(size(tau)) :: c + + ! local + real :: c0 + + call this%gaspari_cohn_1_evaluate_array(tau,c) + call this%gaspari_cohn_1_evaluate_scalar(0.0,c0) + + c = c/c0 + + end function + + function gaspari_cohn_1_evaluate_norm_scalar(this,tau) result(c) + + implicit none + + ! arguments + class(gaspari_cohn_1) :: this + real, intent(in) :: tau + + ! result + real :: c + + ! local + real :: c0 + + call this%gaspari_cohn_1_evaluate_scalar(tau,c) + call this%gaspari_cohn_1_evaluate_scalar(0.0,c0) + + c = c/c0 + + end function + + subroutine gaspari_cohn_1_evaluate_array(this,tau,c) + + implicit none + + ! arguments + class(gaspari_cohn_1) :: this + real, dimension(:), intent(in) :: tau + real, dimension(:), intent(out) :: c + + ! local + real, dimension(:,:), allocatable :: F + integer :: i,j + integer, dimension(:), allocatable :: case_idx + + allocate(F(6,size(tau))) + + F(1,:) = 1. + F(2,:) = tau/this%R + do i=3,6 + F(i,:) = F(i-1,:)*F(2,:) + end do + + allocate(case_idx(size(tau))) + case_idx = 0 + where( (0<=tau) .and. (tau<=this%R/2.) ) + case_idx = 1 + else where ( (this%R/2.0) then + ! scalar product: < B(case_idx(i),:), F > + do j=1,6 + c(i) = c(i) + this%B(case_idx(i),j) * F(j,i) + end do + if(case_idx(i)>1)then + c(i) = c(i) + this%d(case_idx(i))*(this%R/tau(i)) + end if + end if + end do + + deallocate(F) + deallocate(case_idx) + + end subroutine + + subroutine gaspari_cohn_1_evaluate_scalar(this,tau,c) + + implicit none + + ! arguments + class(gaspari_cohn_1) :: this + real, intent(in) :: tau + real, intent(out) :: c + + ! local + real, dimension(6) :: F + integer :: i + integer :: case_idx + + F(1) = 1. + F(2) = tau/this%R + do i=3,6 + F(i) = F(i-1)*F(2) + end do + + case_idx = 0 + if( (0<=tau) .and. (tau<=this%R/2.) ) then + case_idx = 1 + else if ( (this%R/2.0) then + ! TODO use ddot? + do i=1,6 + c = c + this%B(case_idx,i) * F(i) + end do + if(case_idx>1) then + ! d(1) is always 0 and In case tau==0 this would result in invalid division + c = c + this%d(case_idx)*(this%R/tau) + end if + end if + + end subroutine + + +end module diff --git a/src/PDAF_local_weight.F90 b/src/PDAF_local_weight.F90 index 54747515c..fd348aba1 100644 --- a/src/PDAF_local_weight.F90 +++ b/src/PDAF_local_weight.F90 @@ -37,6 +37,9 @@ SUBROUTINE PDAF_local_weight(wtype, rtype, cradius, sradius, distance, & ! Later revisions - see svn log ! ! !USES: + + use analytical_correlation_functions, only: gaspari_cohn_1 + IMPLICIT NONE ! !ARGUMENTS: @@ -67,6 +70,7 @@ SUBROUTINE PDAF_local_weight(wtype, rtype, cradius, sradius, distance, & REAL :: var ! variance for Gaussian REAL, PARAMETER :: pi=3.141592653589793 !Pi + type(gaspari_cohn_1), save :: finite_gaussian_mimic ! ******************************** ! *** Print screen information *** @@ -154,21 +158,10 @@ SUBROUTINE PDAF_local_weight(wtype, rtype, cradius, sradius, distance, & cradnull: IF (cradius > 0.0 .and. sradius > 0.0) THEN cutoff: IF (distance <= cradius) THEN - IF (distance <= sradius / 2) THEN - weight = -0.25 * (distance / cfaci)**5 & - + 0.5 * (distance / cfaci)**4 & - + 5.0 / 8.0 * (distance / cfaci)**3 & - - 5.0 / 3.0 * (distance / cfaci)**2 + 1.0 - ELSEIF (distance > sradius / 2 .AND. distance < sradius) THEN - weight = 1.0 / 12.0 * (distance / cfaci)**5 & - - 0.5 * (distance / cfaci)**4 & - + 5.0 / 8.0 * (distance / cfaci)**3 & - + 5.0 / 3.0 * (distance / cfaci)**2 & - - 5.0 * (distance / cfaci) & - + 4.0 - 2.0 / 3.0 * cfaci / distance - ELSE - weight = 0.0 - ENDIF + + call finite_gaussian_mimic%init(0.5,cfaci) + weight = finite_gaussian_mimic%evaluate(distance) + ELSE cutoff weight = 0.0 END IF cutoff From 1d73dd2e4c8e5c77dbe914a08bb85ec407a57188 Mon Sep 17 00:00:00 2001 From: Armin Corbin Date: Wed, 31 Jul 2024 08:40:13 +0200 Subject: [PATCH 29/83] reverted some changes of previous two commits --- Depends | 5 +- Makefile | 3 +- src/PDAF_analytical_correlation_functions.F90 | 217 ------------------ src/PDAF_local_weight.F90 | 23 +- src/PDAFomi_obs_f.F90 | 28 +-- 5 files changed, 19 insertions(+), 257 deletions(-) delete mode 100644 src/PDAF_analytical_correlation_functions.F90 diff --git a/Depends b/Depends index 732ff0924..18839644a 100644 --- a/Depends +++ b/Depends @@ -13,7 +13,6 @@ $(OBJDIR)/PDAF_add_increment.o: ./src/PDAF_add_increment.F90 $(OBJDIR)/PDAF_mod_ $(OBJDIR)/PDAF_alloc_filters.o: ./src/PDAF_alloc_filters.F90 $(OBJDIR)/PDAF_allreduce.o: ./src/PDAF_allreduce.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h $(OBJDIR)/PDAF_analysis_utils.o: ./src/PDAF_analysis_utils.F90 $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_analytical_correlation_functions.o: ./src/PDAF_analytical_correlation_functions.F90 ./src/typedefs.h $(OBJDIR)/PDAF_assimilate_3dvar.o: ./src/PDAF_assimilate_3dvar.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_assimilate_en3dvar_estkf.o: ./src/PDAF_assimilate_en3dvar_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_assimilate_en3dvar_lestkf.o: ./src/PDAF_assimilate_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o @@ -171,7 +170,7 @@ $(OBJDIR)/PDAF_lnetf_memtime.o: ./src/PDAF_lnetf_memtime.F90 $(OBJDIR)/PDAF_time $(OBJDIR)/PDAF_lnetf_options.o: ./src/PDAF_lnetf_options.F90 $(OBJDIR)/PDAF_lnetf_smootherT.o: ./src/PDAF_lnetf_smootherT.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h $(OBJDIR)/PDAF_lnetf_update.o: ./src/PDAF_lnetf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h -$(OBJDIR)/PDAF_local_weight.o: ./src/PDAF_local_weight.F90 $(OBJDIR)/PDAF_analytical_correlation_functions.o +$(OBJDIR)/PDAF_local_weight.o: ./src/PDAF_local_weight.F90 $(OBJDIR)/PDAF_local_weights.o: ./src/PDAF_local_weights.F90 $(OBJDIR)/PDAF_lseik_alloc.o: ./src/PDAF_lseik_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_lseik_analysis.o: ./src/PDAF_lseik_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h @@ -292,8 +291,6 @@ $(OBJDIR)/PDAFomi_assimilate_hyb3dvar_lestkf.o: ./src/PDAFomi_assimilate_hyb3dva $(OBJDIR)/PDAFomi_assimilate_lenkf.o: ./src/PDAFomi_assimilate_lenkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAFomi_assimilate_lenkf_si.o: ./src/PDAFomi_assimilate_lenkf_si.F90 $(OBJDIR)/PDAFomi_assimilate_local.o: ./src/PDAFomi_assimilate_local.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_assimilate_local_nondiagR.o: ./src/PDAFomi_assimilate_local_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_assimilate_local_nondiagR_si.o: ./src/PDAFomi_assimilate_local_nondiagR_si.F90 $(OBJDIR)/PDAFomi_assimilate_local_si.o: ./src/PDAFomi_assimilate_local_si.F90 $(OBJDIR)/PDAFomi_callback.o: ./src/PDAFomi_callback.F90 $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi_generate_obs.o: ./src/PDAFomi_generate_obs.F90 $(OBJDIR)/PDAFomi.o diff --git a/Makefile b/Makefile index 096359ed3..f7dcacb13 100644 --- a/Makefile +++ b/Makefile @@ -45,7 +45,6 @@ SRC_MOD_INTERFACE = PDAF_interfaces_module.F90 # Generic routines in PDAF SRC_PDAF_GEN = PDAF_analysis_utils.F90 \ - PDAF_analytical_correlation_functions.F90 \ PDAF_init.F90 \ PDAF_init_si.F90 \ PDAF_init_filters.F90 \ @@ -486,5 +485,5 @@ listarch: ####################################################### # include file containing dependencies for parallel # execution of make -# created with ./external/mkdepends/mkdepends ./src ./external/* '$(OBJDIR)' +# created with ./mkdepends ./src ./external/* '$(OBJDIR)' include Depends diff --git a/src/PDAF_analytical_correlation_functions.F90 b/src/PDAF_analytical_correlation_functions.F90 deleted file mode 100644 index dbb477a32..000000000 --- a/src/PDAF_analytical_correlation_functions.F90 +++ /dev/null @@ -1,217 +0,0 @@ -module analytical_correlation_functions - - implicit none - - ! Referenes Gaspari & cohn: - ! - ! https://link.springer.com/chapter/10.1007/978-3-662-47100-5_15#Sec8 - ! - ! https://rmets.onlinelibrary.wiley.com/doi/pdf/10.1256/qj.05.08 (C1 und C2) - ! - ! https://link.springer.com/content/pdf/10.1007/s00190-007-0195-4.pdf?pdf=inline%20link (41) and (42) - type :: gaspari_cohn_1 - real, dimension(4,6), private :: B - real, dimension(4), private :: d - real, private :: a = huge(1.) - real, public :: R = huge(1.) - contains - procedure, pass(this) :: init => gaspari_cohn_1_init - procedure, pass(this), private :: gaspari_cohn_1_evaluate_scalar - procedure, pass(this), private :: gaspari_cohn_1_evaluate_array - procedure, pass(this) :: gaspari_cohn_1_evaluate_norm_scalar - procedure, pass(this) :: gaspari_cohn_1_evaluate_norm_array - generic :: evaluate => gaspari_cohn_1_evaluate_norm_scalar, gaspari_cohn_1_evaluate_norm_array - end type - - contains - - subroutine gaspari_cohn_1_init(this,a,R) - implicit none - - class(gaspari_cohn_1) :: this - real, intent(in) :: a - real, intent(in) :: R - - if(this%R/=R) then - this%R=R - end if - if(this%a/=a) then - this%a=a - - this%B(1,6)=-16.*(3.-8.*a + 7.*a**2)/3. - this%B(1,5)=+16.*(1.-2.*a + 2.*a**2) - this%B(1,4)=+10.*(1.-4.*a + 8.*a**2) - this%B(1,3)=-40.*(1.-2.*a + 8.*a**2)/3. - this%B(1,2)=0. - this%B(1,1)=2. + 6.*a + 44.*a**2 - - this%B(2,6)=+16.*(1.-6.*a + 5.*a**2)/3. - this%B(2,5)=-8.*(2. - 10.*a + 8.*a**2) - this%B(2,4)=+10. - this%B(2,3)=+20.*(2.-22.*a + 20.*a**2)/3. - this%B(2,2)=-5.*(4. - 26.*a + 36.*a**2) - this%B(2,1)= 8.-35.*a + 102.*a**2 - - this%B(3,6)=+16.*a*(2.-3.*a)/3. - this%B(3,5)=-16.*a*(3.-4.*a) - this%B(3,4)=+40.*a*(1.-a) - this%B(3,3)=+40.*a*(9.-10.*a)/3. - this%B(3,2)=-10.*a*(27.-22.*a) - this%B(3,1)=a*(189.-122.*a) - - this%B(4,6)=+16.*a**2/3. - this%B(4,5)=-32.*a**2 - this%B(4,4)=+40.*a**2 - this%B(4,3)=+320.*a**2/3 - this%B(4,2)=-320.*a**2 - this%B(4,1)=+256.*a**2 - - this%d(1) = 0. - this%d(2) = (-4. + 29.*a - 42.*a**2)/6. - this%d(3) = -a*(243. - 230.*a)/6. - this%d(4) = -128.*a**2/3. - end if - - end subroutine - - function gaspari_cohn_1_evaluate_norm_array(this,tau) result(c) - - implicit none - - ! arguments - class(gaspari_cohn_1) :: this - real, dimension(:), intent(in) :: tau - - ! result - real, dimension(size(tau)) :: c - - ! local - real :: c0 - - call this%gaspari_cohn_1_evaluate_array(tau,c) - call this%gaspari_cohn_1_evaluate_scalar(0.0,c0) - - c = c/c0 - - end function - - function gaspari_cohn_1_evaluate_norm_scalar(this,tau) result(c) - - implicit none - - ! arguments - class(gaspari_cohn_1) :: this - real, intent(in) :: tau - - ! result - real :: c - - ! local - real :: c0 - - call this%gaspari_cohn_1_evaluate_scalar(tau,c) - call this%gaspari_cohn_1_evaluate_scalar(0.0,c0) - - c = c/c0 - - end function - - subroutine gaspari_cohn_1_evaluate_array(this,tau,c) - - implicit none - - ! arguments - class(gaspari_cohn_1) :: this - real, dimension(:), intent(in) :: tau - real, dimension(:), intent(out) :: c - - ! local - real, dimension(:,:), allocatable :: F - integer :: i,j - integer, dimension(:), allocatable :: case_idx - - allocate(F(6,size(tau))) - - F(1,:) = 1. - F(2,:) = tau/this%R - do i=3,6 - F(i,:) = F(i-1,:)*F(2,:) - end do - - allocate(case_idx(size(tau))) - case_idx = 0 - where( (0<=tau) .and. (tau<=this%R/2.) ) - case_idx = 1 - else where ( (this%R/2.0) then - ! scalar product: < B(case_idx(i),:), F > - do j=1,6 - c(i) = c(i) + this%B(case_idx(i),j) * F(j,i) - end do - if(case_idx(i)>1)then - c(i) = c(i) + this%d(case_idx(i))*(this%R/tau(i)) - end if - end if - end do - - deallocate(F) - deallocate(case_idx) - - end subroutine - - subroutine gaspari_cohn_1_evaluate_scalar(this,tau,c) - - implicit none - - ! arguments - class(gaspari_cohn_1) :: this - real, intent(in) :: tau - real, intent(out) :: c - - ! local - real, dimension(6) :: F - integer :: i - integer :: case_idx - - F(1) = 1. - F(2) = tau/this%R - do i=3,6 - F(i) = F(i-1)*F(2) - end do - - case_idx = 0 - if( (0<=tau) .and. (tau<=this%R/2.) ) then - case_idx = 1 - else if ( (this%R/2.0) then - ! TODO use ddot? - do i=1,6 - c = c + this%B(case_idx,i) * F(i) - end do - if(case_idx>1) then - ! d(1) is always 0 and In case tau==0 this would result in invalid division - c = c + this%d(case_idx)*(this%R/tau) - end if - end if - - end subroutine - - -end module diff --git a/src/PDAF_local_weight.F90 b/src/PDAF_local_weight.F90 index fd348aba1..54747515c 100644 --- a/src/PDAF_local_weight.F90 +++ b/src/PDAF_local_weight.F90 @@ -37,9 +37,6 @@ SUBROUTINE PDAF_local_weight(wtype, rtype, cradius, sradius, distance, & ! Later revisions - see svn log ! ! !USES: - - use analytical_correlation_functions, only: gaspari_cohn_1 - IMPLICIT NONE ! !ARGUMENTS: @@ -70,7 +67,6 @@ SUBROUTINE PDAF_local_weight(wtype, rtype, cradius, sradius, distance, & REAL :: var ! variance for Gaussian REAL, PARAMETER :: pi=3.141592653589793 !Pi - type(gaspari_cohn_1), save :: finite_gaussian_mimic ! ******************************** ! *** Print screen information *** @@ -158,10 +154,21 @@ SUBROUTINE PDAF_local_weight(wtype, rtype, cradius, sradius, distance, & cradnull: IF (cradius > 0.0 .and. sradius > 0.0) THEN cutoff: IF (distance <= cradius) THEN - - call finite_gaussian_mimic%init(0.5,cfaci) - weight = finite_gaussian_mimic%evaluate(distance) - + IF (distance <= sradius / 2) THEN + weight = -0.25 * (distance / cfaci)**5 & + + 0.5 * (distance / cfaci)**4 & + + 5.0 / 8.0 * (distance / cfaci)**3 & + - 5.0 / 3.0 * (distance / cfaci)**2 + 1.0 + ELSEIF (distance > sradius / 2 .AND. distance < sradius) THEN + weight = 1.0 / 12.0 * (distance / cfaci)**5 & + - 0.5 * (distance / cfaci)**4 & + + 5.0 / 8.0 * (distance / cfaci)**3 & + + 5.0 / 3.0 * (distance / cfaci)**2 & + - 5.0 * (distance / cfaci) & + + 4.0 - 2.0 / 3.0 * cfaci / distance + ELSE + weight = 0.0 + ENDIF ELSE cutoff weight = 0.0 END IF cutoff diff --git a/src/PDAFomi_obs_f.F90 b/src/PDAFomi_obs_f.F90 index 75823efcc..a86eba2ab 100644 --- a/src/PDAFomi_obs_f.F90 +++ b/src/PDAFomi_obs_f.F90 @@ -147,11 +147,6 @@ MODULE PDAFomi_obs_f !$OMP THREADPRIVATE(debug) - INTERFACE PDAFomi_gather_obs - MODULE PROCEDURE PDAFomi_gather_obs_radius_array - MODULE PROCEDURE PDAFomi_gather_obs_radius_scalar - END INTERFACE - !------------------------------------------------------------------------------- @@ -179,26 +174,7 @@ MODULE PDAFomi_obs_f !! * 2020-03 - Lars Nerger - Initial code from restructuring observation routines !! * Later revisions - see repository log !! - - SUBROUTINE PDAFomi_gather_obs_radius_array(thisobs, dim_obs_p, obs_p, ivar_obs_p, ocoord_p, & - ncoord, lradius, dim_obs_f) - - IMPLICIT NONE - ! *** Arguments *** - TYPE(obs_f), INTENT(inout) :: thisobs !< Data type with full observation - INTEGER, INTENT(in) :: dim_obs_p !< Number of process-local observation - REAL, INTENT(in) :: obs_p(:) !< Vector of process-local observations - REAL, INTENT(in) :: ivar_obs_p(:) !< Vector of process-local inverse observation error variance - REAL, INTENT(in) :: ocoord_p(:,:) !< Array of process-local observation coordinates - INTEGER, INTENT(in) :: ncoord !< Number of rows of coordinate array - REAL, DIMENSION(:), INTENT(in) :: lradius !< Localization radius (the maximum radius used in this process domain) - INTEGER, INTENT(out) :: dim_obs_f !< Full number of observations - - call PDAFomi_gather_obs_radius_scalar(thisobs, dim_obs_p, obs_p, ivar_obs_p, ocoord_p, & - ncoord, maxval(lradius), dim_obs_f) - END SUBROUTINE PDAFomi_gather_obs_radius_array - - SUBROUTINE PDAFomi_gather_obs_radius_scalar(thisobs, dim_obs_p, obs_p, ivar_obs_p, ocoord_p, & + SUBROUTINE PDAFomi_gather_obs(thisobs, dim_obs_p, obs_p, ivar_obs_p, ocoord_p, & ncoord, lradius, dim_obs_f) IMPLICIT NONE @@ -525,7 +501,7 @@ SUBROUTINE PDAFomi_gather_obs_radius_scalar(thisobs, dim_obs_p, obs_p, ivar_obs_ WRITE (*,*) '++ OMI-debug: ', debug, 'PDAFomi_gather_obs -- END' END IF - END SUBROUTINE PDAFomi_gather_obs_radius_scalar + END SUBROUTINE PDAFomi_gather_obs From 0ee6d919cbec9072e646b9c4b72020b4f7e78cc8 Mon Sep 17 00:00:00 2001 From: Armin Corbin Date: Wed, 31 Jul 2024 08:42:26 +0200 Subject: [PATCH 30/83] updated Depends --- Depends | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Depends b/Depends index 18839644a..e0f3b6e4a 100644 --- a/Depends +++ b/Depends @@ -291,6 +291,8 @@ $(OBJDIR)/PDAFomi_assimilate_hyb3dvar_lestkf.o: ./src/PDAFomi_assimilate_hyb3dva $(OBJDIR)/PDAFomi_assimilate_lenkf.o: ./src/PDAFomi_assimilate_lenkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAFomi_assimilate_lenkf_si.o: ./src/PDAFomi_assimilate_lenkf_si.F90 $(OBJDIR)/PDAFomi_assimilate_local.o: ./src/PDAFomi_assimilate_local.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_local_nondiagR.o: ./src/PDAFomi_assimilate_local_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_local_nondiagR_si.o: ./src/PDAFomi_assimilate_local_nondiagR_si.F90 $(OBJDIR)/PDAFomi_assimilate_local_si.o: ./src/PDAFomi_assimilate_local_si.F90 $(OBJDIR)/PDAFomi_callback.o: ./src/PDAFomi_callback.F90 $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi_generate_obs.o: ./src/PDAFomi_generate_obs.F90 $(OBJDIR)/PDAFomi.o From e5e596a66e20a8c0653b7ea611ee16d8847ac81a Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Fri, 2 Aug 2024 09:44:36 +0200 Subject: [PATCH 31/83] Add mapping routines performing the projects between global and local state vectors utlizing a user-provided index vector. In Makefile, I also re-inserted the objects for assimilate_local_nondiagR. --- src/Makefile | 6 ++++- src/PDAF_g2l.F90 | 67 ++++++++++++++++++++++++++++++++++++++++++++++++ src/PDAF_l2g.F90 | 64 +++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 136 insertions(+), 1 deletion(-) create mode 100644 src/PDAF_g2l.F90 create mode 100644 src/PDAF_l2g.F90 diff --git a/src/Makefile b/src/Makefile index e33b07ea2..a97e7c83c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -93,10 +93,14 @@ OBJ_PDAF_GEN = PDAF_analysis_utils.o \ PDAFomi_assimilate_global_si.o \ PDAFomi_assimilate_local.o \ PDAFomi_assimilate_local_si.o \ + PDAFomi_assimilate_local_nondiagR.o \ + PDAFomi_assimilate_local_nondiagR_si.o \ PDAF_reset_forget.o \ PDAF_get_ensstats.o \ PDAF_set_debug_flag.o \ - PDAF_set_offline_mode.o + PDAF_set_offline_mode.o \ + PDAF_g2l.o \ + PDAF_l2g.o # Specific PDAF-routines for SEIK OBJ_SEIK = PDAF_seik_init.o \ diff --git a/src/PDAF_g2l.F90 b/src/PDAF_g2l.F90 new file mode 100644 index 000000000..cc533af57 --- /dev/null +++ b/src/PDAF_g2l.F90 @@ -0,0 +1,67 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAF_g2l - Project global to local vector according to index array +! +! !INTERFACE: +SUBROUTINE PDAF_g2l(dim_p, dim_l, idx_l_in_p, state_p, state_l) + +! !DESCRIPTION: +! Project a global to a local state vector for the localized filters. +! The mapping is done using the provided index array. +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: +! Include definitions for real type of different precision +! (Defines BLAS/LAPACK routines and MPI_REALTYPE) +#include "typedefs.h" + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension + INTEGER, INTENT(in) :: dim_l !< Local state dimension + INTEGER, INTENT(in) :: idx_l_in_p(dim_l) !< Index array for projection + REAL, INTENT(in) :: state_p(dim_p) !< PE-local full state vector + REAL, INTENT(out) :: state_l(dim_l) !< State vector on local analysis domain + +! !CALLING SEQUENCE: +! Called by user code +!EOP + +! *** local variables *** + INTEGER :: i ! Counter + + +! ************************************* +! *** Initialize local state vector *** +! ************************************* + + DO i = 1, dim_l + ! Only use the index value if it is in a valid range + IF (idx_l_in_p(i) > 0 .and. idx_l_in_p(i) <= dim_p) THEN + state_l(i) = state_p(idx_l_in_p(i)) + END IF + END DO + +END SUBROUTINE PDAF_g2l diff --git a/src/PDAF_l2g.F90 b/src/PDAF_l2g.F90 new file mode 100644 index 000000000..31c279ca3 --- /dev/null +++ b/src/PDAF_l2g.F90 @@ -0,0 +1,64 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAF_l2g - Initialize global vector elements from local state vector +! +! !INTERFACE: +SUBROUTINE PDAF_l2g(dim_p, dim_l, idx_l_in_p, state_p, state_l) + +! !DESCRIPTION: +! Initialize elements of a global state vector from a local state vector +! utilizing the provided index array. This is used for localized filters. +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension + INTEGER, INTENT(in) :: dim_l !< Local state dimension + INTEGER, INTENT(in) :: idx_l_in_p(dim_l) !< Index array for projection + REAL, INTENT(inout) :: state_p(dim_p) !< PE-local full state vector + REAL, INTENT(in) :: state_l(dim_l) !< State vector on local analysis domain + +! !CALLING SEQUENCE: +! Called by user code +!EOP + +! *** local variables *** + INTEGER :: i ! Counter + + +! ************************************************** +! *** Initialize elements of global state vector *** +! ************************************************** + + DO i = 1, dim_l + ! Only use the index value if it is in a valid range + IF (idx_l_in_p(i) > 0 .and. idx_l_in_p(i) <= dim_p) THEN + state_p(idx_l_in_p(i)) = state_l(i) + END IF + END DO + +END SUBROUTINE PDAF_l2g From e5f574c907890e4febfece2177bd27716399dab4 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Fri, 2 Aug 2024 09:48:27 +0200 Subject: [PATCH 32/83] Extend comment to clarify how setting an index vlaue =0 can be used to exclude the elemant from the local state vector from overwriting the global state vector value --- src/PDAF_l2g.F90 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/PDAF_l2g.F90 b/src/PDAF_l2g.F90 index 31c279ca3..0196c5405 100644 --- a/src/PDAF_l2g.F90 +++ b/src/PDAF_l2g.F90 @@ -27,6 +27,9 @@ SUBROUTINE PDAF_l2g(dim_p, dim_l, idx_l_in_p, state_p, state_l) ! Initialize elements of a global state vector from a local state vector ! utilizing the provided index array. This is used for localized filters. ! +! To exclude any element of the local state vector from the initialization +! one can set the corresponding index value to 0. +! ! !REVISION HISTORY: ! 2024-08 - Lars Nerger - Initial code ! Later revisions - see svn log From f25ffd7c3a3ef6d3c8e0c5ecc5c5cb0b4fa27eba Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Fri, 2 Aug 2024 14:29:38 +0200 Subject: [PATCH 33/83] Correct creation date --- src/PDAF_assimilate_lknetf_si.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PDAF_assimilate_lknetf_si.F90 b/src/PDAF_assimilate_lknetf_si.F90 index e8859d4fa..4d00f44f4 100644 --- a/src/PDAF_assimilate_lknetf_si.F90 +++ b/src/PDAF_assimilate_lknetf_si.F90 @@ -40,7 +40,7 @@ SUBROUTINE PDAF_assimilate_lknetf_si(outflag) ! should not be changed by the user ! ! ! !REVISION HISTORY: -! 2013-08 - Lars Nerger - Initial code +! 2017-08 - Lars Nerger - Initial code ! Later revisions - see svn log ! ! !USES: From d0ccb392edca30bc6f5dade8843fd18cfb3490b3 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Fri, 2 Aug 2024 14:38:34 +0200 Subject: [PATCH 34/83] Add PDAFomi_assimilate routines for non-diagonal R matrices --- src/PDAFomi_assimilate_3dvar_nondiagR.F90 | 103 +++++++++++++++ ...Fomi_assimilate_en3dvar_estkf_nondiagR.F90 | 105 +++++++++++++++ ...omi_assimilate_en3dvar_lestkf_nondiagR.F90 | 119 +++++++++++++++++ src/PDAFomi_assimilate_enkf_nondiagR.F90 | 101 ++++++++++++++ src/PDAFomi_assimilate_enkf_nondiagR_si.F90 | 77 +++++++++++ src/PDAFomi_assimilate_global_nondiagR.F90 | 118 +++++++++++++++++ src/PDAFomi_assimilate_global_nondiagR_si.F90 | 76 +++++++++++ ...omi_assimilate_hyb3dvar_estkf_nondiagR.F90 | 109 ++++++++++++++++ ...mi_assimilate_hyb3dvar_lestkf_nondiagR.F90 | 123 ++++++++++++++++++ src/PDAFomi_assimilate_lenkf_nondiagR.F90 | 97 ++++++++++++++ src/PDAFomi_assimilate_lenkf_nondiagR_si.F90 | 78 +++++++++++ src/PDAFomi_assimilate_lknetf_nondiagR.F90 | 117 +++++++++++++++++ src/PDAFomi_assimilate_lknetf_nondiagR_si.F90 | 86 ++++++++++++ src/PDAFomi_assimilate_lnetf_nondiagR.F90 | 110 ++++++++++++++++ src/PDAFomi_assimilate_lnetf_nondiagR_si.F90 | 83 ++++++++++++ src/PDAFomi_assimilate_local_nondiagR.F90 | 53 ++++---- src/PDAFomi_assimilate_local_nondiagR_si.F90 | 13 +- src/PDAFomi_assimilate_nonlin_nondiagR.F90 | 105 +++++++++++++++ src/PDAFomi_assimilate_nonlin_nondiagR_si.F90 | 76 +++++++++++ 19 files changed, 1715 insertions(+), 34 deletions(-) create mode 100644 src/PDAFomi_assimilate_3dvar_nondiagR.F90 create mode 100644 src/PDAFomi_assimilate_en3dvar_estkf_nondiagR.F90 create mode 100644 src/PDAFomi_assimilate_en3dvar_lestkf_nondiagR.F90 create mode 100644 src/PDAFomi_assimilate_enkf_nondiagR.F90 create mode 100644 src/PDAFomi_assimilate_enkf_nondiagR_si.F90 create mode 100644 src/PDAFomi_assimilate_global_nondiagR.F90 create mode 100644 src/PDAFomi_assimilate_global_nondiagR_si.F90 create mode 100644 src/PDAFomi_assimilate_hyb3dvar_estkf_nondiagR.F90 create mode 100644 src/PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 create mode 100644 src/PDAFomi_assimilate_lenkf_nondiagR.F90 create mode 100644 src/PDAFomi_assimilate_lenkf_nondiagR_si.F90 create mode 100644 src/PDAFomi_assimilate_lknetf_nondiagR.F90 create mode 100644 src/PDAFomi_assimilate_lknetf_nondiagR_si.F90 create mode 100644 src/PDAFomi_assimilate_lnetf_nondiagR.F90 create mode 100644 src/PDAFomi_assimilate_lnetf_nondiagR_si.F90 create mode 100644 src/PDAFomi_assimilate_nonlin_nondiagR.F90 create mode 100644 src/PDAFomi_assimilate_nonlin_nondiagR_si.F90 diff --git a/src/PDAFomi_assimilate_3dvar_nondiagR.F90 b/src/PDAFomi_assimilate_3dvar_nondiagR.F90 new file mode 100644 index 000000000..a52832b8a --- /dev/null +++ b/src/PDAFomi_assimilate_3dvar_nondiagR.F90 @@ -0,0 +1,103 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_assimilate_3dvar_nondiagR --- Interface to PDAF for 3D-Var +! +! !INTERFACE: +SUBROUTINE PDAFomi_assimilate_3dvar_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, & + cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, prodRinvA_pdafomi, & + prepoststep_pdaf, next_observation_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_pdaf ! Apply adjoint control vector transform matrix + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of observation vector + obs_op_pdafomi, & ! Observation operator + obs_op_lin_pdafomi, & ! Linearized observation operator + obs_op_adj_pdafomi, & ! Adjoint observation operator + prodRinvA_pdafomi ! Provide product R^-1 A + EXTERNAL :: PDAFomi_init_obs_f_cb ! Initialize observation vector + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_3dvar_nondiagR -- START' + + IF (TRIM(filterstr) == '3DVAR') THEN + CALL PDAF_assimilate_3dvar(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, prodRinvA_pdafomi, & + cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & + prepoststep_pdaf, next_observation_pdaf, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: No valid filter type for PDAFomi_assimilate_3dvar_nondiagR' + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_3dvar_nondiagR -- END' + +END SUBROUTINE PDAFomi_assimilate_3dvar_nondiagR diff --git a/src/PDAFomi_assimilate_en3dvar_estkf_nondiagR.F90 b/src/PDAFomi_assimilate_en3dvar_estkf_nondiagR.F90 new file mode 100644 index 000000000..49d4715ab --- /dev/null +++ b/src/PDAFomi_assimilate_en3dvar_estkf_nondiagR.F90 @@ -0,0 +1,105 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_assimilate_en3dvar_estkf_nondiagR --- Interface to PDAF for En3D-Var/ESTKF +! +! !INTERFACE: +SUBROUTINE PDAFomi_assimilate_en3dvar_estkf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, cvt_ens_pdaf, cvt_adj_ens_pdaf, & + obs_op_lin_pdafomi, obs_op_adj_pdafomi, prodRinvA_pdafomi, & + prepoststep_pdaf, next_observation_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf ! Apply adjoint control vector transform matrix + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of observation vector + obs_op_pdafomi, & ! Observation operator + obs_op_lin_pdafomi, & ! Linearized observation operator + obs_op_adj_pdafomi, & ! Adjoint observation operator + prodRinvA_pdafomi ! Provide product R^-1 A + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector + PDAFomi_init_obsvar_cb ! Initialize mean observation error variance + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_en3dvar_estkf_nondiagR -- START' + + IF (TRIM(filterstr) == '3DVAR') THEN + CALL PDAF_assimilate_en3dvar_estkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, prodRinvA_pdafomi, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & + PDAFomi_init_obsvar_cb, prepoststep_pdaf, next_observation_pdaf, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: No valid filter type for PDAFomi_assimilate_en3dvar_estkf_nondiagR' + outflag = 200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_en3dvar_estkf_nondiagR -- END' + +END SUBROUTINE PDAFomi_assimilate_en3dvar_estkf_nondiagR diff --git a/src/PDAFomi_assimilate_en3dvar_lestkf_nondiagR.F90 b/src/PDAFomi_assimilate_en3dvar_lestkf_nondiagR.F90 new file mode 100644 index 000000000..353f6718d --- /dev/null +++ b/src/PDAFomi_assimilate_en3dvar_lestkf_nondiagR.F90 @@ -0,0 +1,119 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_assimilate_en3dvar_lestkf_nondiagR --- Interface to PDAF for En3D-Var/LESTKF +! +! !INTERFACE: +SUBROUTINE PDAFomi_assimilate_en3dvar_lestkf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, cvt_ens_pdaf, cvt_adj_ens_pdaf, & + obs_op_lin_pdafomi, obs_op_adj_pdafomi, prodRinvA_pdafomi, & + init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, & + g2l_state_pdaf, l2g_state_pdaf, prepoststep_pdaf, next_observation_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf ! Apply adjoint control vector transform matrix + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from full state + l2g_state_pdaf ! Init full state from local state + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector + obs_op_pdafomi, & ! Full observation operator + obs_op_lin_pdafomi, & ! Linearized observation operator + obs_op_adj_pdafomi, & ! Adjoint observation operator + init_dim_obs_l_pdafomi, & ! Initialize local dimimension of obs. vector + prodRinvA_pdafomi, & ! Provide product R^-1 A + prodRinvA_l_pdafomi ! Provide product R^-1 A + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_g2l_obs_cb ! Restrict full obs. vector to local analysis domain + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_en3dvar_lestkf_nondiagR -- START' + + IF (TRIM(filterstr) == '3DVAR') THEN + CALL PDAF_assimilate_en3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, prodRinvA_pdafomi, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + prodRinvA_l_pdafomi, init_n_domains_pdaf, init_dim_l_pdaf, & + init_dim_obs_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, PDAFomi_g2l_obs_cb, & + PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & + prepoststep_pdaf, next_observation_pdaf, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: No valid filter type for PDAFomi_assimilate_en3dvar_lestkf_nondiagR' + outflag = 200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_en3dvar_lestkf_nondiagR -- END' + +END SUBROUTINE PDAFomi_assimilate_en3dvar_lestkf_nondiagR diff --git a/src/PDAFomi_assimilate_enkf_nondiagR.F90 b/src/PDAFomi_assimilate_enkf_nondiagR.F90 new file mode 100644 index 000000000..b86b2d9e7 --- /dev/null +++ b/src/PDAFomi_assimilate_enkf_nondiagR.F90 @@ -0,0 +1,101 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_assimilate_enkf_nondiagR --- Interface to PDAF for global filters +! +! !INTERFACE: +SUBROUTINE PDAFomi_assimilate_enkf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, add_obs_error_pdafomi, init_obscovar_pdafomi, & + prepoststep_pdaf, next_observation_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of observation vector + obs_op_pdafomi, & ! Observation operator + init_obscovar_pdafomi, & ! Initialize mean observation error variance + add_obs_error_pdafomi ! Add observation error covariance matrix + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector + PDAFomi_prodRinvA_cb, & ! Provide product R^-1 A + PDAFomi_likelihood_cb ! Compute likelihood + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_enkf_nondiagR -- START' + + IF (TRIM(filterstr) == 'ENKF') THEN + CALL PDAF_assimilate_enkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, prepoststep_pdaf, & + add_obs_error_pdafomi, init_obscovar_pdafomi, next_observation_pdaf, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: Invalid filter choice for PDAFomi_assimilate_enkf_nondiagR' + outflag=200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_enkf_nondiagR -- END' + +END SUBROUTINE PDAFomi_assimilate_enkf_nondiagR diff --git a/src/PDAFomi_assimilate_enkf_nondiagR_si.F90 b/src/PDAFomi_assimilate_enkf_nondiagR_si.F90 new file mode 100644 index 000000000..413496d8b --- /dev/null +++ b/src/PDAFomi_assimilate_enkf_nondiagR_si.F90 @@ -0,0 +1,77 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_assimilate_enkf_nondiagR_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFomi_assimilate_enkf_nondiagR_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + ! Interface to PDAF-OMI for local and global filters + EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain + obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain + init_obscovar_pdafomi, & ! Initialize mean observation error variance + add_obs_error_pdafomi ! Add observation error covariance matrix + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFomi_assimilate_enkf_nondiagR +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFomi_assimilate_enkf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, add_obs_error_pdafomi, init_obscovar_pdafomi, & + prepoststep_pdaf, next_observation_pdaf, outflag) + +END SUBROUTINE PDAFomi_assimilate_enkf_nondiagR_si diff --git a/src/PDAFomi_assimilate_global_nondiagR.F90 b/src/PDAFomi_assimilate_global_nondiagR.F90 new file mode 100644 index 000000000..7c6ecb81b --- /dev/null +++ b/src/PDAFomi_assimilate_global_nondiagR.F90 @@ -0,0 +1,118 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_assimilate_global_nondiagR --- Interface to PDAF for global filters +! +! !INTERFACE: +SUBROUTINE PDAFomi_assimilate_global_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdaf, obs_op_pdaf, prodRinvA_pdaf, prepoststep_pdaf, next_observation_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_dim_obs_pdaf, & ! Initialize dimension of observation vector + obs_op_pdaf ! Observation operator + EXTERNAL :: prodRinvA_pdaf ! Provide product R^-1 A + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obscovar_cb, & ! Initialize mean observation error variance + PDAFomi_add_obs_error_cb ! Add observation error covariance matrix + + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_global_nondiagR -- START' + + IF (TRIM(filterstr) == 'SEIK') THEN + CALL PDAF_assimilate_seik(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdaf, obs_op_pdaf, PDAFomi_init_obs_f_cb, prepoststep_pdaf, & + prodRinvA_pdaf, PDAFomi_init_obsvar_cb, next_observation_pdaf, outflag) + ELSEIF (TRIM(filterstr) == 'ENKF') THEN + WRITE (*,*) 'PDAF-ERROR: Use PDAFomi_assimilate_enkf_nondiagR for EnKF' + outflag=200 + ELSEIF (TRIM(filterstr) == 'ETKF') THEN + CALL PDAF_assimilate_etkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdaf, obs_op_pdaf, PDAFomi_init_obs_f_cb, prepoststep_pdaf, & + prodRinvA_pdaf, PDAFomi_init_obsvar_cb, next_observation_pdaf, outflag) + ELSEIF (TRIM(filterstr) == 'ESTKF') THEN + CALL PDAF_assimilate_estkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdaf, obs_op_pdaf, PDAFomi_init_obs_f_cb, prepoststep_pdaf, & + prodRinvA_pdaf, PDAFomi_init_obsvar_cb, next_observation_pdaf, outflag) + ELSEIF (TRIM(filterstr) == 'NETF') THEN + WRITE (*,*) 'PDAF-ERROR: Use PDAFomi_assimilate_nonlin_nondiagR for NETF and PF' + outflag=200 + ELSEIF (TRIM(filterstr) == 'PF') THEN + WRITE (*,*) 'PDAF-ERROR: Use PDAFomi_assimilate_nonlin_nondiagR for NETF and PF' + outflag=200 + ELSE + WRITE (*,*) 'PDAF-ERROR: Invalid filter choice for PDAFomi_assimilate_global_nondiagR' + outflag=200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_global_nondiagR -- END' + +END SUBROUTINE PDAFomi_assimilate_global_nondiagR diff --git a/src/PDAFomi_assimilate_global_nondiagR_si.F90 b/src/PDAFomi_assimilate_global_nondiagR_si.F90 new file mode 100644 index 000000000..3117a2c9d --- /dev/null +++ b/src/PDAFomi_assimilate_global_nondiagR_si.F90 @@ -0,0 +1,76 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_assimilate_global_nondiagR_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFomi_assimilate_global_nondiagR_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + ! Interface to PDAF-OMI for local and global filters + EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain + obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain + prodRinvA_pdafomi ! Provide product R^-1 A + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFomi_assimilate_global_nondiagR +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFomi_assimilate_global_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prodRinvA_pdafomi, prepoststep_pdaf, & + next_observation_pdaf, outflag) + +END SUBROUTINE PDAFomi_assimilate_global_nondiagR_si diff --git a/src/PDAFomi_assimilate_hyb3dvar_estkf_nondiagR.F90 b/src/PDAFomi_assimilate_hyb3dvar_estkf_nondiagR.F90 new file mode 100644 index 000000000..ba55c3bd0 --- /dev/null +++ b/src/PDAFomi_assimilate_hyb3dvar_estkf_nondiagR.F90 @@ -0,0 +1,109 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_assimilate_hyb3dvar_estkf_nondiagR --- Interface to PDAF for Hyb3D-Var/ESTKF +! +! !INTERFACE: +SUBROUTINE PDAFomi_assimilate_hyb3dvar_estkf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, & + obs_op_lin_pdafomi, obs_op_adj_pdafomi, prodRinvA_pdafomi, & + prepoststep_pdaf, next_observation_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_pdaf, & ! Apply adjoint control vector transform matrix + cvt_ens_pdaf, & ! Apply ensemble control vector transform matrix to control vector + cvt_adj_ens_pdaf ! Apply adjoint ensemble control vector transform matrix + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of observation vector + obs_op_pdafomi, & ! Observation operator + obs_op_lin_pdafomi, & ! Linearized observation operator + obs_op_adj_pdafomi, & ! Adjoint observation operator + prodRinvA_pdafomi ! Provide product R^-1 A + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector + PDAFomi_init_obsvar_cb ! Initialize mean observation error variance + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_hyb3dvar_estkf_nondiagR -- START' + + IF (TRIM(filterstr) == '3DVAR') THEN + CALL PDAF_assimilate_hyb3dvar_estkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, prodRinvA_pdafomi, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, & + obs_op_lin_pdafomi, obs_op_adj_pdafomi, & + PDAFomi_init_obsvar_cb, prepoststep_pdaf, next_observation_pdaf, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: No valid filter type for PDAFomi_assimilate_hyb3dvar_estkf_nondiagR' + outflag = 200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_hyb3dvar_estkf_nondiagR -- END' + +END SUBROUTINE PDAFomi_assimilate_hyb3dvar_estkf_nondiagR diff --git a/src/PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 b/src/PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 new file mode 100644 index 000000000..465e3b30c --- /dev/null +++ b/src/PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 @@ -0,0 +1,123 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR --- Interface to PDAF for Hyb3D-Var/LESTKF +! +! !INTERFACE: +SUBROUTINE PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, cvt_ens_pdaf, cvt_adj_ens_pdaf, & + cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, prodRinvA_pdafomi, & + init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, & + g2l_state_pdaf, l2g_state_pdaf, prepoststep_pdaf, next_observation_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix + cvt_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_pdaf ! Apply adjoint control vector transform matrix + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from full state + l2g_state_pdaf ! Init full state from local state + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector + obs_op_pdafomi, & ! Full observation operator + obs_op_lin_pdafomi, & ! Linearized observation operator + obs_op_adj_pdafomi, & ! Adjoint observation operator + init_dim_obs_l_pdafomi, & ! Initialize local dimimension of obs. vector + prodRinvA_pdafomi, & ! Provide product R^-1 A + prodRinvA_l_pdafomi ! Provide product R^-1 A + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_prodRinvA_cb, & ! Provide product R^-1 A + PDAFomi_g2l_obs_cb ! Restrict full obs. vector to local analysis domain + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR -- START' + + IF (TRIM(filterstr) == '3DVAR') THEN + CALL PDAF_assimilate_hyb3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, & + prodRinvA_pdafomi, cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, & + obs_op_lin_pdafomi, obs_op_adj_pdafomi, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + prodRinvA_l_pdafomi, init_n_domains_pdaf, init_dim_l_pdaf, & + init_dim_obs_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, PDAFomi_g2l_obs_cb, & + PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & + prepoststep_pdaf, next_observation_pdaf, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: No valid filter type for PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR' + outflag = 200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR -- END' + +END SUBROUTINE PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR diff --git a/src/PDAFomi_assimilate_lenkf_nondiagR.F90 b/src/PDAFomi_assimilate_lenkf_nondiagR.F90 new file mode 100644 index 000000000..a832a8b40 --- /dev/null +++ b/src/PDAFomi_assimilate_lenkf_nondiagR.F90 @@ -0,0 +1,97 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_assimilate_lenkf_nondiagR --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFomi_assimilate_lenkf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, localize_covar_pdafomi, & + add_obs_error_pdafomi, init_obscovar_pdafomi, next_observation_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! Variant for LENKF with domain decomposition. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of observation vector + obs_op_pdafomi, & ! Observation operator + localize_covar_pdafomi, & ! Apply localization to HP and HPH^T + init_obscovar_pdafomi, & ! Initialize mean observation error variance + add_obs_error_pdafomi ! Provide product R^-1 A + EXTERNAL :: PDAFomi_init_obs_f_cb ! Initialize observation vector + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAF_assimilate_lenkf +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_lenkf_nondiagR -- START' + + CALL PDAF_assimilate_lenkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, prepoststep_pdaf, & + localize_covar_pdafomi, add_obs_error_pdafomi, init_obscovar_pdafomi, & + next_observation_pdaf, outflag) + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_lenkf_nondiagR -- END' + +END SUBROUTINE PDAFomi_assimilate_lenkf_nondiagR diff --git a/src/PDAFomi_assimilate_lenkf_nondiagR_si.F90 b/src/PDAFomi_assimilate_lenkf_nondiagR_si.F90 new file mode 100644 index 000000000..dd3904a2d --- /dev/null +++ b/src/PDAFomi_assimilate_lenkf_nondiagR_si.F90 @@ -0,0 +1,78 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_assimilate_lenkf_nondiagR_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFomi_assimilate_lenkf_nondiagR_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + ! Interface to PDAF-OMI for local and global filters + EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain + obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain + localize_covar_pdafomi, & ! Apply localization to HP and HPH^T + init_obscovar_pdafomi, & ! Initialize mean observation error variance + add_obs_error_pdafomi ! Provide product R^-1 A + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFomi_assimilate_lenkf_nondiagR +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFomi_assimilate_lenkf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, localize_covar_pdafomi, & + add_obs_error_pdafomi, init_obscovar_pdafomi, next_observation_pdaf, outflag) + +END SUBROUTINE PDAFomi_assimilate_lenkf_nondiagR_si diff --git a/src/PDAFomi_assimilate_lknetf_nondiagR.F90 b/src/PDAFomi_assimilate_lknetf_nondiagR.F90 new file mode 100644 index 000000000..67a1600c4 --- /dev/null +++ b/src/PDAFomi_assimilate_lknetf_nondiagR.F90 @@ -0,0 +1,117 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_assimilate_lknetf_nondiagR --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFomi_assimilate_lknetf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, prodRinvA_hyb_l_pdafomi, & + likelihood_l_pdafomi, likelihood_hyb_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, & + next_observation_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from full state + l2g_state_pdaf ! Init full state from local state + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector + obs_op_pdafomi, & ! Full observation operator + init_dim_obs_l_pdafomi, & ! Initialize local dimimension of obs. vector + prodRinvA_l_pdafomi, & ! Provide product R^-1 A on local analysis domain + likelihood_l_pdafomi, & ! Compute likelihood and apply localization + prodRinvA_hyb_l_pdafomi, & ! Product R^-1 A on local analysis domain with hybrid weight + likelihood_hyb_l_pdafomi ! Compute likelihood and apply localization with tempering + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize full observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_g2l_obs_cb ! Restrict full obs. vector to local analysis domain + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_lknetf_nondiagR -- START' + + IF (TRIM(filterstr) == 'LKNETF') THEN + CALL PDAF_assimilate_lknetf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, & + PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, prepoststep_pdaf, & + prodRinvA_l_pdafomi, prodRinvA_hyb_l_pdafomi, & + init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & + g2l_state_pdaf, l2g_state_pdaf, PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, & + PDAFomi_init_obsvar_l_cb, likelihood_l_pdafomi, likelihood_hyb_l_pdafomi, & + next_observation_pdaf, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: Invalid filter choice for PDAFomi_assimilate_lknetf_nondiagR' + outflag=200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_lknetf_nondiagR -- END' + +END SUBROUTINE PDAFomi_assimilate_lknetf_nondiagR diff --git a/src/PDAFomi_assimilate_lknetf_nondiagR_si.F90 b/src/PDAFomi_assimilate_lknetf_nondiagR_si.F90 new file mode 100644 index 000000000..0c257e900 --- /dev/null +++ b/src/PDAFomi_assimilate_lknetf_nondiagR_si.F90 @@ -0,0 +1,86 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_assimilate_lknetf_nondiagR_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFomi_assimilate_lknetf_nondiagR_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from full state + l2g_state_pdaf ! Init full state from local state + EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain + obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain + init_dim_obs_l_pdafomi, & ! Get dimension of obs. vector for local analysis domain + prodRinvA_l_pdafomi, & ! Provide product R^-1 A on local analysis domain + prodRinvA_hyb_l_pdafomi, & ! Provide product R^-1 A on local analysis domain with hybrid weight + likelihood_l_pdafomi, & ! Compute observation likelihood for an ensemble member + likelihood_hyb_l_pdafomi ! Compute observation likelihood for an ensemble member with hybrid weight + + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFomi_assimilate_lknetf_nondiagR +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFomi_assimilate_lknetf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, prodRinvA_hyb_l_pdafomi, & + likelihood_l_pdafomi, likelihood_hyb_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, & + next_observation_pdaf, outflag) + +END SUBROUTINE PDAFomi_assimilate_lknetf_nondiagR_si diff --git a/src/PDAFomi_assimilate_lnetf_nondiagR.F90 b/src/PDAFomi_assimilate_lnetf_nondiagR.F90 new file mode 100644 index 000000000..aef0873ee --- /dev/null +++ b/src/PDAFomi_assimilate_lnetf_nondiagR.F90 @@ -0,0 +1,110 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_assimilate_lnetf_nondiagR --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFomi_assimilate_lnetf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, likelihood_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, & + next_observation_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from full state + l2g_state_pdaf ! Init full state from local state + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector + obs_op_pdafomi, & ! Full observation operator + init_dim_obs_l_pdafomi, & ! Initialize local dimimension of obs. vector + likelihood_l_pdafomi ! Compute likelihood and apply localization + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize full observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_g2l_obs_cb ! Restrict full obs. vector to local analysis domain + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_lnetf_nondiagR -- START' + + IF (TRIM(filterstr) == 'LNETF') THEN + CALL PDAF_assimilate_lnetf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_l_cb, & + prepoststep_pdaf, likelihood_l_pdafomi, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, & + PDAFomi_g2l_obs_cb, next_observation_pdaf, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: Invalid filter choice for PDAFomi_assimilate_lnetf_nondiagR' + outflag=200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_lnetf_nondiagR -- END' + +END SUBROUTINE PDAFomi_assimilate_lnetf_nondiagR diff --git a/src/PDAFomi_assimilate_lnetf_nondiagR_si.F90 b/src/PDAFomi_assimilate_lnetf_nondiagR_si.F90 new file mode 100644 index 000000000..da7542d82 --- /dev/null +++ b/src/PDAFomi_assimilate_lnetf_nondiagR_si.F90 @@ -0,0 +1,83 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_assimilate_lnetf_nondiagR_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFomi_assimilate_lnetf_nondiagR_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from full state + l2g_state_pdaf ! Init full state from local state + EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain + obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain + init_dim_obs_l_pdafomi, & ! Get dimension of obs. vector for local analysis domain + likelihood_l_pdafomi ! Compute likelihood and apply localization + + + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFomi_assimilate_lnetf_nondiagR +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFomi_assimilate_lnetf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, likelihood_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, & + next_observation_pdaf, outflag) + +END SUBROUTINE PDAFomi_assimilate_lnetf_nondiagR_si diff --git a/src/PDAFomi_assimilate_local_nondiagR.F90 b/src/PDAFomi_assimilate_local_nondiagR.F90 index 02dbb089b..8991272f3 100644 --- a/src/PDAFomi_assimilate_local_nondiagR.F90 +++ b/src/PDAFomi_assimilate_local_nondiagR.F90 @@ -22,9 +22,9 @@ ! ! !INTERFACE: SUBROUTINE PDAFomi_assimilate_local_nondiagR(collect_state_pdaf, distribute_state_pdaf, & - init_dim_obs_f_pdaf, obs_op_f_pdaf, prepoststep_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdaf, prodRinvA_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & - next_observation_pdaf, outflag) + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, & + g2l_state_pdaf, l2g_state_pdaf, next_observation_pdaf, outflag) ! !DESCRIPTION: ! Interface routine called from the model during the @@ -43,7 +43,7 @@ SUBROUTINE PDAFomi_assimilate_local_nondiagR(collect_state_pdaf, distribute_stat ! should not be changed by the user ! ! ! !REVISION HISTORY: -! 2020-11 - Lars Nerger - Initial code +! 2024-07 - Lars Nerger - Initial code ! Later revisions - see svn log ! ! !USES: @@ -63,20 +63,16 @@ SUBROUTINE PDAFomi_assimilate_local_nondiagR(collect_state_pdaf, distribute_stat EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains init_dim_l_pdaf, & ! Init state dimension for local ana. domain g2l_state_pdaf, & ! Get state on local ana. domain from full state - l2g_state_pdaf, & ! Init full state from local state - init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector - obs_op_f_pdaf, & ! Full observation operator - init_dim_obs_l_pdaf ! Initialize local dimimension of obs. vector - EXTERNAL :: prodRinvA_l_pdaf ! Provide product of inverse of R with matrix A + l2g_state_pdaf ! Init full state from local state + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector + obs_op_pdafomi, & ! Full observation operator + init_dim_obs_l_pdafomi, & ! Initialize local dimimension of obs. vector + prodRinvA_l_pdafomi ! Provide product of inverse of R with matrix A EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize full observation vector PDAFomi_init_obs_l_cb, & ! Initialize local observation vector PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance - PDAFomi_g2l_obs_cb, & ! Restrict full obs. vector to local analysis domain - PDAFomi_prodRinvA_l_cb, & ! Provide product R^-1 A on local analysis domain - PDAFomi_likelihood_l_cb ! Compute likelihood and apply localization - EXTERNAL :: PDAFomi_prodRinvA_hyb_l_cb, & ! Product R^-1 A on local analysis domain with hybrid weight - PDAFomi_likelihood_hyb_l_cb ! Compute likelihood and apply localization with tempering + PDAFomi_g2l_obs_cb ! Restrict full obs. vector to local analysis domain ! !CALLING SEQUENCE: ! Called by: model code @@ -88,34 +84,37 @@ SUBROUTINE PDAFomi_assimilate_local_nondiagR(collect_state_pdaf, distribute_stat ! ************************************************** IF (debug>0) & - WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_local -- START' + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_local_nondiagR -- START' IF (TRIM(filterstr) == 'LSEIK') THEN CALL PDAF_assimilate_lseik(collect_state_pdaf, distribute_state_pdaf, & - init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & - prepoststep_pdaf, prodRinvA_l_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + prepoststep_pdaf, prodRinvA_l_pdafomi, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, & PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & next_observation_pdaf, outflag) ELSE IF (TRIM(filterstr) == 'LETKF') THEN CALL PDAF_assimilate_letkf(collect_state_pdaf, distribute_state_pdaf, & - init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & - prepoststep_pdaf, prodRinvA_l_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + prepoststep_pdaf, prodRinvA_l_pdafomi, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, & PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & next_observation_pdaf, outflag) ELSE IF (TRIM(filterstr) == 'LESTKF') THEN CALL PDAF_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & - init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & - prepoststep_pdaf, prodRinvA_l_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + prepoststep_pdaf, prodRinvA_l_pdafomi, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, & PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & next_observation_pdaf, outflag) ELSE IF (TRIM(filterstr) == 'LNETF') THEN - WRITE (*,*) 'PDAF-ERROR: Non-diagonal R matrix is not supported for LNETF' + WRITE (*,*) 'PDAF-ERROR: Use PDAFomi_assimilate_lnetf_nondiagR for LNETF' outflag=200 ELSE IF (TRIM(filterstr) == 'LKNETF') THEN - WRITE (*,*) 'PDAF-ERROR: Non-diagonal R matrix is not supported for LKNETF' + WRITE (*,*) 'PDAF-ERROR: Use PDAFomi_assimilate_lknetf_nondiagR for LKNETF' + outflag=200 + ELSE + WRITE (*,*) 'PDAF-ERROR: Invalid filter choice for PDAFomi_assimilate_local_nondiagR' outflag=200 END IF @@ -127,6 +126,6 @@ SUBROUTINE PDAFomi_assimilate_local_nondiagR(collect_state_pdaf, distribute_stat CALL PDAFomi_dealloc() IF (debug>0) & - WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_local -- END' + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_local_nondiagR -- END' END SUBROUTINE PDAFomi_assimilate_local_nondiagR diff --git a/src/PDAFomi_assimilate_local_nondiagR_si.F90 b/src/PDAFomi_assimilate_local_nondiagR_si.F90 index 9ccee8872..41ba74d09 100644 --- a/src/PDAFomi_assimilate_local_nondiagR_si.F90 +++ b/src/PDAFomi_assimilate_local_nondiagR_si.F90 @@ -40,7 +40,7 @@ SUBROUTINE PDAFomi_assimilate_local_nondiagR_si(outflag) ! should not be changed by the user ! ! ! !REVISION HISTORY: -! 2021-10 - Lars Nerger - Initial code +! 2024-07 - Lars Nerger - Initial code ! Later revisions - see svn log ! ! !USES: @@ -60,14 +60,13 @@ SUBROUTINE PDAFomi_assimilate_local_nondiagR_si(outflag) l2g_state_pdaf ! Init full state from local state EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain - init_dim_obs_l_pdafomi ! Get dimension of obs. vector for local analysis domain - EXTERNAL :: prodRinvA_l_pdafomi ! Provide product of inverse of R with matrix A - + init_dim_obs_l_pdafomi, & ! Get dimension of obs. vector for local analysis domain + prodRinvA_l_pdafomi ! Provide product of inverse of R with matrix A ! !CALLING SEQUENCE: ! Called by: model code -! Calls: PDAFomi_assimilate_local +! Calls: PDAFomi_assimilate_local_nondiagR !EOP @@ -77,7 +76,7 @@ SUBROUTINE PDAFomi_assimilate_local_nondiagR_si(outflag) CALL PDAFomi_assimilate_local_nondiagR(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, & - next_observation_pdaf, outflag) + init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, & + g2l_state_pdaf, l2g_state_pdaf, next_observation_pdaf, outflag) END SUBROUTINE PDAFomi_assimilate_local_nondiagR_si diff --git a/src/PDAFomi_assimilate_nonlin_nondiagR.F90 b/src/PDAFomi_assimilate_nonlin_nondiagR.F90 new file mode 100644 index 000000000..08e968a68 --- /dev/null +++ b/src/PDAFomi_assimilate_nonlin_nondiagR.F90 @@ -0,0 +1,105 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_assimilate_nonlin_nondiagR --- Interface to PDAF for global filters +! +! !INTERFACE: +SUBROUTINE PDAFomi_assimilate_nonlin_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, likelihood_pdafomi, prepoststep_pdaf, & + next_observation_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of observation vector + obs_op_pdafomi, & ! Observation operator + likelihood_pdafomi ! Compute likelihood + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obscovar_cb, & ! Initialize mean observation error variance + PDAFomi_add_obs_error_cb ! Add observation error covariance matrix + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_nonlin_nondiagR -- START' + + IF (TRIM(filterstr) == 'NETF') THEN + CALL PDAF_assimilate_netf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, prepoststep_pdaf, & + likelihood_pdafomi, next_observation_pdaf, outflag) + ELSEIF (TRIM(filterstr) == 'PF') THEN + CALL PDAF_assimilate_pf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, prepoststep_pdaf, & + likelihood_pdafomi, next_observation_pdaf, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: Invalid filter choice for PDAFomi_assimilate_nonlin_nondiagR' + outflag=200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_nonlin_nondiagR -- END' + +END SUBROUTINE PDAFomi_assimilate_nonlin_nondiagR diff --git a/src/PDAFomi_assimilate_nonlin_nondiagR_si.F90 b/src/PDAFomi_assimilate_nonlin_nondiagR_si.F90 new file mode 100644 index 000000000..b52707301 --- /dev/null +++ b/src/PDAFomi_assimilate_nonlin_nondiagR_si.F90 @@ -0,0 +1,76 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_assimilate_nonlin_nondiagR_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFomi_assimilate_nonlin_nondiagR_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + ! Interface to PDAF-OMI for local and global filters + EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain + obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain + likelihood_pdafomi ! Compute likelihood + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFomi_assimilate_nonlin_nondiagR +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFomi_assimilate_nonlin_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, likelihood_pdafomi, prepoststep_pdaf, & + next_observation_pdaf, outflag) + +END SUBROUTINE PDAFomi_assimilate_nonlin_nondiagR_si From 8879667e28da018f5674ed65e75e2f13811a58cd Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Fri, 2 Aug 2024 15:34:55 +0200 Subject: [PATCH 35/83] Add PDAFomi_put_state routines for non-diagonal R matrices --- src/PDAFomi_put_state_3dvar_nondiagR.F90 | 102 ++++++++++++++ ...AFomi_put_state_en3dvar_estkf_nondiagR.F90 | 103 ++++++++++++++ ...Fomi_put_state_en3dvar_lestkf_nondiagR.F90 | 116 ++++++++++++++++ src/PDAFomi_put_state_enkf_nondiagR.F90 | 99 ++++++++++++++ src/PDAFomi_put_state_enkf_nondiagR_si.F90 | 75 +++++++++++ src/PDAFomi_put_state_global_nondiagR.F90 | 116 ++++++++++++++++ src/PDAFomi_put_state_global_nondiagR_si.F90 | 74 ++++++++++ ...Fomi_put_state_hyb3dvar_estkf_nondiagR.F90 | 107 +++++++++++++++ ...omi_put_state_hyb3dvar_lestkf_nondiagR.F90 | 119 +++++++++++++++++ src/PDAFomi_put_state_lenkf_nondiagR.F90 | 94 +++++++++++++ src/PDAFomi_put_state_lenkf_nondiagR_si.F90 | 76 +++++++++++ src/PDAFomi_put_state_lknetf_nondiagR.F90 | 115 ++++++++++++++++ src/PDAFomi_put_state_lknetf_nondiagR_si.F90 | 84 ++++++++++++ src/PDAFomi_put_state_lnetf_nondiagR.F90 | 107 +++++++++++++++ src/PDAFomi_put_state_lnetf_nondiagR_si.F90 | 81 +++++++++++ src/PDAFomi_put_state_local_nondiagR.F90 | 126 ++++++++++++++++++ src/PDAFomi_put_state_local_nondiagR_si.F90 | 80 +++++++++++ src/PDAFomi_put_state_nonlin_nondiagR.F90 | 101 ++++++++++++++ src/PDAFomi_put_state_nonlin_nondiagR_si.F90 | 74 ++++++++++ 19 files changed, 1849 insertions(+) create mode 100644 src/PDAFomi_put_state_3dvar_nondiagR.F90 create mode 100644 src/PDAFomi_put_state_en3dvar_estkf_nondiagR.F90 create mode 100644 src/PDAFomi_put_state_en3dvar_lestkf_nondiagR.F90 create mode 100644 src/PDAFomi_put_state_enkf_nondiagR.F90 create mode 100644 src/PDAFomi_put_state_enkf_nondiagR_si.F90 create mode 100644 src/PDAFomi_put_state_global_nondiagR.F90 create mode 100644 src/PDAFomi_put_state_global_nondiagR_si.F90 create mode 100644 src/PDAFomi_put_state_hyb3dvar_estkf_nondiagR.F90 create mode 100644 src/PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.F90 create mode 100644 src/PDAFomi_put_state_lenkf_nondiagR.F90 create mode 100644 src/PDAFomi_put_state_lenkf_nondiagR_si.F90 create mode 100644 src/PDAFomi_put_state_lknetf_nondiagR.F90 create mode 100644 src/PDAFomi_put_state_lknetf_nondiagR_si.F90 create mode 100644 src/PDAFomi_put_state_lnetf_nondiagR.F90 create mode 100644 src/PDAFomi_put_state_lnetf_nondiagR_si.F90 create mode 100644 src/PDAFomi_put_state_local_nondiagR.F90 create mode 100644 src/PDAFomi_put_state_local_nondiagR_si.F90 create mode 100644 src/PDAFomi_put_state_nonlin_nondiagR.F90 create mode 100644 src/PDAFomi_put_state_nonlin_nondiagR_si.F90 diff --git a/src/PDAFomi_put_state_3dvar_nondiagR.F90 b/src/PDAFomi_put_state_3dvar_nondiagR.F90 new file mode 100644 index 000000000..905cd9f24 --- /dev/null +++ b/src/PDAFomi_put_state_3dvar_nondiagR.F90 @@ -0,0 +1,102 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_put_state_3dvar_nondiagR --- Interface to PDAF for 3D-Var +! +! !INTERFACE: +SUBROUTINE PDAFomi_put_state_3dvar_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, & + cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, prodRinvA_pdafomi, & + prepoststep_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_pdaf ! Apply adjoint control vector transform matrix + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of observation vector + obs_op_pdafomi, & ! Observation operator + obs_op_lin_pdafomi, & ! Linearized observation operator + obs_op_adj_pdafomi, & ! Adjoint observation operator + prodRinvA_pdafomi ! Provide product R^-1 A + EXTERNAL :: PDAFomi_init_obs_f_cb ! Initialize observation vector + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_3dvar_nondiagR -- START' + + IF (TRIM(filterstr) == '3DVAR') THEN + CALL PDAF_put_state_3dvar(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, prodRinvA_pdafomi, & + cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & + prepoststep_pdaf, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: No valid filter type for PDAFomi_put_state_3dvar_nondiagR' + outflag = 200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_3dvar_nondiagR -- END' + +END SUBROUTINE PDAFomi_put_state_3dvar_nondiagR diff --git a/src/PDAFomi_put_state_en3dvar_estkf_nondiagR.F90 b/src/PDAFomi_put_state_en3dvar_estkf_nondiagR.F90 new file mode 100644 index 000000000..b1cebff3c --- /dev/null +++ b/src/PDAFomi_put_state_en3dvar_estkf_nondiagR.F90 @@ -0,0 +1,103 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_put_state_en3dvar_estkf_nondiagR --- Interface to PDAF for En3D-Var/ESTKF +! +! !INTERFACE: +SUBROUTINE PDAFomi_put_state_en3dvar_estkf_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, cvt_ens_pdaf, cvt_adj_ens_pdaf, & + obs_op_lin_pdafomi, obs_op_adj_pdafomi, prodRinvA_pdafomi, & + prepoststep_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf ! Apply adjoint control vector transform matrix + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of observation vector + obs_op_pdafomi, & ! Observation operator + obs_op_lin_pdafomi, & ! Linearized observation operator + obs_op_adj_pdafomi, & ! Adjoint observation operator + prodRinvA_pdafomi ! Provide product R^-1 A + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector + PDAFomi_init_obsvar_cb ! Initialize mean observation error variance + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_en3dvar_estkf_nondiagR -- START' + + IF (TRIM(filterstr) == '3DVAR') THEN + CALL PDAF_put_state_en3dvar_estkf(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, prodRinvA_pdafomi, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & + PDAFomi_init_obsvar_cb, prepoststep_pdaf, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: No valid filter type for PDAFomi_put_state_en3dvar_estkf_nondiagR' + outflag = 200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_en3dvar_estkf_nondiagR -- END' + +END SUBROUTINE PDAFomi_put_state_en3dvar_estkf_nondiagR diff --git a/src/PDAFomi_put_state_en3dvar_lestkf_nondiagR.F90 b/src/PDAFomi_put_state_en3dvar_lestkf_nondiagR.F90 new file mode 100644 index 000000000..b6397c33d --- /dev/null +++ b/src/PDAFomi_put_state_en3dvar_lestkf_nondiagR.F90 @@ -0,0 +1,116 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_put_state_en3dvar_lestkf_nondiagR --- Interface to PDAF for En3D-Var/LESTKF +! +! !INTERFACE: +SUBROUTINE PDAFomi_put_state_en3dvar_lestkf_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, cvt_ens_pdaf, cvt_adj_ens_pdaf, & + obs_op_lin_pdafomi, obs_op_adj_pdafomi, prodRinvA_pdafomi, & + init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, & + g2l_state_pdaf, l2g_state_pdaf, prepoststep_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf ! Apply adjoint control vector transform matrix + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from full state + l2g_state_pdaf ! Init full state from local state + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector + obs_op_pdafomi, & ! Full observation operator + obs_op_lin_pdafomi, & ! Linearized observation operator + obs_op_adj_pdafomi, & ! Adjoint observation operator + init_dim_obs_l_pdafomi, & ! Initialize local dimimension of obs. vector + prodRinvA_pdafomi, & ! Provide product R^-1 A + prodRinvA_l_pdafomi ! Provide product R^-1 A + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_g2l_obs_cb ! Restrict full obs. vector to local analysis domain + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_en3dvar_lestkf_nondiagR -- START' + + IF (TRIM(filterstr) == '3DVAR') THEN + CALL PDAF_put_state_en3dvar_lestkf(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, prodRinvA_pdafomi, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + prodRinvA_l_pdafomi, init_n_domains_pdaf, init_dim_l_pdaf, & + init_dim_obs_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, PDAFomi_g2l_obs_cb, & + PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, prepoststep_pdaf, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: No valid filter type for PDAFomi_put_state_en3dvar_lestkf_nondiagR' + outflag = 200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_en3dvar_lestkf_nondiagR -- END' + +END SUBROUTINE PDAFomi_put_state_en3dvar_lestkf_nondiagR diff --git a/src/PDAFomi_put_state_enkf_nondiagR.F90 b/src/PDAFomi_put_state_enkf_nondiagR.F90 new file mode 100644 index 000000000..3ba6ea62c --- /dev/null +++ b/src/PDAFomi_put_state_enkf_nondiagR.F90 @@ -0,0 +1,99 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_put_state_enkf_nondiagR --- Interface to PDAF for global filters +! +! !INTERFACE: +SUBROUTINE PDAFomi_put_state_enkf_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, add_obs_error_pdafomi, init_obscovar_pdafomi, & + prepoststep_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of observation vector + obs_op_pdafomi, & ! Observation operator + init_obscovar_pdafomi, & ! Initialize mean observation error variance + add_obs_error_pdafomi ! Add observation error covariance matrix + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector + PDAFomi_prodRinvA_cb, & ! Provide product R^-1 A + PDAFomi_likelihood_cb ! Compute likelihood + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_enkf_nondiagR -- START' + + IF (TRIM(filterstr) == 'ENKF') THEN + CALL PDAF_put_state_enkf(collect_state_pdaf, init_dim_obs_pdafomi, obs_op_pdafomi, & + PDAFomi_init_obs_f_cb, prepoststep_pdaf, add_obs_error_pdafomi, & + init_obscovar_pdafomi, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: Invalid filter choice for PDAFomi_put_state_enkf_nondiagR' + outflag=200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_enkf_nondiagR -- END' + +END SUBROUTINE PDAFomi_put_state_enkf_nondiagR diff --git a/src/PDAFomi_put_state_enkf_nondiagR_si.F90 b/src/PDAFomi_put_state_enkf_nondiagR_si.F90 new file mode 100644 index 000000000..5967f6788 --- /dev/null +++ b/src/PDAFomi_put_state_enkf_nondiagR_si.F90 @@ -0,0 +1,75 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_put_state_enkf_nondiagR_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFomi_put_state_enkf_nondiagR_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + ! Interface to PDAF-OMI for local and global filters + EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain + obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain + init_obscovar_pdafomi, & ! Initialize mean observation error variance + add_obs_error_pdafomi ! Add observation error covariance matrix + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFomi_put_state_enkf_nondiagR +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFomi_put_state_enkf_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, add_obs_error_pdafomi, init_obscovar_pdafomi, & + prepoststep_pdaf, outflag) + +END SUBROUTINE PDAFomi_put_state_enkf_nondiagR_si diff --git a/src/PDAFomi_put_state_global_nondiagR.F90 b/src/PDAFomi_put_state_global_nondiagR.F90 new file mode 100644 index 000000000..e57d9f009 --- /dev/null +++ b/src/PDAFomi_put_state_global_nondiagR.F90 @@ -0,0 +1,116 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_put_state_global_nondiagR --- Interface to PDAF for global filters +! +! !INTERFACE: +SUBROUTINE PDAFomi_put_state_global_nondiagR(collect_state_pdaf, & + init_dim_obs_pdaf, obs_op_pdaf, prodRinvA_pdaf, prepoststep_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_dim_obs_pdaf, & ! Initialize dimension of observation vector + obs_op_pdaf ! Observation operator + EXTERNAL :: prodRinvA_pdaf ! Provide product R^-1 A + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obscovar_cb, & ! Initialize mean observation error variance + PDAFomi_add_obs_error_cb ! Add observation error covariance matrix + + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_global_nondiagR -- START' + + IF (TRIM(filterstr) == 'SEIK') THEN + CALL PDAF_put_state_seik(collect_state_pdaf, init_dim_obs_pdaf, obs_op_pdaf, & + PDAFomi_init_obs_f_cb, prepoststep_pdaf, & + prodRinvA_pdaf, PDAFomi_init_obsvar_cb, outflag) + ELSEIF (TRIM(filterstr) == 'ENKF') THEN + WRITE (*,*) 'PDAF-ERROR: Use PDAFomi_put_state_enkf_nondiagR for EnKF' + outflag=200 + ELSEIF (TRIM(filterstr) == 'ETKF') THEN + CALL PDAF_put_state_etkf(collect_state_pdaf, init_dim_obs_pdaf, obs_op_pdaf, & + PDAFomi_init_obs_f_cb, prepoststep_pdaf, & + prodRinvA_pdaf, PDAFomi_init_obsvar_cb, outflag) + ELSEIF (TRIM(filterstr) == 'ESTKF') THEN + CALL PDAF_put_state_estkf(collect_state_pdaf, init_dim_obs_pdaf, obs_op_pdaf, & + PDAFomi_init_obs_f_cb, prepoststep_pdaf, & + prodRinvA_pdaf, PDAFomi_init_obsvar_cb, outflag) + ELSEIF (TRIM(filterstr) == 'NETF') THEN + WRITE (*,*) 'PDAF-ERROR: Use PDAFomi_put_state_nonlin_nondiagR for NETF and PF' + outflag=200 + ELSEIF (TRIM(filterstr) == 'PF') THEN + WRITE (*,*) 'PDAF-ERROR: Use PDAFomi_put_state_nonlin_nondiagR for NETF and PF' + outflag=200 + ELSE + WRITE (*,*) 'PDAF-ERROR: Invalid filter choice for PDAFomi_put_state_global_nondiagR' + outflag=200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_global_nondiagR -- END' + +END SUBROUTINE PDAFomi_put_state_global_nondiagR diff --git a/src/PDAFomi_put_state_global_nondiagR_si.F90 b/src/PDAFomi_put_state_global_nondiagR_si.F90 new file mode 100644 index 000000000..de10367e6 --- /dev/null +++ b/src/PDAFomi_put_state_global_nondiagR_si.F90 @@ -0,0 +1,74 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_put_state_global_nondiagR_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFomi_put_state_global_nondiagR_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + ! Interface to PDAF-OMI for local and global filters + EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain + obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain + prodRinvA_pdafomi ! Provide product R^-1 A + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFomi_put_state_global_nondiagR +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFomi_put_state_global_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prodRinvA_pdafomi, prepoststep_pdaf, & + outflag) + +END SUBROUTINE PDAFomi_put_state_global_nondiagR_si diff --git a/src/PDAFomi_put_state_hyb3dvar_estkf_nondiagR.F90 b/src/PDAFomi_put_state_hyb3dvar_estkf_nondiagR.F90 new file mode 100644 index 000000000..83f771513 --- /dev/null +++ b/src/PDAFomi_put_state_hyb3dvar_estkf_nondiagR.F90 @@ -0,0 +1,107 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_put_state_hyb3dvar_estkf_nondiagR --- Interface to PDAF for Hyb3D-Var/ESTKF +! +! !INTERFACE: +SUBROUTINE PDAFomi_put_state_hyb3dvar_estkf_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, & + obs_op_lin_pdafomi, obs_op_adj_pdafomi, prodRinvA_pdafomi, & + prepoststep_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_pdaf, & ! Apply adjoint control vector transform matrix + cvt_ens_pdaf, & ! Apply ensemble control vector transform matrix to control vector + cvt_adj_ens_pdaf ! Apply adjoint ensemble control vector transform matrix + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of observation vector + obs_op_pdafomi, & ! Observation operator + obs_op_lin_pdafomi, & ! Linearized observation operator + obs_op_adj_pdafomi, & ! Adjoint observation operator + prodRinvA_pdafomi ! Provide product R^-1 A + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector + PDAFomi_init_obsvar_cb ! Initialize mean observation error variance + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_hyb3dvar_estkf_nondiagR -- START' + + IF (TRIM(filterstr) == '3DVAR') THEN + CALL PDAF_put_state_hyb3dvar_estkf(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, prodRinvA_pdafomi, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, & + obs_op_lin_pdafomi, obs_op_adj_pdafomi, PDAFomi_init_obsvar_cb, & + prepoststep_pdaf, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: No valid filter type for PDAFomi_put_state_hyb3dvar_estkf_nondiagR' + outflag = 200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_hyb3dvar_estkf_nondiagR -- END' + +END SUBROUTINE PDAFomi_put_state_hyb3dvar_estkf_nondiagR diff --git a/src/PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.F90 b/src/PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.F90 new file mode 100644 index 000000000..bf9dcfdfa --- /dev/null +++ b/src/PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.F90 @@ -0,0 +1,119 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_put_state_hyb3dvar_lestkf_nondiagR --- Interface to PDAF for Hyb3D-Var/LESTKF +! +! !INTERFACE: +SUBROUTINE PDAFomi_put_state_hyb3dvar_lestkf_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, cvt_ens_pdaf, cvt_adj_ens_pdaf, & + cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, prodRinvA_pdafomi, & + init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, & + g2l_state_pdaf, l2g_state_pdaf, prepoststep_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix + cvt_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_pdaf ! Apply adjoint control vector transform matrix + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from full state + l2g_state_pdaf ! Init full state from local state + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector + obs_op_pdafomi, & ! Full observation operator + obs_op_lin_pdafomi, & ! Linearized observation operator + obs_op_adj_pdafomi, & ! Adjoint observation operator + init_dim_obs_l_pdafomi, & ! Initialize local dimimension of obs. vector + prodRinvA_pdafomi, & ! Provide product R^-1 A + prodRinvA_l_pdafomi ! Provide product R^-1 A + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_prodRinvA_cb, & ! Provide product R^-1 A + PDAFomi_g2l_obs_cb ! Restrict full obs. vector to local analysis domain + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_hyb3dvar_lestkf_nondiagR -- START' + + IF (TRIM(filterstr) == '3DVAR') THEN + CALL PDAF_put_state_hyb3dvar_lestkf(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, prodRinvA_pdafomi, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + prodRinvA_l_pdafomi, init_n_domains_pdaf, init_dim_l_pdaf, & + init_dim_obs_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, PDAFomi_g2l_obs_cb, & + PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, prepoststep_pdaf, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: No valid filter type for PDAFomi_put_state_hyb3dvar_lestkf_nondiagR' + outflag = 200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_hyb3dvar_lestkf_nondiagR -- END' + +END SUBROUTINE PDAFomi_put_state_hyb3dvar_lestkf_nondiagR diff --git a/src/PDAFomi_put_state_lenkf_nondiagR.F90 b/src/PDAFomi_put_state_lenkf_nondiagR.F90 new file mode 100644 index 000000000..d19a51c1a --- /dev/null +++ b/src/PDAFomi_put_state_lenkf_nondiagR.F90 @@ -0,0 +1,94 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_put_state_lenkf_nondiagR --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFomi_put_state_lenkf_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, localize_covar_pdafomi, & + add_obs_error_pdafomi, init_obscovar_pdafomi, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! Variant for LENKF with domain decomposition. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of observation vector + obs_op_pdafomi, & ! Observation operator + localize_covar_pdafomi, & ! Apply localization to HP and HPH^T + init_obscovar_pdafomi, & ! Initialize mean observation error variance + add_obs_error_pdafomi ! Provide product R^-1 A + EXTERNAL :: PDAFomi_init_obs_f_cb ! Initialize observation vector + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAF_put_state_lenkf +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_lenkf_nondiagR -- START' + + CALL PDAF_put_state_lenkf(collect_state_pdaf, init_dim_obs_pdafomi, obs_op_pdafomi, & + PDAFomi_init_obs_f_cb, prepoststep_pdaf, localize_covar_pdafomi, & + add_obs_error_pdafomi, init_obscovar_pdafomi, outflag) + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_lenkf_nondiagR -- END' + +END SUBROUTINE PDAFomi_put_state_lenkf_nondiagR diff --git a/src/PDAFomi_put_state_lenkf_nondiagR_si.F90 b/src/PDAFomi_put_state_lenkf_nondiagR_si.F90 new file mode 100644 index 000000000..ede97b240 --- /dev/null +++ b/src/PDAFomi_put_state_lenkf_nondiagR_si.F90 @@ -0,0 +1,76 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_put_state_lenkf_nondiagR_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFomi_put_state_lenkf_nondiagR_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + ! Interface to PDAF-OMI for local and global filters + EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain + obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain + localize_covar_pdafomi, & ! Apply localization to HP and HPH^T + init_obscovar_pdafomi, & ! Initialize mean observation error variance + add_obs_error_pdafomi ! Provide product R^-1 A + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFomi_put_state_lenkf_nondiagR +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFomi_put_state_lenkf_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, localize_covar_pdafomi, & + add_obs_error_pdafomi, init_obscovar_pdafomi, outflag) + +END SUBROUTINE PDAFomi_put_state_lenkf_nondiagR_si diff --git a/src/PDAFomi_put_state_lknetf_nondiagR.F90 b/src/PDAFomi_put_state_lknetf_nondiagR.F90 new file mode 100644 index 000000000..2118be1b4 --- /dev/null +++ b/src/PDAFomi_put_state_lknetf_nondiagR.F90 @@ -0,0 +1,115 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_put_state_lknetf_nondiagR --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFomi_put_state_lknetf_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, prodRinvA_hyb_l_pdafomi, & + likelihood_l_pdafomi, likelihood_hyb_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, & + outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from full state + l2g_state_pdaf ! Init full state from local state + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector + obs_op_pdafomi, & ! Full observation operator + init_dim_obs_l_pdafomi, & ! Initialize local dimimension of obs. vector + prodRinvA_l_pdafomi, & ! Provide product R^-1 A on local analysis domain + likelihood_l_pdafomi, & ! Compute likelihood and apply localization + prodRinvA_hyb_l_pdafomi, & ! Product R^-1 A on local analysis domain with hybrid weight + likelihood_hyb_l_pdafomi ! Compute likelihood and apply localization with tempering + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize full observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_g2l_obs_cb ! Restrict full obs. vector to local analysis domain + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_lknetf_nondiagR -- START' + + IF (TRIM(filterstr) == 'LKNETF') THEN + CALL PDAF_put_state_lknetf(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, & + PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, prepoststep_pdaf, & + prodRinvA_l_pdafomi, prodRinvA_hyb_l_pdafomi, & + init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & + g2l_state_pdaf, l2g_state_pdaf, PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, & + PDAFomi_init_obsvar_l_cb, likelihood_l_pdafomi, likelihood_hyb_l_pdafomi, & + outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: Invalid filter choice for PDAFomi_put_state_lknetf_nondiagR' + outflag=200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_lknetf_nondiagR -- END' + +END SUBROUTINE PDAFomi_put_state_lknetf_nondiagR diff --git a/src/PDAFomi_put_state_lknetf_nondiagR_si.F90 b/src/PDAFomi_put_state_lknetf_nondiagR_si.F90 new file mode 100644 index 000000000..153a5476f --- /dev/null +++ b/src/PDAFomi_put_state_lknetf_nondiagR_si.F90 @@ -0,0 +1,84 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_put_state_lknetf_nondiagR_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFomi_put_state_lknetf_nondiagR_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from full state + l2g_state_pdaf ! Init full state from local state + EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain + obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain + init_dim_obs_l_pdafomi, & ! Get dimension of obs. vector for local analysis domain + prodRinvA_l_pdafomi, & ! Provide product R^-1 A on local analysis domain + prodRinvA_hyb_l_pdafomi, & ! Provide product R^-1 A on local analysis domain with hybrid weight + likelihood_l_pdafomi, & ! Compute observation likelihood for an ensemble member + likelihood_hyb_l_pdafomi ! Compute observation likelihood for an ensemble member with hybrid weight + + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFomi_put_state_lknetf_nondiagR +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFomi_put_state_lknetf_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, prodRinvA_hyb_l_pdafomi, & + likelihood_l_pdafomi, likelihood_hyb_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, & + outflag) + +END SUBROUTINE PDAFomi_put_state_lknetf_nondiagR_si diff --git a/src/PDAFomi_put_state_lnetf_nondiagR.F90 b/src/PDAFomi_put_state_lnetf_nondiagR.F90 new file mode 100644 index 000000000..5817b2bf7 --- /dev/null +++ b/src/PDAFomi_put_state_lnetf_nondiagR.F90 @@ -0,0 +1,107 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_put_state_lnetf_nondiagR --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFomi_put_state_lnetf_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, likelihood_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, & + outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from full state + l2g_state_pdaf ! Init full state from local state + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector + obs_op_pdafomi, & ! Full observation operator + init_dim_obs_l_pdafomi, & ! Initialize local dimimension of obs. vector + likelihood_l_pdafomi ! Compute likelihood and apply localization + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize full observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_g2l_obs_cb ! Restrict full obs. vector to local analysis domain + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_lnetf_nondiagR -- START' + + IF (TRIM(filterstr) == 'LNETF') THEN + CALL PDAF_put_state_lnetf(collect_state_pdaf, init_dim_obs_pdafomi, obs_op_pdafomi, & + PDAFomi_init_obs_l_cb, prepoststep_pdaf, likelihood_l_pdafomi, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, & + PDAFomi_g2l_obs_cb, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: Invalid filter choice for PDAFomi_put_state_lnetf_nondiagR' + outflag=200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_lnetf_nondiagR -- END' + +END SUBROUTINE PDAFomi_put_state_lnetf_nondiagR diff --git a/src/PDAFomi_put_state_lnetf_nondiagR_si.F90 b/src/PDAFomi_put_state_lnetf_nondiagR_si.F90 new file mode 100644 index 000000000..f40da3d9b --- /dev/null +++ b/src/PDAFomi_put_state_lnetf_nondiagR_si.F90 @@ -0,0 +1,81 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_put_state_lnetf_nondiagR_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFomi_put_state_lnetf_nondiagR_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from full state + l2g_state_pdaf ! Init full state from local state + EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain + obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain + init_dim_obs_l_pdafomi, & ! Get dimension of obs. vector for local analysis domain + likelihood_l_pdafomi ! Compute likelihood and apply localization + + + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFomi_put_state_lnetf_nondiagR +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFomi_put_state_lnetf_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, likelihood_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, & + outflag) + +END SUBROUTINE PDAFomi_put_state_lnetf_nondiagR_si diff --git a/src/PDAFomi_put_state_local_nondiagR.F90 b/src/PDAFomi_put_state_local_nondiagR.F90 new file mode 100644 index 000000000..6258663a3 --- /dev/null +++ b/src/PDAFomi_put_state_local_nondiagR.F90 @@ -0,0 +1,126 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_put_state_local_nondiagR --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFomi_put_state_local_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, & + g2l_state_pdaf, l2g_state_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-07 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from full state + l2g_state_pdaf ! Init full state from local state + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector + obs_op_pdafomi, & ! Full observation operator + init_dim_obs_l_pdafomi, & ! Initialize local dimimension of obs. vector + prodRinvA_l_pdafomi ! Provide product of inverse of R with matrix A + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize full observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_g2l_obs_cb ! Restrict full obs. vector to local analysis domain + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_local_nondiagR -- START' + + IF (TRIM(filterstr) == 'LSEIK') THEN + CALL PDAF_put_state_lseik(collect_state_pdaf, init_dim_obs_pdafomi, obs_op_pdafomi, & + PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, prepoststep_pdaf, & + prodRinvA_l_pdafomi, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & + g2l_state_pdaf, l2g_state_pdaf, PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, & + PDAFomi_init_obsvar_l_cb, outflag) + ELSE IF (TRIM(filterstr) == 'LETKF') THEN + CALL PDAF_put_state_letkf(collect_state_pdaf, init_dim_obs_pdafomi, obs_op_pdafomi, & + PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, prepoststep_pdaf, & + prodRinvA_l_pdafomi, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & + g2l_state_pdaf, l2g_state_pdaf, PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, & + PDAFomi_init_obsvar_l_cb, outflag) + ELSE IF (TRIM(filterstr) == 'LESTKF') THEN + CALL PDAF_put_state_lestkf(collect_state_pdaf, init_dim_obs_pdafomi, obs_op_pdafomi, & + PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, prepoststep_pdaf, & + prodRinvA_l_pdafomi, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & + g2l_state_pdaf, l2g_state_pdaf, PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, & + PDAFomi_init_obsvar_l_cb, outflag) + ELSE IF (TRIM(filterstr) == 'LNETF') THEN + WRITE (*,*) 'PDAF-ERROR: Use PDAFomi_put_state_lnetf_nondiagR for LNETF' + outflag=200 + ELSE IF (TRIM(filterstr) == 'LKNETF') THEN + WRITE (*,*) 'PDAF-ERROR: Use PDAFomi_put_state_lknetf_nondiagR for LKNETF' + outflag=200 + ELSE + WRITE (*,*) 'PDAF-ERROR: Invalid filter choice for PDAFomi_put_state_local_nondiagR' + outflag=200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_local_nondiagR -- END' + +END SUBROUTINE PDAFomi_put_state_local_nondiagR diff --git a/src/PDAFomi_put_state_local_nondiagR_si.F90 b/src/PDAFomi_put_state_local_nondiagR_si.F90 new file mode 100644 index 000000000..4e566efe8 --- /dev/null +++ b/src/PDAFomi_put_state_local_nondiagR_si.F90 @@ -0,0 +1,80 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_put_state_local_nondiagR_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFomi_put_state_local_nondiagR_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-07 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from full state + l2g_state_pdaf ! Init full state from local state + EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain + obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain + init_dim_obs_l_pdafomi, & ! Get dimension of obs. vector for local analysis domain + prodRinvA_l_pdafomi ! Provide product of inverse of R with matrix A + + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFomi_put_state_local_nondiagR +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFomi_put_state_local_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, & + g2l_state_pdaf, l2g_state_pdaf, outflag) + +END SUBROUTINE PDAFomi_put_state_local_nondiagR_si diff --git a/src/PDAFomi_put_state_nonlin_nondiagR.F90 b/src/PDAFomi_put_state_nonlin_nondiagR.F90 new file mode 100644 index 000000000..5870feda1 --- /dev/null +++ b/src/PDAFomi_put_state_nonlin_nondiagR.F90 @@ -0,0 +1,101 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_put_state_nonlin_nondiagR --- Interface to PDAF for global filters +! +! !INTERFACE: +SUBROUTINE PDAFomi_put_state_nonlin_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, likelihood_pdafomi, prepoststep_pdaf, & + outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of observation vector + obs_op_pdafomi, & ! Observation operator + likelihood_pdafomi ! Compute likelihood + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obscovar_cb, & ! Initialize mean observation error variance + PDAFomi_add_obs_error_cb ! Add observation error covariance matrix + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_nonlin_nondiagR -- START' + + IF (TRIM(filterstr) == 'NETF') THEN + CALL PDAF_put_state_netf(collect_state_pdaf, init_dim_obs_pdafomi, obs_op_pdafomi, & + PDAFomi_init_obs_f_cb, prepoststep_pdaf, likelihood_pdafomi, outflag) + ELSEIF (TRIM(filterstr) == 'PF') THEN + CALL PDAF_put_state_pf(collect_state_pdaf, init_dim_obs_pdafomi, obs_op_pdafomi, & + PDAFomi_init_obs_f_cb, prepoststep_pdaf, likelihood_pdafomi, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: Invalid filter choice for PDAFomi_put_state_nonlin_nondiagR' + outflag=200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_nonlin_nondiagR -- END' + +END SUBROUTINE PDAFomi_put_state_nonlin_nondiagR diff --git a/src/PDAFomi_put_state_nonlin_nondiagR_si.F90 b/src/PDAFomi_put_state_nonlin_nondiagR_si.F90 new file mode 100644 index 000000000..d48711311 --- /dev/null +++ b/src/PDAFomi_put_state_nonlin_nondiagR_si.F90 @@ -0,0 +1,74 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_put_state_nonlin_nondiagR_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFomi_put_state_nonlin_nondiagR_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + ! Interface to PDAF-OMI for local and global filters + EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain + obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain + likelihood_pdafomi ! Compute likelihood + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFomi_put_state_nonlin_nondiagR +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFomi_put_state_nonlin_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, likelihood_pdafomi, prepoststep_pdaf, & + outflag) + +END SUBROUTINE PDAFomi_put_state_nonlin_nondiagR_si From 80e9c986cdc7af5a76edb1355060cf7e4ea0c31a Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Fri, 2 Aug 2024 15:37:31 +0200 Subject: [PATCH 36/83] Some clean up. Add PDAFomi_put_state*nondiagR routines to Makefile --- src/Makefile | 44 ++++++++++++++++++++--- src/PDAFomi_assimilate_en3dvar_estkf.F90 | 9 ++--- src/PDAFomi_put_state_3dvar.F90 | 1 + src/PDAFomi_put_state_lknetf_nondiagR.F90 | 3 +- 4 files changed, 45 insertions(+), 12 deletions(-) diff --git a/src/Makefile b/src/Makefile index a97e7c83c..d34daf360 100644 --- a/src/Makefile +++ b/src/Makefile @@ -87,10 +87,20 @@ OBJ_PDAF_GEN = PDAF_analysis_utils.o \ PDAF_inflate_weights.o \ PDAFomi_put_state_global.o \ PDAFomi_put_state_global_si.o \ + PDAFomi_put_state_global_nondiagR.o \ + PDAFomi_put_state_global_nondiagR_si.o \ + PDAFomi_put_state_nonlin_nondiagR.o \ + PDAFomi_put_state_nonlin_nondiagR_si.o \ PDAFomi_put_state_local.o \ PDAFomi_put_state_local_si.o \ + PDAFomi_put_state_local_nondiagR.o \ + PDAFomi_put_state_local_nondiagR_si.o \ PDAFomi_assimilate_global.o \ PDAFomi_assimilate_global_si.o \ + PDAFomi_assimilate_global_nondiagR.o \ + PDAFomi_assimilate_global_nondiagR_si.o \ + PDAFomi_assimilate_nonlin_nondiagR.o \ + PDAFomi_assimilate_nonlin_nondiagR_si.o \ PDAFomi_assimilate_local.o \ PDAFomi_assimilate_local_si.o \ PDAFomi_assimilate_local_nondiagR.o \ @@ -165,7 +175,11 @@ OBJ_ENKF = PDAF_enkf_init.o \ PDAF_enkf_analysis_rsm.o \ PDAF_enkf_omega.o \ PDAF_enkf_Tleft.o \ - PDAF_smoother_enkf.o + PDAF_smoother_enkf.o \ + PDAFomi_put_state_enkf_nondiagR.o \ + PDAFomi_put_state_enkf_nondiagR_si.o \ + PDAFomi_assimilate_enkf_nondiagR.o \ + PDAFomi_assimilate_enkf_nondiagR_si.o # Specific PDAF-routines for ETKF OBJ_ETKF = PDAF_etkf_init.o \ @@ -234,10 +248,14 @@ OBJ_LENKF = PDAF_lenkf_init.o \ PDAF_put_state_lenkf_si.o \ PDAFomi_put_state_lenkf.o \ PDAFomi_put_state_lenkf_si.o \ + PDAFomi_put_state_lenkf_nondiagR.o \ + PDAFomi_put_state_lenkf_nondiagR_si.o \ PDAF_assimilate_lenkf.o \ PDAF_assimilate_lenkf_si.o \ PDAFomi_assimilate_lenkf.o \ PDAFomi_assimilate_lenkf_si.o \ + PDAFomi_assimilate_lenkf_nondiagR.o \ + PDAFomi_assimilate_lenkf_nondiagR_si.o \ PDAF_lenkf_update.o \ PDAF_lenkf_analysis_rsm.o # Additional objects used by LEnKF but already specified for EnKF @@ -272,7 +290,11 @@ OBJ_LNETF = PDAF_lnetf_init.o \ PDAF_lnetf_update.o \ PDAF_lnetf_analysis.o \ PDAF_lnetf_smootherT.o \ - PDAF_smoother_lnetf.o + PDAF_smoother_lnetf.o \ + PDAFomi_put_state_lnetf_nondiagR.o \ + PDAFomi_put_state_lnetf_nondiagR_si.o \ + PDAFomi_assimilate_lnetf_nondiagR.o \ + PDAFomi_assimilate_lnetf_nondiagR_si.o # Specific PDAF-routines for PF OBJ_PF = PDAF_pf_init.o \ @@ -305,7 +327,11 @@ OBJ_LKNETF = PDAF_lknetf_init.o \ PDAF_lknetf_compute_gamma.o \ PDAF_lknetf_set_gamma.o \ PDAF_lknetf_alpha_neff.o \ - PDAF_lknetf_reset_gamma.o + PDAF_lknetf_reset_gamma.o \ + PDAFomi_put_state_lknetf_nondiagR.o \ + PDAFomi_put_state_lknetf_nondiagR_si.o \ + PDAFomi_assimilate_lknetf_nondiagR.o \ + PDAFomi_assimilate_lknetf_nondiagR_si.o # Specific PDAF-routines for generating observations OBJ_OBSGEN = PDAF_genobs_init.o \ @@ -364,11 +390,21 @@ OBJ_3DVAR = PDAF_put_state_3dvar.o \ PDAFomi_assimilate_en3dvar_lestkf.o \ PDAFomi_assimilate_hyb3dvar_estkf.o \ PDAFomi_assimilate_hyb3dvar_lestkf.o \ + PDAFomi_assimilate_3dvar_nondiagR.o \ + PDAFomi_assimilate_en3dvar_estkf_nondiagR.o \ + PDAFomi_assimilate_en3dvar_lestkf_nondiagR.o \ + PDAFomi_assimilate_hyb3dvar_estkf_nondiagR.o \ + PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR.o \ PDAFomi_put_state_3dvar.o \ PDAFomi_put_state_en3dvar_estkf.o \ PDAFomi_put_state_en3dvar_lestkf.o \ PDAFomi_put_state_hyb3dvar_estkf.o \ - PDAFomi_put_state_hyb3dvar_lestkf.o + PDAFomi_put_state_hyb3dvar_lestkf.o \ + PDAFomi_put_state_3dvar_nondiagR.o \ + PDAFomi_put_state_en3dvar_estkf_nondiagR.o \ + PDAFomi_put_state_en3dvar_lestkf_nondiagR.o \ + PDAFomi_put_state_hyb3dvar_estkf_nondiagR.o \ + PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.o # Additional file for 3DVar already specified in OBJ_3DVAR_ini # PDAF_3dvar_memtime.o diff --git a/src/PDAFomi_assimilate_en3dvar_estkf.F90 b/src/PDAFomi_assimilate_en3dvar_estkf.F90 index cf0e33700..7fae8e256 100644 --- a/src/PDAFomi_assimilate_en3dvar_estkf.F90 +++ b/src/PDAFomi_assimilate_en3dvar_estkf.F90 @@ -60,18 +60,15 @@ SUBROUTINE PDAFomi_assimilate_en3dvar_estkf(collect_state_pdaf, distribute_state distribute_state_pdaf, & ! Routine to distribute a state vector next_observation_pdaf, & ! Provide time step, time and dimension of next observation prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf ! Apply adjoint control vector transform matrix EXTERNAL :: init_dim_obs_pdaf, & ! Initialize dimension of observation vector obs_op_pdaf, & ! Observation operator - cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector - cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix obs_op_lin_pdaf, & ! Linearized observation operator obs_op_adj_pdaf ! Adjoint observation operator EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance - PDAFomi_init_obscovar_cb, & ! Initialize mean observation error variance - PDAFomi_add_obs_error_cb, & ! Add observation error covariance matrix - PDAFomi_prodRinvA_cb, & ! Provide product R^-1 A - PDAFomi_likelihood_cb ! Compute likelihood + PDAFomi_prodRinvA_cb ! Provide product R^-1 A ! !CALLING SEQUENCE: ! Called by: model code diff --git a/src/PDAFomi_put_state_3dvar.F90 b/src/PDAFomi_put_state_3dvar.F90 index 9c950a23a..70d07a746 100644 --- a/src/PDAFomi_put_state_3dvar.F90 +++ b/src/PDAFomi_put_state_3dvar.F90 @@ -81,6 +81,7 @@ SUBROUTINE PDAFomi_put_state_3dvar(collect_state_pdaf, init_dim_obs_pdaf, obs_op prepoststep_pdaf, outflag) ELSE WRITE (*,*) 'PDAF-ERROR: No valid filter type for PDAFomi_put_state_3dvar' + outflag = 200 END IF diff --git a/src/PDAFomi_put_state_lknetf_nondiagR.F90 b/src/PDAFomi_put_state_lknetf_nondiagR.F90 index 2118be1b4..b3e470db6 100644 --- a/src/PDAFomi_put_state_lknetf_nondiagR.F90 +++ b/src/PDAFomi_put_state_lknetf_nondiagR.F90 @@ -89,8 +89,7 @@ SUBROUTINE PDAFomi_put_state_lknetf_nondiagR(collect_state_pdaf, & WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_put_state_lknetf_nondiagR -- START' IF (TRIM(filterstr) == 'LKNETF') THEN - CALL PDAF_put_state_lknetf(collect_state_pdaf, & - init_dim_obs_pdafomi, obs_op_pdafomi, & + CALL PDAF_put_state_lknetf(collect_state_pdaf, init_dim_obs_pdafomi, obs_op_pdafomi, & PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, prepoststep_pdaf, & prodRinvA_l_pdafomi, prodRinvA_hyb_l_pdafomi, & init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & From fe748142aa534b8d945d7db44f3e546e07ac0bd0 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Fri, 2 Aug 2024 15:56:27 +0200 Subject: [PATCH 37/83] Add compilation of full set of PDnondiagR files to new Makefile --- Makefile | 46 +++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 41 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index f7dcacb13..56530a485 100644 --- a/Makefile +++ b/Makefile @@ -101,13 +101,23 @@ SRC_PDAF_GEN = PDAF_analysis_utils.F90 \ PDAF_inflate_weights.F90 \ PDAFomi_put_state_global.F90 \ PDAFomi_put_state_global_si.F90 \ + PDAFomi_put_state_global_nondiagR.F90 \ + PDAFomi_put_state_global_nondiagR_si.F90 \ + PDAFomi_put_state_nonlin_nondiagR.F90 \ + PDAFomi_put_state_nonlin_nondiagR_si.F90 \ PDAFomi_put_state_local.F90 \ PDAFomi_put_state_local_si.F90 \ + PDAFomi_put_state_local_nondiagR.F90 \ + PDAFomi_put_state_local_nondiagR_si.F90 \ PDAFomi_assimilate_global.F90 \ PDAFomi_assimilate_global_si.F90 \ + PDAFomi_assimilate_global_nondiagR.F90 \ + PDAFomi_assimilate_global_nondiagR_si.F90 \ + PDAFomi_assimilate_nonlin_nondiagR.F90 \ + PDAFomi_assimilate_nonlin_nondiagR_si.F90 \ PDAFomi_assimilate_local.F90 \ - PDAFomi_assimilate_local_nondiagR.F90 \ PDAFomi_assimilate_local_si.F90 \ + PDAFomi_assimilate_local_nondiagR.F90 \ PDAFomi_assimilate_local_nondiagR_si.F90 \ PDAF_reset_forget.F90 \ PDAF_get_ensstats.F90 \ @@ -177,7 +187,11 @@ SRC_ENKF = PDAF_enkf_init.F90 \ PDAF_enkf_analysis_rsm.F90 \ PDAF_enkf_omega.F90 \ PDAF_enkf_Tleft.F90 \ - PDAF_smoother_enkf.F90 + PDAF_smoother_enkf.F90 \ + PDAFomi_put_state_enkf_nondiagR.F90 \ + PDAFomi_put_state_enkf_nondiagR_si.F90 \ + PDAFomi_assimilate_enkf_nondiagR.F90 \ + PDAFomi_assimilate_enkf_nondiagR_si.F90 # Specific PDAF-routines for ETKF SRC_ETKF = PDAF_etkf_init.F90 \ @@ -246,10 +260,14 @@ SRC_LENKF = PDAF_lenkf_init.F90 \ PDAF_put_state_lenkf_si.F90 \ PDAFomi_put_state_lenkf.F90 \ PDAFomi_put_state_lenkf_si.F90 \ + PDAFomi_put_state_lenkf_nondiagR.F90 \ + PDAFomi_put_state_lenkf_nondiagR_si.F90 \ PDAF_assimilate_lenkf.F90 \ PDAF_assimilate_lenkf_si.F90 \ PDAFomi_assimilate_lenkf.F90 \ PDAFomi_assimilate_lenkf_si.F90 \ + PDAFomi_assimilate_lenkf_nondiagR.F90 \ + PDAFomi_assimilate_lenkf_nondiagR_si.F90 \ PDAF_lenkf_update.F90 \ PDAF_lenkf_analysis_rsm.F90 # Additional objects used by LEnKF but already specified for EnKF @@ -284,7 +302,11 @@ SRC_LNETF = PDAF_lnetf_init.F90 \ PDAF_lnetf_update.F90 \ PDAF_lnetf_analysis.F90 \ PDAF_lnetf_smootherT.F90 \ - PDAF_smoother_lnetf.F90 + PDAF_smoother_lnetf.F90 \ + PDAFomi_put_state_lnetf_nondiagR.F90 \ + PDAFomi_put_state_lnetf_nondiagR_si.F90 \ + PDAFomi_assimilate_lnetf_nondiagR.F90 \ + PDAFomi_assimilate_lnetf_nondiagR_si.F90 # Specific PDAF-routines for PF SRC_PF = PDAF_pf_init.F90 \ @@ -317,7 +339,11 @@ SRC_LKNETF = PDAF_lknetf_init.F90 \ PDAF_lknetf_compute_gamma.F90 \ PDAF_lknetf_set_gamma.F90 \ PDAF_lknetf_alpha_neff.F90 \ - PDAF_lknetf_reset_gamma.F90 + PDAF_lknetf_reset_gamma.F90 \ + PDAFomi_put_state_lknetf_nondiagR.F90 \ + PDAFomi_put_state_lknetf_nondiagR_si.F90 \ + PDAFomi_assimilate_lknetf_nondiagR.F90 \ + PDAFomi_assimilate_lknetf_nondiagR_si.F90 # Specific PDAF-routines for generating observations SRC_OBSGEN = PDAF_genobs_init.F90 \ @@ -376,11 +402,21 @@ SRC_3DVAR = PDAF_put_state_3dvar.F90 \ PDAFomi_assimilate_en3dvar_lestkf.F90 \ PDAFomi_assimilate_hyb3dvar_estkf.F90 \ PDAFomi_assimilate_hyb3dvar_lestkf.F90 \ + PDAFomi_assimilate_3dvar_nondiagR.F90 \ + PDAFomi_assimilate_en3dvar_estkf_nondiagR.F90 \ + PDAFomi_assimilate_en3dvar_lestkf_nondiagR.F90 \ + PDAFomi_assimilate_hyb3dvar_estkf_nondiagR.F90 \ + PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 \ PDAFomi_put_state_3dvar.F90 \ PDAFomi_put_state_en3dvar_estkf.F90 \ PDAFomi_put_state_en3dvar_lestkf.F90 \ PDAFomi_put_state_hyb3dvar_estkf.F90 \ - PDAFomi_put_state_hyb3dvar_lestkf.F90 + PDAFomi_put_state_hyb3dvar_lestkf.F90 \ + PDAFomi_put_state_3dvar_nondiagR.F90 \ + PDAFomi_put_state_en3dvar_estkf_nondiagR.F90 \ + PDAFomi_put_state_en3dvar_lestkf_nondiagR.F90 \ + PDAFomi_put_state_hyb3dvar_estkf_nondiagR.F90 \ + PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.F90 # Additional file for 3DVar already specified in SRC_3DVAR_ini # PDAF_3dvar_memtime.F90 From cb0ceac1364365936677738186ffc67d79a9d3ec Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Fri, 2 Aug 2024 15:59:28 +0200 Subject: [PATCH 38/83] Add PDAF_g2l and PDAF_l2g to new Makefile. Update Depends --- Depends | 38 ++++++++++++++++++++++++++++++++++++++ Makefile | 4 +++- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/Depends b/Depends index e0f3b6e4a..01b1cd5e9 100644 --- a/Depends +++ b/Depends @@ -92,6 +92,7 @@ $(OBJDIR)/PDAF_etkf_memtime.o: ./src/PDAF_etkf_memtime.F90 $(OBJDIR)/PDAF_timer. $(OBJDIR)/PDAF_etkf_options.o: ./src/PDAF_etkf_options.F90 $(OBJDIR)/PDAF_etkf_update.o: ./src/PDAF_etkf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_force_analysis.o: ./src/PDAF_force_analysis.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_g2l.o: ./src/PDAF_g2l.F90 ./src/typedefs.h $(OBJDIR)/PDAF_gather_dim_obs_f.o: ./src/PDAF_gather_dim_obs_f.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h $(OBJDIR)/PDAF_gather_obs_f.o: ./src/PDAF_gather_obs_f.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h $(OBJDIR)/PDAF_gather_obs_f2.o: ./src/PDAF_gather_obs_f2.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h @@ -129,6 +130,7 @@ $(OBJDIR)/PDAF_init.o: ./src/PDAF_init.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF $(OBJDIR)/PDAF_init_filters.o: ./src/PDAF_init_filters.F90 $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_init_si.o: ./src/PDAF_init_si.F90 $(OBJDIR)/PDAF_interfaces_module.o: ./src/PDAF_interfaces_module.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_l2g.o: ./src/PDAF_l2g.F90 $(OBJDIR)/PDAF_lenkf_alloc.o: ./src/PDAF_lenkf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_lenkf_analysis_rsm.o: ./src/PDAF_lenkf_analysis_rsm.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h $(OBJDIR)/PDAF_lenkf_init.o: ./src/PDAF_lenkf_init.F90 $(OBJDIR)/PDAF_mod_filter.o @@ -282,35 +284,71 @@ $(OBJDIR)/PDAF_timer.o: ./src/PDAF_timer.F90 $(OBJDIR)/PDAF_timer_mpi.o: ./src/PDAF_timer_mpi.F90 $(OBJDIR)/PDAFomi.o: ./src/PDAFomi.F90 $(OBJDIR)/PDAFomi_obs_f.o $(OBJDIR)/PDAFomi_obs_l.o $(OBJDIR)/PDAFomi_obs_op.o $(OBJDIR)/PDAFomi_assimilate_3dvar.o: ./src/PDAFomi_assimilate_3dvar.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_3dvar_nondiagR.o: ./src/PDAFomi_assimilate_3dvar_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAFomi_assimilate_en3dvar_estkf.o: ./src/PDAFomi_assimilate_en3dvar_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_en3dvar_estkf_nondiagR.o: ./src/PDAFomi_assimilate_en3dvar_estkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAFomi_assimilate_en3dvar_lestkf.o: ./src/PDAFomi_assimilate_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_en3dvar_lestkf_nondiagR.o: ./src/PDAFomi_assimilate_en3dvar_lestkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_enkf_nondiagR.o: ./src/PDAFomi_assimilate_enkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_enkf_nondiagR_si.o: ./src/PDAFomi_assimilate_enkf_nondiagR_si.F90 $(OBJDIR)/PDAFomi_assimilate_global.o: ./src/PDAFomi_assimilate_global.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_global_nondiagR.o: ./src/PDAFomi_assimilate_global_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_global_nondiagR_si.o: ./src/PDAFomi_assimilate_global_nondiagR_si.F90 $(OBJDIR)/PDAFomi_assimilate_global_si.o: ./src/PDAFomi_assimilate_global_si.F90 $(OBJDIR)/PDAFomi_assimilate_hyb3dvar_estkf.o: ./src/PDAFomi_assimilate_hyb3dvar_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_hyb3dvar_estkf_nondiagR.o: ./src/PDAFomi_assimilate_hyb3dvar_estkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAFomi_assimilate_hyb3dvar_lestkf.o: ./src/PDAFomi_assimilate_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR.o: ./src/PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAFomi_assimilate_lenkf.o: ./src/PDAFomi_assimilate_lenkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_lenkf_nondiagR.o: ./src/PDAFomi_assimilate_lenkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_lenkf_nondiagR_si.o: ./src/PDAFomi_assimilate_lenkf_nondiagR_si.F90 $(OBJDIR)/PDAFomi_assimilate_lenkf_si.o: ./src/PDAFomi_assimilate_lenkf_si.F90 +$(OBJDIR)/PDAFomi_assimilate_lknetf_nondiagR.o: ./src/PDAFomi_assimilate_lknetf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_lknetf_nondiagR_si.o: ./src/PDAFomi_assimilate_lknetf_nondiagR_si.F90 +$(OBJDIR)/PDAFomi_assimilate_lnetf_nondiagR.o: ./src/PDAFomi_assimilate_lnetf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_lnetf_nondiagR_si.o: ./src/PDAFomi_assimilate_lnetf_nondiagR_si.F90 $(OBJDIR)/PDAFomi_assimilate_local.o: ./src/PDAFomi_assimilate_local.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAFomi_assimilate_local_nondiagR.o: ./src/PDAFomi_assimilate_local_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAFomi_assimilate_local_nondiagR_si.o: ./src/PDAFomi_assimilate_local_nondiagR_si.F90 $(OBJDIR)/PDAFomi_assimilate_local_si.o: ./src/PDAFomi_assimilate_local_si.F90 +$(OBJDIR)/PDAFomi_assimilate_nonlin_nondiagR.o: ./src/PDAFomi_assimilate_nonlin_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_nonlin_nondiagR_si.o: ./src/PDAFomi_assimilate_nonlin_nondiagR_si.F90 $(OBJDIR)/PDAFomi_callback.o: ./src/PDAFomi_callback.F90 $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi_generate_obs.o: ./src/PDAFomi_generate_obs.F90 $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAFomi_obs_f.o: ./src/PDAFomi_obs_f.F90 $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h $(OBJDIR)/PDAFomi_obs_l.o: ./src/PDAFomi_obs_l.F90 $(OBJDIR)/PDAFomi_obs_f.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi_obs_op.o: ./src/PDAFomi_obs_op.F90 $(OBJDIR)/PDAFomi_obs_f.o $(OBJDIR)/PDAFomi_put_state_3dvar.o: ./src/PDAFomi_put_state_3dvar.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_3dvar_nondiagR.o: ./src/PDAFomi_put_state_3dvar_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAFomi_put_state_en3dvar_estkf.o: ./src/PDAFomi_put_state_en3dvar_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_en3dvar_estkf_nondiagR.o: ./src/PDAFomi_put_state_en3dvar_estkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAFomi_put_state_en3dvar_lestkf.o: ./src/PDAFomi_put_state_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_en3dvar_lestkf_nondiagR.o: ./src/PDAFomi_put_state_en3dvar_lestkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_enkf_nondiagR.o: ./src/PDAFomi_put_state_enkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_enkf_nondiagR_si.o: ./src/PDAFomi_put_state_enkf_nondiagR_si.F90 $(OBJDIR)/PDAFomi_put_state_generate_obs.o: ./src/PDAFomi_put_state_generate_obs.F90 $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAFomi_put_state_global.o: ./src/PDAFomi_put_state_global.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_global_nondiagR.o: ./src/PDAFomi_put_state_global_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_global_nondiagR_si.o: ./src/PDAFomi_put_state_global_nondiagR_si.F90 $(OBJDIR)/PDAFomi_put_state_global_si.o: ./src/PDAFomi_put_state_global_si.F90 $(OBJDIR)/PDAFomi_put_state_hyb3dvar_estkf.o: ./src/PDAFomi_put_state_hyb3dvar_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_hyb3dvar_estkf_nondiagR.o: ./src/PDAFomi_put_state_hyb3dvar_estkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAFomi_put_state_hyb3dvar_lestkf.o: ./src/PDAFomi_put_state_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.o: ./src/PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAFomi_put_state_lenkf.o: ./src/PDAFomi_put_state_lenkf.F90 $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_lenkf_nondiagR.o: ./src/PDAFomi_put_state_lenkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_lenkf_nondiagR_si.o: ./src/PDAFomi_put_state_lenkf_nondiagR_si.F90 $(OBJDIR)/PDAFomi_put_state_lenkf_si.o: ./src/PDAFomi_put_state_lenkf_si.F90 +$(OBJDIR)/PDAFomi_put_state_lknetf_nondiagR.o: ./src/PDAFomi_put_state_lknetf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_lknetf_nondiagR_si.o: ./src/PDAFomi_put_state_lknetf_nondiagR_si.F90 +$(OBJDIR)/PDAFomi_put_state_lnetf_nondiagR.o: ./src/PDAFomi_put_state_lnetf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_lnetf_nondiagR_si.o: ./src/PDAFomi_put_state_lnetf_nondiagR_si.F90 $(OBJDIR)/PDAFomi_put_state_local.o: ./src/PDAFomi_put_state_local.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_local_nondiagR.o: ./src/PDAFomi_put_state_local_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_local_nondiagR_si.o: ./src/PDAFomi_put_state_local_nondiagR_si.F90 $(OBJDIR)/PDAFomi_put_state_local_si.o: ./src/PDAFomi_put_state_local_si.F90 +$(OBJDIR)/PDAFomi_put_state_nonlin_nondiagR.o: ./src/PDAFomi_put_state_nonlin_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_nonlin_nondiagR_si.o: ./src/PDAFomi_put_state_nonlin_nondiagR_si.F90 $(OBJDIR)/SANGOMA_quicksort.o: ./external/SANGOMA/SANGOMA_quicksort.F90 $(OBJDIR)/blas.o: ./external/CG+/blas.f $(OBJDIR)/cgfam.o: ./external/CG+/cgfam.f diff --git a/Makefile b/Makefile index 56530a485..2779a41ab 100644 --- a/Makefile +++ b/Makefile @@ -122,7 +122,9 @@ SRC_PDAF_GEN = PDAF_analysis_utils.F90 \ PDAF_reset_forget.F90 \ PDAF_get_ensstats.F90 \ PDAF_set_debug_flag.F90 \ - PDAF_set_offline_mode.F90 + PDAF_set_offline_mode.F90 \ + PDAF_g2l.F90 \ + PDAF_l2g.F90 # Specific PDAF-routines for SEIK SRC_SEIK = PDAF_seik_init.F90 \ From 21b297d8f37b9720f06419effb4b5cb2ba30b34b Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Tue, 6 Aug 2024 13:31:06 +0200 Subject: [PATCH 39/83] Complte PDAFomi_assimilate/PDAFomi_put_state interfaces for nondiagR. Also add PDAF_g2l/PDAF_l2g --- src/PDAF_interfaces_module.F90 | 1232 ++++++++++++++++++++++---------- 1 file changed, 856 insertions(+), 376 deletions(-) diff --git a/src/PDAF_interfaces_module.F90 b/src/PDAF_interfaces_module.F90 index 48d4d8f7f..f7f353165 100644 --- a/src/PDAF_interfaces_module.F90 +++ b/src/PDAF_interfaces_module.F90 @@ -1149,6 +1149,326 @@ SUBROUTINE PDAF_get_localfilter(lfilter) END SUBROUTINE PDAF_get_localfilter END INTERFACE + INTERFACE + SUBROUTINE PDAF_put_state_3dvar(U_collect_state, & + U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & + U_cvt, U_cvt_adj, U_obs_op_lin, U_obs_op_adj, & + U_prepoststep, outflag) + INTEGER, INTENT(out) :: outflag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obs, & ! Initialize observation vector + U_prepoststep, & ! User supplied pre/poststep routine + U_prodRinvA, & ! Provide product R^-1 A + U_cvt, & ! Apply control vector transform matrix to control vector + U_cvt_adj, & ! Apply adjoint control vector transform matrix + U_obs_op_lin, & ! Linearized observation operator + U_obs_op_adj ! Adjoint observation operator + END SUBROUTINE PDAF_put_state_3dvar + END INTERFACE + + INTERFACE + SUBROUTINE PDAF_put_state_en3dvar_estkf(U_collect_state, & + U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & + U_cvt_ens, U_cvt_adj_ens, U_obs_op_lin, U_obs_op_adj, & + U_init_obsvar, U_prepoststep, outflag) + INTEGER, INTENT(out) :: outflag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_init_obs, & ! Initialize observation vector + U_prepoststep, & ! User supplied pre/poststep routine + U_prodRinvA, & ! Provide product R^-1 A + U_cvt_ens, & ! Apply control vector transform matrix (ensemble) + U_cvt_adj_ens, & ! Apply adjoint control vector transform matrix (ensemble var) + U_obs_op_lin, & ! Linearized observation operator + U_obs_op_adj ! Adjoint observation operator + EXTERNAL :: U_init_obsvar ! Initialize mean observation error variance + END SUBROUTINE PDAF_put_state_en3dvar_estkf + END INTERFACE + + INTERFACE + SUBROUTINE PDAF_put_state_en3dvar_lestkf(U_collect_state, U_init_dim_obs, U_obs_op, & + U_init_obs, U_prodRinvA, & + U_cvt_ens, U_cvt_adj_ens, U_obs_op_lin, U_obs_op_adj, & + U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, U_init_obs_l, U_prodRinvA_l, & + U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, U_g2l_state, U_l2g_state, & + U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & + U_prepoststep, outflag) + INTEGER, INTENT(out) :: outflag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_init_obs, & ! Initialize observation vector + U_prepoststep, & ! User supplied pre/poststep routine + U_prodRinvA, & ! Provide product R^-1 A + U_cvt_ens, & ! Apply control vector transform matrix (ensemble) + U_cvt_adj_ens, & ! Apply adjoint control vector transform matrix (ensemble var) + U_obs_op_lin, & ! Linearized observation operator + U_obs_op_adj ! Adjoint observation operator + EXTERNAL :: U_obs_op_f, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs_f, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs_f, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_state, & ! Get state on local ana. domain from full state + U_l2g_state, & ! Init full state from state on local analysis domain + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l ! Provide product R^-1 A on local analysis domain + END SUBROUTINE PDAF_put_state_en3dvar_lestkf + END INTERFACE + + INTERFACE + SUBROUTINE PDAF_put_state_hyb3dvar_estkf(U_collect_state, U_init_dim_obs, U_obs_op, & + U_init_obs, U_prodRinvA, & + U_cvt, U_cvt_adj, U_cvt_ens, U_cvt_adj_ens, U_obs_op_lin, U_obs_op_adj, & + U_init_obsvar, U_prepoststep, outflag) + INTEGER, INTENT(out) :: outflag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_init_obs, & ! Initialize observation vector + U_prepoststep, & ! User supplied pre/poststep routine + U_prodRinvA, & ! Provide product R^-1 A + U_cvt_ens, & ! Apply control vector transform matrix (ensemble) + U_cvt_adj_ens, & ! Apply adjoint control vector transform matrix (ensemble var) + U_cvt, & ! Apply control vector transform matrix to control vector + U_cvt_adj, & ! Apply adjoint control vector transform matrix + U_obs_op_lin, & ! Linearized observation operator + U_obs_op_adj ! Adjoint observation operator + EXTERNAL :: U_init_obsvar ! Initialize mean observation error variance + END SUBROUTINE PDAF_put_state_hyb3dvar_estkf + END INTERFACE + + INTERFACE + SUBROUTINE PDAF_put_state_hyb3dvar_lestkf(U_collect_state, & + U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & + U_cvt_ens, U_cvt_adj_ens, U_cvt, U_cvt_adj, U_obs_op_lin, U_obs_op_adj, & + U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, U_init_obs_l, U_prodRinvA_l, & + U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, U_g2l_state, U_l2g_state, & + U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & + U_prepoststep, outflag) + INTEGER, INTENT(out) :: outflag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_init_obs, & ! Initialize observation vector + U_prepoststep, & ! User supplied pre/poststep routine + U_prodRinvA, & ! Provide product R^-1 A + U_cvt_ens, & ! Apply control vector transform matrix (ensemble) + U_cvt_adj_ens, & ! Apply adjoint control vector transform matrix (ensemble var) + U_cvt, & ! Apply control vector transform matrix to control vector + U_cvt_adj, & ! Apply adjoint control vector transform matrix + U_obs_op_lin, & ! Linearized observation operator + U_obs_op_adj ! Adjoint observation operator + EXTERNAL :: U_obs_op_f, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs_f, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs_f, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_state, & ! Get state on local ana. domain from full state + U_l2g_state, & ! Init full state from state on local analysis domain + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l ! Provide product R^-1 A on local analysis domain + END SUBROUTINE PDAF_put_state_hyb3dvar_lestkf + END INTERFACE + + INTERFACE + SUBROUTINE PDAF_assimilate_3dvar(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & + U_cvt, U_cvt_adj, U_obs_op_lin, U_obs_op_adj, & + U_prepoststep, U_next_observation, outflag) + INTEGER, INTENT(out) :: outflag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obs, & ! Initialize observation vector + U_prepoststep, & ! User supplied pre/poststep routine + U_prodRinvA, & ! Provide product R^-1 A + U_next_observation, & ! Routine to provide time step, time and dimension + ! of next observation + U_distribute_state, & ! Routine to distribute a state vector + U_cvt, & ! Apply control vector transform matrix to control vector + U_cvt_adj, & ! Apply adjoint control vector transform matrix + U_obs_op_lin, & ! Linearized observation operator + U_obs_op_adj ! Adjoint observation operator + END SUBROUTINE PDAF_assimilate_3dvar + END INTERFACE + + INTERFACE + SUBROUTINE PDAF_assimilate_en3dvar_estkf(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & + U_cvt_ens, U_cvt_adj_ens, U_obs_op_lin, U_obs_op_adj, & + U_init_obsvar, U_prepoststep, U_next_observation, outflag) + INTEGER, INTENT(out) :: outflag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obs, & ! Initialize observation vector + U_prepoststep, & ! User supplied pre/poststep routine + U_prodRinvA, & ! Provide product R^-1 A + U_next_observation, & ! Routine to provide time step, time and dimension + ! of next observation + U_distribute_state, & ! Routine to distribute a state vector + U_cvt_ens, & ! Apply control vector transform matrix (ensemble) + U_cvt_adj_ens, & ! Apply adjoint control vector transform matrix (ensemble var) + U_cvt, & ! Apply control vector transform matrix to control vector + U_cvt_adj, & ! Apply adjoint control vector transform matrix + U_obs_op_lin, & ! Linearized observation operator + U_obs_op_adj ! Adjoint observation operator + END SUBROUTINE PDAF_assimilate_en3dvar_estkf + END INTERFACE + + INTERFACE + SUBROUTINE PDAF_assimilate_en3dvar_lestkf(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & + U_cvt_ens, U_cvt_adj_ens, U_obs_op_lin, U_obs_op_adj, & + U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, U_init_obs_l, U_prodRinvA_l, & + U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, U_g2l_state, U_l2g_state, & + U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & + U_prepoststep, U_next_observation, outflag) + INTEGER, INTENT(inout) :: outflag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obs, & ! Initialize observation vector + U_prepoststep, & ! User supplied pre/poststep routine + U_prodRinvA, & ! Provide product R^-1 A + U_next_observation, & ! Routine to provide time step, time and dimension + ! of next observation + U_distribute_state, & ! Routine to distribute a state vector + U_cvt_ens, & ! Apply control vector transform matrix (ensemble) + U_cvt_adj_ens, & ! Apply adjoint control vector transform matrix (ensemble var) + U_cvt, & ! Apply control vector transform matrix to control vector + U_cvt_adj, & ! Apply adjoint control vector transform matrix + U_obs_op_lin, & ! Linearized observation operator + U_obs_op_adj ! Adjoint observation operator + EXTERNAL :: U_obs_op_f, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs_f, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs_f, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_state, & ! Get state on local ana. domain from full state + U_l2g_state, & ! Init full state from state on local analysis domain + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l ! Provide product R^-1 A on local analysis domain + END SUBROUTINE PDAF_assimilate_en3dvar_lestkf + END INTERFACE + + INTERFACE + SUBROUTINE PDAF_assimilate_hyb3dvar_estkf(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & + U_cvt_ens, U_cvt_adj_ens, U_cvt, U_cvt_adj, U_obs_op_lin, U_obs_op_adj, & + U_init_obsvar, U_prepoststep, U_next_observation, outflag) + INTEGER, INTENT(out) :: outflag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obs, & ! Initialize observation vector + U_prepoststep, & ! User supplied pre/poststep routine + U_prodRinvA, & ! Provide product R^-1 A + U_next_observation, & ! Routine to provide time step, time and dimension + ! of next observation + U_distribute_state, & ! Routine to distribute a state vector + U_cvt_ens, & ! Apply control vector transform matrix (ensemble) + U_cvt_adj_ens, & ! Apply adjoint control vector transform matrix (ensemble var) + U_cvt, & ! Apply control vector transform matrix to control vector + U_cvt_adj, & ! Apply adjoint control vector transform matrix + U_obs_op_lin, & ! Linearized observation operator + U_obs_op_adj ! Adjoint observation operator + END SUBROUTINE PDAF_assimilate_hyb3dvar_estkf + END INTERFACE + + INTERFACE + SUBROUTINE PDAF_assimilate_hyb3dvar_lestkf(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & + U_cvt_ens, U_cvt_adj_ens, U_cvt, U_cvt_adj, U_obs_op_lin, U_obs_op_adj, & + U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, U_init_obs_l, U_prodRinvA_l, & + U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, U_g2l_state, U_l2g_state, & + U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & + U_prepoststep, U_next_observation, outflag) + INTEGER, INTENT(out) :: outflag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obs, & ! Initialize observation vector + U_prepoststep, & ! User supplied pre/poststep routine + U_prodRinvA, & ! Provide product R^-1 A + U_next_observation, & ! Routine to provide time step, time and dimension + ! of next observation + U_distribute_state, & ! Routine to distribute a state vector + U_cvt_ens, & ! Apply control vector transform matrix (ensemble) + U_cvt_adj_ens, & ! Apply adjoint control vector transform matrix (ensemble var) + U_cvt, & ! Apply control vector transform matrix to control vector + U_cvt_adj, & ! Apply adjoint control vector transform matrix + U_obs_op_lin, & ! Linearized observation operator + U_obs_op_adj ! Adjoint observation operator + EXTERNAL :: U_obs_op_f, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs_f, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs_f, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_state, & ! Get state on local ana. domain from full state + U_l2g_state, & ! Init full state from state on local analysis domain + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l ! Provide product R^-1 A on local analysis domain + END SUBROUTINE PDAF_assimilate_hyb3dvar_lestkf + END INTERFACE + + INTERFACE + SUBROUTINE PDAF_set_debug_flag(debugval) + INTEGER, INTENT(in) :: debugval ! Value of debugging flag; print debug information for >0 + END SUBROUTINE PDAF_set_debug_flag + END INTERFACE + + INTERFACE + SUBROUTINE PDAF_set_offline_mode(screen) + INTEGER, INTENT(in) :: screen ! Verbosity flag + END SUBROUTINE PDAF_set_offline_mode + END INTERFACE + + INTERFACE + SUBROUTINE PDAF_g2l(dim_p, dim_l, idx_l_in_p, state_p, state_l) + INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension + INTEGER, INTENT(in) :: dim_l !< Local state dimension + INTEGER, INTENT(in) :: idx_l_in_p(dim_l) !< Index array for projection + REAL, INTENT(in) :: state_p(dim_p) !< PE-local full state vector + REAL, INTENT(out) :: state_l(dim_l) !< State vector on local analysis domain + END SUBROUTINE PDAF_g2l + END INTERFACE + + INTERFACE + SUBROUTINE PDAF_l2g(dim_p, dim_l, idx_l_in_p, state_p, state_l) + INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension + INTEGER, INTENT(in) :: dim_l !< Local state dimension + INTEGER, INTENT(in) :: idx_l_in_p(dim_l) !< Index array for projection + REAL, INTENT(inout) :: state_p(dim_p) !< PE-local full state vector + REAL, INTENT(in) :: state_l(dim_l) !< State vector on local analysis domain + END SUBROUTINE PDAF_l2g + END INTERFACE + + ! OMI INTERFACES --------------------- INTERFACE @@ -1162,6 +1482,57 @@ SUBROUTINE PDAFomi_put_state_global(U_collect_state, U_init_dim_obs, U_obs_op, & END SUBROUTINE PDAFomi_put_state_global END INTERFACE + INTERFACE + SUBROUTINE PDAFomi_put_state_global_nondiagR(U_collect_state, U_init_dim_obs, U_obs_op, & + U_prodRinvA, U_prepoststep, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_prodRinvA, & ! Provide product R^-1 A + U_prepoststep ! User supplied pre/poststep routine + END SUBROUTINE PDAFomi_put_state_global_nondiagR + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_put_state_nonlin_nondiagR(U_collect_state, U_init_dim_obs, U_obs_op, & + U_likelihood, U_prepoststep, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_likelihood, & ! Compute likelihood + U_prepoststep ! User supplied pre/poststep routine + END SUBROUTINE PDAFomi_put_state_nonlin_nondiagR + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_put_state_enkf_nondiagR(U_collect_state, U_init_dim_obs, U_obs_op, & + U_prepoststep, U_add_obs_err, U_init_obs_covar, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_add_obs_err, & ! Add obs error covariance R to HPH in EnKF + U_init_obs_covar, & ! Initialize obs. error cov. matrix R in EnKF + U_prepoststep ! User supplied pre/poststep routine + END SUBROUTINE PDAFomi_put_state_enkf_nondiagR + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_put_state_lenkf_nondiagR(U_collect_state, U_init_dim_obs, U_obs_op, & + U_prepoststep, U_localize, U_add_obs_err, U_init_obs_covar, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_add_obs_err, & ! Add obs error covariance R to HPH in EnKF + U_init_obs_covar, & ! Initialize obs. error cov. matrix R in EnKF + U_localize, & ! Apply localization to HP and HPH^T + U_prepoststep ! User supplied pre/poststep routine + END SUBROUTINE PDAFomi_put_state_lenkf_nondiagR + END INTERFACE + INTERFACE SUBROUTINE PDAFomi_assimilate_global(U_collect_state, U_distribute_state, & U_init_dim_obs, U_obs_op, U_prepoststep, U_next_observation, flag) @@ -1192,6 +1563,64 @@ SUBROUTINE PDAFomi_put_state_local(U_collect_state, U_init_dim_obs, U_obs_op, & END SUBROUTINE PDAFomi_put_state_local END INTERFACE + INTERFACE + SUBROUTINE PDAFomi_put_state_local_nondiagR(U_collect_state, U_init_dim_obs, U_obs_op, & + U_prepoststep, U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, U_prodRinvA_l, & + U_g2l_state, U_l2g_state, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain + U_g2l_state, & ! Get state on local ana. domain from full state + U_l2g_state, & ! Init full state from state on local analysis domain + U_prepoststep ! User supplied pre/poststep routine + END SUBROUTINE PDAFomi_put_state_local_nondiagR + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_put_state_lnetf_nondiagR(U_collect_state, U_init_dim_obs, U_obs_op, & + U_prepoststep, U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, U_likelihood_l, & + U_g2l_state, U_l2g_state, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_likelihood_l, & ! Compute likelihood and apply localization + U_g2l_state, & ! Get state on local ana. domain from full state + U_l2g_state, & ! Init full state from state on local analysis domain + U_prepoststep ! User supplied pre/poststep routine + END SUBROUTINE PDAFomi_put_state_lnetf_nondiagR + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_put_state_lknetf_nondiagR(U_collect_state, U_init_dim_obs, U_obs_op, & + U_prepoststep, U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, & + U_prodRinvA_l, U_prodRinvA_hyb_l, U_likelihood_l, U_likelihood_hyb_l, & + U_g2l_state, U_l2g_state, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain + U_prodRinvA_hyb_l, & ! Product R^-1 A on local analysis domain with hybrid weight + U_likelihood_l, & ! Compute likelihood and apply localization + U_likelihood_hyb_l, & ! Compute likelihood and apply localization with tempering + U_g2l_state, & ! Get state on local ana. domain from full state + U_l2g_state, & ! Init full state from state on local analysis domain + U_prepoststep ! User supplied pre/poststep routine + END SUBROUTINE PDAFomi_put_state_lknetf_nondiagR + END INTERFACE + INTERFACE SUBROUTINE PDAFomi_assimilate_local(U_collect_state, U_distribute_state, & U_init_dim_obs, U_obs_op, U_prepoststep, U_init_n_domains_p, U_init_dim_l, & @@ -1232,45 +1661,228 @@ END SUBROUTINE PDAFomi_assimilate_local_nondiagR END INTERFACE INTERFACE - SUBROUTINE PDAFomi_put_state_local_si(flag) + SUBROUTINE PDAFomi_assimilate_lnetf_nondiagR(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_prepoststep, U_init_n_domains_p, U_init_dim_l, & + U_init_dim_obs_l, U_likelihood_l, U_g2l_state, U_l2g_state, U_next_observation, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_distribute_state, & ! Routine to distribute a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_likelihood_l, & ! Compute likelihood and apply localization + U_g2l_state, & ! Get state on local ana. domain from full state + U_l2g_state, & ! Init full state from state on local analysis domain + U_prepoststep, & ! User supplied pre/poststep routine + U_next_observation ! Provide time step and time of next observation + END SUBROUTINE PDAFomi_assimilate_lnetf_nondiagR + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_assimilate_lknetf_nondiagR(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_prepoststep, U_init_n_domains_p, U_init_dim_l, & + U_init_dim_obs_l, U_prodRinvA_l, U_prodRinvA_hyb_l, U_likelihood_l, U_likelihood_hyb_l, & + U_g2l_state, U_l2g_state, U_next_observation, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_distribute_state, & ! Routine to distribute a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain + U_prodRinvA_hyb_l, & ! Product R^-1 A on local analysis domain with hybrid weight + U_likelihood_l, & ! Compute likelihood and apply localization + U_likelihood_hyb_l, & ! Compute likelihood and apply localization with tempering + U_g2l_state, & ! Get state on local ana. domain from full state + U_l2g_state, & ! Init full state from state on local analysis domain + U_prepoststep, & ! User supplied pre/poststep routine + U_next_observation ! Provide time step and time of next observation + END SUBROUTINE PDAFomi_assimilate_lknetf_nondiagR + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_assimilate_global_nondiagR(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_prodRinvA, U_prepoststep, U_next_observation, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_distribute_state, & ! Routine to distribute a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_prodRinvA, & ! Provide product R^-1 A + U_prepoststep, & ! User supplied pre/poststep routine + U_next_observation ! Provide time step and time of next observation + END SUBROUTINE PDAFomi_assimilate_global_nondiagR + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_assimilate_nonlin_nondiagR(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_likelihood, U_prepoststep, U_next_observation, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_distribute_state, & ! Routine to distribute a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_likelihood, & ! Compute likelihood + U_prepoststep, & ! User supplied pre/poststep routine + U_next_observation ! Provide time step and time of next observation + END SUBROUTINE PDAFomi_assimilate_nonlin_nondiagR + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_assimilate_enkf_nondiagR(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_add_obs_err, U_init_obs_covar, & + U_prepoststep, U_next_observation, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_distribute_state, & ! Routine to distribute a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_add_obs_err, & ! Add obs error covariance R to HPH in EnKF + U_init_obs_covar, & ! Initialize obs. error cov. matrix R in EnKF + U_prepoststep, & ! User supplied pre/poststep routine + U_next_observation ! Provide time step and time of next observation + END SUBROUTINE PDAFomi_assimilate_enkf_nondiagR + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_assimilate_lenkf_nondiagR(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_prepoststep, U_localize, & + U_add_obs_error, U_init_obs_covar, U_next_observation, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_distribute_state, & ! Routine to distribute a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_init_obs_covar, & ! Initialize obs. error cov. matrix R in EnKF + U_prepoststep, & ! User supplied pre/poststep routine + U_localize, & ! Apply localization to HP and HPH^T + U_add_obs_error, & ! Add obs error covariance R to HPH in EnKF + U_next_observation ! Provide time step and time of next observation + END SUBROUTINE PDAFomi_assimilate_lenkf_nondiagR + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_put_state_local_si(flag) + INTEGER, INTENT(out) :: flag ! Status flag + END SUBROUTINE PDAFomi_put_state_local_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_assimilate_local_si(flag) + INTEGER, INTENT(out) :: flag ! Status flag + END SUBROUTINE PDAFomi_assimilate_local_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_assimilate_local_nondiagR_si(flag) + INTEGER, INTENT(out) :: flag ! Status flag + END SUBROUTINE PDAFomi_assimilate_local_nondiagR_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_assimilate_global_nondiagR_si(flag) + INTEGER, INTENT(out) :: flag ! Status flag + END SUBROUTINE PDAFomi_assimilate_global_nondiagR_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_assimilate_enkf_nondiagR_si(flag) + INTEGER, INTENT(out) :: flag ! Status flag + END SUBROUTINE PDAFomi_assimilate_enkf_nondiagR_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_assimilate_nonlin_nondiagR_si(flag) + INTEGER, INTENT(out) :: flag ! Status flag + END SUBROUTINE PDAFomi_assimilate_nonlin_nondiagR_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_assimilate_lenkf_nondiagR_si(flag) + INTEGER, INTENT(out) :: flag ! Status flag + END SUBROUTINE PDAFomi_assimilate_lenkf_nondiagR_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_assimilate_lknetf_nondiagR_si(flag) + INTEGER, INTENT(out) :: flag ! Status flag + END SUBROUTINE PDAFomi_assimilate_lknetf_nondiagR_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_assimilate_lnetf_nondiagR_si(flag) + INTEGER, INTENT(out) :: flag ! Status flag + END SUBROUTINE PDAFomi_assimilate_lnetf_nondiagR_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_put_state_global_si(flag) + INTEGER, INTENT(out) :: flag ! Status flag + END SUBROUTINE PDAFomi_put_state_global_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_assimilate_global_si(flag) + INTEGER, INTENT(out) :: flag ! Status flag + END SUBROUTINE PDAFomi_assimilate_global_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_assimilate_lenkf_si(flag) + INTEGER, INTENT(out) :: flag ! Status flag + END SUBROUTINE PDAFomi_assimilate_lenkf_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_put_state_lenkf_si(flag) INTEGER, INTENT(out) :: flag ! Status flag - END SUBROUTINE PDAFomi_put_state_local_si + END SUBROUTINE PDAFomi_put_state_lenkf_si END INTERFACE INTERFACE - SUBROUTINE PDAFomi_assimilate_local_si(flag) + SUBROUTINE PDAFomi_put_state_local_nondiagR_si(flag) INTEGER, INTENT(out) :: flag ! Status flag - END SUBROUTINE PDAFomi_assimilate_local_si + END SUBROUTINE PDAFomi_put_state_local_nondiagR_si END INTERFACE - INTERFACE - SUBROUTINE PDAFomi_assimilate_local_nondiagR_si(flag) + INTERFACE + SUBROUTINE PDAFomi_put_state_global_nondiagR_si(flag) INTEGER, INTENT(out) :: flag ! Status flag - END SUBROUTINE PDAFomi_assimilate_local_nondiagR_si + END SUBROUTINE PDAFomi_put_state_global_nondiagR_si END INTERFACE INTERFACE - SUBROUTINE PDAFomi_put_state_global_si(flag) + SUBROUTINE PDAFomi_put_state_enkf_nondiagR_si(flag) INTEGER, INTENT(out) :: flag ! Status flag - END SUBROUTINE PDAFomi_put_state_global_si + END SUBROUTINE PDAFomi_put_state_enkf_nondiagR_si END INTERFACE INTERFACE - SUBROUTINE PDAFomi_assimilate_global_si(flag) + SUBROUTINE PDAFomi_put_state_nonlin_nondiagR_si(flag) INTEGER, INTENT(out) :: flag ! Status flag - END SUBROUTINE PDAFomi_assimilate_global_si + END SUBROUTINE PDAFomi_put_state_nonlin_nondiagR_si END INTERFACE INTERFACE - SUBROUTINE PDAFomi_assimilate_lenkf_si(flag) + SUBROUTINE PDAFomi_put_state_lenkf_nondiagR_si(flag) INTEGER, INTENT(out) :: flag ! Status flag - END SUBROUTINE PDAFomi_assimilate_lenkf_si + END SUBROUTINE PDAFomi_put_state_lenkf_nondiagR_si END INTERFACE INTERFACE - SUBROUTINE PDAFomi_put_state_lenkf_si(flag) + SUBROUTINE PDAFomi_put_state_lknetf_nondiagR_si(flag) INTEGER, INTENT(out) :: flag ! Status flag - END SUBROUTINE PDAFomi_put_state_lenkf_si + END SUBROUTINE PDAFomi_put_state_lknetf_nondiagR_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_put_state_lnetf_nondiagR_si(flag) + INTEGER, INTENT(out) :: flag ! Status flag + END SUBROUTINE PDAFomi_put_state_lnetf_nondiagR_si END INTERFACE INTERFACE @@ -1348,6 +1960,26 @@ SUBROUTINE PDAFomi_assimilate_3dvar(collect_state_pdaf, distribute_state_pdaf, & END SUBROUTINE PDAFomi_assimilate_3dvar END INTERFACE + INTERFACE + SUBROUTINE PDAFomi_assimilate_3dvar_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdaf, obs_op_pdaf, prodRinvA_pdaf, & + cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, & + prepoststep_pdaf, next_observation_pdaf, outflag) + INTEGER, INTENT(inout) :: outflag ! Status flag + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_dim_obs_pdaf, & ! Initialize dimension of observation vector + obs_op_pdaf, & ! Observation operator + prodRinvA_pdaf, & ! Provide product R^-1 A + cvt_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_pdaf, & ! Apply adjoint control vector transform matrix + obs_op_lin_pdaf, & ! Linearized observation operator + obs_op_adj_pdaf ! Adjoint observation operator + END SUBROUTINE PDAFomi_assimilate_3dvar_nondiagR + END INTERFACE + INTERFACE SUBROUTINE PDAFomi_assimilate_en3dvar_estkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdaf, obs_op_pdaf, & @@ -1364,15 +1996,29 @@ SUBROUTINE PDAFomi_assimilate_en3dvar_estkf(collect_state_pdaf, distribute_state cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix obs_op_lin_pdaf, & ! Linearized observation operator obs_op_adj_pdaf ! Adjoint observation operator - EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector - PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance - PDAFomi_init_obscovar_cb, & ! Initialize mean observation error variance - PDAFomi_add_obs_error_cb, & ! Add observation error covariance matrix - PDAFomi_prodRinvA_cb, & ! Provide product R^-1 A - PDAFomi_likelihood_cb ! Compute likelihood END SUBROUTINE PDAFomi_assimilate_en3dvar_estkf END INTERFACE + INTERFACE + SUBROUTINE PDAFomi_assimilate_en3dvar_estkf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdaf, obs_op_pdaf, prodRinvA_pdaf, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, & + prepoststep_pdaf, next_observation_pdaf, outflag) + INTEGER, INTENT(inout) :: outflag ! Status flag + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_dim_obs_pdaf, & ! Initialize dimension of observation vector + obs_op_pdaf, & ! Observation operator + prodRinvA_pdaf, & ! Provide product R^-1 A + cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix + obs_op_lin_pdaf, & ! Linearized observation operator + obs_op_adj_pdaf ! Adjoint observation operator + END SUBROUTINE PDAFomi_assimilate_en3dvar_estkf_nondiagR + END INTERFACE + INTERFACE SUBROUTINE PDAFomi_assimilate_en3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, & @@ -1395,17 +2041,36 @@ SUBROUTINE PDAFomi_assimilate_en3dvar_lestkf(collect_state_pdaf, distribute_stat init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector obs_op_f_pdaf, & ! Full observation operator init_dim_obs_l_pdaf ! Initialize local dimimension of obs. vector - EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector - PDAFomi_init_obs_l_cb, & ! Initialize local observation vector - PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance - PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance - PDAFomi_prodRinvA_cb, & ! Provide product R^-1 A - PDAFomi_g2l_obs_cb, & ! Restrict full obs. vector to local analysis domain - PDAFomi_prodRinvA_l_cb, & ! Provide product R^-1 A on local analysis domain - PDAFomi_likelihood_l_cb ! Compute likelihood and apply localization END SUBROUTINE PDAFomi_assimilate_en3dvar_lestkf END INTERFACE + INTERFACE + SUBROUTINE PDAFomi_assimilate_en3dvar_lestkf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, prodRinvA_pdaf, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, & + prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & + g2l_state_pdaf, l2g_state_pdaf, prepoststep_pdaf, next_observation_pdaf, outflag) + INTEGER, INTENT(inout) :: outflag ! Status flag + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix + obs_op_lin_pdaf, & ! Linearized observation operator + obs_op_adj_pdaf ! Adjoint observation operator + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + prodRinvA_pdaf, & ! Provide product R^-1 A + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from full state + l2g_state_pdaf, & ! Init full state from local state + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + obs_op_f_pdaf, & ! Full observation operator + init_dim_obs_l_pdaf, & ! Initialize local dimimension of obs. vector + prodRinvA_l_pdaf ! Provide product R^-1 A with localization + END SUBROUTINE PDAFomi_assimilate_en3dvar_lestkf_nondiagR + END INTERFACE + INTERFACE SUBROUTINE PDAFomi_assimilate_hyb3dvar_estkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdaf, obs_op_pdaf, & @@ -1424,15 +2089,31 @@ SUBROUTINE PDAFomi_assimilate_hyb3dvar_estkf(collect_state_pdaf, distribute_stat cvt_adj_ens_pdaf, & ! Apply adjoint ensemble control vector transform matrix obs_op_lin_pdaf, & ! Linearized observation operator obs_op_adj_pdaf ! Adjoint observation operator - EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector - PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance - PDAFomi_init_obscovar_cb, & ! Initialize mean observation error variance - PDAFomi_add_obs_error_cb, & ! Add observation error covariance matrix - PDAFomi_prodRinvA_cb, & ! Provide product R^-1 A - PDAFomi_likelihood_cb ! Compute likelihood END SUBROUTINE PDAFomi_assimilate_hyb3dvar_estkf END INTERFACE + INTERFACE + SUBROUTINE PDAFomi_assimilate_hyb3dvar_estkf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdaf, obs_op_pdaf, prodRinvA_pdaf, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, & + obs_op_lin_pdaf, obs_op_adj_pdaf, prepoststep_pdaf, next_observation_pdaf, outflag) + INTEGER, INTENT(inout) :: outflag ! Status flag + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_dim_obs_pdaf, & ! Initialize dimension of observation vector + obs_op_pdaf, & ! Observation operator + prodRinvA_pdaf, & ! Provide product R^-1 A + cvt_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_pdaf, & ! Apply adjoint control vector transform matrix + cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix + obs_op_lin_pdaf, & ! Linearized observation operator + obs_op_adj_pdaf ! Adjoint observation operator + END SUBROUTINE PDAFomi_assimilate_hyb3dvar_estkf_nondiagR + END INTERFACE + INTERFACE SUBROUTINE PDAFomi_assimilate_hyb3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, & @@ -1451,174 +2132,42 @@ SUBROUTINE PDAFomi_assimilate_hyb3dvar_lestkf(collect_state_pdaf, distribute_sta obs_op_lin_pdaf, & ! Linearized observation operator obs_op_adj_pdaf ! Adjoint observation operator EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains - init_dim_l_pdaf, & ! Init state dimension for local ana. domain - g2l_state_pdaf, & ! Get state on local ana. domain from full state - l2g_state_pdaf, & ! Init full state from local state - init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector - obs_op_f_pdaf, & ! Full observation operator - init_dim_obs_l_pdaf ! Initialize local dimimension of obs. vector - EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector - PDAFomi_init_obs_l_cb, & ! Initialize local observation vector - PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance - PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance - PDAFomi_prodRinvA_cb, & ! Provide product R^-1 A - PDAFomi_g2l_obs_cb, & ! Restrict full obs. vector to local analysis domain - PDAFomi_prodRinvA_l_cb, & ! Provide product R^-1 A on local analysis domain - PDAFomi_likelihood_l_cb ! Compute likelihood and apply localization - END SUBROUTINE PDAFomi_assimilate_hyb3dvar_lestkf - END INTERFACE - - INTERFACE - SUBROUTINE PDAF_assimilate_3dvar(U_collect_state, U_distribute_state, & - U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & - U_cvt, U_cvt_adj, U_obs_op_lin, U_obs_op_adj, & - U_prepoststep, U_next_observation, outflag) - INTEGER, INTENT(out) :: outflag ! Status flag - EXTERNAL :: U_collect_state, & ! Routine to collect a state vector - U_init_dim_obs, & ! Initialize dimension of observation vector - U_obs_op, & ! Observation operator - U_init_obsvar, & ! Initialize mean observation error variance - U_init_obs, & ! Initialize observation vector - U_prepoststep, & ! User supplied pre/poststep routine - U_prodRinvA, & ! Provide product R^-1 A - U_next_observation, & ! Routine to provide time step, time and dimension - ! of next observation - U_distribute_state, & ! Routine to distribute a state vector - U_cvt, & ! Apply control vector transform matrix to control vector - U_cvt_adj, & ! Apply adjoint control vector transform matrix - U_obs_op_lin, & ! Linearized observation operator - U_obs_op_adj ! Adjoint observation operator - END SUBROUTINE PDAF_assimilate_3dvar - END INTERFACE - - INTERFACE - SUBROUTINE PDAF_assimilate_en3dvar_estkf(U_collect_state, U_distribute_state, & - U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & - U_cvt_ens, U_cvt_adj_ens, U_obs_op_lin, U_obs_op_adj, & - U_init_obsvar, U_prepoststep, U_next_observation, outflag) - INTEGER, INTENT(out) :: outflag ! Status flag - EXTERNAL :: U_collect_state, & ! Routine to collect a state vector - U_init_dim_obs, & ! Initialize dimension of observation vector - U_obs_op, & ! Observation operator - U_init_obsvar, & ! Initialize mean observation error variance - U_init_obs, & ! Initialize observation vector - U_prepoststep, & ! User supplied pre/poststep routine - U_prodRinvA, & ! Provide product R^-1 A - U_next_observation, & ! Routine to provide time step, time and dimension - ! of next observation - U_distribute_state, & ! Routine to distribute a state vector - U_cvt_ens, & ! Apply control vector transform matrix (ensemble) - U_cvt_adj_ens, & ! Apply adjoint control vector transform matrix (ensemble var) - U_cvt, & ! Apply control vector transform matrix to control vector - U_cvt_adj, & ! Apply adjoint control vector transform matrix - U_obs_op_lin, & ! Linearized observation operator - U_obs_op_adj ! Adjoint observation operator - END SUBROUTINE PDAF_assimilate_en3dvar_estkf - END INTERFACE - - INTERFACE - SUBROUTINE PDAF_assimilate_en3dvar_lestkf(U_collect_state, U_distribute_state, & - U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & - U_cvt_ens, U_cvt_adj_ens, U_obs_op_lin, U_obs_op_adj, & - U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, U_init_obs_l, U_prodRinvA_l, & - U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, U_g2l_state, U_l2g_state, & - U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & - U_prepoststep, U_next_observation, outflag) - INTEGER, INTENT(inout) :: outflag ! Status flag - EXTERNAL :: U_collect_state, & ! Routine to collect a state vector - U_init_dim_obs, & ! Initialize dimension of observation vector - U_obs_op, & ! Observation operator - U_init_obsvar, & ! Initialize mean observation error variance - U_init_obs, & ! Initialize observation vector - U_prepoststep, & ! User supplied pre/poststep routine - U_prodRinvA, & ! Provide product R^-1 A - U_next_observation, & ! Routine to provide time step, time and dimension - ! of next observation - U_distribute_state, & ! Routine to distribute a state vector - U_cvt_ens, & ! Apply control vector transform matrix (ensemble) - U_cvt_adj_ens, & ! Apply adjoint control vector transform matrix (ensemble var) - U_cvt, & ! Apply control vector transform matrix to control vector - U_cvt_adj, & ! Apply adjoint control vector transform matrix - U_obs_op_lin, & ! Linearized observation operator - U_obs_op_adj ! Adjoint observation operator - EXTERNAL :: U_obs_op_f, & ! Observation operator - U_init_n_domains_p, & ! Provide number of local analysis domains - U_init_dim_l, & ! Init state dimension for local ana. domain - U_init_dim_obs_f, & ! Initialize dimension of observation vector - U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain - U_init_obs_f, & ! Initialize PE-local observation vector - U_init_obs_l, & ! Init. observation vector on local analysis domain - U_init_obsvar_l, & ! Initialize local mean observation error variance - U_g2l_state, & ! Get state on local ana. domain from full state - U_l2g_state, & ! Init full state from state on local analysis domain - U_g2l_obs, & ! Restrict full obs. vector to local analysis domain - U_prodRinvA_l ! Provide product R^-1 A on local analysis domain - END SUBROUTINE PDAF_assimilate_en3dvar_lestkf - END INTERFACE - - INTERFACE - SUBROUTINE PDAF_assimilate_hyb3dvar_estkf(U_collect_state, U_distribute_state, & - U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & - U_cvt_ens, U_cvt_adj_ens, U_cvt, U_cvt_adj, U_obs_op_lin, U_obs_op_adj, & - U_init_obsvar, U_prepoststep, U_next_observation, outflag) - INTEGER, INTENT(out) :: outflag ! Status flag - EXTERNAL :: U_collect_state, & ! Routine to collect a state vector - U_init_dim_obs, & ! Initialize dimension of observation vector - U_obs_op, & ! Observation operator - U_init_obsvar, & ! Initialize mean observation error variance - U_init_obs, & ! Initialize observation vector - U_prepoststep, & ! User supplied pre/poststep routine - U_prodRinvA, & ! Provide product R^-1 A - U_next_observation, & ! Routine to provide time step, time and dimension - ! of next observation - U_distribute_state, & ! Routine to distribute a state vector - U_cvt_ens, & ! Apply control vector transform matrix (ensemble) - U_cvt_adj_ens, & ! Apply adjoint control vector transform matrix (ensemble var) - U_cvt, & ! Apply control vector transform matrix to control vector - U_cvt_adj, & ! Apply adjoint control vector transform matrix - U_obs_op_lin, & ! Linearized observation operator - U_obs_op_adj ! Adjoint observation operator - END SUBROUTINE PDAF_assimilate_hyb3dvar_estkf - END INTERFACE - - INTERFACE - SUBROUTINE PDAF_assimilate_hyb3dvar_lestkf(U_collect_state, U_distribute_state, & - U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & - U_cvt_ens, U_cvt_adj_ens, U_cvt, U_cvt_adj, U_obs_op_lin, U_obs_op_adj, & - U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, U_init_obs_l, U_prodRinvA_l, & - U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, U_g2l_state, U_l2g_state, & - U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & - U_prepoststep, U_next_observation, outflag) - INTEGER, INTENT(out) :: outflag ! Status flag - EXTERNAL :: U_collect_state, & ! Routine to collect a state vector - U_init_dim_obs, & ! Initialize dimension of observation vector - U_obs_op, & ! Observation operator - U_init_obsvar, & ! Initialize mean observation error variance - U_init_obs, & ! Initialize observation vector - U_prepoststep, & ! User supplied pre/poststep routine - U_prodRinvA, & ! Provide product R^-1 A - U_next_observation, & ! Routine to provide time step, time and dimension - ! of next observation - U_distribute_state, & ! Routine to distribute a state vector - U_cvt_ens, & ! Apply control vector transform matrix (ensemble) - U_cvt_adj_ens, & ! Apply adjoint control vector transform matrix (ensemble var) - U_cvt, & ! Apply control vector transform matrix to control vector - U_cvt_adj, & ! Apply adjoint control vector transform matrix - U_obs_op_lin, & ! Linearized observation operator - U_obs_op_adj ! Adjoint observation operator - EXTERNAL :: U_obs_op_f, & ! Observation operator - U_init_n_domains_p, & ! Provide number of local analysis domains - U_init_dim_l, & ! Init state dimension for local ana. domain - U_init_dim_obs_f, & ! Initialize dimension of observation vector - U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain - U_init_obs_f, & ! Initialize PE-local observation vector - U_init_obs_l, & ! Init. observation vector on local analysis domain - U_init_obsvar_l, & ! Initialize local mean observation error variance - U_g2l_state, & ! Get state on local ana. domain from full state - U_l2g_state, & ! Init full state from state on local analysis domain - U_g2l_obs, & ! Restrict full obs. vector to local analysis domain - U_prodRinvA_l ! Provide product R^-1 A on local analysis domain - END SUBROUTINE PDAF_assimilate_hyb3dvar_lestkf + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from full state + l2g_state_pdaf, & ! Init full state from local state + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + obs_op_f_pdaf, & ! Full observation operator + init_dim_obs_l_pdaf ! Initialize local dimimension of obs. vector + END SUBROUTINE PDAFomi_assimilate_hyb3dvar_lestkf + END INTERFACE + + INTERFACE + SUBROUTINE PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, prodRinvA_pdaf, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, & + prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & + g2l_state_pdaf, l2g_state_pdaf, prepoststep_pdaf, next_observation_pdaf, outflag) + INTEGER, INTENT(inout) :: outflag ! Status flag + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix + cvt_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_pdaf, & ! Apply adjoint control vector transform matrix + obs_op_lin_pdaf, & ! Linearized observation operator + obs_op_adj_pdaf ! Adjoint observation operator + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + prodRinvA_pdaf, & ! Provide product R^-1 A + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from full state + l2g_state_pdaf, & ! Init full state from local state + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + obs_op_f_pdaf, & ! Full observation operator + init_dim_obs_l_pdaf, & ! Initialize local dimimension of obs. vector + prodRinvA_l_pdaf ! Provide product R^-1 A with localization + END SUBROUTINE PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR END INTERFACE INTERFACE @@ -1633,11 +2182,26 @@ SUBROUTINE PDAFomi_put_state_3dvar(collect_state_pdaf, init_dim_obs_pdaf, obs_op cvt_adj_pdaf, & ! Apply adjoint control vector transform matrix obs_op_lin_pdaf, & ! Linearized observation operator obs_op_adj_pdaf ! Adjoint observation operator - EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector - PDAFomi_prodRinvA_cb ! Provide product R^-1 A END SUBROUTINE PDAFomi_put_state_3dvar END INTERFACE + INTERFACE + SUBROUTINE PDAFomi_put_state_3dvar_nondiagR(collect_state_pdaf, & + init_dim_obs_pdaf, obs_op_pdaf, prodRinvA_pdaf, & + cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, prepoststep_pdaf, outflag) + INTEGER, INTENT(inout) :: outflag ! Status flag + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_dim_obs_pdaf, & ! Initialize dimension of observation vector + obs_op_pdaf, & ! Observation operator + prodRinvA_pdaf, & ! Provide product R^-1 A + cvt_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_pdaf, & ! Apply adjoint control vector transform matrix + obs_op_lin_pdaf, & ! Linearized observation operator + obs_op_adj_pdaf ! Adjoint observation operator + END SUBROUTINE PDAFomi_put_state_3dvar_nondiagR + END INTERFACE + INTERFACE SUBROUTINE PDAFomi_put_state_en3dvar_estkf(collect_state_pdaf, & init_dim_obs_pdaf, obs_op_pdaf, & @@ -1652,15 +2216,27 @@ SUBROUTINE PDAFomi_put_state_en3dvar_estkf(collect_state_pdaf, & cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix obs_op_lin_pdaf, & ! Linearized observation operator obs_op_adj_pdaf ! Adjoint observation operator - EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector - PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance - PDAFomi_init_obscovar_cb, & ! Initialize mean observation error variance - PDAFomi_add_obs_error_cb, & ! Add observation error covariance matrix - PDAFomi_prodRinvA_cb, & ! Provide product R^-1 A - PDAFomi_likelihood_cb ! Compute likelihood END SUBROUTINE PDAFomi_put_state_en3dvar_estkf END INTERFACE + INTERFACE + SUBROUTINE PDAFomi_put_state_en3dvar_estkf_nondiagR(collect_state_pdaf, & + init_dim_obs_pdaf, obs_op_pdaf, prodRinvA_pdaf, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, & + prepoststep_pdaf, outflag) + INTEGER, INTENT(inout) :: outflag ! Status flag + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_dim_obs_pdaf, & ! Initialize dimension of observation vector + obs_op_pdaf, & ! Observation operator + prodRinvA_pdaf, & ! Provide product R^-1 A + cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix + obs_op_lin_pdaf, & ! Linearized observation operator + obs_op_adj_pdaf ! Adjoint observation operator + END SUBROUTINE PDAFomi_put_state_en3dvar_estkf_nondiagR + END INTERFACE + INTERFACE SUBROUTINE PDAFomi_put_state_en3dvar_lestkf(collect_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, & @@ -1681,17 +2257,34 @@ SUBROUTINE PDAFomi_put_state_en3dvar_lestkf(collect_state_pdaf, & init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector obs_op_f_pdaf, & ! Full observation operator init_dim_obs_l_pdaf ! Initialize local dimimension of obs. vector - EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector - PDAFomi_init_obs_l_cb, & ! Initialize local observation vector - PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance - PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance - PDAFomi_prodRinvA_cb, & ! Provide product R^-1 A - PDAFomi_g2l_obs_cb, & ! Restrict full obs. vector to local analysis domain - PDAFomi_prodRinvA_l_cb, & ! Provide product R^-1 A on local analysis domain - PDAFomi_likelihood_l_cb ! Compute likelihood and apply localization END SUBROUTINE PDAFomi_put_state_en3dvar_lestkf END INTERFACE + INTERFACE + SUBROUTINE PDAFomi_put_state_en3dvar_lestkf_nondiagR(collect_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, prodRinvA_pdaf, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, & + prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & + g2l_state_pdaf, l2g_state_pdaf, prepoststep_pdaf, outflag) + INTEGER, INTENT(inout) :: outflag ! Status flag + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix + obs_op_lin_pdaf, & ! Linearized observation operator + obs_op_adj_pdaf ! Adjoint observation operator + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + prodRinvA_pdaf, & ! Provide product R^-1 A + g2l_state_pdaf, & ! Get state on local ana. domain from full state + l2g_state_pdaf, & ! Init full state from local state + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + obs_op_f_pdaf, & ! Full observation operator + init_dim_obs_l_pdaf, & ! Initialize local dimimension of obs. vector + prodRinvA_l_pdaf ! Provide product R^-1 A with localization + END SUBROUTINE PDAFomi_put_state_en3dvar_lestkf_nondiagR + END INTERFACE + INTERFACE SUBROUTINE PDAFomi_put_state_hyb3dvar_estkf(collect_state_pdaf, & init_dim_obs_pdaf, obs_op_pdaf, & @@ -1708,15 +2301,29 @@ SUBROUTINE PDAFomi_put_state_hyb3dvar_estkf(collect_state_pdaf, & cvt_adj_ens_pdaf, & ! Apply adjoint ensemble control vector transform matrix obs_op_lin_pdaf, & ! Linearized observation operator obs_op_adj_pdaf ! Adjoint observation operator - EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector - PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance - PDAFomi_init_obscovar_cb, & ! Initialize mean observation error variance - PDAFomi_add_obs_error_cb, & ! Add observation error covariance matrix - PDAFomi_prodRinvA_cb, & ! Provide product R^-1 A - PDAFomi_likelihood_cb ! Compute likelihood END SUBROUTINE PDAFomi_put_state_hyb3dvar_estkf END INTERFACE + INTERFACE + SUBROUTINE PDAFomi_put_state_hyb3dvar_estkf_nondiagR(collect_state_pdaf, & + init_dim_obs_pdaf, obs_op_pdaf, prodRinvA_pdaf, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, & + obs_op_lin_pdaf, obs_op_adj_pdaf, prepoststep_pdaf, outflag) + INTEGER, INTENT(inout) :: outflag ! Status flag + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_dim_obs_pdaf, & ! Initialize dimension of observation vector + obs_op_pdaf, & ! Observation operator + prodRinvA_pdaf, & ! Provide product R^-1 A + cvt_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_pdaf, & ! Apply adjoint control vector transform matrix + cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix + obs_op_lin_pdaf, & ! Linearized observation operator + obs_op_adj_pdaf ! Adjoint observation operator + END SUBROUTINE PDAFomi_put_state_hyb3dvar_estkf_nondiagR + END INTERFACE + INTERFACE SUBROUTINE PDAFomi_put_state_hyb3dvar_lestkf(collect_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, & @@ -1739,161 +2346,34 @@ SUBROUTINE PDAFomi_put_state_hyb3dvar_lestkf(collect_state_pdaf, & init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector obs_op_f_pdaf, & ! Full observation operator init_dim_obs_l_pdaf ! Initialize local dimimension of obs. vector - EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector - PDAFomi_init_obs_l_cb, & ! Initialize local observation vector - PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance - PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance - PDAFomi_prodRinvA_cb, & ! Provide product R^-1 A - PDAFomi_g2l_obs_cb, & ! Restrict full obs. vector to local analysis domain - PDAFomi_prodRinvA_l_cb, & ! Provide product R^-1 A on local analysis domain - PDAFomi_likelihood_l_cb ! Compute likelihood and apply localization END SUBROUTINE PDAFomi_put_state_hyb3dvar_lestkf END INTERFACE INTERFACE - SUBROUTINE PDAF_put_state_3dvar(U_collect_state, & - U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & - U_cvt, U_cvt_adj, U_obs_op_lin, U_obs_op_adj, & - U_prepoststep, outflag) - INTEGER, INTENT(out) :: outflag ! Status flag - EXTERNAL :: U_collect_state, & ! Routine to collect a state vector - U_init_dim_obs, & ! Initialize dimension of observation vector - U_obs_op, & ! Observation operator - U_init_obsvar, & ! Initialize mean observation error variance - U_init_obs, & ! Initialize observation vector - U_prepoststep, & ! User supplied pre/poststep routine - U_prodRinvA, & ! Provide product R^-1 A - U_cvt, & ! Apply control vector transform matrix to control vector - U_cvt_adj, & ! Apply adjoint control vector transform matrix - U_obs_op_lin, & ! Linearized observation operator - U_obs_op_adj ! Adjoint observation operator - END SUBROUTINE PDAF_put_state_3dvar - END INTERFACE - - INTERFACE - SUBROUTINE PDAF_put_state_en3dvar_estkf(U_collect_state, & - U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & - U_cvt_ens, U_cvt_adj_ens, U_obs_op_lin, U_obs_op_adj, & - U_init_obsvar, U_prepoststep, outflag) - INTEGER, INTENT(out) :: outflag ! Status flag - EXTERNAL :: U_collect_state, & ! Routine to collect a state vector - U_init_dim_obs, & ! Initialize dimension of observation vector - U_obs_op, & ! Observation operator - U_init_obs, & ! Initialize observation vector - U_prepoststep, & ! User supplied pre/poststep routine - U_prodRinvA, & ! Provide product R^-1 A - U_cvt_ens, & ! Apply control vector transform matrix (ensemble) - U_cvt_adj_ens, & ! Apply adjoint control vector transform matrix (ensemble var) - U_obs_op_lin, & ! Linearized observation operator - U_obs_op_adj ! Adjoint observation operator - EXTERNAL :: U_init_obsvar ! Initialize mean observation error variance - END SUBROUTINE PDAF_put_state_en3dvar_estkf - END INTERFACE - - INTERFACE - SUBROUTINE PDAF_put_state_en3dvar_lestkf(U_collect_state, U_init_dim_obs, U_obs_op, & - U_init_obs, U_prodRinvA, & - U_cvt_ens, U_cvt_adj_ens, U_obs_op_lin, U_obs_op_adj, & - U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, U_init_obs_l, U_prodRinvA_l, & - U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, U_g2l_state, U_l2g_state, & - U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & - U_prepoststep, outflag) - INTEGER, INTENT(out) :: outflag ! Status flag - EXTERNAL :: U_collect_state, & ! Routine to collect a state vector - U_init_dim_obs, & ! Initialize dimension of observation vector - U_obs_op, & ! Observation operator - U_init_obs, & ! Initialize observation vector - U_prepoststep, & ! User supplied pre/poststep routine - U_prodRinvA, & ! Provide product R^-1 A - U_cvt_ens, & ! Apply control vector transform matrix (ensemble) - U_cvt_adj_ens, & ! Apply adjoint control vector transform matrix (ensemble var) - U_obs_op_lin, & ! Linearized observation operator - U_obs_op_adj ! Adjoint observation operator - EXTERNAL :: U_obs_op_f, & ! Observation operator - U_init_n_domains_p, & ! Provide number of local analysis domains - U_init_dim_l, & ! Init state dimension for local ana. domain - U_init_dim_obs_f, & ! Initialize dimension of observation vector - U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain - U_init_obs_f, & ! Initialize PE-local observation vector - U_init_obs_l, & ! Init. observation vector on local analysis domain - U_init_obsvar, & ! Initialize mean observation error variance - U_init_obsvar_l, & ! Initialize local mean observation error variance - U_g2l_state, & ! Get state on local ana. domain from full state - U_l2g_state, & ! Init full state from state on local analysis domain - U_g2l_obs, & ! Restrict full obs. vector to local analysis domain - U_prodRinvA_l ! Provide product R^-1 A on local analysis domain - END SUBROUTINE PDAF_put_state_en3dvar_lestkf - END INTERFACE - - INTERFACE - SUBROUTINE PDAF_put_state_hyb3dvar_estkf(U_collect_state, U_init_dim_obs, U_obs_op, & - U_init_obs, U_prodRinvA, & - U_cvt, U_cvt_adj, U_cvt_ens, U_cvt_adj_ens, U_obs_op_lin, U_obs_op_adj, & - U_init_obsvar, U_prepoststep, outflag) - INTEGER, INTENT(out) :: outflag ! Status flag - EXTERNAL :: U_collect_state, & ! Routine to collect a state vector - U_init_dim_obs, & ! Initialize dimension of observation vector - U_obs_op, & ! Observation operator - U_init_obs, & ! Initialize observation vector - U_prepoststep, & ! User supplied pre/poststep routine - U_prodRinvA, & ! Provide product R^-1 A - U_cvt_ens, & ! Apply control vector transform matrix (ensemble) - U_cvt_adj_ens, & ! Apply adjoint control vector transform matrix (ensemble var) - U_cvt, & ! Apply control vector transform matrix to control vector - U_cvt_adj, & ! Apply adjoint control vector transform matrix - U_obs_op_lin, & ! Linearized observation operator - U_obs_op_adj ! Adjoint observation operator - EXTERNAL :: U_init_obsvar ! Initialize mean observation error variance - END SUBROUTINE PDAF_put_state_hyb3dvar_estkf - END INTERFACE - - INTERFACE - SUBROUTINE PDAF_put_state_hyb3dvar_lestkf(U_collect_state, & - U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & - U_cvt_ens, U_cvt_adj_ens, U_cvt, U_cvt_adj, U_obs_op_lin, U_obs_op_adj, & - U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, U_init_obs_l, U_prodRinvA_l, & - U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, U_g2l_state, U_l2g_state, & - U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & - U_prepoststep, outflag) - INTEGER, INTENT(out) :: outflag ! Status flag - EXTERNAL :: U_collect_state, & ! Routine to collect a state vector - U_init_dim_obs, & ! Initialize dimension of observation vector - U_obs_op, & ! Observation operator - U_init_obs, & ! Initialize observation vector - U_prepoststep, & ! User supplied pre/poststep routine - U_prodRinvA, & ! Provide product R^-1 A - U_cvt_ens, & ! Apply control vector transform matrix (ensemble) - U_cvt_adj_ens, & ! Apply adjoint control vector transform matrix (ensemble var) - U_cvt, & ! Apply control vector transform matrix to control vector - U_cvt_adj, & ! Apply adjoint control vector transform matrix - U_obs_op_lin, & ! Linearized observation operator - U_obs_op_adj ! Adjoint observation operator - EXTERNAL :: U_obs_op_f, & ! Observation operator - U_init_n_domains_p, & ! Provide number of local analysis domains - U_init_dim_l, & ! Init state dimension for local ana. domain - U_init_dim_obs_f, & ! Initialize dimension of observation vector - U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain - U_init_obs_f, & ! Initialize PE-local observation vector - U_init_obs_l, & ! Init. observation vector on local analysis domain - U_init_obsvar, & ! Initialize mean observation error variance - U_init_obsvar_l, & ! Initialize local mean observation error variance - U_g2l_state, & ! Get state on local ana. domain from full state - U_l2g_state, & ! Init full state from state on local analysis domain - U_g2l_obs, & ! Restrict full obs. vector to local analysis domain - U_prodRinvA_l ! Provide product R^-1 A on local analysis domain - END SUBROUTINE PDAF_put_state_hyb3dvar_lestkf - END INTERFACE - - INTERFACE - SUBROUTINE PDAF_set_debug_flag(debugval) - INTEGER, INTENT(in) :: debugval ! Value of debugging flag; print debug information for >0 - END SUBROUTINE PDAF_set_debug_flag - END INTERFACE - - INTERFACE - SUBROUTINE PDAF_set_offline_mode(screen) - INTEGER, INTENT(in) :: screen ! Verbosity flag - END SUBROUTINE PDAF_set_offline_mode + SUBROUTINE PDAFomi_put_state_hyb3dvar_lestkf_nondiagR(collect_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, prodRinvA_pdaf, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, & + prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & + g2l_state_pdaf, l2g_state_pdaf, prepoststep_pdaf, outflag) + INTEGER, INTENT(inout) :: outflag ! Status flag + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix + cvt_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_pdaf, & ! Apply adjoint control vector transform matrix + obs_op_lin_pdaf, & ! Linearized observation operator + obs_op_adj_pdaf ! Adjoint observation operator + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + prodRinvA_pdaf, & ! Provide product R^-1 A + g2l_state_pdaf, & ! Get state on local ana. domain from full state + l2g_state_pdaf, & ! Init full state from local state + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + obs_op_f_pdaf, & ! Full observation operator + init_dim_obs_l_pdaf, & ! Initialize local dimimension of obs. vector + prodRinvA_l_pdaf ! Provide product R^-1 A with localization + END SUBROUTINE PDAFomi_put_state_hyb3dvar_lestkf_nondiagR END INTERFACE END MODULE PDAF_interfaces_module From 6727fb029661598231740917167d863fed363a0e Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Tue, 6 Aug 2024 13:33:05 +0200 Subject: [PATCH 40/83] Correct order of arguments to be consistent with nin-OMI routines --- src/PDAFomi_assimilate_3dvar_nondiagR.F90 | 4 ++-- src/PDAFomi_assimilate_en3dvar_estkf_nondiagR.F90 | 8 ++++---- src/PDAFomi_assimilate_en3dvar_lestkf_nondiagR.F90 | 8 ++++---- src/PDAFomi_assimilate_hyb3dvar_estkf_nondiagR.F90 | 4 ++-- src/PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 | 6 +++--- src/PDAFomi_put_state_3dvar_nondiagR.F90 | 4 ++-- src/PDAFomi_put_state_en3dvar_estkf_nondiagR.F90 | 4 ++-- src/PDAFomi_put_state_en3dvar_lestkf_nondiagR.F90 | 8 ++++---- src/PDAFomi_put_state_hyb3dvar_estkf_nondiagR.F90 | 4 ++-- src/PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.F90 | 7 ++++--- 10 files changed, 29 insertions(+), 28 deletions(-) diff --git a/src/PDAFomi_assimilate_3dvar_nondiagR.F90 b/src/PDAFomi_assimilate_3dvar_nondiagR.F90 index a52832b8a..b8694d0b4 100644 --- a/src/PDAFomi_assimilate_3dvar_nondiagR.F90 +++ b/src/PDAFomi_assimilate_3dvar_nondiagR.F90 @@ -22,8 +22,8 @@ ! ! !INTERFACE: SUBROUTINE PDAFomi_assimilate_3dvar_nondiagR(collect_state_pdaf, distribute_state_pdaf, & - init_dim_obs_pdafomi, obs_op_pdafomi, & - cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, prodRinvA_pdafomi, & + init_dim_obs_pdafomi, obs_op_pdafomi, prodRinvA_pdafomi, & + cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & prepoststep_pdaf, next_observation_pdaf, outflag) ! !DESCRIPTION: diff --git a/src/PDAFomi_assimilate_en3dvar_estkf_nondiagR.F90 b/src/PDAFomi_assimilate_en3dvar_estkf_nondiagR.F90 index 49d4715ab..7fac7af03 100644 --- a/src/PDAFomi_assimilate_en3dvar_estkf_nondiagR.F90 +++ b/src/PDAFomi_assimilate_en3dvar_estkf_nondiagR.F90 @@ -22,8 +22,8 @@ ! ! !INTERFACE: SUBROUTINE PDAFomi_assimilate_en3dvar_estkf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & - init_dim_obs_pdafomi, obs_op_pdafomi, cvt_ens_pdaf, cvt_adj_ens_pdaf, & - obs_op_lin_pdafomi, obs_op_adj_pdafomi, prodRinvA_pdafomi, & + init_dim_obs_pdafomi, obs_op_pdafomi, prodRinvA_pdafomi, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & prepoststep_pdaf, next_observation_pdaf, outflag) ! !DESCRIPTION: @@ -63,10 +63,10 @@ SUBROUTINE PDAFomi_assimilate_en3dvar_estkf_nondiagR(collect_state_pdaf, distrib EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector cvt_adj_ens_pdaf ! Apply adjoint control vector transform matrix EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of observation vector + prodRinvA_pdafomi, & ! Provide product R^-1 A obs_op_pdafomi, & ! Observation operator obs_op_lin_pdafomi, & ! Linearized observation operator - obs_op_adj_pdafomi, & ! Adjoint observation operator - prodRinvA_pdafomi ! Provide product R^-1 A + obs_op_adj_pdafomi ! Adjoint observation operator EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector PDAFomi_init_obsvar_cb ! Initialize mean observation error variance diff --git a/src/PDAFomi_assimilate_en3dvar_lestkf_nondiagR.F90 b/src/PDAFomi_assimilate_en3dvar_lestkf_nondiagR.F90 index 353f6718d..b3d181ada 100644 --- a/src/PDAFomi_assimilate_en3dvar_lestkf_nondiagR.F90 +++ b/src/PDAFomi_assimilate_en3dvar_lestkf_nondiagR.F90 @@ -22,9 +22,9 @@ ! ! !INTERFACE: SUBROUTINE PDAFomi_assimilate_en3dvar_lestkf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & - init_dim_obs_pdafomi, obs_op_pdafomi, cvt_ens_pdaf, cvt_adj_ens_pdaf, & - obs_op_lin_pdafomi, obs_op_adj_pdafomi, prodRinvA_pdafomi, & - init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, & + init_dim_obs_pdafomi, obs_op_pdafomi, prodRinvA_pdafomi, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & + prodRinvA_l_pdafomi, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & g2l_state_pdaf, l2g_state_pdaf, prepoststep_pdaf, next_observation_pdaf, outflag) ! !DESCRIPTION: @@ -73,7 +73,7 @@ SUBROUTINE PDAFomi_assimilate_en3dvar_lestkf_nondiagR(collect_state_pdaf, distri obs_op_adj_pdafomi, & ! Adjoint observation operator init_dim_obs_l_pdafomi, & ! Initialize local dimimension of obs. vector prodRinvA_pdafomi, & ! Provide product R^-1 A - prodRinvA_l_pdafomi ! Provide product R^-1 A + prodRinvA_l_pdafomi ! Provide product R^-1 A with localization EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector PDAFomi_init_obs_l_cb, & ! Initialize local observation vector PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance diff --git a/src/PDAFomi_assimilate_hyb3dvar_estkf_nondiagR.F90 b/src/PDAFomi_assimilate_hyb3dvar_estkf_nondiagR.F90 index ba55c3bd0..6d8675795 100644 --- a/src/PDAFomi_assimilate_hyb3dvar_estkf_nondiagR.F90 +++ b/src/PDAFomi_assimilate_hyb3dvar_estkf_nondiagR.F90 @@ -22,9 +22,9 @@ ! ! !INTERFACE: SUBROUTINE PDAFomi_assimilate_hyb3dvar_estkf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & - init_dim_obs_pdafomi, obs_op_pdafomi, & + init_dim_obs_pdafomi, obs_op_pdafomi, prodRinvA_pdafomi, & cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, & - obs_op_lin_pdafomi, obs_op_adj_pdafomi, prodRinvA_pdafomi, & + obs_op_lin_pdafomi, obs_op_adj_pdafomi, & prepoststep_pdaf, next_observation_pdaf, outflag) ! !DESCRIPTION: diff --git a/src/PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 b/src/PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 index 465e3b30c..11bc0e09d 100644 --- a/src/PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 +++ b/src/PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 @@ -22,9 +22,9 @@ ! ! !INTERFACE: SUBROUTINE PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & - init_dim_obs_pdafomi, obs_op_pdafomi, cvt_ens_pdaf, cvt_adj_ens_pdaf, & - cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, prodRinvA_pdafomi, & - init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, & + init_dim_obs_pdafomi, obs_op_pdafomi, prodRinvA_pdafomi, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & + prodRinvA_l_pdafomi, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & g2l_state_pdaf, l2g_state_pdaf, prepoststep_pdaf, next_observation_pdaf, outflag) ! !DESCRIPTION: diff --git a/src/PDAFomi_put_state_3dvar_nondiagR.F90 b/src/PDAFomi_put_state_3dvar_nondiagR.F90 index 905cd9f24..681b3e0f2 100644 --- a/src/PDAFomi_put_state_3dvar_nondiagR.F90 +++ b/src/PDAFomi_put_state_3dvar_nondiagR.F90 @@ -22,8 +22,8 @@ ! ! !INTERFACE: SUBROUTINE PDAFomi_put_state_3dvar_nondiagR(collect_state_pdaf, & - init_dim_obs_pdafomi, obs_op_pdafomi, & - cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, prodRinvA_pdafomi, & + init_dim_obs_pdafomi, obs_op_pdafomi, prodRinvA_pdafomi, & + cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & prepoststep_pdaf, outflag) ! !DESCRIPTION: diff --git a/src/PDAFomi_put_state_en3dvar_estkf_nondiagR.F90 b/src/PDAFomi_put_state_en3dvar_estkf_nondiagR.F90 index b1cebff3c..a7fd75a8f 100644 --- a/src/PDAFomi_put_state_en3dvar_estkf_nondiagR.F90 +++ b/src/PDAFomi_put_state_en3dvar_estkf_nondiagR.F90 @@ -22,8 +22,8 @@ ! ! !INTERFACE: SUBROUTINE PDAFomi_put_state_en3dvar_estkf_nondiagR(collect_state_pdaf, & - init_dim_obs_pdafomi, obs_op_pdafomi, cvt_ens_pdaf, cvt_adj_ens_pdaf, & - obs_op_lin_pdafomi, obs_op_adj_pdafomi, prodRinvA_pdafomi, & + init_dim_obs_pdafomi, obs_op_pdafomi, prodRinvA_pdafomi, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & prepoststep_pdaf, outflag) ! !DESCRIPTION: diff --git a/src/PDAFomi_put_state_en3dvar_lestkf_nondiagR.F90 b/src/PDAFomi_put_state_en3dvar_lestkf_nondiagR.F90 index b6397c33d..e9a0e0a9b 100644 --- a/src/PDAFomi_put_state_en3dvar_lestkf_nondiagR.F90 +++ b/src/PDAFomi_put_state_en3dvar_lestkf_nondiagR.F90 @@ -22,9 +22,9 @@ ! ! !INTERFACE: SUBROUTINE PDAFomi_put_state_en3dvar_lestkf_nondiagR(collect_state_pdaf, & - init_dim_obs_pdafomi, obs_op_pdafomi, cvt_ens_pdaf, cvt_adj_ens_pdaf, & - obs_op_lin_pdafomi, obs_op_adj_pdafomi, prodRinvA_pdafomi, & - init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, & + init_dim_obs_pdafomi, obs_op_pdafomi, prodRinvA_pdafomi, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & + prodRinvA_l_pdafomi, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & g2l_state_pdaf, l2g_state_pdaf, prepoststep_pdaf, outflag) ! !DESCRIPTION: @@ -64,7 +64,7 @@ SUBROUTINE PDAFomi_put_state_en3dvar_lestkf_nondiagR(collect_state_pdaf, & EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains init_dim_l_pdaf, & ! Init state dimension for local ana. domain g2l_state_pdaf, & ! Get state on local ana. domain from full state - l2g_state_pdaf ! Init full state from local state +2 l2g_state_pdaf ! Init full state from local state EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector obs_op_pdafomi, & ! Full observation operator obs_op_lin_pdafomi, & ! Linearized observation operator diff --git a/src/PDAFomi_put_state_hyb3dvar_estkf_nondiagR.F90 b/src/PDAFomi_put_state_hyb3dvar_estkf_nondiagR.F90 index 83f771513..8cf10eb43 100644 --- a/src/PDAFomi_put_state_hyb3dvar_estkf_nondiagR.F90 +++ b/src/PDAFomi_put_state_hyb3dvar_estkf_nondiagR.F90 @@ -22,9 +22,9 @@ ! ! !INTERFACE: SUBROUTINE PDAFomi_put_state_hyb3dvar_estkf_nondiagR(collect_state_pdaf, & - init_dim_obs_pdafomi, obs_op_pdafomi, & + init_dim_obs_pdafomi, obs_op_pdafomi, prodRinvA_pdafomi, & cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, & - obs_op_lin_pdafomi, obs_op_adj_pdafomi, prodRinvA_pdafomi, & + obs_op_lin_pdafomi, obs_op_adj_pdafomi, & prepoststep_pdaf, outflag) ! !DESCRIPTION: diff --git a/src/PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.F90 b/src/PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.F90 index bf9dcfdfa..504a93303 100644 --- a/src/PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.F90 +++ b/src/PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.F90 @@ -22,9 +22,10 @@ ! ! !INTERFACE: SUBROUTINE PDAFomi_put_state_hyb3dvar_lestkf_nondiagR(collect_state_pdaf, & - init_dim_obs_pdafomi, obs_op_pdafomi, cvt_ens_pdaf, cvt_adj_ens_pdaf, & - cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, prodRinvA_pdafomi, & - init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, & + init_dim_obs_pdafomi, obs_op_pdafomi, prodRinvA_pdafomi, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, & + obs_op_lin_pdafomi, obs_op_adj_pdafomi, & + prodRinvA_l_pdafomi, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & g2l_state_pdaf, l2g_state_pdaf, prepoststep_pdaf, outflag) ! !DESCRIPTION: From ac639029e4ffd9e4a32c76ee41ecf2b89f2e9cbb Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Tue, 6 Aug 2024 17:07:22 +0200 Subject: [PATCH 41/83] Add PDAF_correlation_function to evaluate correlation functions --- Makefile | 5 +- src/Makefile | 3 +- src/PDAF_correlation_function.F90 | 120 ++++++++++++++++++++++++++++++ 3 files changed, 125 insertions(+), 3 deletions(-) create mode 100644 src/PDAF_correlation_function.F90 diff --git a/Makefile b/Makefile index 2779a41ab..8bd50301e 100644 --- a/Makefile +++ b/Makefile @@ -124,7 +124,8 @@ SRC_PDAF_GEN = PDAF_analysis_utils.F90 \ PDAF_set_debug_flag.F90 \ PDAF_set_offline_mode.F90 \ PDAF_g2l.F90 \ - PDAF_l2g.F90 + PDAF_l2g.F90 \ + PDAF_correlation_function.F90 # Specific PDAF-routines for SEIK SRC_SEIK = PDAF_seik_init.F90 \ @@ -523,5 +524,5 @@ listarch: ####################################################### # include file containing dependencies for parallel # execution of make -# created with ./mkdepends ./src ./external/* '$(OBJDIR)' +# created with ./external/mkdepends/mkdepends ./src ./external/* '$(OBJDIR)' include Depends diff --git a/src/Makefile b/src/Makefile index d34daf360..e9c1a849b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -110,7 +110,8 @@ OBJ_PDAF_GEN = PDAF_analysis_utils.o \ PDAF_set_debug_flag.o \ PDAF_set_offline_mode.o \ PDAF_g2l.o \ - PDAF_l2g.o + PDAF_l2g.o \ + PDAF_correlation_function.o # Specific PDAF-routines for SEIK OBJ_SEIK = PDAF_seik_init.o \ diff --git a/src/PDAF_correlation_function.F90 b/src/PDAF_correlation_function.F90 new file mode 100644 index 000000000..2339e5930 --- /dev/null +++ b/src/PDAF_correlation_function.F90 @@ -0,0 +1,120 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id: PDAF_set_comm_pdaf.F90 918 2021-12-03 07:42:19Z lnerger $ + + +!> Get value of a correlation function +!! +!! This routine returns the value of the chosen correlation +!! function according to the specified length scale. +!! +!! This is a core routine of PDAF and +!! should not be changed by the user ! +!! +!! __Revision history:__ +!! * 2024-08 - Lars Nerger - Initial code +!! * Later revisions - see repository log +!! +SUBROUTINE PDAF_correlation_function(ctype, length, distance, value) + + IMPLICIT NONE + +! *** Arguments *** + INTEGER, INTENT(in) :: ctype !< Type of correlation function + !< (1): Gaussian with f(0)=1.0 + !< (2): 5th-order polynomial (Gaspace/Cohn, 1999) + REAL, INTENT(in) :: length !< Length scale of function + !< (1): standard deviation + !< (2): support length f=0 for distance>length + REAL, INTENT(in) :: distance !< Distance at which the function is evaluated + REAL, INTENT(out) :: value !< Value of the function + + +! *** Local variables *** + REAL :: shalf ! Half of support distance for Gaspari-Cohn + + +! ************************** +! *** Set function value *** +! ************************** + + IF (ctype == 1) THEN + ! ********************************************* + ! *** Gaussian function scaled for f(0)=1.0 *** + ! ********************************************* + + ! Compute weight + IF (length > 0.0) THEN + + value = exp(-distance*distance/ (2.0*length*length)) + + ELSE + + IF (distance > 0.0) THEN + value = 0.0 + ELSE + value = 1.0 + END IF + + END IF + + ELSEIF (ctype == 2) THEN + ! ************************************************************************ + ! *** 5th-order polynomial mimicking Gaussian but with compact support *** + ! *** Equation (4.10) of Gaspari&Cohn, QJRMS125, 723 (1999) *** + ! ************************************************************************ + + shalf = REAL(length) / 2.0 + + ! Evaluate function + cradnull: IF (length > 0.0) THEN + + cutoff: IF (distance <= length) THEN + IF (distance <= length / 2.0) THEN + value = -0.25 * (distance / shalf)**5 & + + 0.5 * (distance / shalf)**4 & + + 5.0 / 8.0 * (distance / shalf)**3 & + - 5.0 / 3.0 * (distance / shalf)**2 + 1.0 + ELSEIF (distance > length / 2.0 .AND. distance < length) THEN + value = 1.0 / 12.0 * (distance / shalf)**5 & + - 0.5 * (distance / shalf)**4 & + + 5.0 / 8.0 * (distance / shalf)**3 & + + 5.0 / 3.0 * (distance / shalf)**2 & + - 5.0 * (distance / shalf) & + + 4.0 - 2.0 / 3.0 * shalf / distance + ELSE + value = 0.0 + ENDIF + ELSE cutoff + value = 0.0 + END IF cutoff + + ELSE cradnull + + IF (distance > 0.0) THEN + value = 0.0 + ELSE + value = 1.0 + END IF + + END IF cradnull + + END IF + + +END SUBROUTINE PDAF_correlation_function From 2bf264479c6f6cd2d2864caf7c23c5c20e19c464 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Tue, 6 Aug 2024 17:09:25 +0200 Subject: [PATCH 42/83] Typo correction --- src/PDAFomi_put_state_en3dvar_lestkf_nondiagR.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PDAFomi_put_state_en3dvar_lestkf_nondiagR.F90 b/src/PDAFomi_put_state_en3dvar_lestkf_nondiagR.F90 index e9a0e0a9b..8447c8fdb 100644 --- a/src/PDAFomi_put_state_en3dvar_lestkf_nondiagR.F90 +++ b/src/PDAFomi_put_state_en3dvar_lestkf_nondiagR.F90 @@ -64,7 +64,7 @@ SUBROUTINE PDAFomi_put_state_en3dvar_lestkf_nondiagR(collect_state_pdaf, & EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains init_dim_l_pdaf, & ! Init state dimension for local ana. domain g2l_state_pdaf, & ! Get state on local ana. domain from full state -2 l2g_state_pdaf ! Init full state from local state + l2g_state_pdaf ! Init full state from local state EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector obs_op_pdafomi, & ! Full observation operator obs_op_lin_pdafomi, & ! Linearized observation operator From 1447c2cf98f4549e45566a9bf218429c9c91ec31 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Tue, 6 Aug 2024 17:09:37 +0200 Subject: [PATCH 43/83] Update Depends for PDAF_correlation_function --- Depends | 1 + 1 file changed, 1 insertion(+) diff --git a/Depends b/Depends index 01b1cd5e9..83d54464a 100644 --- a/Depends +++ b/Depends @@ -47,6 +47,7 @@ $(OBJDIR)/PDAF_assimilate_seek_si.o: ./src/PDAF_assimilate_seek_si.F90 $(OBJDIR)/PDAF_assimilate_seik.o: ./src/PDAF_assimilate_seik.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_assimilate_seik_si.o: ./src/PDAF_assimilate_seik_si.F90 $(OBJDIR)/PDAF_communicate_ens.o: ./src/PDAF_communicate_ens.F90 $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_correlation_function.o: ./src/PDAF_correlation_function.F90 $(OBJDIR)/PDAF_deallocate.o: ./src/PDAF_deallocate.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_diag_crps.o: ./src/PDAF_diag_crps.F90 $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/SANGOMA_quicksort.o ./src/typedefs.h $(OBJDIR)/PDAF_diag_effsample.o: ./src/PDAF_diag_effsample.F90 From 248a98b089f8091c255a8cc7c524307aa5356ff7 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Fri, 9 Aug 2024 09:44:17 +0200 Subject: [PATCH 44/83] REvise Makefiles to compile the PDAF library using the new Makefile in the root directory --- models/lorenz05b/Makefile | 4 ++-- models/lorenz05b/tools/Makefile | 4 ++-- models/lorenz05c/Makefile | 4 ++-- models/lorenz05c/tools/Makefile | 4 ++-- models/lorenz63/Makefile | 4 ++-- models/lorenz63/tools/Makefile | 12 ++++++++---- models/lorenz96/Makefile | 4 ++-- models/lorenz96/tools/Makefile | 2 +- templates/classical/offline/Makefile | 4 ++-- templates/classical/online/Makefile | 4 ++-- templates/offline_omi/Makefile | 4 ++-- templates/online_omi/Makefile | 4 ++-- templates/online_omi_flexible/Makefile | 4 ++-- testsuite/src/Makefile | 4 ++-- tutorial/3dvar/offline_2D_serial/Makefile | 4 ++-- tutorial/3dvar/online_2D_parallelmodel/Makefile | 4 ++-- tutorial/3dvar/online_2D_serialmodel/Makefile | 4 ++-- tutorial/classical/offline_2D_parallel/Makefile | 4 ++-- tutorial/classical/offline_2D_serial/Makefile | 4 ++-- tutorial/classical/online_2D_parallelmodel/Makefile | 4 ++-- .../online_2D_parallelmodel_fullpar/Makefile | 4 ++-- .../online_2D_parallelmodel_fullpar_1fpe/Makefile | 4 ++-- tutorial/classical/online_2D_serialmodel/Makefile | 4 ++-- tutorial/offline_2D_parallel/Makefile | 4 ++-- tutorial/offline_2D_serial/Makefile | 4 ++-- tutorial/online_2D_parallelmodel/Makefile | 4 ++-- tutorial/online_2D_parallelmodel_fullpar/Makefile | 4 ++-- .../online_2D_parallelmodel_fullpar_1fpe/Makefile | 4 ++-- tutorial/online_2D_serialmodel/Makefile | 4 ++-- tutorial/online_2D_serialmodel_2fields/Makefile | 4 ++-- 30 files changed, 65 insertions(+), 61 deletions(-) diff --git a/models/lorenz05b/Makefile b/models/lorenz05b/Makefile index 64008ccf9..e90587f72 100644 --- a/models/lorenz05b/Makefile +++ b/models/lorenz05b/Makefile @@ -116,7 +116,7 @@ pdaf_lorenz_05b : libpdaf-d.a \ libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; ###################################################### @@ -144,7 +144,7 @@ cleandata: cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean ###################################################### diff --git a/models/lorenz05b/tools/Makefile b/models/lorenz05b/tools/Makefile index 90579139d..0d06b88de 100644 --- a/models/lorenz05b/tools/Makefile +++ b/models/lorenz05b/tools/Makefile @@ -32,7 +32,7 @@ EXE_COVAR = generate_covar ###################################################### info: - @echo "Makefile to build tool programs for the Lorenz05b model"; + @echo "Makefile to build tool programs for the Lorenz96 model"; @echo "-------------------------------------------------------------------------------"; @echo "Use as make TARGET where TARGET can be:"; @echo " info - This text"; @@ -66,7 +66,7 @@ all: $(EXE_GENOBS) $(EXE_COVAR) libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; clean : diff --git a/models/lorenz05c/Makefile b/models/lorenz05c/Makefile index 6e3a94b8d..0d23eb24d 100644 --- a/models/lorenz05c/Makefile +++ b/models/lorenz05c/Makefile @@ -116,7 +116,7 @@ pdaf_lorenz_05c : libpdaf-d.a \ libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; ###################################################### @@ -144,7 +144,7 @@ cleandata: cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean ###################################################### diff --git a/models/lorenz05c/tools/Makefile b/models/lorenz05c/tools/Makefile index 76a7c9577..0d06b88de 100644 --- a/models/lorenz05c/tools/Makefile +++ b/models/lorenz05c/tools/Makefile @@ -32,7 +32,7 @@ EXE_COVAR = generate_covar ###################################################### info: - @echo "Makefile to build tool programs for the Lorenz05c model"; + @echo "Makefile to build tool programs for the Lorenz96 model"; @echo "-------------------------------------------------------------------------------"; @echo "Use as make TARGET where TARGET can be:"; @echo " info - This text"; @@ -66,7 +66,7 @@ all: $(EXE_GENOBS) $(EXE_COVAR) libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; clean : diff --git a/models/lorenz63/Makefile b/models/lorenz63/Makefile index 18935ec21..3921b2ac3 100644 --- a/models/lorenz63/Makefile +++ b/models/lorenz63/Makefile @@ -116,7 +116,7 @@ pdaf_lorenz_63 : libpdaf-d.a \ libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; ###################################################### @@ -144,7 +144,7 @@ cleandata: cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean ###################################################### diff --git a/models/lorenz63/tools/Makefile b/models/lorenz63/tools/Makefile index 3271eee45..0d06b88de 100644 --- a/models/lorenz63/tools/Makefile +++ b/models/lorenz63/tools/Makefile @@ -9,11 +9,15 @@ ###################################################### + +# Root directory of PDAF package +BASEDIR = ../../.. + # Include machine-specific definitions # For available include files see directory make.arch # To choose a file, set PDAF_ARCH either here or by an # environment variable. -include ../../../make.arch/$(PDAF_ARCH).h +include $(BASEDIR)/make.arch/$(PDAF_ARCH).h ###################################################### @@ -46,12 +50,12 @@ $(EXE_GENOBS) : $(OBJ_GENOBS) $(EXE_COVAR) : libpdaf-d.a $(OBJ_COVAR) rm -f $@ - $(LD) $(OPT) -o $@ $(MODULES) $(OBJ_COVAR) $(NC_LIB) -L../../../lib -lpdaf-d $(LINK_LIBS) + $(LD) $(OPT) -o $@ $(MODULES) $(OBJ_COVAR) $(NC_LIB) -L$(BASEDIR)/lib -lpdaf-d $(LINK_LIBS) all: $(EXE_GENOBS) $(EXE_COVAR) .F90.o : - $(FC) $(OPT) $(MPI_INC) $(CPP_DEFS) $(NC_INC) -c $*.F90 + $(FC) $(OPT) $(CPP_DEFS) $(NC_INC) -c $*.F90 # For older compilers one might need to separate the # preprocessing from the compilation as defined below: @@ -62,7 +66,7 @@ all: $(EXE_GENOBS) $(EXE_COVAR) libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd ../../../src; make; + @cd $(BASEDIR); make; clean : diff --git a/models/lorenz96/Makefile b/models/lorenz96/Makefile index 8550b9042..b2ca10456 100644 --- a/models/lorenz96/Makefile +++ b/models/lorenz96/Makefile @@ -116,7 +116,7 @@ pdaf_lorenz_96 : libpdaf-d.a \ libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; ###################################################### @@ -144,7 +144,7 @@ cleandata: cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean ###################################################### diff --git a/models/lorenz96/tools/Makefile b/models/lorenz96/tools/Makefile index 8d6971df3..0d06b88de 100644 --- a/models/lorenz96/tools/Makefile +++ b/models/lorenz96/tools/Makefile @@ -66,7 +66,7 @@ all: $(EXE_GENOBS) $(EXE_COVAR) libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; clean : diff --git a/templates/classical/offline/Makefile b/templates/classical/offline/Makefile index 94c662a93..6e52683fe 100644 --- a/templates/classical/offline/Makefile +++ b/templates/classical/offline/Makefile @@ -114,7 +114,7 @@ $(EXE) : libpdaf-d.a \ libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; ###################################################### @@ -135,4 +135,4 @@ clean : cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean diff --git a/templates/classical/online/Makefile b/templates/classical/online/Makefile index 4dffdc566..e115c1d9e 100644 --- a/templates/classical/online/Makefile +++ b/templates/classical/online/Makefile @@ -111,7 +111,7 @@ $(EXE) : libpdaf-d.a \ libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; ###################################################### @@ -132,4 +132,4 @@ clean : cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean diff --git a/templates/offline_omi/Makefile b/templates/offline_omi/Makefile index 791f037c0..8974ff69e 100644 --- a/templates/offline_omi/Makefile +++ b/templates/offline_omi/Makefile @@ -84,7 +84,7 @@ $(EXE) : libpdaf-d.a \ libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; ###################################################### @@ -105,4 +105,4 @@ clean : cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean diff --git a/templates/online_omi/Makefile b/templates/online_omi/Makefile index 5d5c4ce2e..8100743b2 100644 --- a/templates/online_omi/Makefile +++ b/templates/online_omi/Makefile @@ -89,7 +89,7 @@ $(EXE) : libpdaf-d.a \ libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; ###################################################### @@ -110,4 +110,4 @@ clean : cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean diff --git a/templates/online_omi_flexible/Makefile b/templates/online_omi_flexible/Makefile index c33305e6e..2572b4a73 100644 --- a/templates/online_omi_flexible/Makefile +++ b/templates/online_omi_flexible/Makefile @@ -88,7 +88,7 @@ $(EXE) : libpdaf-d.a \ libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; ###################################################### @@ -109,4 +109,4 @@ clean : cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean diff --git a/testsuite/src/Makefile b/testsuite/src/Makefile index c93eca509..17fd4b76c 100644 --- a/testsuite/src/Makefile +++ b/testsuite/src/Makefile @@ -180,7 +180,7 @@ cleandummy1Dsi: libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd ../../src; make; + @cd ../..; make; .F90.o : $(FC) $(OPT) $(MPI_INC) $(CPP_DEFS) $(CPP_PDAF2) -Ioffline_1D -c $*.F90 @@ -208,7 +208,7 @@ cleanmodels: cleandummymodel cleanoffline cleandummy1Dsi cleandummysngl cleanpdaf: @echo "+++ Clean up PDAF directory" - cd ../../src; make clean + cd ../..; make clean distclean: cleanpdaf cleanall diff --git a/tutorial/3dvar/offline_2D_serial/Makefile b/tutorial/3dvar/offline_2D_serial/Makefile index 747347142..21914e993 100644 --- a/tutorial/3dvar/offline_2D_serial/Makefile +++ b/tutorial/3dvar/offline_2D_serial/Makefile @@ -95,7 +95,7 @@ $(EXE) : libpdaf-var.a \ libpdaf-var.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make pdaf-var; + @cd $(BASEDIR); make pdaf-var; ###################################################### @@ -119,7 +119,7 @@ clean : cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean cleandata: rm -f ens*ana.txt state_ana.txt diff --git a/tutorial/3dvar/online_2D_parallelmodel/Makefile b/tutorial/3dvar/online_2D_parallelmodel/Makefile index 944fff9af..bca8ed06c 100644 --- a/tutorial/3dvar/online_2D_parallelmodel/Makefile +++ b/tutorial/3dvar/online_2D_parallelmodel/Makefile @@ -117,7 +117,7 @@ model_pdaf : libpdaf-var.a \ libpdaf-var.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make pdaf-var; + @cd $(BASEDIR); make pdaf-var; ###################################################### @@ -142,7 +142,7 @@ clean : cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean cleandata: rm -f ens*ana.txt ens*for.txt state_*ana.txt state_*for.txt diff --git a/tutorial/3dvar/online_2D_serialmodel/Makefile b/tutorial/3dvar/online_2D_serialmodel/Makefile index c9419899d..335bbcfe3 100644 --- a/tutorial/3dvar/online_2D_serialmodel/Makefile +++ b/tutorial/3dvar/online_2D_serialmodel/Makefile @@ -115,7 +115,7 @@ model_pdaf : libpdaf-var.a \ libpdaf-var.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make pdaf-var; + @cd $(BASEDIR); make pdaf-var; ###################################################### @@ -140,7 +140,7 @@ clean : cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean cleandata: rm -f ens*ana.txt ens*for.txt state_*ana.txt state_*for.txt diff --git a/tutorial/classical/offline_2D_parallel/Makefile b/tutorial/classical/offline_2D_parallel/Makefile index 62cb630e9..9a10210c5 100644 --- a/tutorial/classical/offline_2D_parallel/Makefile +++ b/tutorial/classical/offline_2D_parallel/Makefile @@ -99,7 +99,7 @@ $(EXE) : libpdaf-d.a \ libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; ###################################################### @@ -123,7 +123,7 @@ clean : cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean cleandata: rm -f ens*ana.txt state_ana.txt diff --git a/tutorial/classical/offline_2D_serial/Makefile b/tutorial/classical/offline_2D_serial/Makefile index 89d43f1c0..9e2c5ffe2 100644 --- a/tutorial/classical/offline_2D_serial/Makefile +++ b/tutorial/classical/offline_2D_serial/Makefile @@ -99,7 +99,7 @@ $(EXE) : libpdaf-d.a \ libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; ###################################################### @@ -123,7 +123,7 @@ clean : cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean cleandata: rm -f ens*ana.txt state_ana.txt diff --git a/tutorial/classical/online_2D_parallelmodel/Makefile b/tutorial/classical/online_2D_parallelmodel/Makefile index aa5f5ddc4..ef360aea0 100644 --- a/tutorial/classical/online_2D_parallelmodel/Makefile +++ b/tutorial/classical/online_2D_parallelmodel/Makefile @@ -121,7 +121,7 @@ model_pdaf : libpdaf-d.a \ libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; ###################################################### @@ -146,7 +146,7 @@ clean : cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean cleandata: rm -f ens*ana.txt ens*for.txt state_*ana.txt state_*for.txt diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar/Makefile b/tutorial/classical/online_2D_parallelmodel_fullpar/Makefile index 022d0672d..3a6136ddf 100644 --- a/tutorial/classical/online_2D_parallelmodel_fullpar/Makefile +++ b/tutorial/classical/online_2D_parallelmodel_fullpar/Makefile @@ -121,7 +121,7 @@ model_pdaf : libpdaf-d.a \ libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; ###################################################### @@ -144,7 +144,7 @@ clean : cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean cleandata: rm -f ens*ana.txt ens*for.txt state_*ana.txt state_*for.txt diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/Makefile b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/Makefile index 1c3c1ef74..9d3170e1a 100644 --- a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/Makefile +++ b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/Makefile @@ -121,7 +121,7 @@ model_pdaf : libpdaf-d.a \ libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; ###################################################### @@ -143,7 +143,7 @@ clean : cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean cleandata: rm -f ens*ana.txt ens*for.txt state_*ana.txt state_*for.txt diff --git a/tutorial/classical/online_2D_serialmodel/Makefile b/tutorial/classical/online_2D_serialmodel/Makefile index c7b398705..20b935ece 100644 --- a/tutorial/classical/online_2D_serialmodel/Makefile +++ b/tutorial/classical/online_2D_serialmodel/Makefile @@ -119,7 +119,7 @@ model_pdaf : libpdaf-d.a \ libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; ###################################################### @@ -144,7 +144,7 @@ clean : cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean cleandata: rm -f ens*ana.txt ens*for.txt state_*ana.txt state_*for.txt true*.txt diff --git a/tutorial/offline_2D_parallel/Makefile b/tutorial/offline_2D_parallel/Makefile index c1fc8332a..dad71c1fb 100644 --- a/tutorial/offline_2D_parallel/Makefile +++ b/tutorial/offline_2D_parallel/Makefile @@ -86,7 +86,7 @@ $(EXE) : libpdaf-d.a \ libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; ###################################################### @@ -110,7 +110,7 @@ clean : cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean cleandata: rm -f ens*ana.txt state_ana.txt diff --git a/tutorial/offline_2D_serial/Makefile b/tutorial/offline_2D_serial/Makefile index 3653b60f7..53ad7e6f6 100644 --- a/tutorial/offline_2D_serial/Makefile +++ b/tutorial/offline_2D_serial/Makefile @@ -87,7 +87,7 @@ $(EXE) : libpdaf-d.a \ libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; ###################################################### @@ -111,7 +111,7 @@ clean : cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean cleandata: rm -f ens*ana.txt state_ana.txt diff --git a/tutorial/online_2D_parallelmodel/Makefile b/tutorial/online_2D_parallelmodel/Makefile index 1c9527873..4881b2702 100644 --- a/tutorial/online_2D_parallelmodel/Makefile +++ b/tutorial/online_2D_parallelmodel/Makefile @@ -108,7 +108,7 @@ model_pdaf : libpdaf-d.a \ libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; ###################################################### @@ -133,7 +133,7 @@ clean : cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean cleandata: rm -f ens*ana.txt ens*for.txt state_*ana.txt state_*for.txt diff --git a/tutorial/online_2D_parallelmodel_fullpar/Makefile b/tutorial/online_2D_parallelmodel_fullpar/Makefile index 90200607e..eb349d361 100644 --- a/tutorial/online_2D_parallelmodel_fullpar/Makefile +++ b/tutorial/online_2D_parallelmodel_fullpar/Makefile @@ -108,7 +108,7 @@ model_pdaf : libpdaf-d.a \ libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; ###################################################### @@ -131,7 +131,7 @@ clean : cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean cleandata: rm -f ens*ana.txt ens*for.txt state_*ana.txt state_*for.txt diff --git a/tutorial/online_2D_parallelmodel_fullpar_1fpe/Makefile b/tutorial/online_2D_parallelmodel_fullpar_1fpe/Makefile index 90200607e..eb349d361 100644 --- a/tutorial/online_2D_parallelmodel_fullpar_1fpe/Makefile +++ b/tutorial/online_2D_parallelmodel_fullpar_1fpe/Makefile @@ -108,7 +108,7 @@ model_pdaf : libpdaf-d.a \ libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; ###################################################### @@ -131,7 +131,7 @@ clean : cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean cleandata: rm -f ens*ana.txt ens*for.txt state_*ana.txt state_*for.txt diff --git a/tutorial/online_2D_serialmodel/Makefile b/tutorial/online_2D_serialmodel/Makefile index 61175d6da..7a832f2d4 100644 --- a/tutorial/online_2D_serialmodel/Makefile +++ b/tutorial/online_2D_serialmodel/Makefile @@ -106,7 +106,7 @@ model_pdaf : libpdaf-d.a \ libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; ###################################################### @@ -131,7 +131,7 @@ clean : cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean cleandata: rm -f ens*ana.txt ens*for.txt state_*ana.txt state_*for.txt diff --git a/tutorial/online_2D_serialmodel_2fields/Makefile b/tutorial/online_2D_serialmodel_2fields/Makefile index 36c8b2902..e34d87d76 100644 --- a/tutorial/online_2D_serialmodel_2fields/Makefile +++ b/tutorial/online_2D_serialmodel_2fields/Makefile @@ -105,7 +105,7 @@ model_pdaf : libpdaf-d.a \ libpdaf-d.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR)/src; make; + @cd $(BASEDIR); make; ###################################################### @@ -130,7 +130,7 @@ clean : cleanpdaf: @echo "+++ Clean up PDAF directory" - cd $(BASEDIR)/src; make clean + cd $(BASEDIR); make clean cleandata: rm -f ens*ana.txt ens*for.txt state_*ana.txt state_*for.txt stateB_*txt ensB*.txt From 983855dd0c02141b5356f47502edd0e91d1a24ba Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Wed, 14 Aug 2024 17:18:34 +0200 Subject: [PATCH 45/83] Adding new PDAF_local routines. PDAF_local_set_indices is called by init_dim_l to stored the index array for mapping between global and local state vectors. The two other routines use this information to do the mappping as internal callback routines. This is implemented in tutorial/online_2D_serialmodel --- Makefile | 3 + src/Makefile | 3 + src/PDAF_local_g2l_callback.F90 | 69 ++++++++++++++++++ src/PDAF_local_l2g_callback.F90 | 72 +++++++++++++++++++ src/PDAF_local_set_indices.F90 | 57 +++++++++++++++ src/PDAF_mod_filter.F90 | 4 +- tutorial/online_2D_serialmodel/Makefile | 6 +- .../online_2D_serialmodel/assimilate_pdaf.F90 | 5 +- .../online_2D_serialmodel/init_dim_l_pdaf.F90 | 2 + 9 files changed, 215 insertions(+), 6 deletions(-) create mode 100644 src/PDAF_local_g2l_callback.F90 create mode 100644 src/PDAF_local_l2g_callback.F90 create mode 100644 src/PDAF_local_set_indices.F90 diff --git a/Makefile b/Makefile index 8bd50301e..1fef25076 100644 --- a/Makefile +++ b/Makefile @@ -125,6 +125,9 @@ SRC_PDAF_GEN = PDAF_analysis_utils.F90 \ PDAF_set_offline_mode.F90 \ PDAF_g2l.F90 \ PDAF_l2g.F90 \ + PDAF_local_set_indices.F90 \ + PDAF_local_g2l_callback.F90 \ + PDAF_local_l2g_callback.F90 \ PDAF_correlation_function.F90 # Specific PDAF-routines for SEIK diff --git a/src/Makefile b/src/Makefile index e9c1a849b..13db8bcaa 100644 --- a/src/Makefile +++ b/src/Makefile @@ -111,6 +111,9 @@ OBJ_PDAF_GEN = PDAF_analysis_utils.o \ PDAF_set_offline_mode.o \ PDAF_g2l.o \ PDAF_l2g.o \ + PDAF_local_set_indices.o \ + PDAF_local_g2l_callback.o \ + PDAF_local_l2g_callback.o \ PDAF_correlation_function.o # Specific PDAF-routines for SEIK diff --git a/src/PDAF_local_g2l_callback.F90 b/src/PDAF_local_g2l_callback.F90 new file mode 100644 index 000000000..49d1d1eac --- /dev/null +++ b/src/PDAF_local_g2l_callback.F90 @@ -0,0 +1,69 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAF_local_g2l_callback - Project global to local vector according to index array +! +! !INTERFACE: +SUBROUTINE PDAF_local_g2l_callback(step, domain_p, dim_p, state_p, dim_l, state_l) + +! !DESCRIPTION: +! Project a global to a local state vector for the localized filters. +! This is the full callback function to be used internally. The mapping +! is done using the index vector id_lstate_in_pstate that is initialize +! in PDAF_local_set_index. +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, & + ONLY: id_lstate_in_pstate + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(in) :: step !< Current time step + INTEGER, INTENT(in) :: domain_p !< Current local analysis domain + INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension + INTEGER, INTENT(in) :: dim_l !< Local state dimension + REAL, INTENT(in) :: state_p(dim_p) !< PE-local full state vector + REAL, INTENT(out) :: state_l(dim_l) !< State vector on local analysis domain + +! !CALLING SEQUENCE: +! Called by filter routine +!EOP + +! *** local variables *** + INTEGER :: i ! Counter + + +! ************************************* +! *** Initialize local state vector *** +! ************************************* + + DO i = 1, dim_l + ! Only use the index value if it is in a valid range + IF (id_lstate_in_pstate(i) > 0 .and. id_lstate_in_pstate(i) <= dim_p) THEN + state_l(i) = state_p(id_lstate_in_pstate(i)) + END IF + END DO + +END SUBROUTINE PDAF_local_g2l_callback diff --git a/src/PDAF_local_l2g_callback.F90 b/src/PDAF_local_l2g_callback.F90 new file mode 100644 index 000000000..cf47576f5 --- /dev/null +++ b/src/PDAF_local_l2g_callback.F90 @@ -0,0 +1,72 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAF_local_l2g_callback - Initialize global vector elements from local state vector +! +! !INTERFACE: +SUBROUTINE PDAF_local_l2g_callback(step, domain_p, dim_l, state_l, dim_p, state_p) + +! !DESCRIPTION: +! Initialize elements of a global state vector from a local state vector. +! This is the full callback function to be used internally. The mapping +! is done using the index vector id_lstate_in_pstate that is initialize +! in PDAF_local_set_index. +! +! To exclude any element of the local state vector from the initialization +! one can set the corresponding index value to 0. +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, & + ONLY: id_lstate_in_pstate + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(in) :: step !< Current time step + INTEGER, INTENT(in) :: domain_p !< Current local analysis domain + INTEGER, INTENT(in) :: dim_l !< Local state dimension + INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension + REAL, INTENT(in) :: state_l(dim_l) !< State vector on local analysis domain + REAL, INTENT(inout) :: state_p(dim_p) !< PE-local full state vector + +! !CALLING SEQUENCE: +! Called by filter routine +!EOP + +! *** local variables *** + INTEGER :: i ! Counter + + +! ************************************************** +! *** Initialize elements of global state vector *** +! ************************************************** + + DO i = 1, dim_l + ! Only use the index value if it is in a valid range + IF (id_lstate_in_pstate(i) > 0 .and. id_lstate_in_pstate(i) <= dim_p) THEN + state_p(id_lstate_in_pstate(i)) = state_l(i) + END IF + END DO + +END SUBROUTINE PDAF_local_l2g_callback diff --git a/src/PDAF_local_set_indices.F90 b/src/PDAF_local_set_indices.F90 new file mode 100644 index 000000000..d5a2e231d --- /dev/null +++ b/src/PDAF_local_set_indices.F90 @@ -0,0 +1,57 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id: PDAF_set_comm_pdaf.F90 918 2021-12-03 07:42:19Z lnerger $ + + +!> Get value of a correlation function +!! +!! This routine initializes a PDAF_internal local index array +!! for the mapping between the global and local state vectors +!! +!! This is a core routine of PDAF and +!! should not be changed by the user ! +!! +!! __Revision history:__ +!! * 2024-08 - Lars Nerger - Initial code +!! * Later revisions - see repository log +!! +SUBROUTINE PDAF_local_set_indices(dim_l, map) + + USE PDAF_mod_filter, & + ONLY: id_lstate_in_pstate + + IMPLICIT NONE + +! *** Arguments *** + INTEGER, INTENT(in) :: dim_l !< Dimension of local state vector + INTEGER, INTENT(in) :: map(dim_l) !< Index array for mapping + +! *** Local variables *** + REAL :: shalf ! Half of support distance for Gaspari-Cohn + + +! ******************************************** +! *** Initialize PDAF_internal index array *** +! ******************************************** + + IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) + ALLOCATE(id_lstate_in_pstate(dim_l)) + + id_lstate_in_pstate(:) = map(:) + +END SUBROUTINE PDAF_local_set_indices diff --git a/src/PDAF_mod_filter.F90 b/src/PDAF_mod_filter.F90 index f4b5fdc07..6d8ec095c 100644 --- a/src/PDAF_mod_filter.F90 +++ b/src/PDAF_mod_filter.F90 @@ -189,8 +189,10 @@ MODULE PDAF_mod_filter REAL, TARGET, ALLOCATABLE :: skewness(:) ! Skewness of ensemble for each local domain REAL, TARGET, ALLOCATABLE :: kurtosis(:) ! Kurtosis of ensemble for each local domain REAL, ALLOCATABLE :: bias(:) ! Model bias vector + + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector !EOP -!$OMP THREADPRIVATE(cnt_maxlag, obs_member, forget_l, debug) +!$OMP THREADPRIVATE(cnt_maxlag, obs_member, forget_l, debug, id_lstate_in_pstate) END MODULE PDAF_mod_filter diff --git a/tutorial/online_2D_serialmodel/Makefile b/tutorial/online_2D_serialmodel/Makefile index 7a832f2d4..ad5db0889 100644 --- a/tutorial/online_2D_serialmodel/Makefile +++ b/tutorial/online_2D_serialmodel/Makefile @@ -69,9 +69,9 @@ OBJ_USER_GEN = init_ens_pdaf.o \ # User-supplied routines for state in localized analysis (LESTKF/LSEIK/LETKF) OBJ_USER_LOCAL = init_n_domains_pdaf.o \ - init_dim_l_pdaf.o \ - g2l_state_pdaf.o \ - l2g_state_pdaf.o + init_dim_l_pdaf.o #\ +# g2l_state_pdaf.o \ +# l2g_state_pdaf.o # Full list of user-supplied routines for online mode OBJ_PDAF_USER = $(OBJ_USER_PDAFOMI) $(OBJ_PDAF_INT) $(OBJ_USER_GEN) $(OBJ_USER_LOCAL) diff --git a/tutorial/online_2D_serialmodel/assimilate_pdaf.F90 b/tutorial/online_2D_serialmodel/assimilate_pdaf.F90 index 6c24fd4c3..2fcbc3721 100644 --- a/tutorial/online_2D_serialmodel/assimilate_pdaf.F90 +++ b/tutorial/online_2D_serialmodel/assimilate_pdaf.F90 @@ -48,7 +48,8 @@ SUBROUTINE assimilate_pdaf() obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain init_dim_obs_l_pdafomi, & ! Get dimension of obs. vector for local analysis domain localize_covar_pdafomi ! Apply localization to covariance matrix in LEnKF - + EXTERNAL :: PDAF_local_g2l_callback, & + PDAF_local_l2g_callback ! ********************************* ! *** Call assimilation routine *** @@ -62,7 +63,7 @@ SUBROUTINE assimilate_pdaf() ! Call generic OMI interface routine for domain-localized filters CALL PDAFomi_assimilate_local(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, PDAF_local_g2l_callback, PDAF_local_l2g_callback, & next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 8) THEN diff --git a/tutorial/online_2D_serialmodel/init_dim_l_pdaf.F90 b/tutorial/online_2D_serialmodel/init_dim_l_pdaf.F90 index 711074f13..a806cd433 100644 --- a/tutorial/online_2D_serialmodel/init_dim_l_pdaf.F90 +++ b/tutorial/online_2D_serialmodel/init_dim_l_pdaf.F90 @@ -57,4 +57,6 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! Here the local domain is a single grid point and variable given by DOMAIN_P id_lstate_in_pstate(1) = domain_p + CALL PDAF_local_set_indices(dim_l, id_lstate_in_pstate) + END SUBROUTINE init_dim_l_pdaf From 01e668e542790272d3e6a999c8ada12abd19c541 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Wed, 14 Aug 2024 17:28:28 +0200 Subject: [PATCH 46/83] Remove g2l_state_pdaf.F90 and l2g_state_pdaf.F90 as they are provided by PDAF --- .../online_2D_serialmodel/g2l_state_pdaf.F90 | 49 ------------------ .../online_2D_serialmodel/l2g_state_pdaf.F90 | 50 ------------------- 2 files changed, 99 deletions(-) delete mode 100644 tutorial/online_2D_serialmodel/g2l_state_pdaf.F90 delete mode 100644 tutorial/online_2D_serialmodel/l2g_state_pdaf.F90 diff --git a/tutorial/online_2D_serialmodel/g2l_state_pdaf.F90 b/tutorial/online_2D_serialmodel/g2l_state_pdaf.F90 deleted file mode 100644 index 177740d1a..000000000 --- a/tutorial/online_2D_serialmodel/g2l_state_pdaf.F90 +++ /dev/null @@ -1,49 +0,0 @@ -!> Restrict a model state to a local analysis domain -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! before the analysis on a single local analysis -!! domain. It has to initialize elements of the -!! state vector for the local analysis domains from -!! the PE-local full state vector. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - INTEGER, INTENT(in) :: dim_l !< Local state dimension - REAL, INTENT(in) :: state_p(dim_p) !< PE-local full state vector - REAL, INTENT(out) :: state_l(dim_l) !< State vector on local analysis domain - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************* -! *** Initialize local state vector *** -! ************************************* - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_l(i) = state_p(id_lstate_in_pstate(i)) - END DO - -END SUBROUTINE g2l_state_pdaf diff --git a/tutorial/online_2D_serialmodel/l2g_state_pdaf.F90 b/tutorial/online_2D_serialmodel/l2g_state_pdaf.F90 deleted file mode 100644 index 1a27e44f2..000000000 --- a/tutorial/online_2D_serialmodel/l2g_state_pdaf.F90 +++ /dev/null @@ -1,50 +0,0 @@ -!> Initialize full state from local analysis -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! after the analysis and ensemble transformation -!! on a single local analysis domain. It has to -!! initialize elements of the PE-local full state -!! vector from the provided analysis state vector -!! on the local analysis domain. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_l !< Local state dimension - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - REAL, INTENT(in) :: state_l(dim_l) !< State vector on local analysis domain - REAL, INTENT(inout) :: state_p(dim_p) !< PE-local full state vector - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************************** -! *** Initialize elements of global state vector *** -! ************************************************** - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_p(id_lstate_in_pstate(i)) = state_l(i) - END DO - -END SUBROUTINE l2g_state_pdaf From 2d196b83edc799da039f5501cd1ec3b3bab2c28b Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Thu, 15 Aug 2024 08:41:38 +0200 Subject: [PATCH 47/83] Update dependences --- Depends | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Depends b/Depends index 83d54464a..8ffc7b40f 100644 --- a/Depends +++ b/Depends @@ -173,6 +173,9 @@ $(OBJDIR)/PDAF_lnetf_memtime.o: ./src/PDAF_lnetf_memtime.F90 $(OBJDIR)/PDAF_time $(OBJDIR)/PDAF_lnetf_options.o: ./src/PDAF_lnetf_options.F90 $(OBJDIR)/PDAF_lnetf_smootherT.o: ./src/PDAF_lnetf_smootherT.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h $(OBJDIR)/PDAF_lnetf_update.o: ./src/PDAF_lnetf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h +$(OBJDIR)/PDAF_local_g2l_callback.o: ./src/PDAF_local_g2l_callback.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_local_l2g_callback.o: ./src/PDAF_local_l2g_callback.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_local_set_indices.o: ./src/PDAF_local_set_indices.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_local_weight.o: ./src/PDAF_local_weight.F90 $(OBJDIR)/PDAF_local_weights.o: ./src/PDAF_local_weights.F90 $(OBJDIR)/PDAF_lseik_alloc.o: ./src/PDAF_lseik_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o From 9953af6f516b355e5997d833c4aadcb2e5d63546 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Thu, 15 Aug 2024 18:56:12 +0200 Subject: [PATCH 48/83] Revision of PDAF_local files. There is now a module PDAFlocal that contains the routines setting ind ices and (new) increment weights. The corresponding callback routiens are renamed to PDAFlocal_g2l_c allback and PDAFlocal_l2g_callback. Only their interfaces are included in PDAFlocal, because they ar e callback routines. --- src/Makefile | 6 +- src/PDAF_local_set_indices.F90 | 57 ------ src/PDAF_mod_filter.F90 | 4 +- src/PDAFlocal.F90 | 166 ++++++++++++++++++ ...allback.F90 => PDAFlocal_g2l_callback.F90} | 13 +- ...allback.F90 => PDAFlocal_l2g_callback.F90} | 28 +-- 6 files changed, 192 insertions(+), 82 deletions(-) delete mode 100644 src/PDAF_local_set_indices.F90 create mode 100644 src/PDAFlocal.F90 rename src/{PDAF_local_g2l_callback.F90 => PDAFlocal_g2l_callback.F90} (80%) rename src/{PDAF_local_l2g_callback.F90 => PDAFlocal_l2g_callback.F90} (73%) diff --git a/src/Makefile b/src/Makefile index 13db8bcaa..6d06e712a 100644 --- a/src/Makefile +++ b/src/Makefile @@ -111,9 +111,9 @@ OBJ_PDAF_GEN = PDAF_analysis_utils.o \ PDAF_set_offline_mode.o \ PDAF_g2l.o \ PDAF_l2g.o \ - PDAF_local_set_indices.o \ - PDAF_local_g2l_callback.o \ - PDAF_local_l2g_callback.o \ + PDAFlocal.F90 \ + PDAFlocal_g2l_callback.F90 \ + PDAFlocal_l2g_callback.F90 \ PDAF_correlation_function.o # Specific PDAF-routines for SEIK diff --git a/src/PDAF_local_set_indices.F90 b/src/PDAF_local_set_indices.F90 deleted file mode 100644 index d5a2e231d..000000000 --- a/src/PDAF_local_set_indices.F90 +++ /dev/null @@ -1,57 +0,0 @@ -! Copyright (c) 2004-2024 Lars Nerger -! -! This file is part of PDAF. -! -! PDAF is free software: you can redistribute it and/or modify -! it under the terms of the GNU Lesser General Public License -! as published by the Free Software Foundation, either version -! 3 of the License, or (at your option) any later version. -! -! PDAF is distributed in the hope that it will be useful, -! but WITHOUT ANY WARRANTY; without even the implied warranty of -! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -! GNU Lesser General Public License for more details. -! -! You should have received a copy of the GNU Lesser General Public -! License along with PDAF. If not, see . -! -!$Id: PDAF_set_comm_pdaf.F90 918 2021-12-03 07:42:19Z lnerger $ - - -!> Get value of a correlation function -!! -!! This routine initializes a PDAF_internal local index array -!! for the mapping between the global and local state vectors -!! -!! This is a core routine of PDAF and -!! should not be changed by the user ! -!! -!! __Revision history:__ -!! * 2024-08 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE PDAF_local_set_indices(dim_l, map) - - USE PDAF_mod_filter, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: dim_l !< Dimension of local state vector - INTEGER, INTENT(in) :: map(dim_l) !< Index array for mapping - -! *** Local variables *** - REAL :: shalf ! Half of support distance for Gaspari-Cohn - - -! ******************************************** -! *** Initialize PDAF_internal index array *** -! ******************************************** - - IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) - ALLOCATE(id_lstate_in_pstate(dim_l)) - - id_lstate_in_pstate(:) = map(:) - -END SUBROUTINE PDAF_local_set_indices diff --git a/src/PDAF_mod_filter.F90 b/src/PDAF_mod_filter.F90 index 6d8ec095c..f4b5fdc07 100644 --- a/src/PDAF_mod_filter.F90 +++ b/src/PDAF_mod_filter.F90 @@ -189,10 +189,8 @@ MODULE PDAF_mod_filter REAL, TARGET, ALLOCATABLE :: skewness(:) ! Skewness of ensemble for each local domain REAL, TARGET, ALLOCATABLE :: kurtosis(:) ! Kurtosis of ensemble for each local domain REAL, ALLOCATABLE :: bias(:) ! Model bias vector - - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector !EOP -!$OMP THREADPRIVATE(cnt_maxlag, obs_member, forget_l, debug, id_lstate_in_pstate) +!$OMP THREADPRIVATE(cnt_maxlag, obs_member, forget_l, debug) END MODULE PDAF_mod_filter diff --git a/src/PDAFlocal.F90 b/src/PDAFlocal.F90 new file mode 100644 index 000000000..46f14c071 --- /dev/null +++ b/src/PDAFlocal.F90 @@ -0,0 +1,166 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! + +!> PDAF-LOCAL routines handling localization +!! +!! This module contains subroutines that handle the localization of +!! the state vector +!! +!! * PDAFlocal_set_indices \n +!! Set indices of elements of lcoal state vector in global state vector +!! * PDAFlocal_set_increment_weights \n +!! Set optional increment weights applied when upating the lobal state vector +!! from the local analysis state vector +!! * PDAFlocal_clear_increment_weights \n +!! Deallocate vector of increment weights. Afterwards l2g_state is applied without weights +!! +!! __Revision history:__ +!! * 2024-08 - Lars Nerger - Initial code +!! * Later revisions - see repository log +!! +MODULE PDAFlocal + + IMPLICIT NONE + SAVE + + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector + REAL, ALLOCATABLE :: l2g_weights(:) !< Increment weights applied in l2g_state + +!$OMP THREADPRIVATE(id_lstate_in_pstate, l2g_weights) + +!------------------------------------------------------------------------------- + + INTERFACE + SUBROUTINE PDAFlocal_g2l_callback(step, domain_p, dim_p, state_p, dim_l, state_l) + INTEGER, INTENT(in) :: step !< Current time step + INTEGER, INTENT(in) :: domain_p !< Current local analysis domain + INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension + INTEGER, INTENT(in) :: dim_l !< Local state dimension + REAL, INTENT(in) :: state_p(dim_p) !< PE-local full state vector + REAL, INTENT(out) :: state_l(dim_l) !< State vector on local analysis domain + END SUBROUTINE PDAFlocal_g2l_callback + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_l2g_callback(step, domain_p, dim_l, state_l, dim_p, state_p) + INTEGER, INTENT(in) :: step !< Current time step + INTEGER, INTENT(in) :: domain_p !< Current local analysis domain + INTEGER, INTENT(in) :: dim_l !< Local state dimension + INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension + REAL, INTENT(in) :: state_l(dim_l) !< State vector on local analysis domain + REAL, INTENT(inout) :: state_p(dim_p) !< PE-local full state vector + END SUBROUTINE PDAFlocal_l2g_callback + END INTERFACE + +!------------------------------------------------------------------------------- + +CONTAINS + +!> Set index vector to map between global and local state vectors +!! +!! This routine initializes a PDAF_internal local index array +!! for the mapping between the global and local state vectors +!! +!! __Revision history:__ +!! * 2024-08 - Lars Nerger - Initial code +!! * Later revisions - see repository log +!! + SUBROUTINE PDAFlocal_set_indices(dim_l, map) + + IMPLICIT NONE + +! *** Arguments *** + INTEGER, INTENT(in) :: dim_l !< Dimension of local state vector + INTEGER, INTENT(in) :: map(dim_l) !< Index array for mapping + + +! ******************************************** +! *** Initialize PDAF_internal index array *** +! ******************************************** + + IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) + ALLOCATE(id_lstate_in_pstate(dim_l)) + + id_lstate_in_pstate(:) = map(:) + + END SUBROUTINE PDAFlocal_set_indices + + + +!------------------------------------------------------------------------------- +!> Set vector of local increment weights +!! +!! This routine initializes a PDAF_internal local array +!! of increment weights. The weights are applied in +!! in PDAF_local_l2g_callback, when the global state vector +!! is initialized from the local state vector. These can +!! e.g. be used to apply a vertical localization. +!! +!! __Revision history:__ +!! * 2024-08 - Lars Nerger - Initial code +!! * Later revisions - see repository log +!! + SUBROUTINE PDAFlocal_set_increment_weights(dim_l, weights) + + IMPLICIT NONE + +! *** Arguments *** + INTEGER, INTENT(in) :: dim_l !< Dimension of local state vector + REAL, INTENT(in) :: weights(dim_l) !< Weights array + +! *** Local variables *** + + +! ******************************************** +! *** Initialize PDAF_internal index array *** +! ******************************************** + + IF (ALLOCATED(l2g_weights)) DEALLOCATE(l2g_weights) + ALLOCATE(l2g_weights(dim_l)) + + l2g_weights(:) = weights(:) + + END SUBROUTINE PDAFlocal_set_increment_weights + + + +!------------------------------------------------------------------------------- +!> Deallocate vector of local increment weights +!! +!! This routine simply deallocates the local increment +!! weight vector if it is allocated. +!! +!! __Revision history:__ +!! * 2024-08 - Lars Nerger - Initial code +!! * Later revisions - see repository log +!! + SUBROUTINE PDAFlocal_clear_increment_weights() + + IMPLICIT NONE + +! *** Arguments *** + +! ***************************************** +! *** Deallocate increment weight array *** +! ***************************************** + + IF (ALLOCATED(l2g_weights)) DEALLOCATE(l2g_weights) + + END SUBROUTINE PDAFlocal_clear_increment_weights + +END MODULE PDAFlocal diff --git a/src/PDAF_local_g2l_callback.F90 b/src/PDAFlocal_g2l_callback.F90 similarity index 80% rename from src/PDAF_local_g2l_callback.F90 rename to src/PDAFlocal_g2l_callback.F90 index 49d1d1eac..548008902 100644 --- a/src/PDAF_local_g2l_callback.F90 +++ b/src/PDAFlocal_g2l_callback.F90 @@ -18,10 +18,10 @@ !$Id$ !BOP ! -! !ROUTINE: PDAF_local_g2l_callback - Project global to local vector according to index array +! !ROUTINE: PDAFlocal_g2l_callback - Project global to local vector according to index array ! ! !INTERFACE: -SUBROUTINE PDAF_local_g2l_callback(step, domain_p, dim_p, state_p, dim_l, state_l) +SUBROUTINE PDAFlocal_g2l_callback(step, domain_p, dim_p, state_p, dim_l, state_l) ! !DESCRIPTION: ! Project a global to a local state vector for the localized filters. @@ -34,7 +34,7 @@ SUBROUTINE PDAF_local_g2l_callback(step, domain_p, dim_p, state_p, dim_l, state_ ! Later revisions - see svn log ! ! !USES: - USE PDAF_mod_filter, & + USE PDAFlocal, & ONLY: id_lstate_in_pstate IMPLICIT NONE @@ -60,10 +60,7 @@ SUBROUTINE PDAF_local_g2l_callback(step, domain_p, dim_p, state_p, dim_l, state_ ! ************************************* DO i = 1, dim_l - ! Only use the index value if it is in a valid range - IF (id_lstate_in_pstate(i) > 0 .and. id_lstate_in_pstate(i) <= dim_p) THEN - state_l(i) = state_p(id_lstate_in_pstate(i)) - END IF + state_l(i) = state_p(id_lstate_in_pstate(i)) END DO -END SUBROUTINE PDAF_local_g2l_callback +END SUBROUTINE PDAFlocal_g2l_callback diff --git a/src/PDAF_local_l2g_callback.F90 b/src/PDAFlocal_l2g_callback.F90 similarity index 73% rename from src/PDAF_local_l2g_callback.F90 rename to src/PDAFlocal_l2g_callback.F90 index cf47576f5..907eedf7e 100644 --- a/src/PDAF_local_l2g_callback.F90 +++ b/src/PDAFlocal_l2g_callback.F90 @@ -18,10 +18,10 @@ !$Id$ !BOP ! -! !ROUTINE: PDAF_local_l2g_callback - Initialize global vector elements from local state vector +! !ROUTINE: PDAFlocal_l2g_callback - Initialize global vector elements from local state vector ! ! !INTERFACE: -SUBROUTINE PDAF_local_l2g_callback(step, domain_p, dim_l, state_l, dim_p, state_p) +SUBROUTINE PDAFlocal_l2g_callback(step, domain_p, dim_l, state_l, dim_p, state_p) ! !DESCRIPTION: ! Initialize elements of a global state vector from a local state vector. @@ -37,8 +37,8 @@ SUBROUTINE PDAF_local_l2g_callback(step, domain_p, dim_l, state_l, dim_p, state_ ! Later revisions - see svn log ! ! !USES: - USE PDAF_mod_filter, & - ONLY: id_lstate_in_pstate + USE PDAFlocal, & + ONLY: id_lstate_in_pstate, l2g_weights IMPLICIT NONE @@ -62,11 +62,17 @@ SUBROUTINE PDAF_local_l2g_callback(step, domain_p, dim_l, state_l, dim_p, state_ ! *** Initialize elements of global state vector *** ! ************************************************** - DO i = 1, dim_l - ! Only use the index value if it is in a valid range - IF (id_lstate_in_pstate(i) > 0 .and. id_lstate_in_pstate(i) <= dim_p) THEN + IF (.NOT.ALLOCATED(l2g_weights)) THEN + ! Initialize global state vector with full updated local state + DO i = 1, dim_l state_p(id_lstate_in_pstate(i)) = state_l(i) - END IF - END DO - -END SUBROUTINE PDAF_local_l2g_callback + END DO + ELSE + ! Apply increment weight when initializaing global state vector from local state vector + DO i = 1, dim_l + state_p(id_lstate_in_pstate(i)) = state_p(id_lstate_in_pstate(i)) & + + l2g_weights(i) * (state_l(i) - state_p(id_lstate_in_pstate(i))) + END DO + END IF + +END SUBROUTINE PDAFlocal_l2g_callback From 582e63fe080cde7c7ddde8347121a86b9a393b35 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Fri, 16 Aug 2024 09:25:28 +0200 Subject: [PATCH 49/83] Initialize 'screen' and 'debug' =0 --- src/PDAF_mod_filter.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PDAF_mod_filter.F90 b/src/PDAF_mod_filter.F90 index f4b5fdc07..1bb346b86 100644 --- a/src/PDAF_mod_filter.F90 +++ b/src/PDAF_mod_filter.F90 @@ -100,9 +100,9 @@ MODULE PDAF_mod_filter INTEGER :: step ! Current time step INTEGER :: step_obs ! Time step of next observation INTEGER :: dim_obs ! Dimension of next observation - INTEGER :: screen ! Control verbosity of filter routines + INTEGER :: screen=0 ! Control verbosity of filter routines ! (0) quiet; (1) normal output; (2); plus timings; (3) debug output - INTEGER :: debug ! Debugging flag: print debug information if >0 + INTEGER :: debug=0 ! Debugging flag: print debug information if >0 INTEGER :: incremental=0 ! Whether to perform incremental updating INTEGER :: type_forget=0 ! Type of forgetting factor ! (0): fixed; (1) global adaptive; (2) local adaptive From 6de498c92e3de33f1d5e60e58265833c645b60b8 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Fri, 16 Aug 2024 10:27:43 +0200 Subject: [PATCH 50/83] Update PDAFlocal --- Depends | 6 ++-- Makefile | 6 ++-- src/PDAF_mod_filter.F90 | 4 +-- src/PDAFlocal.F90 | 28 +++++++++++-------- .../assimilate_pdaf_offline.F90 | 9 +++--- .../offline_2D_parallel/init_dim_l_pdaf.F90 | 5 ++++ 6 files changed, 34 insertions(+), 24 deletions(-) diff --git a/Depends b/Depends index 8ffc7b40f..7be34a096 100644 --- a/Depends +++ b/Depends @@ -173,9 +173,6 @@ $(OBJDIR)/PDAF_lnetf_memtime.o: ./src/PDAF_lnetf_memtime.F90 $(OBJDIR)/PDAF_time $(OBJDIR)/PDAF_lnetf_options.o: ./src/PDAF_lnetf_options.F90 $(OBJDIR)/PDAF_lnetf_smootherT.o: ./src/PDAF_lnetf_smootherT.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h $(OBJDIR)/PDAF_lnetf_update.o: ./src/PDAF_lnetf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h -$(OBJDIR)/PDAF_local_g2l_callback.o: ./src/PDAF_local_g2l_callback.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_local_l2g_callback.o: ./src/PDAF_local_l2g_callback.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_local_set_indices.o: ./src/PDAF_local_set_indices.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_local_weight.o: ./src/PDAF_local_weight.F90 $(OBJDIR)/PDAF_local_weights.o: ./src/PDAF_local_weights.F90 $(OBJDIR)/PDAF_lseik_alloc.o: ./src/PDAF_lseik_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o @@ -286,6 +283,9 @@ $(OBJDIR)/PDAF_smoother_netf.o: ./src/PDAF_smoother_netf.F90 $(OBJDIR)/PDAF_time $(OBJDIR)/PDAF_smoother_shift.o: ./src/PDAF_smoother_shift.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h $(OBJDIR)/PDAF_timer.o: ./src/PDAF_timer.F90 $(OBJDIR)/PDAF_timer_mpi.o: ./src/PDAF_timer_mpi.F90 +$(OBJDIR)/PDAFlocal.o: ./src/PDAFlocal.F90 +$(OBJDIR)/PDAFlocal_g2l_callback.o: ./src/PDAFlocal_g2l_callback.F90 $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocal_l2g_callback.o: ./src/PDAFlocal_l2g_callback.F90 $(OBJDIR)/PDAFlocal.o $(OBJDIR)/PDAFomi.o: ./src/PDAFomi.F90 $(OBJDIR)/PDAFomi_obs_f.o $(OBJDIR)/PDAFomi_obs_l.o $(OBJDIR)/PDAFomi_obs_op.o $(OBJDIR)/PDAFomi_assimilate_3dvar.o: ./src/PDAFomi_assimilate_3dvar.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAFomi_assimilate_3dvar_nondiagR.o: ./src/PDAFomi_assimilate_3dvar_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o diff --git a/Makefile b/Makefile index 1fef25076..665c794d0 100644 --- a/Makefile +++ b/Makefile @@ -125,9 +125,9 @@ SRC_PDAF_GEN = PDAF_analysis_utils.F90 \ PDAF_set_offline_mode.F90 \ PDAF_g2l.F90 \ PDAF_l2g.F90 \ - PDAF_local_set_indices.F90 \ - PDAF_local_g2l_callback.F90 \ - PDAF_local_l2g_callback.F90 \ + PDAFlocal.F90 \ + PDAFlocal_g2l_callback.F90 \ + PDAFlocal_l2g_callback.F90 \ PDAF_correlation_function.F90 # Specific PDAF-routines for SEIK diff --git a/src/PDAF_mod_filter.F90 b/src/PDAF_mod_filter.F90 index f4b5fdc07..46064abd5 100644 --- a/src/PDAF_mod_filter.F90 +++ b/src/PDAF_mod_filter.F90 @@ -100,9 +100,9 @@ MODULE PDAF_mod_filter INTEGER :: step ! Current time step INTEGER :: step_obs ! Time step of next observation INTEGER :: dim_obs ! Dimension of next observation - INTEGER :: screen ! Control verbosity of filter routines + INTEGER :: screen=0 ! Control verbosity of filter routines ! (0) quiet; (1) normal output; (2); plus timings; (3) debug output - INTEGER :: debug ! Debugging flag: print debug information if >0 + INTEGER :: debug=0 ! Debugging flag: print debug information if >0 INTEGER :: incremental=0 ! Whether to perform incremental updating INTEGER :: type_forget=0 ! Type of forgetting factor ! (0): fixed; (1) global adaptive; (2) local adaptive diff --git a/src/PDAFlocal.F90 b/src/PDAFlocal.F90 index 46f14c071..065a4193f 100644 --- a/src/PDAFlocal.F90 +++ b/src/PDAFlocal.F90 @@ -35,6 +35,9 @@ !! MODULE PDAFlocal + USE PDAF_mod_filter, & + ONLY: debug + IMPLICIT NONE SAVE @@ -75,10 +78,6 @@ END SUBROUTINE PDAFlocal_l2g_callback !! !! This routine initializes a PDAF_internal local index array !! for the mapping between the global and local state vectors -!! -!! __Revision history:__ -!! * 2024-08 - Lars Nerger - Initial code -!! * Later revisions - see repository log !! SUBROUTINE PDAFlocal_set_indices(dim_l, map) @@ -98,6 +97,10 @@ SUBROUTINE PDAFlocal_set_indices(dim_l, map) id_lstate_in_pstate(:) = map(:) + IF (debug>0) THEN + WRITE (*,*) '++ PDAF-debug PDAFlocal_set_indices:', debug, 'indices', id_lstate_in_pstate(1:dim_l) + END IF + END SUBROUTINE PDAFlocal_set_indices @@ -110,10 +113,6 @@ END SUBROUTINE PDAFlocal_set_indices !! in PDAF_local_l2g_callback, when the global state vector !! is initialized from the local state vector. These can !! e.g. be used to apply a vertical localization. -!! -!! __Revision history:__ -!! * 2024-08 - Lars Nerger - Initial code -!! * Later revisions - see repository log !! SUBROUTINE PDAFlocal_set_increment_weights(dim_l, weights) @@ -135,6 +134,11 @@ SUBROUTINE PDAFlocal_set_increment_weights(dim_l, weights) l2g_weights(:) = weights(:) + IF (debug>0) THEN + WRITE (*,*) '++ PDAF-debug: ', debug, 'PDAFlocal_set_increment_weights -- Set local increment weights' + WRITE (*,*) '++ PDAF-debug PDAFlocal_set_increment_weights:', debug, 'weights', l2g_weights(1:dim_l) + END IF + END SUBROUTINE PDAFlocal_set_increment_weights @@ -144,10 +148,6 @@ END SUBROUTINE PDAFlocal_set_increment_weights !! !! This routine simply deallocates the local increment !! weight vector if it is allocated. -!! -!! __Revision history:__ -!! * 2024-08 - Lars Nerger - Initial code -!! * Later revisions - see repository log !! SUBROUTINE PDAFlocal_clear_increment_weights() @@ -161,6 +161,10 @@ SUBROUTINE PDAFlocal_clear_increment_weights() IF (ALLOCATED(l2g_weights)) DEALLOCATE(l2g_weights) + IF (debug>0) THEN + WRITE (*,*) '++ PDAF-debug: ', debug, 'PDAFlocal_free_increment_weights -- Unset local increment weights' + END IF + END SUBROUTINE PDAFlocal_clear_increment_weights END MODULE PDAFlocal diff --git a/tutorial/offline_2D_parallel/assimilate_pdaf_offline.F90 b/tutorial/offline_2D_parallel/assimilate_pdaf_offline.F90 index bfb31e2ea..0b2625b62 100644 --- a/tutorial/offline_2D_parallel/assimilate_pdaf_offline.F90 +++ b/tutorial/offline_2D_parallel/assimilate_pdaf_offline.F90 @@ -43,14 +43,15 @@ SUBROUTINE assimilate_pdaf_offline() prepoststep_ens_offline ! User supplied pre/poststep routine ! Localization of state vector EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains - init_dim_l_pdaf, & ! Initialize state dimension for local analysis domain - g2l_state_pdaf, & ! Get state on local analysis domain from global state - l2g_state_pdaf ! Update global state from state on local analysis domain + init_dim_l_pdaf ! Initialize state dimension for local analysis domain ! Interface to PDAF-OMI for local and global filters EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain init_dim_obs_l_pdafomi, & ! Get dimension of obs. vector for local analysis domain localize_covar_pdafomi ! Apply localization to covariance matrix in LEnKF + ! PDAF-provided callback routines for g2l and l2g initializations + EXTERNAL :: PDAFlocal_g2l_callback, & ! Get state on local analysis domain from global state + PDAFlocal_l2g_callback ! Update global state from state on local analysis domain ! ***************************** @@ -72,7 +73,7 @@ SUBROUTINE assimilate_pdaf_offline() IF (localfilter==1) THEN CALL PDAFomi_put_state_local(collect_state_pdaf, init_dim_obs_pdafomi, & obs_op_pdafomi, prepoststep_ens_offline, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, status_pdaf) + init_dim_obs_l_pdafomi, PDAFlocal_g2l_callback, PDAFlocal_l2g_callback, status_pdaf) ELSE IF (filtertype /= 8) THEN ! All other filters can use one of the two generic OMI interface routines diff --git a/tutorial/offline_2D_parallel/init_dim_l_pdaf.F90 b/tutorial/offline_2D_parallel/init_dim_l_pdaf.F90 index 8f0751381..f4cd5275a 100644 --- a/tutorial/offline_2D_parallel/init_dim_l_pdaf.F90 +++ b/tutorial/offline_2D_parallel/init_dim_l_pdaf.F90 @@ -20,6 +20,8 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ONLY: coords_l, id_lstate_in_pstate, ny, local_dims USE mod_parallel_pdaf, & ! Parallelization ONLY: mype_filter + USE PDAFlocal, & ! Localization helper routine + ONLY: PDAFlocal_set_indices IMPLICIT NONE @@ -67,4 +69,7 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! Here the local domain is a single grid point and variable given by DOMAIN_P id_lstate_in_pstate(1) = domain_p + ! Provide index array to PDAF + CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) + END SUBROUTINE init_dim_l_pdaf From a6ae5b156863c4727127d2bcf197cc597aa121ea Mon Sep 17 00:00:00 2001 From: Yumeng Chen Date: Wed, 21 Aug 2024 10:38:04 +0100 Subject: [PATCH 51/83] add simplified PDAFomi assimilation in PDAF --- src/Makefile | 5 +- src/PDAFomilocal_assimilate.F90 | 138 ++++++++++++++++++++++++++++++++ 2 files changed, 141 insertions(+), 2 deletions(-) create mode 100644 src/PDAFomilocal_assimilate.F90 diff --git a/src/Makefile b/src/Makefile index 6d06e712a..82c7d19bd 100644 --- a/src/Makefile +++ b/src/Makefile @@ -5,7 +5,7 @@ # To choose the architecture set $PDAF_ARCH # ####################################################### -.SUFFIXES: .F90 .f .o +.SUFFIXES: .F90 .f .o ###################################################### @@ -102,6 +102,7 @@ OBJ_PDAF_GEN = PDAF_analysis_utils.o \ PDAFomi_assimilate_nonlin_nondiagR.o \ PDAFomi_assimilate_nonlin_nondiagR_si.o \ PDAFomi_assimilate_local.o \ + PDAFomilocal_assimilate.o \ PDAFomi_assimilate_local_si.o \ PDAFomi_assimilate_local_nondiagR.o \ PDAFomi_assimilate_local_nondiagR_si.o \ @@ -424,7 +425,7 @@ OBJ_PDAF = $(OBJ_PDAFOMI) $(OBJ_PDAF_GEN) $(OBJ_SEIK) $(OBJ_LSEIK) $(OBJ_SEEK) $(OBJ_ESTKF) $(OBJ_LESTKF) $(OBJ_LENKF) $(OBJ_NETF) $(OBJ_LNETF) \ $(OBJ_LKNETF) $(OBJ_PF) $(OBJ_OBSGEN) $(OBJ_3DVAR_INI) -OBJ_PDAF_VAR = $(OBJ_PDAF) $(OBJ_3DVAR) +OBJ_PDAF_VAR = $(OBJ_PDAF) $(OBJ_3DVAR) # External Routines for SANGOMA tools OBJ_SANGOMA = ../external/SANGOMA/SANGOMA_quicksort.o diff --git a/src/PDAFomilocal_assimilate.F90 b/src/PDAFomilocal_assimilate.F90 new file mode 100644 index 000000000..800756ca6 --- /dev/null +++ b/src/PDAFomilocal_assimilate.F90 @@ -0,0 +1,138 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFomi_assimilate_local --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFomilocal_assimilate(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, next_observation_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2020-11 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + obs_op_f_pdaf, & ! Full observation operator + init_dim_obs_l_pdaf ! Initialize local dimimension of obs. vector + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize full observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_g2l_obs_cb, & ! Restrict full obs. vector to local analysis domain + PDAFomi_prodRinvA_l_cb, & ! Provide product R^-1 A on local analysis domain + PDAFomi_likelihood_l_cb ! Compute likelihood and apply localization + EXTERNAL :: PDAFomi_prodRinvA_hyb_l_cb, & ! Product R^-1 A on local analysis domain with hybrid weight + PDAFomi_likelihood_hyb_l_cb ! Compute likelihood and apply localization with tempering + EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector + PDAFlocal_l2g_callback ! Project local to global state vector +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_local -- START' + + IF (TRIM(filterstr) == 'LSEIK') THEN + CALL PDAF_assimilate_lseik(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + prepoststep_pdaf, PDAFomi_prodRinvA_l_cb, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, PDAFlocal_g2l_callback, PDAFlocal_l2g_callback, & + PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & + next_observation_pdaf, outflag) + ELSE IF (TRIM(filterstr) == 'LETKF') THEN + CALL PDAF_assimilate_letkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + prepoststep_pdaf, PDAFomi_prodRinvA_l_cb, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, PDAFlocal_g2l_callback, PDAFlocal_l2g_callback, & + PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & + next_observation_pdaf, outflag) + ELSE IF (TRIM(filterstr) == 'LESTKF') THEN + CALL PDAF_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + prepoststep_pdaf, PDAFomi_prodRinvA_l_cb, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, PDAFlocal_g2l_callback, PDAFlocal_l2g_callback, & + PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & + next_observation_pdaf, outflag) + ELSE IF (TRIM(filterstr) == 'LNETF') THEN + CALL PDAF_assimilate_lnetf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_l_cb, & + prepoststep_pdaf, PDAFomi_likelihood_l_cb, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, PDAFlocal_g2l_callback, PDAFlocal_l2g_callback, & + PDAFomi_g2l_obs_cb, next_observation_pdaf, outflag) + ELSE IF (TRIM(filterstr) == 'LKNETF') THEN + CALL PDAF_assimilate_lknetf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, & + PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, prepoststep_pdaf, & + PDAFomi_prodRinvA_l_cb, PDAFomi_prodRinvA_hyb_l_cb, & + init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & + PDAFlocal_g2l_callback, PDAFlocal_l2g_callback, PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, & + PDAFomi_init_obsvar_l_cb, PDAFomi_likelihood_l_cb, PDAFomi_likelihood_hyb_l_cb, & + next_observation_pdaf, outflag) + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_local -- END' + +END SUBROUTINE PDAFomilocal_assimilate From c2f22322f7cf43313c5beab1e2caf4f586049384 Mon Sep 17 00:00:00 2001 From: Yumeng Chen Date: Wed, 21 Aug 2024 12:39:44 +0100 Subject: [PATCH 52/83] adding PDAFlocal subroutines --- src/Makefile | 68 ++++- src/PDAFlocal_assimilate_en3dvar_lestkf.F90 | 154 +++++++++++ src/PDAFlocal_assimilate_hyb3dvar_lestkf.F90 | 156 +++++++++++ src/PDAFlocal_assimilate_lestkf.F90 | 141 ++++++++++ src/PDAFlocal_assimilate_lestkf_si.F90 | 87 ++++++ src/PDAFlocal_assimilate_letkf.F90 | 141 ++++++++++ src/PDAFlocal_assimilate_letkf_si.F90 | 87 ++++++ src/PDAFlocal_assimilate_lknetf.F90 | 148 +++++++++++ src/PDAFlocal_assimilate_lknetf_si.F90 | 91 +++++++ src/PDAFlocal_assimilate_lnetf.F90 | 138 ++++++++++ src/PDAFlocal_assimilate_lnetf_si.F90 | 82 ++++++ src/PDAFlocal_assimilate_lseik.F90 | 141 ++++++++++ src/PDAFlocal_assimilate_lseik_si.F90 | 87 ++++++ src/PDAFlocal_put_state_en3dvar_lestkf.F90 | 247 +++++++++++++++++ src/PDAFlocal_put_state_hyb3dvar_lestkf.F90 | 249 ++++++++++++++++++ src/PDAFlocal_put_state_lestkf.F90 | 216 +++++++++++++++ src/PDAFlocal_put_state_lestkf_si.F90 | 84 ++++++ src/PDAFlocal_put_state_letkf.F90 | 215 +++++++++++++++ src/PDAFlocal_put_state_letkf_si.F90 | 84 ++++++ src/PDAFlocal_put_state_lknetf.F90 | 230 ++++++++++++++++ src/PDAFlocal_put_state_lknetf_si.F90 | 88 +++++++ src/PDAFlocal_put_state_lnetf.F90 | 203 ++++++++++++++ src/PDAFlocal_put_state_lnetf_si.F90 | 80 ++++++ src/PDAFlocal_put_state_lseik.F90 | 213 +++++++++++++++ src/PDAFlocal_put_state_lseik_si.F90 | 84 ++++++ ...PDAFlocalomi_assimilate_en3dvar_lestkf.F90 | 117 ++++++++ ...omi_assimilate_en3dvar_lestkf_nondiagR.F90 | 117 ++++++++ ...DAFlocalomi_assimilate_hyb3dvar_lestkf.F90 | 120 +++++++++ ...mi_assimilate_hyb3dvar_lestkf_nondiagR.F90 | 121 +++++++++ ...DAFlocalomi_assimilate_lknetf_nondiagR.F90 | 115 ++++++++ ...localomi_assimilate_lknetf_nondiagR_si.F90 | 84 ++++++ ...PDAFlocalomi_assimilate_lnetf_nondiagR.F90 | 108 ++++++++ ...Flocalomi_assimilate_lnetf_nondiagR_si.F90 | 81 ++++++ src/PDAFlocalomi_assimilate_local.F90 | 138 ++++++++++ ...PDAFlocalomi_assimilate_local_nondiagR.F90 | 129 +++++++++ ...Flocalomi_assimilate_local_nondiagR_si.F90 | 80 ++++++ src/PDAFlocalomi_assimilate_local_si.F90 | 80 ++++++ src/PDAFlocalomi_put_state_en3dvar_lestkf.F90 | 108 ++++++++ ...lomi_put_state_en3dvar_lestkf_nondiagR.F90 | 115 ++++++++ ...PDAFlocalomi_put_state_hyb3dvar_lestkf.F90 | 110 ++++++++ ...omi_put_state_hyb3dvar_lestkf_nondiagR.F90 | 119 +++++++++ ...PDAFlocalomi_put_state_lknetf_nondiagR.F90 | 113 ++++++++ ...Flocalomi_put_state_lknetf_nondiagR_si.F90 | 83 ++++++ src/PDAFlocalomi_put_state_lnetf_nondiagR.F90 | 106 ++++++++ ...AFlocalomi_put_state_lnetf_nondiagR_si.F90 | 80 ++++++ src/PDAFlocalomi_put_state_local.F90 | 123 +++++++++ src/PDAFlocalomi_put_state_local_nondiagR.F90 | 125 +++++++++ ...AFlocalomi_put_state_local_nondiagR_si.F90 | 79 ++++++ src/PDAFlocalomi_put_state_local_si.F90 | 79 ++++++ 49 files changed, 6033 insertions(+), 11 deletions(-) create mode 100644 src/PDAFlocal_assimilate_en3dvar_lestkf.F90 create mode 100644 src/PDAFlocal_assimilate_hyb3dvar_lestkf.F90 create mode 100644 src/PDAFlocal_assimilate_lestkf.F90 create mode 100644 src/PDAFlocal_assimilate_lestkf_si.F90 create mode 100644 src/PDAFlocal_assimilate_letkf.F90 create mode 100644 src/PDAFlocal_assimilate_letkf_si.F90 create mode 100644 src/PDAFlocal_assimilate_lknetf.F90 create mode 100644 src/PDAFlocal_assimilate_lknetf_si.F90 create mode 100644 src/PDAFlocal_assimilate_lnetf.F90 create mode 100644 src/PDAFlocal_assimilate_lnetf_si.F90 create mode 100644 src/PDAFlocal_assimilate_lseik.F90 create mode 100644 src/PDAFlocal_assimilate_lseik_si.F90 create mode 100644 src/PDAFlocal_put_state_en3dvar_lestkf.F90 create mode 100644 src/PDAFlocal_put_state_hyb3dvar_lestkf.F90 create mode 100644 src/PDAFlocal_put_state_lestkf.F90 create mode 100644 src/PDAFlocal_put_state_lestkf_si.F90 create mode 100644 src/PDAFlocal_put_state_letkf.F90 create mode 100644 src/PDAFlocal_put_state_letkf_si.F90 create mode 100644 src/PDAFlocal_put_state_lknetf.F90 create mode 100644 src/PDAFlocal_put_state_lknetf_si.F90 create mode 100644 src/PDAFlocal_put_state_lnetf.F90 create mode 100644 src/PDAFlocal_put_state_lnetf_si.F90 create mode 100644 src/PDAFlocal_put_state_lseik.F90 create mode 100644 src/PDAFlocal_put_state_lseik_si.F90 create mode 100644 src/PDAFlocalomi_assimilate_en3dvar_lestkf.F90 create mode 100644 src/PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.F90 create mode 100644 src/PDAFlocalomi_assimilate_hyb3dvar_lestkf.F90 create mode 100644 src/PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 create mode 100644 src/PDAFlocalomi_assimilate_lknetf_nondiagR.F90 create mode 100644 src/PDAFlocalomi_assimilate_lknetf_nondiagR_si.F90 create mode 100644 src/PDAFlocalomi_assimilate_lnetf_nondiagR.F90 create mode 100644 src/PDAFlocalomi_assimilate_lnetf_nondiagR_si.F90 create mode 100644 src/PDAFlocalomi_assimilate_local.F90 create mode 100644 src/PDAFlocalomi_assimilate_local_nondiagR.F90 create mode 100644 src/PDAFlocalomi_assimilate_local_nondiagR_si.F90 create mode 100644 src/PDAFlocalomi_assimilate_local_si.F90 create mode 100644 src/PDAFlocalomi_put_state_en3dvar_lestkf.F90 create mode 100644 src/PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR.F90 create mode 100644 src/PDAFlocalomi_put_state_hyb3dvar_lestkf.F90 create mode 100644 src/PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR.F90 create mode 100644 src/PDAFlocalomi_put_state_lknetf_nondiagR.F90 create mode 100644 src/PDAFlocalomi_put_state_lknetf_nondiagR_si.F90 create mode 100644 src/PDAFlocalomi_put_state_lnetf_nondiagR.F90 create mode 100644 src/PDAFlocalomi_put_state_lnetf_nondiagR_si.F90 create mode 100644 src/PDAFlocalomi_put_state_local.F90 create mode 100644 src/PDAFlocalomi_put_state_local_nondiagR.F90 create mode 100644 src/PDAFlocalomi_put_state_local_nondiagR_si.F90 create mode 100644 src/PDAFlocalomi_put_state_local_si.F90 diff --git a/src/Makefile b/src/Makefile index 82c7d19bd..36a7dc7b9 100644 --- a/src/Makefile +++ b/src/Makefile @@ -102,10 +102,17 @@ OBJ_PDAF_GEN = PDAF_analysis_utils.o \ PDAFomi_assimilate_nonlin_nondiagR.o \ PDAFomi_assimilate_nonlin_nondiagR_si.o \ PDAFomi_assimilate_local.o \ - PDAFomilocal_assimilate.o \ PDAFomi_assimilate_local_si.o \ PDAFomi_assimilate_local_nondiagR.o \ PDAFomi_assimilate_local_nondiagR_si.o \ + PDAFlocalomi_assimilate_local.o \ + PDAFlocalomi_assimilate_local_nondiagR.o \ + PDAFlocalomi_assimilate_local_nondiagR_si.o \ + PDAFlocalomi_assimilate_local_si.o \ + PDAFlocalomi_put_state_local.o \ + PDAFlocalomi_put_state_local_nondiagR.o \ + PDAFlocalomi_put_state_local_nondiagR_si.o \ + PDAFlocalomi_put_state_local_si.o \ PDAF_reset_forget.o \ PDAF_get_ensstats.o \ PDAF_set_debug_flag.o \ @@ -149,7 +156,11 @@ OBJ_LSEIK = PDAF_lseik_init.o \ PDAF_lseik_update.o \ PDAF_lseik_analysis.o \ PDAF_lseik_resample.o \ - PDAF_lseik_analysis_trans.o + PDAF_lseik_analysis_trans.o \ + PDAFlocal_put_state_lseik.o \ + PDAFlocal_put_state_lseik_si.o \ + PDAFlocal_assimilate_lseik.o \ + PDAFlocal_assimilate_lseik_si.o # Specific PDAF-routines for SEEK OBJ_SEEK = PDAF_seek_init.o \ @@ -214,7 +225,11 @@ OBJ_LETKF = PDAF_letkf_init.o \ PDAF_letkf_update.o \ PDAF_letkf_analysis.o \ PDAF_letkf_analysis_T.o \ - PDAF_letkf_analysis_fixed.o + PDAF_letkf_analysis_fixed.o \ + PDAFlocal_put_state_letkf.o \ + PDAFlocal_put_state_letkf_si.o \ + PDAFlocal_assimilate_letkf.o \ + PDAFlocal_assimilate_letkf_si.o # Specific PDAF-routines for ESTKF OBJ_ESTKF = PDAF_estkf_init.o \ @@ -242,7 +257,11 @@ OBJ_LESTKF = PDAF_lestkf_init.o \ PDAF_assimilate_lestkf_si.o \ PDAF_lestkf_update.o \ PDAF_lestkf_analysis.o \ - PDAF_lestkf_analysis_fixed.o + PDAF_lestkf_analysis_fixed.o \ + PDAFlocal_put_state_lestkf.o \ + PDAFlocal_put_state_lestkf_si.o \ + PDAFlocal_assimilate_lestkf.o \ + PDAFlocal_assimilate_lestkf_si.o # Specific PDAF-routines for LEnKF OBJ_LENKF = PDAF_lenkf_init.o \ @@ -299,7 +318,15 @@ OBJ_LNETF = PDAF_lnetf_init.o \ PDAFomi_put_state_lnetf_nondiagR.o \ PDAFomi_put_state_lnetf_nondiagR_si.o \ PDAFomi_assimilate_lnetf_nondiagR.o \ - PDAFomi_assimilate_lnetf_nondiagR_si.o + PDAFomi_assimilate_lnetf_nondiagR_si.o \ + PDAFlocal_put_state_lnetf.o \ + PDAFlocal_put_state_lnetf_si.o \ + PDAFlocal_assimilate_lnetf.o \ + PDAFlocal_assimilate_lnetf_si.o \ + PDAFlocalomi_assimilate_lnetf_nondiagR.o \ + PDAFlocalomi_assimilate_lnetf_nondiagR_si.o \ + PDAFlocalomi_put_state_lnetf_nondiagR.o \ + PDAFlocalomi_put_state_lnetf_nondiagR_si.o # Specific PDAF-routines for PF OBJ_PF = PDAF_pf_init.o \ @@ -336,8 +363,15 @@ OBJ_LKNETF = PDAF_lknetf_init.o \ PDAFomi_put_state_lknetf_nondiagR.o \ PDAFomi_put_state_lknetf_nondiagR_si.o \ PDAFomi_assimilate_lknetf_nondiagR.o \ - PDAFomi_assimilate_lknetf_nondiagR_si.o - + PDAFomi_assimilate_lknetf_nondiagR_si.o \ + PDAFlocal_put_state_lknetf.o \ + PDAFlocal_put_state_lknetf_si.o \ + PDAFlocal_assimilate_lknetf.o \ + PDAFlocal_assimilate_lknetf_si.o \ + PDAFlocalomi_assimilate_lknetf_nondiagR.o \ + PDAFlocalomi_assimilate_lknetf_nondiagR_si.o \ + PDAFlocalomi_put_state_lknetf_nondiagR.o \ + PDAFlocalomi_put_state_lknetf_nondiagR_si.o # Specific PDAF-routines for generating observations OBJ_OBSGEN = PDAF_genobs_init.o \ PDAF_genobs_alloc.o \ @@ -390,6 +424,10 @@ OBJ_3DVAR = PDAF_put_state_3dvar.o \ PDAF_hyb3dvar_optim_cg.o \ PDAF_hyb3dvar_costf_cvt.o \ PDAF_hyb3dvar_costf_cg_cvt.o \ + PDAFlocal_put_state_en3dvar_lestkf.o \ + PDAFlocal_put_state_hyb3dvar_lestkf.o \ + PDAFlocal_assimilate_en3dvar_lestkf.o \ + PDAFlocal_assimilate_hyb3dvar_lestkf.o \ PDAFomi_assimilate_3dvar.o \ PDAFomi_assimilate_en3dvar_estkf.o \ PDAFomi_assimilate_en3dvar_lestkf.o \ @@ -400,6 +438,10 @@ OBJ_3DVAR = PDAF_put_state_3dvar.o \ PDAFomi_assimilate_en3dvar_lestkf_nondiagR.o \ PDAFomi_assimilate_hyb3dvar_estkf_nondiagR.o \ PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR.o \ + PDAFlocalomi_assimilate_en3dvar_lestkf.o \ + PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.o \ + PDAFlocalomi_assimilate_hyb3dvar_lestkf.o \ + PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.o \ PDAFomi_put_state_3dvar.o \ PDAFomi_put_state_en3dvar_estkf.o \ PDAFomi_put_state_en3dvar_lestkf.o \ @@ -409,7 +451,11 @@ OBJ_3DVAR = PDAF_put_state_3dvar.o \ PDAFomi_put_state_en3dvar_estkf_nondiagR.o \ PDAFomi_put_state_en3dvar_lestkf_nondiagR.o \ PDAFomi_put_state_hyb3dvar_estkf_nondiagR.o \ - PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.o + PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.o \ + PDAFlocalomi_put_state_en3dvar_lestkf.o \ + PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR.o \ + PDAFlocalomi_put_state_hyb3dvar_lestkf.o \ + PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR.o # Additional file for 3DVar already specified in OBJ_3DVAR_ini # PDAF_3dvar_memtime.o @@ -445,10 +491,10 @@ OBJ_OPTIM = ../external/CG+_mpi/cgfam.o ../external/CG+_mpi/cgsearch.o \ $(RANLIB) ../lib/libpdaf-d.a @cp *.mod ../include -../lib/libpdaf-var.a: $(MOD_PDAF) $(MOD_INTERFACE) $(OBJ_PDAF_VAR) $(OBJ_OPTIM) +../lib/libpdaf-var.a: $(MOD_PDAF) $(OBJ_SANGOMA) $(MOD_INTERFACE) $(OBJ_PDAF_VAR) $(OBJ_OPTIM) @echo "++++++ Generate Filter library ++++++" $(AR) -r $(AR_SPEC) $@ \ - $(MOD_PDAF) $(MOD_INTERFACE) $(OBJ_PDAF) $(OBJ_PDAF_VAR) $(OBJ_OPTIM) + $(MOD_PDAF) $(MOD_INTERFACE) $(OBJ_PDAF) $(OBJ_PDAF_VAR) $(OBJ_OPTIM) $(OBJ_SANGOMA) $(RANLIB) ../lib/libpdaf-var.a @cp *.mod ../include @@ -460,7 +506,7 @@ pdaf-var: ../lib/libpdaf-var.a $(FC) $(OPT) $(MPI_INC) $(CPP_DEFS) -o $*.o -c $*.F90 .f.o : - $(FC) -O3 -o $*.o -c $*.f + $(FC) -O3 $(MPI_INC) -o $*.o -c $*.f # For older compilers one might need to separate the # preprocessing from the compilation as defined below: diff --git a/src/PDAFlocal_assimilate_en3dvar_lestkf.F90 b/src/PDAFlocal_assimilate_en3dvar_lestkf.F90 new file mode 100644 index 000000000..8fc07f148 --- /dev/null +++ b/src/PDAFlocal_assimilate_en3dvar_lestkf.F90 @@ -0,0 +1,154 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_assimilate_en3dvar_lestkf --- Interface to PDAF for En3DVAR/LESTKF +! +! !INTERFACE: +SUBROUTINE PDAFlocal_assimilate_en3dvar_lestkf(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & + U_cvt_ens, U_cvt_adj_ens, U_obs_op_lin, U_obs_op_adj, & + U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, U_init_obs_l, U_prodRinvA_l, & + U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, & + U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & + U_prepoststep, U_next_observation, outflag) + +! !DESCRIPTION: +! Interface routine called from the model at each time +! step during the forecast of each ensemble state. If +! the time of the next analysis step is reached the +! forecast state is transferred to PDAF and the analysis +! is computed by calling PDAFlocal_put_state_3dvar. Subsequently, +! PDAF_get_state is called to initialize the next forecast +! phase. +! +! The code is very generic. Basically the only +! filter-specific part are the calls to the +! routines PDAF\_put\_state\_X where the analysis +! is computed and PDAF\_get\_state to initialize the next +! forecast phase. The filter-specific call-back subroutines +! are specified in the calls to the two core routines. +! +! Variant for 3DVAR with domain decomposition. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2013-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, & + ONLY: cnt_steps, nsteps, assim_flag, use_PDAF_assim + USE PDAF_mod_filtermpi, & + ONLY: mype_world + + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(out) :: outflag ! Status flag + +! ! External subroutines +! ! (PDAF-internal names, real names are defined in the call to PDAF) + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obs, & ! Initialize observation vector + U_prepoststep, & ! User supplied pre/poststep routine + U_prodRinvA, & ! Provide product R^-1 A + U_next_observation, & ! Routine to provide time step, time and dimension + ! of next observation + U_distribute_state, & ! Routine to distribute a state vector + U_cvt_ens, & ! Apply control vector transform matrix (ensemble) + U_cvt_adj_ens, & ! Apply adjoint control vector transform matrix (ensemble var) + U_obs_op_lin, & ! Linearized observation operator + U_obs_op_adj ! Adjoint observation operator + EXTERNAL :: U_obs_op_f, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs_f, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs_f, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l ! Provide product R^-1 A on local analysis domain + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocal_put_state_3dvar +! Calls: PDAF_get_state +!EOP + +! Local variables + INTEGER :: steps ! Number of time steps in next forecast phase + INTEGER :: doexit ! Exit flag; not used in this variant + REAL :: time ! Current model time; not used in this variant + + +! ***************************** +! *** At each time step *** +! ***************************** + + ! Set flag for using PDAF_assimilate + use_PDAF_assim = .TRUE. + + ! Increment time step counter + cnt_steps = cnt_steps + 1 + + +! ******************************** +! *** At end of forecast phase *** +! ******************************** + + IF (cnt_steps == nsteps) THEN + + IF (mype_world==0) WRITE(*,'(a, 5x, a)') 'PDAF', 'Perform assimilation with PDAF' + + ! Set flag for assimilation + assim_flag = 1 + + ! *** Call analysis step *** + + CALL PDAFlocal_put_state_en3dvar_lestkf(U_collect_state, & + U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & + U_cvt_ens, U_cvt_adj_ens, U_obs_op_lin, U_obs_op_adj, & + U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, U_init_obs_l, U_prodRinvA_l, & + U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, & + U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & + U_prepoststep, outflag) + + ! *** Prepare start of next ensemble forecast *** + + IF (outflag==0) THEN + CALL PDAF_get_state(steps, time, doexit, U_next_observation, U_distribute_state, & + U_prepoststep, outflag) + END IF + + nsteps = steps + + ELSE + assim_flag = 0 + outflag = 0 + END IF + +END SUBROUTINE PDAFlocal_assimilate_en3dvar_lestkf diff --git a/src/PDAFlocal_assimilate_hyb3dvar_lestkf.F90 b/src/PDAFlocal_assimilate_hyb3dvar_lestkf.F90 new file mode 100644 index 000000000..d5060c4e6 --- /dev/null +++ b/src/PDAFlocal_assimilate_hyb3dvar_lestkf.F90 @@ -0,0 +1,156 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_assimilate_hyb3dvar_lestkf --- Interface to PDAF for Hyb3DVAR/LESTKF +! +! !INTERFACE: +SUBROUTINE PDAFlocal_assimilate_hyb3dvar_lestkf(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & + U_cvt_ens, U_cvt_adj_ens, U_cvt, U_cvt_adj, U_obs_op_lin, U_obs_op_adj, & + U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, U_init_obs_l, U_prodRinvA_l, & + U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, & + U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & + U_prepoststep, U_next_observation, outflag) + +! !DESCRIPTION: +! Interface routine called from the model at each time +! step during the forecast of each ensemble state. If +! the time of the next analysis step is reached the +! forecast state is transferred to PDAF and the analysis +! is computed by calling PDAFlocal_put_state_3dvar. Subsequently, +! PDAF_get_state is called to initialize the next forecast +! phase. +! +! The code is very generic. Basically the only +! filter-specific part are the calls to the +! routines PDAF\_put\_state\_X where the analysis +! is computed and PDAF\_get\_state to initialize the next +! forecast phase. The filter-specific call-back subroutines +! are specified in the calls to the two core routines. +! +! Variant for 3DVAR with domain decomposition. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2013-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, & + ONLY: cnt_steps, nsteps, assim_flag, use_PDAF_assim + USE PDAF_mod_filtermpi, & + ONLY: mype_world + + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(out) :: outflag ! Status flag + +! ! External subroutines +! ! (PDAF-internal names, real names are defined in the call to PDAF) + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obs, & ! Initialize observation vector + U_prepoststep, & ! User supplied pre/poststep routine + U_prodRinvA, & ! Provide product R^-1 A + U_next_observation, & ! Routine to provide time step, time and dimension + ! of next observation + U_distribute_state, & ! Routine to distribute a state vector + U_cvt_ens, & ! Apply control vector transform matrix (ensemble) + U_cvt_adj_ens, & ! Apply adjoint control vector transform matrix (ensemble var) + U_cvt, & ! Apply control vector transform matrix to control vector + U_cvt_adj, & ! Apply adjoint control vector transform matrix + U_obs_op_lin, & ! Linearized observation operator + U_obs_op_adj ! Adjoint observation operator + EXTERNAL :: U_obs_op_f, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs_f, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs_f, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l ! Provide product R^-1 A on local analysis domain + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocal_put_state_3dvar +! Calls: PDAF_get_state +!EOP + +! Local variables + INTEGER :: steps ! Number of time steps in next forecast phase + INTEGER :: doexit ! Exit flag; not used in this variant + REAL :: time ! Current model time; not used in this variant + + +! ***************************** +! *** At each time step *** +! ***************************** + + ! Set flag for using PDAF_assimilate + use_PDAF_assim = .TRUE. + + ! Increment time step counter + cnt_steps = cnt_steps + 1 + + +! ******************************** +! *** At end of forecast phase *** +! ******************************** + + IF (cnt_steps == nsteps) THEN + + IF (mype_world==0) WRITE(*,'(a, 5x, a)') 'PDAF', 'Perform assimilation with PDAF' + + ! Set flag for assimilation + assim_flag = 1 + + ! *** Call analysis step *** + + CALL PDAFlocal_put_state_hyb3dvar_lestkf(U_collect_state, & + U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & + U_cvt_ens, U_cvt_adj_ens, U_cvt, U_cvt_adj, U_obs_op_lin, U_obs_op_adj, & + U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, U_init_obs_l, U_prodRinvA_l, & + U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, & + U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & + U_prepoststep, outflag) + + ! *** Prepare start of next ensemble forecast *** + + IF (outflag==0) THEN + CALL PDAF_get_state(steps, time, doexit, U_next_observation, U_distribute_state, & + U_prepoststep, outflag) + END IF + + nsteps = steps + + ELSE + assim_flag = 0 + outflag = 0 + END IF + +END SUBROUTINE PDAFlocal_assimilate_hyb3dvar_lestkf diff --git a/src/PDAFlocal_assimilate_lestkf.F90 b/src/PDAFlocal_assimilate_lestkf.F90 new file mode 100644 index 000000000..fff0300c4 --- /dev/null +++ b/src/PDAFlocal_assimilate_lestkf.F90 @@ -0,0 +1,141 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_assimilate_lestkf --- Interface to PDAF for LESTKF +! +! !INTERFACE: +SUBROUTINE PDAFlocal_assimilate_lestkf(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_init_obs, U_init_obs_l, U_prepoststep, & + U_prodRinvA_l, U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, & + U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & + U_next_observation, outflag) + +! !DESCRIPTION: +! Interface routine called from the model at each time +! step during the forecast of each ensemble state. If +! the time of the next analysis step is reached the +! forecast state is transferred to PDAF and the analysis +! is computed by calling PDAFlocal_put_state_lestkf. Subsequently, +! PDAF_get_state is called to initialize the next forecast +! phase. +! +! The code is very generic. Basically the only +! filter-specific part are the calls to the +! routines PDAF\_put\_state\_X where the analysis +! is computed and PDAF\_get\_state to initialize the next +! forecast phase. The filter-specific call-back subroutines +! are specified in the calls to the two core routines. +! +! Variant for LESTKF with domain decomposition. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2013-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, & + ONLY: cnt_steps, nsteps, assim_flag, use_PDAF_assim + USE PDAF_mod_filtermpi, & + ONLY: mype_world + + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(out) :: outflag ! Status flag + +! ! External subroutines +! ! (PDAF-internal names, real names are defined in the call to PDAF) + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain + U_prepoststep, & ! User supplied pre/poststep routine + U_next_observation, & ! Routine to provide time step, time and dimension + ! of next observation + U_distribute_state ! Routine to distribute a state vector + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocal_put_state_lestkf +! Calls: PDAF_get_state_lestkf +!EOP + +! Local variables + INTEGER :: steps ! Number of time steps in next forecast phase + INTEGER :: doexit ! Exit flag; not used in this variant + REAL :: time ! Current model time; not used in this variant + + +! ***************************** +! *** At each time step *** +! ***************************** + + ! Set flag for using PDAF_assimilate + use_PDAF_assim = .TRUE. + + ! Increment time step counter + cnt_steps = cnt_steps + 1 + + +! ******************************** +! *** At end of forecast phase *** +! ******************************** + + IF (cnt_steps == nsteps) THEN + + IF (mype_world==0) WRITE(*,'(a, 5x, a)') 'PDAF', 'Perform assimilation with PDAF' + + ! Set flag for assimilation + assim_flag = 1 + + ! *** Call analysis step *** + + CALL PDAFlocal_put_state_lestkf(U_collect_state, U_init_dim_obs, U_obs_op, & + U_init_obs, U_init_obs_l, U_prepoststep, U_prodRinvA_l, U_init_n_domains_p, & + U_init_dim_l, U_init_dim_obs_l, U_g2l_obs, & + U_init_obsvar, U_init_obsvar_l, outflag) + + ! *** Prepare start of next ensemble forecast *** + + IF (outflag==0) THEN + CALL PDAF_get_state(steps, time, doexit, U_next_observation, U_distribute_state, & + U_prepoststep, outflag) + END IF + + nsteps = steps + + ELSE + assim_flag = 0 + outflag = 0 + END IF + +END SUBROUTINE PDAFlocal_assimilate_lestkf diff --git a/src/PDAFlocal_assimilate_lestkf_si.F90 b/src/PDAFlocal_assimilate_lestkf_si.F90 new file mode 100644 index 000000000..51f9ba88c --- /dev/null +++ b/src/PDAFlocal_assimilate_lestkf_si.F90 @@ -0,0 +1,87 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_assimilate_lestkf_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocal_assimilate_lestkf_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! Variant for SEIK with domain decomposition. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2013-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + obs_op_f_pdaf, & ! Full observation operator + init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + init_dim_obs_l_pdaf, & ! Initialize local dimimension of obs. vector + init_obs_f_pdaf, & ! Initialize full observation vector + init_obs_l_pdaf, & ! Initialize local observation vector + init_obsvar_pdaf, & ! Initialize mean observation error variance + init_obsvar_l_pdaf, & ! Initialize local mean observation error variance + g2l_obs_pdaf, & ! Restrict full obs. vector to local analysis domain + prodRinvA_l_pdaf, & ! Provide product R^-1 A on local analysis domain + prepoststep_pdaf, & ! User supplied pre/poststep routine + next_observation_pdaf ! Routine to provide time step, time and dimension + ! of next observation + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocal_assimilate_lestkf +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFlocal_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, init_obs_f_pdaf, init_obs_l_pdaf, & + prepoststep_pdaf, prodRinvA_l_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, & + g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, next_observation_pdaf, & + outflag) + +END SUBROUTINE PDAFlocal_assimilate_lestkf_si diff --git a/src/PDAFlocal_assimilate_letkf.F90 b/src/PDAFlocal_assimilate_letkf.F90 new file mode 100644 index 000000000..a2d8dc831 --- /dev/null +++ b/src/PDAFlocal_assimilate_letkf.F90 @@ -0,0 +1,141 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_assimilate_letkf --- Interface to PDAF for LETKF +! +! !INTERFACE: +SUBROUTINE PDAFlocal_assimilate_letkf(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_init_obs, U_init_obs_l, U_prepoststep, & + U_prodRinvA_l, U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, & + U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & + U_next_observation, outflag) + +! !DESCRIPTION: +! Interface routine called from the model at each time +! step during the forecast of each ensemble state. If +! the time of the next analysis step is reached the +! forecast state is transferred to PDAF and the analysis +! is computed by calling PDAFlocal_put_state_letkf. Subsequently, +! PDAF_get_state is called to initialize the next forecast +! phase. +! +! The code is very generic. Basically the only +! filter-specific part are the calls to the +! routines PDAF\_put\_state\_X where the analysis +! is computed and PDAF\_get\_state to initialize the next +! forecast phase. The filter-specific call-back subroutines +! are specified in the calls to the two core routines. +! +! Variant for LETKF with domain decomposition. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2013-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, & + ONLY: cnt_steps, nsteps, assim_flag, use_PDAF_assim + USE PDAF_mod_filtermpi, & + ONLY: mype_world + + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(out) :: outflag ! Status flag + +! ! External subroutines +! ! (PDAF-internal names, real names are defined in the call to PDAF) + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain + U_prepoststep, & ! User supplied pre/poststep routine + U_next_observation, & ! Routine to provide time step, time and dimension + ! of next observation + U_distribute_state ! Routine to distribute a state vector + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocal_put_state_letkf +! Calls: PDAF_get_state +!EOP + +! Local variables + INTEGER :: steps ! Number of time steps in next forecast phase + INTEGER :: doexit ! Exit flag; not used in this variant + REAL :: time ! Current model time; not used in this variant + + +! ***************************** +! *** At each time step *** +! ***************************** + + ! Set flag for using PDAF_assimilate + use_PDAF_assim = .TRUE. + + ! Increment time step counter + cnt_steps = cnt_steps + 1 + + +! ******************************** +! *** At end of forecast phase *** +! ******************************** + + IF (cnt_steps == nsteps) THEN + + IF (mype_world==0) WRITE(*,'(a, 5x, a)') 'PDAF', 'Perform assimilation with PDAF' + + ! Set flag for assimilation + assim_flag = 1 + + ! *** Call analysis step *** + + CALL PDAFlocal_put_state_letkf(U_collect_state, U_init_dim_obs, U_obs_op, & + U_init_obs, U_init_obs_l, U_prepoststep, U_prodRinvA_l, U_init_n_domains_p, & + U_init_dim_l, U_init_dim_obs_l, U_g2l_obs, & + U_init_obsvar, U_init_obsvar_l, outflag) + + ! *** Prepare start of next ensemble forecast *** + + IF (outflag==0) THEN + CALL PDAF_get_state(steps, time, doexit, U_next_observation, U_distribute_state, & + U_prepoststep, outflag) + END IF + + nsteps = steps + + ELSE + assim_flag = 0 + outflag = 0 + END IF + +END SUBROUTINE PDAFlocal_assimilate_letkf diff --git a/src/PDAFlocal_assimilate_letkf_si.F90 b/src/PDAFlocal_assimilate_letkf_si.F90 new file mode 100644 index 000000000..6c0fb5482 --- /dev/null +++ b/src/PDAFlocal_assimilate_letkf_si.F90 @@ -0,0 +1,87 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_assimilate_letkf_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocal_assimilate_letkf_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! Variant for SEIK with domain decomposition. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2013-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + obs_op_f_pdaf, & ! Full observation operator + init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + init_dim_obs_l_pdaf, & ! Initialize local dimimension of obs. vector + init_obs_f_pdaf, & ! Initialize full observation vector + init_obs_l_pdaf, & ! Initialize local observation vector + init_obsvar_pdaf, & ! Initialize mean observation error variance + init_obsvar_l_pdaf, & ! Initialize local mean observation error variance + g2l_obs_pdaf, & ! Restrict full obs. vector to local analysis domain + prodRinvA_l_pdaf, & ! Provide product R^-1 A on local analysis domain + prepoststep_pdaf, & ! User supplied pre/poststep routine + next_observation_pdaf ! Routine to provide time step, time and dimension + ! of next observation + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocal_assimilate_letkf +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFlocal_assimilate_letkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, init_obs_f_pdaf, init_obs_l_pdaf, & + prepoststep_pdaf, prodRinvA_l_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, & + g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, next_observation_pdaf, & + outflag) + +END SUBROUTINE PDAFlocal_assimilate_letkf_si diff --git a/src/PDAFlocal_assimilate_lknetf.F90 b/src/PDAFlocal_assimilate_lknetf.F90 new file mode 100644 index 000000000..fb5568899 --- /dev/null +++ b/src/PDAFlocal_assimilate_lknetf.F90 @@ -0,0 +1,148 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_assimilate_lknetf --- Interface to PDAF for LKNETF +! +! !INTERFACE: +SUBROUTINE PDAFlocal_assimilate_lknetf(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_init_obs, U_init_obs_l, U_prepoststep, & + U_prodRinvA_l, U_prodRinvA_hyb_l, U_init_n_domains_p, U_init_dim_l, & + U_init_dim_obs_l, & + U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & + U_likelihood_l, U_likelihood_hyb_l, & + U_next_observation, outflag) + +! !DESCRIPTION: +! Interface routine called from the model at each time +! step during the forecast of each ensemble state. If +! the time of the next analysis step is reached the +! forecast state is transferred to PDAF and the analysis +! is computed by calling PDAFlocal_put_state_lknetf. Subsequently, +! PDAF_get_state is called to initialize the next forecast +! phase. +! +! The code is very generic. Basically the only +! filter-specific part are the calls to the +! routines PDAF\_put\_state\_X where the analysis +! is computed and PDAF\_get\_state to initialize the next +! forecast phase. The filter-specific call-back subroutines +! are specified in the calls to the two core routines. +! +! Variant for LKNETF with domain decomposition. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2017-08 - Lars Nerger - Initial code based on LETKF +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, & + ONLY: cnt_steps, nsteps, assim_flag, use_PDAF_assim + USE PDAF_mod_filtermpi, & + ONLY: mype_world + + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(out) :: outflag ! Status flag + +! ! External subroutines +! ! (PDAF-internal names, real names are defined in the call to PDAF) + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain + U_prodRinvA_hyb_l, & ! Provide product R^-1 A on local analysis domain with hybrid weight + U_likelihood_l, & ! Compute likelihood + U_likelihood_hyb_l, & ! Compute likelihood with hybrid weight + U_prepoststep, & ! User supplied pre/poststep routine + U_next_observation, & ! Routine to provide time step, time and dimension + ! of next observation + U_distribute_state ! Routine to distribute a state vector + + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocal_put_state_lknetf +! Calls: PDAF_get_state +!EOP + +! Local variables + INTEGER :: steps ! Number of time steps in next forecast phase + INTEGER :: doexit ! Exit flag; not used in this variant + REAL :: time ! Current model time; not used in this variant + + +! ***************************** +! *** At each time step *** +! ***************************** + + ! Set flag for using PDAF_assimilate + use_PDAF_assim = .TRUE. + + ! Increment time step counter + cnt_steps = cnt_steps + 1 + + +! ********************************************** +! *** At observation time - analysis step *** +! ********************************************** + + IF (cnt_steps == nsteps) THEN + + IF (mype_world==0) WRITE(*,'(a, 5x, a)') 'PDAF', 'Perform assimilation with PDAF - LKNETF' + + ! Set flag for assimilation + assim_flag = 1 + + ! *** Call analysis step *** + + CALL PDAFlocal_put_state_lknetf(U_collect_state, U_init_dim_obs, U_obs_op, & + U_init_obs, U_init_obs_l, U_prepoststep, U_prodRinvA_l, U_prodRinvA_hyb_l, & + U_init_n_domains_p, & + U_init_dim_l, U_init_dim_obs_l, U_g2l_obs, & + U_init_obsvar, U_init_obsvar_l, U_likelihood_l, U_likelihood_hyb_l, outflag) + + ! *** Prepare start of next ensemble forecast *** + + IF (outflag==0) THEN + CALL PDAF_get_state(steps, time, doexit, U_next_observation, & + U_distribute_state, U_prepoststep, outflag) + END IF + + nsteps = steps + + ELSE + assim_flag = 0 + outflag = 0 + END IF + +END SUBROUTINE PDAFlocal_assimilate_lknetf diff --git a/src/PDAFlocal_assimilate_lknetf_si.F90 b/src/PDAFlocal_assimilate_lknetf_si.F90 new file mode 100644 index 000000000..b8c883472 --- /dev/null +++ b/src/PDAFlocal_assimilate_lknetf_si.F90 @@ -0,0 +1,91 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_assimilate_lknetf_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocal_assimilate_lknetf_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! Variant for SEIK with domain decomposition. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2017-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + obs_op_f_pdaf, & ! Full observation operator + init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + init_dim_obs_l_pdaf, & ! Initialize local dimimension of obs. vector + init_obs_f_pdaf, & ! Initialize full observation vector + init_obs_l_pdaf, & ! Initialize local observation vector + init_obsvar_pdaf, & ! Initialize mean observation error variance + init_obsvar_l_pdaf, & ! Initialize local mean observation error variance + g2l_obs_pdaf, & ! Restrict full obs. vector to local analysis domain + prodRinvA_l_pdaf, & ! Provide product R^-1 A on local analysis domain + prodRinvA_hyb_l_pdaf, & ! Provide product R^-1 A on local analysis domain with hybrid weight + likelihood_l_pdaf, & ! Compute observation likelihood for an ensemble member + likelihood_hyb_l_pdaf, & ! Compute observation likelihood for an ensemble member with hybrid weight + prepoststep_pdaf, & ! User supplied pre/poststep routine + next_observation_pdaf ! Routine to provide time step, time and dimension + ! of next observation + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocal_assimilate_lknetf +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFlocal_assimilate_lknetf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, init_obs_f_pdaf, init_obs_l_pdaf, & + prepoststep_pdaf, prodRinvA_l_pdaf, prodRinvA_hyb_l_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, & + g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, likelihood_l_pdaf, & + likelihood_hyb_l_pdaf, next_observation_pdaf, & + outflag) + +END SUBROUTINE PDAFlocal_assimilate_lknetf_si diff --git a/src/PDAFlocal_assimilate_lnetf.F90 b/src/PDAFlocal_assimilate_lnetf.F90 new file mode 100644 index 000000000..fb2b8402a --- /dev/null +++ b/src/PDAFlocal_assimilate_lnetf.F90 @@ -0,0 +1,138 @@ +! Copyright (c) 2014-2024 Paul Kirchgessner +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_assimilate_lnetf --- Interface to PDAF for LNETF +! +! !INTERFACE: +SUBROUTINE PDAFlocal_assimilate_lnetf(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_init_obs_l, U_prepoststep, & + U_likelihood_l, U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, & + U_g2l_obs, U_next_observation, outflag) + +! !DESCRIPTION: +! Interface routine called from the model at each time +! step during the forecast of each ensemble state. If +! the time of the next analysis step is reached the +! forecast state is transferred to PDAF and the analysis +! is computed by calling PDAFlocal_put_state_lnetf. Subsequently, +! PDAF_get_state is called to initialize the next forecast +! phase. +! +! The code is very generic. Basically the only +! filter-specific part are the calls to the +! routines PDAF\_put\_state\_X where the analysis +! is computed and PDAF\_get\_state to initialize the next +! forecast phase. The filter-specific call-back subroutines +! are specified in the calls to the two core routines. +! +! Variant for LNETF with domain decomposition. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2014-05 - Paul Kirchgessner - Initial code based on ETKF +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, & + ONLY: cnt_steps, nsteps, assim_flag, use_PDAF_assim + USE PDAF_mod_filtermpi, & + ONLY: mype_world + + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(out) :: outflag ! Status flag + +! ! External subroutines +! ! (PDAF-internal names, real names are defined in the call to PDAF) + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_likelihood_l, & ! Compute observation likelihood for an ensemble member + U_prepoststep, & ! User supplied pre/poststep routine + U_next_observation, & ! Routine to provide time step, time and dimension + ! of next observation + U_distribute_state ! Routine to distribute a state vector + + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocal_put_state_lnetkf +! Calls: PDAF_get_state +!EOP + +! Local variables + INTEGER :: steps ! Number of time steps in next forecast phase + INTEGER :: doexit ! Exit flag; not used in this variant + REAL :: time ! Current model time; not used in this variant + + +! ***************************** +! *** At each time step *** +! ***************************** + + ! Set flag for using PDAF_assimilate + use_PDAF_assim = .TRUE. + + ! Increment time step counter + cnt_steps = cnt_steps + 1 + + +! ********************************************** +! *** At observation time - analysis step *** +! ********************************************** + + IF (cnt_steps == nsteps) THEN + IF (mype_world==0) WRITE(*,'(a, 5x, a)') 'PDAF', 'Perform assimilation with PDAF - LNETF' + + ! Set flag for assimilation + assim_flag = 1 + + ! *** Call analysis step *** + + CALL PDAFlocal_put_state_lnetf(U_collect_state, U_init_dim_obs, U_obs_op, & + U_init_obs_l, U_prepoststep, U_likelihood_l, U_init_n_domains_p, & + U_init_dim_l, U_init_dim_obs_l, U_g2l_obs, & + outflag) + + ! *** Prepare start of next ensemble forecast *** + + IF (outflag==0) THEN + CALL PDAF_get_state(steps, time, doexit, U_next_observation, & + U_distribute_state, U_prepoststep, outflag) + END IF + + nsteps = steps + + ELSE + assim_flag = 0 + outflag = 0 + END IF + + +END SUBROUTINE PDAFlocal_assimilate_lnetf diff --git a/src/PDAFlocal_assimilate_lnetf_si.F90 b/src/PDAFlocal_assimilate_lnetf_si.F90 new file mode 100644 index 000000000..e4b8ebbb6 --- /dev/null +++ b/src/PDAFlocal_assimilate_lnetf_si.F90 @@ -0,0 +1,82 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_assimilate_lnetf_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocal_assimilate_lnetf_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! Variant for LNETF with domain decomposition. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2016-11 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + obs_op_f_pdaf, & ! Full observation operator + init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + init_dim_obs_l_pdaf, & ! Initialize local dimimension of obs. vector + init_obs_l_pdaf, & ! Initialize local observation vector + g2l_obs_pdaf, & ! Restrict full obs. vector to local analysis domain + likelihood_l_pdaf, & ! Compute observation likelihood for an ensemble member + prepoststep_pdaf, & ! User supplied pre/poststep routine + next_observation_pdaf ! Routine to provide time step, time and dimension + ! of next observation + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocal_assimilate_lestkf +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFlocal_assimilate_lnetf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, init_obs_l_pdaf, prepoststep_pdaf, & + likelihood_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & + g2l_obs_pdaf, next_observation_pdaf, outflag) + +END SUBROUTINE PDAFlocal_assimilate_lnetf_si diff --git a/src/PDAFlocal_assimilate_lseik.F90 b/src/PDAFlocal_assimilate_lseik.F90 new file mode 100644 index 000000000..8d0aa6ed6 --- /dev/null +++ b/src/PDAFlocal_assimilate_lseik.F90 @@ -0,0 +1,141 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_assimilate_lseik --- Interface to PDAF for LSEIK +! +! !INTERFACE: +SUBROUTINE PDAFlocal_assimilate_lseik(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_init_obs, U_init_obs_l, U_prepoststep, & + U_prodRinvA_l, U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, & + U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & + U_next_observation, outflag) + +! !DESCRIPTION: +! Interface routine called from the model at each time +! step during the forecast of each ensemble state. If +! the time of the next analysis step is reached the +! forecast state is transferred to PDAF and the analysis +! is computed by calling PDAFlocal_put_state_lseik. Subsequently, +! PDAF_get_state is called to initialize the next forecast +! phase. +! +! The code is very generic. Basically the only +! filter-specific part are the calls to the +! routines PDAF\_put\_state\_X where the analysis +! is computed and PDAF\_get\_state to initialize the next +! forecast phase. The filter-specific call-back subroutines +! are specified in the calls to the two core routines. +! +! Variant for LSEIK with domain decomposition. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2013-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, & + ONLY: cnt_steps, nsteps, assim_flag, use_PDAF_assim + USE PDAF_mod_filtermpi, & + ONLY: mype_world + + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(out) :: outflag ! Status flag + +! ! External subroutines +! ! (PDAF-internal names, real names are defined in the call to PDAF) + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain + U_prepoststep, & ! User supplied pre/poststep routine + U_next_observation, & ! Routine to provide time step, time and dimension + ! of next observation + U_distribute_state ! Routine to distribute a state vector + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocal_put_state_lseik +! Calls: PDAF_get_state_lseik +!EOP + +! Local variables + INTEGER :: steps ! Number of time steps in next forecast phase + INTEGER :: doexit ! Exit flag; not used in this variant + REAL :: time ! Current model time; not used in this variant + + +! ***************************** +! *** At each time step *** +! ***************************** + + ! Set flag for using PDAF_assimilate + use_PDAF_assim = .TRUE. + + ! Increment time step counter + cnt_steps = cnt_steps + 1 + + +! ******************************** +! *** At end of forecast phase *** +! ******************************** + + IF (cnt_steps == nsteps) THEN + + IF (mype_world==0) WRITE(*,'(a, 5x, a)') 'PDAF', 'Perform assimilation with PDAF' + + ! Set flag for assimilation + assim_flag = 1 + + ! *** Call analysis step *** + + CALL PDAFlocal_put_state_lseik(U_collect_state, U_init_dim_obs, U_obs_op, & + U_init_obs, U_init_obs_l, U_prepoststep, U_prodRinvA_l, U_init_n_domains_p, & + U_init_dim_l, U_init_dim_obs_l, U_g2l_obs, & + U_init_obsvar, U_init_obsvar_l, outflag) + + ! *** Prepare start of next ensemble forecast *** + + IF (outflag==0) THEN + CALL PDAF_get_state(steps, time, doexit, U_next_observation, U_distribute_state, & + U_prepoststep, outflag) + END IF + + nsteps = steps + + ELSE + assim_flag = 0 + outflag = 0 + END IF + +END SUBROUTINE PDAFlocal_assimilate_lseik diff --git a/src/PDAFlocal_assimilate_lseik_si.F90 b/src/PDAFlocal_assimilate_lseik_si.F90 new file mode 100644 index 000000000..8e40b22a7 --- /dev/null +++ b/src/PDAFlocal_assimilate_lseik_si.F90 @@ -0,0 +1,87 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_assimilate_lseik_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocal_assimilate_lseik_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! Variant for SEIK with domain decomposition. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2013-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + obs_op_f_pdaf, & ! Full observation operator + init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + init_dim_obs_l_pdaf, & ! Initialize local dimimension of obs. vector + init_obs_f_pdaf, & ! Initialize full observation vector + init_obs_l_pdaf, & ! Initialize local observation vector + init_obsvar_pdaf, & ! Initialize mean observation error variance + init_obsvar_l_pdaf, & ! Initialize local mean observation error variance + g2l_obs_pdaf, & ! Restrict full obs. vector to local analysis domain + prodRinvA_l_pdaf, & ! Provide product R^-1 A on local analysis domain + prepoststep_pdaf, & ! User supplied pre/poststep routine + next_observation_pdaf ! Routine to provide time step, time and dimension + ! of next observation + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocal_assimilate_lseik +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFlocal_assimilate_lseik(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, init_obs_f_pdaf, init_obs_l_pdaf, & + prepoststep_pdaf, prodRinvA_l_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, & + g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, next_observation_pdaf, & + outflag) + +END SUBROUTINE PDAFlocal_assimilate_lseik_si diff --git a/src/PDAFlocal_put_state_en3dvar_lestkf.F90 b/src/PDAFlocal_put_state_en3dvar_lestkf.F90 new file mode 100644 index 000000000..0c0b7e9be --- /dev/null +++ b/src/PDAFlocal_put_state_en3dvar_lestkf.F90 @@ -0,0 +1,247 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_put_state_en3dvar_lestkf --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocal_put_state_en3dvar_lestkf(U_collect_state, U_init_dim_obs, U_obs_op, & + U_init_obs, U_prodRinvA, & + U_cvt_ens, U_cvt_adj_ens, U_obs_op_lin, U_obs_op_adj, & + U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, U_init_obs_l, U_prodRinvA_l, & + U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, & + U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & + U_prepoststep, outflag) + +! !DESCRIPTION: +! Interface routine called from the model after the +! forecast of each ensemble state to transfer data +! from the model to PDAF. For the parallelization +! this involves transfer from model PEs to filter +! PEs.\\ +! During the forecast phase state vectors are +! re-initialized from the forecast model fields +! by U\_collect\_state. +! At the end of a forecast phase (i.e. when all +! ensemble members have been integrated by the model) +! sub-ensembles are gathered from the model tasks. +! Subsequently the filter update is performed. +! +! The code is very generic. Basically the only +! filter-specific part if the call to the +! update-routine PDAF\_X\_update where the analysis +! is computed. The filter-specific subroutines that +! are specified in the call to PDAF\_put\_state\_X +! are passed through to the update routine +! +! Variant for ensemble 3DVAR using LESTKF to +! update the ensemble perturbations. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2021-03 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_communicate_ens, & + ONLY: PDAF_gather_ens + USE PDAF_timer, & + ONLY: PDAF_timeit, PDAF_time_temp + USE PDAF_memcounting, & + ONLY: PDAF_memcount + USE PDAF_mod_filter, & + ONLY: dim_p, dim_obs, dim_ens, local_dim_ens, & + nsteps, step_obs, step, member, member_save, subtype_filter, & + type_forget, incremental, initevol, state, eofV, & + eofU, state_inc, forget, screen, flag, & + dim_cvec_ens, type_opt, offline_mode + USE PDAF_mod_filtermpi, & + ONLY: mype_world, filterpe, & + dim_ens_l, modelpe, filter_no_model + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(out) :: outflag ! Status flag + +! ! External subroutines +! ! (PDAF-internal names, real names are defined in the call to PDAF) + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_init_obs, & ! Initialize observation vector + U_prepoststep, & ! User supplied pre/poststep routine + U_prodRinvA, & ! Provide product R^-1 A + U_cvt_ens, & ! Apply control vector transform matrix (ensemble) + U_cvt_adj_ens, & ! Apply adjoint control vector transform matrix (ensemble var) + U_obs_op_lin, & ! Linearized observation operator + U_obs_op_adj ! Adjoint observation operator + EXTERNAL :: U_obs_op_f, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs_f, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs_f, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l ! Provide product R^-1 A on local analysis domain + EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector + PDAFlocal_l2g_callback ! Project local to global state vector +! !CALLING SEQUENCE: +! Called by: model code +! Calls: U_collect_state +! Calls: PDAF_gather_ens +! Calls: PDAF_3dvar_update +! Calls: PDAF_timeit +!EOP + +! local variables + INTEGER :: i ! Counter + INTEGER, SAVE :: allocflag = 0 ! Flag whether first time allocation is done + + +! ************************************************** +! *** Save forecasted state back to the ensemble *** +! *** Only done on the filter Pes *** +! ************************************************** + + doevol: IF (nsteps > 0 .OR. .NOT.offline_mode) THEN + + CALL PDAF_timeit(41, 'new') + + modelpes: IF (modelpe) THEN + + ! Store member index for PDAF_get_memberid + member_save = member + + IF (subtype_filter /= 2 .AND. subtype_filter /= 3) THEN + ! Save evolved state in ensemble matrix + CALL U_collect_state(dim_p, eofV(1 : dim_p, member)) + ELSE + ! Save evolved ensemble mean state + CALL U_collect_state(dim_p, state(1:dim_p)) + END IF + END IF modelpes + + CALL PDAF_timeit(41, 'old') + + member = member + 1 + ELSE + member = local_dim_ens + 1 + END IF doevol + + IF (filter_no_model .AND. filterpe) THEN + member = local_dim_ens + 1 + END IF + + +! ******************************************************** +! *** When forecast phase is completed *** +! *** - collect forecast sub_ensembles on filter PEs *** +! *** - perform analysis step *** +! *** - re-initialize forecast counters/flags *** +! ******************************************************** + completeforecast: IF (member == local_dim_ens + 1 & + .OR. offline_mode) THEN + + ! *********************************************** + ! *** Collect forecast ensemble on filter PEs *** + ! *********************************************** + + doevolB: IF (nsteps > 0) THEN + + IF (.not.filterpe) THEN + ! Non filter PEs only store a sub-ensemble + CALL PDAF_gather_ens(dim_p, dim_ens_l, eofV, screen) + ELSE + ! On filter PEs, the ensemble array has full size + CALL PDAF_gather_ens(dim_p, dim_ens, eofV, screen) + END IF + + END IF doevolB + + ! *** call timer + CALL PDAF_timeit(2, 'old') + + IF (.NOT.offline_mode .AND. mype_world == 0 .AND. screen > 1) THEN + WRITE (*, '(a, 5x, a, F10.3, 1x, a)') & + 'PDAF', '--- duration of forecast phase:', PDAF_time_temp(2), 's' + END IF + + + ! ************************************** + ! *** Perform analysis on filter PEs *** + ! ************************************** + + ! Screen output + IF (offline_mode .AND. mype_world == 0 .AND. screen > 0) THEN + WRITE (*, '(//a5, 64a)') 'PDAF ',('-', i = 1, 64) + WRITE (*, '(a, 20x, a)') 'PDAF', '+++++ ASSIMILATION +++++' + WRITE (*, '(a5, 64a)') 'PDAF ', ('-', i = 1, 64) + ENDIF + + OnFilterPE: IF (filterpe) THEN + + IF (incremental == 0) THEN + ! Allocate only if no incremental updating is used. + ! With incremental STATE_INC is allocated in PDAF_filter_init. + ALLOCATE(state_inc(dim_p)) + IF (allocflag == 0) THEN + CALL PDAF_memcount(3, 'r', dim_p) + allocflag = 1 + END IF + END IF + + CALL PDAF_en3dvar_update_lestkf(step_obs, dim_p, dim_obs, dim_ens, & + dim_cvec_ens, state, eofU, eofV, state_inc, forget, & + U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, U_prepoststep, & + U_cvt_ens, U_cvt_adj_ens, U_obs_op_lin, U_obs_op_adj, & + U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, U_init_obs_l, U_prodRinvA_l, & + U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_callback, & + PDAFlocal_l2g_callback, & + U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & + screen, subtype_filter, incremental, type_forget, type_opt, & + flag) + + IF (incremental == 0) DEALLOCATE(state_inc) + + END IF OnFilterPE + + + ! *********************************** + ! *** Set forecast counters/flags *** + ! *********************************** + initevol = 1 + member = 1 + step = step_obs + 1 + + END IF completeforecast + + +! ******************** +! *** finishing up *** +! ******************** + + outflag = flag + +END SUBROUTINE PDAFlocal_put_state_en3dvar_lestkf diff --git a/src/PDAFlocal_put_state_hyb3dvar_lestkf.F90 b/src/PDAFlocal_put_state_hyb3dvar_lestkf.F90 new file mode 100644 index 000000000..526b724d6 --- /dev/null +++ b/src/PDAFlocal_put_state_hyb3dvar_lestkf.F90 @@ -0,0 +1,249 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_put_state_hyb3dvar_lestkf --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocal_put_state_hyb3dvar_lestkf(U_collect_state, & + U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & + U_cvt_ens, U_cvt_adj_ens, U_cvt, U_cvt_adj, U_obs_op_lin, U_obs_op_adj, & + U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, U_init_obs_l, U_prodRinvA_l, & + U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, & + U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & + U_prepoststep, outflag) + +! !DESCRIPTION: +! Interface routine called from the model after the +! forecast of each ensemble state to transfer data +! from the model to PDAF. For the parallelization +! this involves transfer from model PEs to filter +! PEs.\\ +! During the forecast phase state vectors are +! re-initialized from the forecast model fields +! by U\_collect\_state. +! At the end of a forecast phase (i.e. when all +! ensemble members have been integrated by the model) +! sub-ensembles are gathered from the model tasks. +! Subsequently the filter update is performed. +! +! The code is very generic. Basically the only +! filter-specific part if the call to the +! update-routine PDAF\_X\_update where the analysis +! is computed. The filter-specific subroutines that +! are specified in the call to PDAF\_put\_state\_X +! are passed through to the update routine +! +! Variant for hybrid 3DVAR using LESTKF to +! update the ensemble perturbations. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2021-03 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_communicate_ens, & + ONLY: PDAF_gather_ens + USE PDAF_timer, & + ONLY: PDAF_timeit, PDAF_time_temp + USE PDAF_memcounting, & + ONLY: PDAF_memcount + USE PDAF_mod_filter, & + ONLY: dim_p, dim_obs, dim_ens, local_dim_ens, & + nsteps, step_obs, step, member, member_save, subtype_filter, & + type_forget, incremental, initevol, state, eofV, & + eofU, state_inc, forget, screen, flag, & + dim_cvec, dim_cvec_ens, type_opt, offline_mode + USE PDAF_mod_filtermpi, & + ONLY: mype_world, filterpe, & + dim_ens_l, modelpe, filter_no_model + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(out) :: outflag ! Status flag + +! ! External subroutines +! ! (PDAF-internal names, real names are defined in the call to PDAF) + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_init_obs, & ! Initialize observation vector + U_prepoststep, & ! User supplied pre/poststep routine + U_prodRinvA, & ! Provide product R^-1 A + U_cvt_ens, & ! Apply control vector transform matrix (ensemble) + U_cvt_adj_ens, & ! Apply adjoint control vector transform matrix (ensemble var) + U_cvt, & ! Apply control vector transform matrix to control vector + U_cvt_adj, & ! Apply adjoint control vector transform matrix + U_obs_op_lin, & ! Linearized observation operator + U_obs_op_adj ! Adjoint observation operator + EXTERNAL :: U_obs_op_f, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs_f, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs_f, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l ! Provide product R^-1 A on local analysis domain + EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector + PDAFlocal_l2g_callback ! Project local to global state vector +! !CALLING SEQUENCE: +! Called by: model code +! Calls: U_collect_state +! Calls: PDAF_gather_ens +! Calls: PDAF_3dvar_update +! Calls: PDAF_timeit +!EOP + +! local variables + INTEGER :: i ! Counter + INTEGER, SAVE :: allocflag = 0 ! Flag whether first time allocation is done + + +! ************************************************** +! *** Save forecasted state back to the ensemble *** +! *** Only done on the filter Pes *** +! ************************************************** + + doevol: IF (nsteps > 0 .OR. .NOT.offline_mode) THEN + + CALL PDAF_timeit(41, 'new') + + modelpes: IF (modelpe) THEN + + ! Store member index for PDAF_get_memberid + member_save = member + + IF (subtype_filter /= 2 .AND. subtype_filter /= 3) THEN + ! Save evolved state in ensemble matrix + CALL U_collect_state(dim_p, eofV(1 : dim_p, member)) + ELSE + ! Save evolved ensemble mean state + CALL U_collect_state(dim_p, state(1:dim_p)) + END IF + END IF modelpes + + CALL PDAF_timeit(41, 'old') + + member = member + 1 + ELSE + member = local_dim_ens + 1 + END IF doevol + + IF (filter_no_model .AND. filterpe) THEN + member = local_dim_ens + 1 + END IF + + +! ******************************************************** +! *** When forecast phase is completed *** +! *** - collect forecast sub_ensembles on filter PEs *** +! *** - perform analysis step *** +! *** - re-initialize forecast counters/flags *** +! ******************************************************** + completeforecast: IF (member == local_dim_ens + 1 & + .OR. offline_mode) THEN + + ! *********************************************** + ! *** Collect forecast ensemble on filter PEs *** + ! *********************************************** + + doevolB: IF (nsteps > 0) THEN + + IF (.not.filterpe) THEN + ! Non filter PEs only store a sub-ensemble + CALL PDAF_gather_ens(dim_p, dim_ens_l, eofV, screen) + ELSE + ! On filter PEs, the ensemble array has full size + CALL PDAF_gather_ens(dim_p, dim_ens, eofV, screen) + END IF + + END IF doevolB + + ! *** call timer + CALL PDAF_timeit(2, 'old') + + IF (.NOT.offline_mode .AND. mype_world == 0 .AND. screen > 1) THEN + WRITE (*, '(a, 5x, a, F10.3, 1x, a)') & + 'PDAF', '--- duration of forecast phase:', PDAF_time_temp(2), 's' + END IF + + + ! ************************************** + ! *** Perform analysis on filter PEs *** + ! ************************************** + + ! Screen output + IF (offline_mode .AND. mype_world == 0 .AND. screen > 0) THEN + WRITE (*, '(//a5, 64a)') 'PDAF ',('-', i = 1, 64) + WRITE (*, '(a, 20x, a)') 'PDAF', '+++++ ASSIMILATION +++++' + WRITE (*, '(a5, 64a)') 'PDAF ', ('-', i = 1, 64) + ENDIF + + OnFilterPE: IF (filterpe) THEN + + IF (incremental == 0) THEN + ! Allocate only if no incremental updating is used. + ! With incremental STATE_INC is allocated in PDAF_filter_init. + ALLOCATE(state_inc(dim_p)) + IF (allocflag == 0) THEN + CALL PDAF_memcount(3, 'r', dim_p) + allocflag = 1 + END IF + END IF + + CALL PDAF_hyb3dvar_update_lestkf(step_obs, dim_p, dim_obs, dim_ens, & + dim_cvec, dim_cvec_ens, state, eofU, eofV, state_inc, forget, & + U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, U_prepoststep, & + U_cvt_ens, U_cvt_adj_ens, U_cvt, U_cvt_adj, U_obs_op_lin, U_obs_op_adj, & + U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, U_init_obs_l, U_prodRinvA_l, & + U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_callback, & + PDAFlocal_l2g_callback, & + U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & + screen, subtype_filter, incremental, type_forget, type_opt, & + flag) + + IF (incremental == 0) DEALLOCATE(state_inc) + + END IF OnFilterPE + + + ! *********************************** + ! *** Set forecast counters/flags *** + ! *********************************** + initevol = 1 + member = 1 + step = step_obs + 1 + + END IF completeforecast + + +! ******************** +! *** finishing up *** +! ******************** + + outflag = flag + +END SUBROUTINE PDAFlocal_put_state_hyb3dvar_lestkf diff --git a/src/PDAFlocal_put_state_lestkf.F90 b/src/PDAFlocal_put_state_lestkf.F90 new file mode 100644 index 000000000..e08abf566 --- /dev/null +++ b/src/PDAFlocal_put_state_lestkf.F90 @@ -0,0 +1,216 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! The code is very generic. Basically the only +! filter-specific part if the call to the +! update-routine PDAF\_X\_update where the analysis +! is computed. The filter-specific subroutines that +! are specified in the call to PDAF\_put\_state\_X +! are passed through to the update routine +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_put_state_lestkf --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocal_put_state_lestkf(U_collect_state, U_init_dim_obs, U_obs_op, & + U_init_obs, U_init_obs_l, U_prepoststep, U_prodRinvA_l, U_init_n_domains_p, & + U_init_dim_l, U_init_dim_obs_l, U_g2l_obs, & + U_init_obsvar, U_init_obsvar_l, outflag) + +! !DESCRIPTION: +! Interface routine called from the model after the +! forecast of each ensemble state to transfer data +! from the model to PDAF. For the parallelization +! this involves transfer from model PEs to filter +! PEs.\\ +! During the forecast phase state vectors are +! re-initialized from the forecast model fields +! by U\_collect\_state. +! At the end of a forecast phase (i.e. when all +! ensemble members have been integrated by the model) +! sub-ensembles are gathered from the model tasks. +! Subsequently the filter update is performed. +! +! Variant for LESTKF with domain decomposition. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2011-09 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_communicate_ens, & + ONLY: PDAF_gather_ens + USE PDAF_timer, & + ONLY: PDAF_timeit, PDAF_time_temp + USE PDAF_mod_filter, & + ONLY: dim_p, dim_obs, dim_ens, rank, local_dim_ens, & + nsteps, step_obs, step, member, member_save, subtype_filter, & + type_forget, incremental, initevol, state, eofV, & + eofU, state_inc, screen, flag, & + type_sqrt, sens, dim_lag, cnt_maxlag, offline_mode + USE PDAF_mod_filtermpi, & + ONLY: mype_world, filterpe, dim_ens_l, modelpe, filter_no_model + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(out) :: outflag ! Status flag + +! ! External subroutines +! ! (PDAF-internal names, real names are defined in the call to PDAF) + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain + U_prepoststep ! User supplied pre/poststep routine + EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector + PDAFlocal_l2g_callback ! Project local to global state vector +! !CALLING SEQUENCE: +! Called by: model code +! Calls: U_collect_state +! Calls: PDAF_gather_ens +! Calls: PDAF_lestkf_update +! Calls: PDAF_timeit +!EOP + +! local variables + INTEGER :: i ! Counter + + +! ************************************************** +! *** Save forecast state back to the ensemble *** +! *** Only done on the filter Pes *** +! ************************************************** + + doevol: IF (nsteps > 0) THEN + + CALL PDAF_timeit(41, 'new') + + modelpes: IF (modelpe) THEN + + ! Store member index for PDAF_get_memberid + member_save = member + + IF (subtype_filter /= 2 .AND. subtype_filter /= 3) THEN + ! Save evolved state in ensemble matrix + CALL U_collect_state(dim_p, eofV(1 : dim_p, member)) + ELSE + ! Save evolved ensemble mean state + CALL U_collect_state(dim_p, state(1 : dim_p)) + END IF + END IF modelpes + + CALL PDAF_timeit(41, 'old') + + member = member + 1 + ELSE + member = local_dim_ens + 1 + END IF doevol + + IF (filter_no_model .AND. filterpe) THEN + member = local_dim_ens + 1 + END IF + + +! ******************************************************** +! *** When forecast phase is completed *** +! *** - collect forecast sub_ensembles on filter PEs *** +! *** - perform analysis step *** +! *** - re-initialize forecast counters/flags *** +! ******************************************************** + completeforecast: IF (member == local_dim_ens + 1 & + .OR. offline_mode) THEN + + ! *********************************************** + ! *** Collect forecast ensemble on filter PEs *** + ! *********************************************** + + doevolB: IF (nsteps > 0) THEN + + IF (.not.filterpe) THEN + ! Non filter PEs only store a sub-ensemble + CALL PDAF_gather_ens(dim_p, dim_ens_l, eofV, screen) + ELSE + ! On filter PEs, the ensemble array has full size + CALL PDAF_gather_ens(dim_p, dim_ens, eofV, screen) + END IF + + end IF doevolB + + ! *** call timer + CALL PDAF_timeit(2, 'old') + + IF (.NOT.offline_mode .AND. mype_world == 0 .AND. screen > 1) THEN + WRITE (*, '(a, 5x, a, F10.3, 1x, a)') & + 'PDAF', '--- duration of forecast phase:', PDAF_time_temp(2), 's' + END IF + + + ! ************************************** + ! *** Perform analysis on filter PEs *** + ! ************************************** + + ! Screen output + IF (offline_mode .AND. mype_world == 0 .AND. screen > 0) THEN + WRITE (*, '(//a5, 64a)') 'PDAF ',('-', i = 1, 64) + WRITE (*, '(a, 20x, a)') 'PDAF', '+++++ ASSIMILATION +++++' + WRITE (*, '(a5, 64a)') 'PDAF ', ('-', i = 1, 64) + ENDIF + + OnFilterPE: IF (filterpe) THEN + CALL PDAF_lestkf_update(step_obs, dim_p, dim_obs, dim_ens, rank, state, & + eofU, eofV, state_inc, U_init_dim_obs, & + U_obs_op, U_init_obs, U_init_obs_l, U_prodRinvA_l, U_init_n_domains_p, & + U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_callback, & + PDAFlocal_l2g_callback, & + U_g2l_obs, & + U_init_obsvar, U_init_obsvar_l, U_prepoststep, screen, subtype_filter, & + incremental, type_forget, type_sqrt, dim_lag, sens, & + cnt_maxlag, flag) + END IF OnFilterPE + + + ! *********************************** + ! *** Set forecast counters/flags *** + ! *********************************** + initevol = 1 + member = 1 + step = step_obs + 1 + + END IF completeforecast + + +! ******************** +! *** finishing up *** +! ******************** + + outflag = flag + +END SUBROUTINE PDAFlocal_put_state_lestkf diff --git a/src/PDAFlocal_put_state_lestkf_si.F90 b/src/PDAFlocal_put_state_lestkf_si.F90 new file mode 100644 index 000000000..6ba963b63 --- /dev/null +++ b/src/PDAFlocal_put_state_lestkf_si.F90 @@ -0,0 +1,84 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_put_state_lestkf_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocal_put_state_lestkf_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model after the +! forecast of each ensemble state to transfer data +! from the model to PDAF. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! Variant for LESTKF with domain decomposition. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2011-09 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + obs_op_f_pdaf, & ! Full observation operator + init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + init_dim_obs_l_pdaf, & ! Initialize local dimimension of obs. vector + init_obs_f_pdaf, & ! Initialize full observation vector + init_obs_l_pdaf, & ! Initialize local observation vector + init_obsvar_pdaf, & ! Initialize mean observation error variance + init_obsvar_l_pdaf, & ! Initialize local mean observation error variance + g2l_obs_pdaf, & ! Restrict full obs. vector to local analysis domain + prodRinvA_l_pdaf, & ! Provide product R^-1 A on local analysis domain + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector + PDAFlocal_l2g_callback ! Project local to global state vector +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocal_put_state_lestkf +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFlocal_put_state_lestkf(collect_state_pdaf, init_dim_obs_f_pdaf, & + obs_op_f_pdaf, init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_pdaf, & + prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & + init_dim_obs_l_pdaf, PDAFlocal_g2l_callback, & + PDAFlocal_l2g_callback, & + g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, outflag) + +END SUBROUTINE PDAFlocal_put_state_lestkf_si diff --git a/src/PDAFlocal_put_state_letkf.F90 b/src/PDAFlocal_put_state_letkf.F90 new file mode 100644 index 000000000..6979b3443 --- /dev/null +++ b/src/PDAFlocal_put_state_letkf.F90 @@ -0,0 +1,215 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_put_state_letkf --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocal_put_state_letkf(U_collect_state, U_init_dim_obs, U_obs_op, & + U_init_obs, U_init_obs_l, U_prepoststep, U_prodRinvA_l, U_init_n_domains_p, & + U_init_dim_l, U_init_dim_obs_l, U_g2l_obs, & + U_init_obsvar, U_init_obsvar_l, outflag) + +! !DESCRIPTION: +! Interface routine called from the model after the +! forecast of each ensemble state to transfer data +! from the model to PDAF. For the parallelization +! this involves transfer from model PEs to filter +! PEs.\\ +! During the forecast phase state vectors are +! re-initialized from the forecast model fields +! by U\_collect\_state. +! At the end of a forecast phase (i.e. when all +! ensemble members have been integrated by the model) +! sub-ensembles are gathered from the model tasks. +! Subsequently the filter update is performed. +! +! The code is very generic. Basically the only +! filter-specific part if the call to the +! update-routine PDAF\_X\_update where the analysis +! is computed. The filter-specific subroutines that +! are specified in the call to PDAF\_put\_state\_X +! are passed through to the update routine +! +! Variant for LETKF with domain decomposition. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2009-07 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_communicate_ens, & + ONLY: PDAF_gather_ens + USE PDAF_timer, & + ONLY: PDAF_timeit, PDAF_time_temp + USE PDAF_mod_filter, & + ONLY: dim_p, dim_obs, dim_ens, local_dim_ens, & + nsteps, step_obs, step, member, member_save, subtype_filter, & + type_forget, incremental, initevol, state, eofV, & + eofU, state_inc, screen, flag, & + sens, dim_lag, cnt_maxlag, offline_mode + USE PDAF_mod_filtermpi, & + ONLY: mype_world, filterpe, dim_ens_l, modelpe, filter_no_model + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(out) :: outflag ! Status flag + +! ! External subroutines +! ! (PDAF-internal names, real names are defined in the call to PDAF) + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain + U_prepoststep ! User supplied pre/poststep routine + EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector + PDAFlocal_l2g_callback ! Project local to global state vector +! !CALLING SEQUENCE: +! Called by: model code +! Calls: U_collect_state +! Calls: PDAF_gather_ens +! Calls: PDAF_letkf_update +! Calls: PDAF_timeit +!EOP + +! local variables + INTEGER :: i ! Counter + + +! ************************************************** +! *** Save forecast state back to the ensemble *** +! *** Only done on the filter Pes *** +! ************************************************** + + doevol: IF (nsteps > 0) THEN + + CALL PDAF_timeit(41, 'new') + + modelpes: IF (modelpe) THEN + + ! Store member index for PDAF_get_memberid + member_save = member + + IF (subtype_filter /= 2 .AND. subtype_filter /= 3) THEN + ! Save evolved state in ensemble matrix + CALL U_collect_state(dim_p, eofV(1 : dim_p, member)) + ELSE + ! Save evolved ensemble mean state + CALL U_collect_state(dim_p, state(1 : dim_p)) + END IF + END IF modelpes + + CALL PDAF_timeit(41, 'old') + + member = member + 1 + ELSE + member = local_dim_ens + 1 + END IF doevol + + IF (filter_no_model .AND. filterpe) THEN + member = local_dim_ens + 1 + END IF + + +! ******************************************************** +! *** When forecast phase is completed *** +! *** - collect forecast sub_ensembles on filter PEs *** +! *** - perform analysis step *** +! *** - re-initialize forecast counters/flags *** +! ******************************************************** + completeforecast: IF (member == local_dim_ens + 1 & + .OR. offline_mode) THEN + + ! *********************************************** + ! *** Collect forecast ensemble on filter PEs *** + ! *********************************************** + + doevolB: IF (nsteps > 0) THEN + + IF (.not.filterpe) THEN + ! Non filter PEs only store a sub-ensemble + CALL PDAF_gather_ens(dim_p, dim_ens_l, eofV, screen) + ELSE + ! On filter PEs, the ensemble array has full size + CALL PDAF_gather_ens(dim_p, dim_ens, eofV, screen) + END IF + + END IF doevolB + + ! *** call timer + CALL PDAF_timeit(2, 'old') + + IF (.NOT.offline_mode .AND. mype_world == 0 .AND. screen > 1) THEN + WRITE (*, '(a, 5x, a, F10.3, 1x, a)') & + 'PDAF', '--- duration of forecast phase:', PDAF_time_temp(2), 's' + END IF + + + ! ************************************** + ! *** Perform analysis on filter PEs *** + ! ************************************** + + ! Screen output + IF (offline_mode .AND. mype_world == 0 .AND. screen > 0) THEN + WRITE (*, '(//a5, 64a)') 'PDAF ',('-', i = 1, 64) + WRITE (*, '(a, 20x, a)') 'PDAF', '+++++ ASSIMILATION +++++' + WRITE (*, '(a5, 64a)') 'PDAF ', ('-', i = 1, 64) + ENDIF + + OnFilterPE: IF (filterpe) THEN + CALL PDAF_letkf_update(step_obs, dim_p, dim_obs, dim_ens, state, & + eofU, eofV, state_inc, U_init_dim_obs, & + U_obs_op, U_init_obs, U_init_obs_l, U_prodRinvA_l, U_init_n_domains_p, & + U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_callback, & + PDAFlocal_l2g_callback, & + U_g2l_obs, & + U_init_obsvar, U_init_obsvar_l, U_prepoststep, screen, subtype_filter, & + incremental, type_forget, dim_lag, sens, cnt_maxlag, flag) + END IF OnFilterPE + + + ! *********************************** + ! *** Set forecast counters/flags *** + ! *********************************** + initevol = 1 + member = 1 + step = step_obs + 1 + + END IF completeforecast + + +! ******************** +! *** finishing up *** +! ******************** + + outflag = flag + +END SUBROUTINE PDAFlocal_put_state_letkf diff --git a/src/PDAFlocal_put_state_letkf_si.F90 b/src/PDAFlocal_put_state_letkf_si.F90 new file mode 100644 index 000000000..58b0182f3 --- /dev/null +++ b/src/PDAFlocal_put_state_letkf_si.F90 @@ -0,0 +1,84 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_put_state_letkf_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocal_put_state_letkf_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model after the +! forecast of each ensemble state to transfer data +! from the model to PDAF. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! Variant for LETKF with domain decomposition. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2010-07 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + obs_op_f_pdaf, & ! Full observation operator + init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + init_dim_obs_l_pdaf, & ! Initialize local dimimension of obs. vector + init_obs_f_pdaf, & ! Initialize full observation vector + init_obs_l_pdaf, & ! Initialize local observation vector + init_obsvar_pdaf, & ! Initialize mean observation error variance + init_obsvar_l_pdaf, & ! Initialize local mean observation error variance + g2l_obs_pdaf, & ! Restrict full obs. vector to local analysis domain + prodRinvA_l_pdaf, & ! Provide product R^-1 A on local analysis domain + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector + PDAFlocal_l2g_callback ! Project local to global state vector +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocal_put_state_letkf +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFlocal_put_state_letkf(collect_state_pdaf, init_dim_obs_f_pdaf, & + obs_op_f_pdaf, init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_pdaf, & + prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & + init_dim_obs_l_pdaf, PDAFlocal_g2l_callback, & + PDAFlocal_l2g_callback, & + g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, outflag) + +END SUBROUTINE PDAFlocal_put_state_letkf_si diff --git a/src/PDAFlocal_put_state_lknetf.F90 b/src/PDAFlocal_put_state_lknetf.F90 new file mode 100644 index 000000000..5df6f6267 --- /dev/null +++ b/src/PDAFlocal_put_state_lknetf.F90 @@ -0,0 +1,230 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_put_state_lknetf --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocal_put_state_lknetf(U_collect_state, U_init_dim_obs, U_obs_op, & + U_init_obs, U_init_obs_l, U_prepoststep, U_prodRinvA_l, U_prodRinvA_hyb_l, & + U_init_n_domains_p, & + U_init_dim_l, U_init_dim_obs_l, U_g2l_obs, & + U_init_obsvar, U_init_obsvar_l, U_likelihood_l, U_likelihood_hyb_l, outflag) + +! !DESCRIPTION: +! Interface routine called from the model after the +! forecast of each ensemble state to transfer data +! from the model to PDAF. For the parallelization +! this involves transfer from model PEs to filter +! PEs.\\ +! During the forecast phase state vectors are +! re-initialized from the forecast model fields +! by U\_collect\_state. +! At the end of a forecast phase (i.e. when all +! ensemble members have been integrated by the model) +! sub-ensembles are gathered from the model tasks. +! Subsequently the filter update is performed. +! +! The code is very generic. Basically the only +! filter-specific part if the call to the +! update-routine PDAF\_X\_update where the analysis +! is computed. The filter-specific subroutines that +! are specified in the call to PDAF\_put\_state\_X +! are passed through to the update routine +! +! Variant for LKNETF with domain decomposition. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2017-08 - Lars Nerger - Initial code based on LETKF +! Later revisions - see svn log +! +! !USES: + USE PDAF_communicate_ens, & + ONLY: PDAF_gather_ens + USE PDAF_timer, & + ONLY: PDAF_timeit, PDAF_time_temp + USE PDAF_mod_filter, & + ONLY: dim_p, dim_obs, dim_ens, local_dim_ens, & + nsteps, step_obs, step, member, member_save, subtype_filter, & + type_forget, incremental, initevol, state, eofV, & + eofU, state_inc, screen, flag, & + sens, dim_lag, cnt_maxlag, offline_mode + USE PDAF_mod_filtermpi, & + ONLY: mype_world, filterpe, dim_ens_l, modelpe, filter_no_model + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(out) :: outflag ! Status flag + +! ! External subroutines +! ! (PDAF-internal names, real names are defined in the call to PDAF) + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain + U_prodRinvA_hyb_l, & ! Provide product R^-1 A on local analysis domain with hybrid weight + U_likelihood_l, & ! Compute likelihood + U_likelihood_hyb_l, & ! Compute likelihood with hybrid weight + U_prepoststep ! User supplied pre/poststep routine + EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector + PDAFlocal_l2g_callback ! Project local to global state vector +! !CALLING SEQUENCE: +! Called by: model code +! Calls: U_collect_state +! Calls: PDAF_gather_ens +! Calls: PDAF_lknetf_update +! Calls: PDAF_timeit +!EOP + +! local variables + INTEGER :: i ! Counter + + +! ************************************************** +! *** Save forecast state back to the ensemble *** +! *** Only done on the filter Pes *** +! ************************************************** + + doevol: IF (nsteps > 0) THEN + + CALL PDAF_timeit(41, 'new') + + modelpes: IF (modelpe) THEN + + ! Store member index for PDAF_get_memberid + member_save = member + + IF (subtype_filter /= 2 .AND. subtype_filter /= 3) THEN + ! Save evolved state in ensemble matrix + CALL U_collect_state(dim_p, eofV(1 : dim_p, member)) + ELSE + ! Save evolved ensemble mean state + CALL U_collect_state(dim_p, state(1 : dim_p)) + END IF + END IF modelpes + + CALL PDAF_timeit(41, 'old') + + member = member + 1 + ELSE + member = local_dim_ens + 1 + END IF doevol + + IF (filter_no_model .AND. filterpe) THEN + member = local_dim_ens + 1 + END IF + + +! ******************************************************** +! *** When forecast phase is completed *** +! *** - collect forecast sub_ensembles on filter PEs *** +! *** - perform analysis step *** +! *** - re-initialize forecast counters/flags *** +! ******************************************************** + completeforecast: IF (member == local_dim_ens + 1 & + .OR. offline_mode) THEN + + ! *********************************************** + ! *** Collect forecast ensemble on filter PEs *** + ! *********************************************** + + doevolB: IF (nsteps > 0) THEN + + IF (.not.filterpe) THEN + ! Non filter PEs only store a sub-ensemble + CALL PDAF_gather_ens(dim_p, dim_ens_l, eofV, screen) + ELSE + ! On filter PEs, the ensemble array has full size + CALL PDAF_gather_ens(dim_p, dim_ens, eofV, screen) + END IF + + END IF doevolB + + ! *** call timer + CALL PDAF_timeit(2, 'old') + + IF (.NOT.offline_mode .AND. mype_world == 0 .AND. screen > 1) THEN + WRITE (*, '(a, 5x, a, F10.3, 1x, a)') & + 'PDAF', '--- duration of forecast phase:', PDAF_time_temp(2), 's' + END IF + + + ! ************************************** + ! *** Perform analysis on filter PEs *** + ! ************************************** + + ! Screen output + IF (offline_mode .AND. mype_world == 0 .AND. screen > 0) THEN + WRITE (*, '(//a5, 64a)') 'PDAF ',('-', i = 1, 64) + WRITE (*, '(a, 20x, a)') 'PDAF', '+++++ ASSIMILATION +++++' + WRITE (*, '(a5, 64a)') 'PDAF ', ('-', i = 1, 64) + ENDIF + + OnFilterPE: IF (filterpe) THEN + IF (subtype_filter == 4) THEN + CALL PDAF_lknetf_update(step_obs, dim_p, dim_obs, dim_ens, state, & + eofU, eofV, state_inc, U_init_dim_obs, & + U_obs_op, U_init_obs, U_init_obs_l, U_prodRinvA_l, U_init_n_domains_p, & + U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_callback, & + PDAFlocal_l2g_callback, U_g2l_obs, & + U_init_obsvar, U_init_obsvar_l, U_likelihood_l, & + U_prepoststep, screen, subtype_filter, incremental, type_forget, & + dim_lag, sens, cnt_maxlag, flag) + ELSE + CALL PDAF_lknetf_step_update(step_obs, dim_p, dim_obs, dim_ens, state, & + eofU, eofV, state_inc, U_init_dim_obs, & + U_obs_op, U_init_obs, U_init_obs_l, U_prodRinvA_hyb_l, U_init_n_domains_p, & + U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_callback, & + PDAFlocal_l2g_callback, U_g2l_obs, & + U_init_obsvar, U_init_obsvar_l, U_likelihood_l, U_likelihood_hyb_l, U_prepoststep, & + screen, subtype_filter, & + incremental, type_forget, dim_lag, sens, cnt_maxlag, flag) + END IF + END IF OnFilterPE + + + ! *********************************** + ! *** Set forecast counters/flags *** + ! *********************************** + initevol = 1 + member = 1 + step = step_obs + 1 + + END IF completeforecast + + +! ******************** +! *** finishing up *** +! ******************** + + outflag = flag + +END SUBROUTINE PDAFlocal_put_state_lknetf diff --git a/src/PDAFlocal_put_state_lknetf_si.F90 b/src/PDAFlocal_put_state_lknetf_si.F90 new file mode 100644 index 000000000..871180b16 --- /dev/null +++ b/src/PDAFlocal_put_state_lknetf_si.F90 @@ -0,0 +1,88 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_put_state_lknetf_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocal_put_state_lknetf_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model after the +! forecast of each ensemble state to transfer data +! from the model to PDAF. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! Variant for LKNETF with domain decomposition. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2018-07 - Lars Nerger - Initial code based on LETKF +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + obs_op_f_pdaf, & ! Full observation operator + init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + init_dim_obs_l_pdaf, & ! Initialize local dimimension of obs. vector + init_obs_f_pdaf, & ! Initialize full observation vector + init_obs_l_pdaf, & ! Initialize local observation vector + init_obsvar_pdaf, & ! Initialize mean observation error variance + init_obsvar_l_pdaf, & ! Initialize local mean observation error variance + g2l_obs_pdaf, & ! Restrict full obs. vector to local analysis domain + prodRinvA_l_pdaf, & ! Provide product R^-1 A on local analysis domain + prodRinvA_hyb_l_pdaf, & ! Provide product R^-1 A on local analysis domain with hybrid weight + likelihood_l_pdaf, & ! Compute observation likelihood for an ensemble member + likelihood_hyb_l_pdaf, & ! Compute observation likelihood for an ensemble member with hybrid weight + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector + PDAFlocal_l2g_callback ! Project local to global state vector +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocal_put_state_lknetf +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFlocal_put_state_lknetf(collect_state_pdaf, init_dim_obs_f_pdaf, & + obs_op_f_pdaf, init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_pdaf, & + prodRinvA_l_pdaf, prodRinvA_hyb_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & + init_dim_obs_l_pdaf, PDAFlocal_g2l_callback, & + PDAFlocal_l2g_callback, & + g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, likelihood_l_pdaf, & + likelihood_hyb_l_pdaf, outflag) + +END SUBROUTINE PDAFlocal_put_state_lknetf_si diff --git a/src/PDAFlocal_put_state_lnetf.F90 b/src/PDAFlocal_put_state_lnetf.F90 new file mode 100644 index 000000000..30745ad06 --- /dev/null +++ b/src/PDAFlocal_put_state_lnetf.F90 @@ -0,0 +1,203 @@ +! Copyright (c) 2014-2024 Paul Kirchgessner +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_put_state_lnetf --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocal_put_state_lnetf(U_collect_state, U_init_dim_obs, U_obs_op, & + U_init_obs_l, U_prepoststep, U_likelihood_l, U_init_n_domains_p, & + U_init_dim_l, U_init_dim_obs_l, U_g2l_obs, & + outflag) + +! !DESCRIPTION: +! Interface routine called from the model after the +! forecast of each ensemble state to transfer data +! from the model to PDAF. For the parallelization +! this involves transfer from model PEs to filter +! PEs.\\ +! During the forecast phase state vectors are +! re-initialized from the forecast model fields +! by U\_collect\_state. +! At the end of a forecast phase (i.e. when all +! ensemble members have been integrated by the model) +! sub-ensembles are gathered from the model tasks. +! Subsequently the filter update is performed. +! +! The code is very generic. Basically the only +! filter-specific part if the call to the +! update-routine PDAF\_X\_update where the analysis +! is computed. The filter-specific subroutines that +! are specified in the call to PDAF\_put\_state\_X +! are passed through to the update routine +! +! Variant for LNETF with domain decomposition. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2014-05 - Paul Kirchgessner - Initial code based on LETKF +! Later revisions - see svn log +! +! !USES: + USE PDAF_communicate_ens, & + ONLY: PDAF_gather_ens + USE PDAF_timer, & + ONLY: PDAF_timeit, PDAF_time_temp + USE PDAF_memcounting, & + ONLY: PDAF_memcount + USE PDAF_mod_filter, & + ONLY: dim_p, dim_obs, dim_ens, local_dim_ens, & + nsteps, step_obs, step, member, member_save, subtype_filter, & + type_forget, initevol, state, eofV, & + noise_type, pf_noise_amp, offline_mode, & + eofU, screen, flag, sens, dim_lag, cnt_maxlag + USE PDAF_mod_filtermpi, & + ONLY: mype_world, filterpe, dim_ens_l + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(out) :: outflag ! Status flag + +! ! External subroutines +! ! (PDAF-internal names, real names are defined in the call to PDAF) + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_likelihood_l, & ! Compute observation likelihood for an ensemble member + U_prepoststep ! User supplied pre/poststep routine + EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector + PDAFlocal_l2g_callback ! Project local to global state vector +! !CALLING SEQUENCE: +! Called by: model code +! Calls: U_collect_state +! Calls: PDAF_gather_ens +! Calls: PDAF_etkf_update +! Calls: PDAF_timeit +!EOP + +! local variables + INTEGER :: i ! Counter + + +! ************************************************** +! *** Save forecasted state back to the ensemble *** +! *** Only done on the filter Pes *** +! ************************************************** + + doevol: IF (nsteps > 0 ) THEN + + CALL PDAF_timeit(41, 'new') + + ! Store member index for PDAF_get_memberid + member_save = member + + ! Save evolved state in ensemble matrix + CALL U_collect_state(dim_p, eofV(1 : dim_p, member)) + + CALL PDAF_timeit(41, 'old') + + member = member + 1 + ELSE + member = local_dim_ens + 1 + END IF doevol + + +! ******************************************************** +! *** When forecast phase is completed *** +! *** - collect forecast sub_ensembles on filter PEs *** +! *** - perform analysis step *** +! *** - re-initialize forecast counters/flags *** +! ******************************************************** + completeforecast: IF (member == local_dim_ens + 1 & + .OR. offline_mode) THEN + + ! *********************************************** + ! *** Collect forecast ensemble on filter PEs *** + ! *********************************************** + + doevolB: IF (nsteps > 0) THEN + + IF (.not.filterpe) THEN + ! Non filter PEs only store a sub-ensemble + CALL PDAF_gather_ens(dim_p, dim_ens_l, eofV, screen) + ELSE + ! On filter PEs, the ensemble array has full size + CALL PDAF_gather_ens(dim_p, dim_ens, eofV, screen) + END IF + + END IF doevolB + + ! *** call timer + CALL PDAF_timeit(2, 'old') + + IF (.NOT.offline_mode .AND. mype_world == 0 .AND. screen > 1) THEN + WRITE (*, '(a, 5x, a, F10.3, 1x, a)') & + 'PDAF', '--- duration of forecast phase:', PDAF_time_temp(2), 's' + END IF + + + ! ************************************** + ! *** Perform analysis on filter PEs *** + ! ************************************** + + ! Screen output + IF (offline_mode .AND. mype_world == 0 .AND. screen > 0) THEN + WRITE (*, '(//a5, 64a)') 'PDAF ',('-', i = 1, 64) + WRITE (*, '(a, 20x, a)') 'PDAF', '+++++ ASSIMILATION +++++' + WRITE (*, '(a5, 64a)') 'PDAF ', ('-', i = 1, 64) + ENDIF + + OnFilterPE: IF (filterpe) THEN + + CALL PDAF_lnetf_update(step_obs, dim_p, dim_obs, dim_ens, & + state, eofU, eofV, type_forget, noise_type, pf_noise_amp, & + U_obs_op, U_init_dim_obs, U_init_obs_l, U_likelihood_l, & + U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_callback, & + PDAFlocal_l2g_callback, & + U_g2l_obs, U_prepoststep, screen, subtype_filter, & + dim_lag, sens, cnt_maxlag, flag) + + END IF OnFilterPE + + + ! *********************************** + ! *** Set forecast counters/flags *** + ! *********************************** + initevol = 1 + member = 1 + step = step_obs + 1 + + END IF completeforecast + + +! ******************** +! *** finishing up *** +! ******************** + + outflag = flag + +END SUBROUTINE PDAFlocal_put_state_lnetf diff --git a/src/PDAFlocal_put_state_lnetf_si.F90 b/src/PDAFlocal_put_state_lnetf_si.F90 new file mode 100644 index 000000000..981e668c9 --- /dev/null +++ b/src/PDAFlocal_put_state_lnetf_si.F90 @@ -0,0 +1,80 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_put_state_lnetf_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocal_put_state_lnetf_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model after the +! forecast of each ensemble state to transfer data +! from the model to PDAF. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! Variant for LNETF with domain decomposition. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2016-11 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + obs_op_f_pdaf, & ! Full observation operator + init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + init_dim_obs_l_pdaf, & ! Initialize local dimimension of obs. vector + init_obs_l_pdaf, & ! Initialize local observation vector + g2l_obs_pdaf, & ! Restrict full obs. vector to local analysis domain + likelihood_l_pdaf, & ! Compute observation likelihood for an ensemble member + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector + PDAFlocal_l2g_callback ! Project local to global state vector +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocal_put_state_lnetf +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFlocal_put_state_lnetf(collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & + init_obs_l_pdaf, prepoststep_pdaf, likelihood_l_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, PDAFlocal_g2l_callback, & + PDAFlocal_l2g_callback, & + g2l_obs_pdaf, outflag) + +END SUBROUTINE PDAFlocal_put_state_lnetf_si diff --git a/src/PDAFlocal_put_state_lseik.F90 b/src/PDAFlocal_put_state_lseik.F90 new file mode 100644 index 000000000..acd6ac3dc --- /dev/null +++ b/src/PDAFlocal_put_state_lseik.F90 @@ -0,0 +1,213 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! The code is very generic. Basically the only +! filter-specific part if the call to the +! update-routine PDAF\_X\_update where the analysis +! is computed. The filter-specific subroutines that +! are specified in the call to PDAF\_put\_state\_X +! are passed through to the update routine +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_put_state_lseik --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocal_put_state_lseik(U_collect_state, U_init_dim_obs, U_obs_op, & + U_init_obs, U_init_obs_l, U_prepoststep, U_prodRinvA_l, U_init_n_domains_p, & + U_init_dim_l, U_init_dim_obs_l, U_g2l_obs, & + U_init_obsvar, U_init_obsvar_l, outflag) + +! !DESCRIPTION: +! Interface routine called from the model after the +! forecast of each ensemble state to transfer data +! from the model to PDAF. For the parallelization +! this involves transfer from model PEs to filter +! PEs.\\ +! During the forecast phase state vectors are +! re-initialized from the forecast model fields +! by U\_collect\_state. +! At the end of a forecast phase (i.e. when all +! ensemble members have been integrated by the model) +! sub-ensembles are gathered from the model tasks. +! Subsequently the filter update is performed. +! +! Variant for LSEIK with domain decomposition. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2003-09 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_communicate_ens, & + ONLY: PDAF_gather_ens + USE PDAF_timer, & + ONLY: PDAF_timeit, PDAF_time_temp + USE PDAF_mod_filter, & + ONLY: dim_p, dim_obs, dim_ens, rank, local_dim_ens, & + nsteps, step_obs, step, member, member_save, subtype_filter, & + type_forget, incremental, initevol, state, eofV, eofU, & + state_inc, screen, flag, type_sqrt, offline_mode + USE PDAF_mod_filtermpi, & + ONLY: mype_world, filterpe, dim_ens_l, modelpe, filter_no_model + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(out) :: outflag ! Status flag + +! ! External subroutines +! ! (PDAF-internal names, real names are defined in the call to PDAF) + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain + U_prepoststep ! User supplied pre/poststep routine + EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector + PDAFlocal_l2g_callback ! Project local to global state vector +! !CALLING SEQUENCE: +! Called by: model code +! Calls: U_collect_state +! Calls: PDAF_gather_ens +! Calls: PDAF_lseik_update +! Calls: PDAF_timeit +!EOP + +! local variables + INTEGER :: i ! Counter + + +! ************************************************** +! *** Save forecast state back to the ensemble *** +! *** Only done on the filter Pes *** +! ************************************************** + + doevol: IF (nsteps > 0) THEN + + CALL PDAF_timeit(41, 'new') + + modelpes: IF (modelpe) THEN + + ! Store member index for PDAF_get_memberid + member_save = member + + IF (subtype_filter /= 2 .AND. subtype_filter /= 3) THEN + ! Save evolved state in ensemble matrix + CALL U_collect_state(dim_p, eofV(1 : dim_p, member)) + ELSE + ! Save evolved ensemble mean state + CALL U_collect_state(dim_p, state(1 : dim_p)) + END IF + END IF modelpes + + CALL PDAF_timeit(41, 'old') + + member = member + 1 + ELSE + member = local_dim_ens + 1 + END IF doevol + + IF (filter_no_model .AND. filterpe) THEN + member = local_dim_ens + 1 + END IF + + +! ******************************************************** +! *** When forecast phase is completed *** +! *** - collect forecast sub_ensembles on filter PEs *** +! *** - perform analysis step *** +! *** - re-initialize forecast counters/flags *** +! ******************************************************** + completeforecast: IF (member == local_dim_ens + 1 & + .OR. offline_mode) THEN + + ! *********************************************** + ! *** Collect forecast ensemble on filter PEs *** + ! *********************************************** + + doevolB: IF (nsteps > 0) THEN + + IF (.NOT.filterpe) THEN + ! Non filter PEs only store a sub-ensemble + CALL PDAF_gather_ens(dim_p, dim_ens_l, eofV, screen) + ELSE + ! On filter PEs, the ensemble array has full size + CALL PDAF_gather_ens(dim_p, dim_ens, eofV, screen) + END IF + + END IF doevolB + + ! *** call timer + CALL PDAF_timeit(2, 'old') + + IF (.NOT.offline_mode .AND. mype_world == 0 .AND. screen > 1) THEN + WRITE (*, '(a, 5x, a, F10.3, 1x, a)') & + 'PDAF', '--- duration of forecast phase:', PDAF_time_temp(2), 's' + END IF + + + ! ************************************** + ! *** Perform analysis on filter PEs *** + ! ************************************** + + ! Screen output + IF (offline_mode .AND. mype_world == 0 .AND. screen > 0) THEN + WRITE (*, '(//a5, 64a)') 'PDAF ',('-', i = 1, 64) + WRITE (*, '(a, 20x, a)') 'PDAF', '+++++ ASSIMILATION +++++' + WRITE (*, '(a5, 64a)') 'PDAF ', ('-', i = 1, 64) + ENDIF + + OnFilterPE: IF (filterpe) THEN + CALL PDAF_lseik_update(step_obs, dim_p, dim_obs, dim_ens, rank, state, & + eofU, eofV, state_inc, U_init_dim_obs, & + U_obs_op, U_init_obs, U_init_obs_l, U_prodRinvA_l, U_init_n_domains_p, & + U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_callback, & + PDAFlocal_l2g_callback, U_g2l_obs, & + U_init_obsvar, U_init_obsvar_l, U_prepoststep, screen, subtype_filter, & + incremental, type_forget, type_sqrt, flag) + END IF OnFilterPE + + + ! *********************************** + ! *** Set forecast counters/flags *** + ! *********************************** + initevol = 1 + member = 1 + step = step_obs + 1 + + END IF completeforecast + + +! ******************** +! *** finishing up *** +! ******************** + + outflag = flag + +END SUBROUTINE PDAFlocal_put_state_lseik diff --git a/src/PDAFlocal_put_state_lseik_si.F90 b/src/PDAFlocal_put_state_lseik_si.F90 new file mode 100644 index 000000000..59456f558 --- /dev/null +++ b/src/PDAFlocal_put_state_lseik_si.F90 @@ -0,0 +1,84 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_put_state_lseik_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocal_put_state_lseik_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model after the +! forecast of each ensemble state to transfer data +! from the model to PDAF. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! Variant for LSEIK with domain decomposition. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2010-07 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + obs_op_f_pdaf, & ! Full observation operator + init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + init_dim_obs_l_pdaf, & ! Initialize local dimimension of obs. vector + init_obs_f_pdaf, & ! Initialize full observation vector + init_obs_l_pdaf, & ! Initialize local observation vector + init_obsvar_pdaf, & ! Initialize mean observation error variance + init_obsvar_l_pdaf, & ! Initialize local mean observation error variance + g2l_obs_pdaf, & ! Restrict full obs. vector to local analysis domain + prodRinvA_l_pdaf, & ! Provide product R^-1 A on local analysis domain + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector + PDAFlocal_l2g_callback ! Project local to global state vector +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocal_put_state_lseik +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFlocal_put_state_lseik(collect_state_pdaf, init_dim_obs_f_pdaf, & + obs_op_f_pdaf, init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_pdaf, & + prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & + init_dim_obs_l_pdaf, PDAFlocal_g2l_callback, & + PDAFlocal_l2g_callback, & + g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, outflag) + +END SUBROUTINE PDAFlocal_put_state_lseik_si diff --git a/src/PDAFlocalomi_assimilate_en3dvar_lestkf.F90 b/src/PDAFlocalomi_assimilate_en3dvar_lestkf.F90 new file mode 100644 index 000000000..9278d3cbe --- /dev/null +++ b/src/PDAFlocalomi_assimilate_en3dvar_lestkf.F90 @@ -0,0 +1,117 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocalomi_assimilate_en3dvar_lestkf --- Interface to PDAF for En3D-Var/LESTKF +! +! !INTERFACE: +SUBROUTINE PDAFlocalomi_assimilate_en3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, & + init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & + prepoststep_pdaf, next_observation_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2021-04 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix + obs_op_lin_pdaf, & ! Linearized observation operator + obs_op_adj_pdaf ! Adjoint observation operator + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + obs_op_f_pdaf, & ! Full observation operator + init_dim_obs_l_pdaf ! Initialize local dimimension of obs. vector + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_prodRinvA_cb, & ! Provide product R^-1 A + PDAFomi_g2l_obs_cb, & ! Restrict full obs. vector to local analysis domain + PDAFomi_prodRinvA_l_cb, & ! Provide product R^-1 A on local analysis domain + PDAFomi_likelihood_l_cb ! Compute likelihood and apply localization + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_en3dvar_lestkf -- START' + + IF (TRIM(filterstr) == '3DVAR') THEN + CALL PDAF_assimilate_en3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_prodRinvA_cb, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + PDAFomi_prodRinvA_l_cb, init_n_domains_pdaf, init_dim_l_pdaf, & + init_dim_obs_l_pdaf, PDAFomi_g2l_obs_cb, & + PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & + prepoststep_pdaf, next_observation_pdaf, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: No valid filter type for PDAFlocalomi_assimilate_3dvar' + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_en3dvar_lestkf -- END' + +END SUBROUTINE PDAFlocalomi_assimilate_en3dvar_lestkf diff --git a/src/PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.F90 b/src/PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.F90 new file mode 100644 index 000000000..648ec54b6 --- /dev/null +++ b/src/PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.F90 @@ -0,0 +1,117 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR --- Interface to PDAF for En3D-Var/LESTKF +! +! !INTERFACE: +SUBROUTINE PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prodRinvA_pdafomi, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & + prodRinvA_l_pdafomi, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & + prepoststep_pdaf, next_observation_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf ! Apply adjoint control vector transform matrix + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf ! Init state dimension for local ana. domain + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector + obs_op_pdafomi, & ! Full observation operator + obs_op_lin_pdafomi, & ! Linearized observation operator + obs_op_adj_pdafomi, & ! Adjoint observation operator + init_dim_obs_l_pdafomi, & ! Initialize local dimimension of obs. vector + prodRinvA_pdafomi, & ! Provide product R^-1 A + prodRinvA_l_pdafomi ! Provide product R^-1 A with localization + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_g2l_obs_cb ! Restrict full obs. vector to local analysis domain + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR -- START' + + IF (TRIM(filterstr) == '3DVAR') THEN + CALL PDAF_assimilate_en3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, prodRinvA_pdafomi, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + prodRinvA_l_pdafomi, init_n_domains_pdaf, init_dim_l_pdaf, & + init_dim_obs_l_pdafomi, PDAFomi_g2l_obs_cb, & + PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & + prepoststep_pdaf, next_observation_pdaf, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: No valid filter type for PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR' + outflag = 200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR -- END' + +END SUBROUTINE PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR diff --git a/src/PDAFlocalomi_assimilate_hyb3dvar_lestkf.F90 b/src/PDAFlocalomi_assimilate_hyb3dvar_lestkf.F90 new file mode 100644 index 000000000..b6bee5cf9 --- /dev/null +++ b/src/PDAFlocalomi_assimilate_hyb3dvar_lestkf.F90 @@ -0,0 +1,120 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocalomi_assimilate_hyb3dvar_lestkf --- Interface to PDAF for Hyb3D-Var/LESTKF +! +! !INTERFACE: +SUBROUTINE PDAFlocalomi_assimilate_hyb3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, & + init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & + prepoststep_pdaf, next_observation_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2021-04 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix + cvt_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_pdaf, & ! Apply adjoint control vector transform matrix + obs_op_lin_pdaf, & ! Linearized observation operator + obs_op_adj_pdaf ! Adjoint observation operator + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + obs_op_f_pdaf, & ! Full observation operator + init_dim_obs_l_pdaf ! Initialize local dimimension of obs. vector + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_prodRinvA_cb, & ! Provide product R^-1 A + PDAFomi_g2l_obs_cb, & ! Restrict full obs. vector to local analysis domain + PDAFomi_prodRinvA_l_cb, & ! Provide product R^-1 A on local analysis domain + PDAFomi_likelihood_l_cb ! Compute likelihood and apply localization + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_hyb3dvar_lestkf -- START' + + IF (TRIM(filterstr) == '3DVAR') THEN + CALL PDAF_assimilate_hyb3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, & + PDAFomi_prodRinvA_cb, cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, & + obs_op_lin_pdaf, obs_op_adj_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + PDAFomi_prodRinvA_l_cb, init_n_domains_pdaf, init_dim_l_pdaf, & + init_dim_obs_l_pdaf, PDAFomi_g2l_obs_cb, & + PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & + prepoststep_pdaf, next_observation_pdaf, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: No valid filter type for PDAFlocalomi_assimilate_3dvar' + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_hyb3dvar_lestkf -- END' + +END SUBROUTINE PDAFlocalomi_assimilate_hyb3dvar_lestkf diff --git a/src/PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 b/src/PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 new file mode 100644 index 000000000..6b9e7a793 --- /dev/null +++ b/src/PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 @@ -0,0 +1,121 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR --- Interface to PDAF for Hyb3D-Var/LESTKF +! +! !INTERFACE: +SUBROUTINE PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prodRinvA_pdafomi, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & + prodRinvA_l_pdafomi, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & + prepoststep_pdaf, next_observation_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix + cvt_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_pdaf ! Apply adjoint control vector transform matrix + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf ! Init state dimension for local ana. domain + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector + obs_op_pdafomi, & ! Full observation operator + obs_op_lin_pdafomi, & ! Linearized observation operator + obs_op_adj_pdafomi, & ! Adjoint observation operator + init_dim_obs_l_pdafomi, & ! Initialize local dimimension of obs. vector + prodRinvA_pdafomi, & ! Provide product R^-1 A + prodRinvA_l_pdafomi ! Provide product R^-1 A + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_prodRinvA_cb, & ! Provide product R^-1 A + PDAFomi_g2l_obs_cb ! Restrict full obs. vector to local analysis domain + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR -- START' + + IF (TRIM(filterstr) == '3DVAR') THEN + CALL PDAF_assimilate_hyb3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, & + prodRinvA_pdafomi, cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, & + obs_op_lin_pdafomi, obs_op_adj_pdafomi, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + prodRinvA_l_pdafomi, init_n_domains_pdaf, init_dim_l_pdaf, & + init_dim_obs_l_pdafomi, PDAFomi_g2l_obs_cb, & + PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & + prepoststep_pdaf, next_observation_pdaf, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: No valid filter type for PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR' + outflag = 200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR -- END' + +END SUBROUTINE PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR diff --git a/src/PDAFlocalomi_assimilate_lknetf_nondiagR.F90 b/src/PDAFlocalomi_assimilate_lknetf_nondiagR.F90 new file mode 100644 index 000000000..23e6a4f2d --- /dev/null +++ b/src/PDAFlocalomi_assimilate_lknetf_nondiagR.F90 @@ -0,0 +1,115 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocalomi_assimilate_lknetf_nondiagR --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocalomi_assimilate_lknetf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, prodRinvA_hyb_l_pdafomi, & + likelihood_l_pdafomi, likelihood_hyb_l_pdafomi, & + next_observation_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf ! Init state dimension for local ana. domain + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector + obs_op_pdafomi, & ! Full observation operator + init_dim_obs_l_pdafomi, & ! Initialize local dimimension of obs. vector + prodRinvA_l_pdafomi, & ! Provide product R^-1 A on local analysis domain + likelihood_l_pdafomi, & ! Compute likelihood and apply localization + prodRinvA_hyb_l_pdafomi, & ! Product R^-1 A on local analysis domain with hybrid weight + likelihood_hyb_l_pdafomi ! Compute likelihood and apply localization with tempering + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize full observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_g2l_obs_cb ! Restrict full obs. vector to local analysis domain + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_lknetf_nondiagR -- START' + + IF (TRIM(filterstr) == 'LKNETF') THEN + CALL PDAF_assimilate_lknetf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, & + PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, prepoststep_pdaf, & + prodRinvA_l_pdafomi, prodRinvA_hyb_l_pdafomi, & + init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & + PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, & + PDAFomi_init_obsvar_l_cb, likelihood_l_pdafomi, likelihood_hyb_l_pdafomi, & + next_observation_pdaf, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: Invalid filter choice for PDAFlocalomi_assimilate_lknetf_nondiagR' + outflag=200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_lknetf_nondiagR -- END' + +END SUBROUTINE PDAFlocalomi_assimilate_lknetf_nondiagR diff --git a/src/PDAFlocalomi_assimilate_lknetf_nondiagR_si.F90 b/src/PDAFlocalomi_assimilate_lknetf_nondiagR_si.F90 new file mode 100644 index 000000000..d548e6054 --- /dev/null +++ b/src/PDAFlocalomi_assimilate_lknetf_nondiagR_si.F90 @@ -0,0 +1,84 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocalomi_assimilate_lknetf_nondiagR_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocalomi_assimilate_lknetf_nondiagR_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf ! Init state dimension for local ana. domain + EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain + obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain + init_dim_obs_l_pdafomi, & ! Get dimension of obs. vector for local analysis domain + prodRinvA_l_pdafomi, & ! Provide product R^-1 A on local analysis domain + prodRinvA_hyb_l_pdafomi, & ! Provide product R^-1 A on local analysis domain with hybrid weight + likelihood_l_pdafomi, & ! Compute observation likelihood for an ensemble member + likelihood_hyb_l_pdafomi ! Compute observation likelihood for an ensemble member with hybrid weight + + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocalomi_assimilate_lknetf_nondiagR +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFlocalomi_assimilate_lknetf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, prodRinvA_hyb_l_pdafomi, & + likelihood_l_pdafomi, likelihood_hyb_l_pdafomi, & + next_observation_pdaf, outflag) + +END SUBROUTINE PDAFlocalomi_assimilate_lknetf_nondiagR_si diff --git a/src/PDAFlocalomi_assimilate_lnetf_nondiagR.F90 b/src/PDAFlocalomi_assimilate_lnetf_nondiagR.F90 new file mode 100644 index 000000000..007758256 --- /dev/null +++ b/src/PDAFlocalomi_assimilate_lnetf_nondiagR.F90 @@ -0,0 +1,108 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocalomi_assimilate_lnetf_nondiagR --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocalomi_assimilate_lnetf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, likelihood_l_pdafomi, & + next_observation_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf ! Init state dimension for local ana. domain + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector + obs_op_pdafomi, & ! Full observation operator + init_dim_obs_l_pdafomi, & ! Initialize local dimimension of obs. vector + likelihood_l_pdafomi ! Compute likelihood and apply localization + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize full observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_g2l_obs_cb ! Restrict full obs. vector to local analysis domain + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_lnetf_nondiagR -- START' + + IF (TRIM(filterstr) == 'LNETF') THEN + CALL PDAF_assimilate_lnetf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_l_cb, & + prepoststep_pdaf, likelihood_l_pdafomi, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, & + PDAFomi_g2l_obs_cb, next_observation_pdaf, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: Invalid filter choice for PDAFlocalomi_assimilate_lnetf_nondiagR' + outflag=200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_lnetf_nondiagR -- END' + +END SUBROUTINE PDAFlocalomi_assimilate_lnetf_nondiagR diff --git a/src/PDAFlocalomi_assimilate_lnetf_nondiagR_si.F90 b/src/PDAFlocalomi_assimilate_lnetf_nondiagR_si.F90 new file mode 100644 index 000000000..b868ef0e1 --- /dev/null +++ b/src/PDAFlocalomi_assimilate_lnetf_nondiagR_si.F90 @@ -0,0 +1,81 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocalomi_assimilate_lnetf_nondiagR_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocalomi_assimilate_lnetf_nondiagR_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf ! Init state dimension for local ana. domain + EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain + obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain + init_dim_obs_l_pdafomi, & ! Get dimension of obs. vector for local analysis domain + likelihood_l_pdafomi ! Compute likelihood and apply localization + + + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocalomi_assimilate_lnetf_nondiagR +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFlocalomi_assimilate_lnetf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, likelihood_l_pdafomi, & + next_observation_pdaf, outflag) + +END SUBROUTINE PDAFlocalomi_assimilate_lnetf_nondiagR_si diff --git a/src/PDAFlocalomi_assimilate_local.F90 b/src/PDAFlocalomi_assimilate_local.F90 new file mode 100644 index 000000000..872f974ff --- /dev/null +++ b/src/PDAFlocalomi_assimilate_local.F90 @@ -0,0 +1,138 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocalomi_assimilate_local --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocalomi_assimilate_local(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, & + next_observation_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2020-11 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + obs_op_f_pdaf, & ! Full observation operator + init_dim_obs_l_pdaf ! Initialize local dimimension of obs. vector + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize full observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_g2l_obs_cb, & ! Restrict full obs. vector to local analysis domain + PDAFomi_prodRinvA_l_cb, & ! Provide product R^-1 A on local analysis domain + PDAFomi_likelihood_l_cb ! Compute likelihood and apply localization + EXTERNAL :: PDAFomi_prodRinvA_hyb_l_cb, & ! Product R^-1 A on local analysis domain with hybrid weight + PDAFomi_likelihood_hyb_l_cb ! Compute likelihood and apply localization with tempering + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_local -- START' + + IF (TRIM(filterstr) == 'LSEIK') THEN + CALL PDAF_assimilate_lseik(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + prepoststep_pdaf, PDAFomi_prodRinvA_l_cb, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, & + PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & + next_observation_pdaf, outflag) + ELSE IF (TRIM(filterstr) == 'LETKF') THEN + CALL PDAF_assimilate_letkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + prepoststep_pdaf, PDAFomi_prodRinvA_l_cb, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, & + PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & + next_observation_pdaf, outflag) + ELSE IF (TRIM(filterstr) == 'LESTKF') THEN + CALL PDAF_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + prepoststep_pdaf, PDAFomi_prodRinvA_l_cb, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, & + PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & + next_observation_pdaf, outflag) + ELSE IF (TRIM(filterstr) == 'LNETF') THEN + CALL PDAF_assimilate_lnetf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_l_cb, & + prepoststep_pdaf, PDAFomi_likelihood_l_cb, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, & + PDAFomi_g2l_obs_cb, next_observation_pdaf, outflag) + ELSE IF (TRIM(filterstr) == 'LKNETF') THEN + CALL PDAF_assimilate_lknetf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, & + PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, prepoststep_pdaf, & + PDAFomi_prodRinvA_l_cb, PDAFomi_prodRinvA_hyb_l_cb, & + init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & + PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, & + PDAFomi_init_obsvar_l_cb, PDAFomi_likelihood_l_cb, PDAFomi_likelihood_hyb_l_cb, & + next_observation_pdaf, outflag) + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_local -- END' + +END SUBROUTINE PDAFlocalomi_assimilate_local diff --git a/src/PDAFlocalomi_assimilate_local_nondiagR.F90 b/src/PDAFlocalomi_assimilate_local_nondiagR.F90 new file mode 100644 index 000000000..1d8b52109 --- /dev/null +++ b/src/PDAFlocalomi_assimilate_local_nondiagR.F90 @@ -0,0 +1,129 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocalomi_assimilate_local_nondiagR --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocalomi_assimilate_local_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, & + next_observation_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-07 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf ! Init state dimension for local ana. domain + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector + obs_op_pdafomi, & ! Full observation operator + init_dim_obs_l_pdafomi, & ! Initialize local dimimension of obs. vector + prodRinvA_l_pdafomi ! Provide product of inverse of R with matrix A + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize full observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_g2l_obs_cb ! Restrict full obs. vector to local analysis domain + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_local_nondiagR -- START' + + IF (TRIM(filterstr) == 'LSEIK') THEN + CALL PDAF_assimilate_lseik(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + prepoststep_pdaf, prodRinvA_l_pdafomi, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, & + PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & + next_observation_pdaf, outflag) + ELSE IF (TRIM(filterstr) == 'LETKF') THEN + CALL PDAF_assimilate_letkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + prepoststep_pdaf, prodRinvA_l_pdafomi, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, & + PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & + next_observation_pdaf, outflag) + ELSE IF (TRIM(filterstr) == 'LESTKF') THEN + CALL PDAF_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + prepoststep_pdaf, prodRinvA_l_pdafomi, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, & + PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & + next_observation_pdaf, outflag) + ELSE IF (TRIM(filterstr) == 'LNETF') THEN + WRITE (*,*) 'PDAF-ERROR: Use PDAFlocalomi_assimilate_lnetf_nondiagR for LNETF' + outflag=200 + ELSE IF (TRIM(filterstr) == 'LKNETF') THEN + WRITE (*,*) 'PDAF-ERROR: Use PDAFlocalomi_assimilate_lknetf_nondiagR for LKNETF' + outflag=200 + ELSE + WRITE (*,*) 'PDAF-ERROR: Invalid filter choice for PDAFlocalomi_assimilate_local_nondiagR' + outflag=200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_local_nondiagR -- END' + +END SUBROUTINE PDAFlocalomi_assimilate_local_nondiagR diff --git a/src/PDAFlocalomi_assimilate_local_nondiagR_si.F90 b/src/PDAFlocalomi_assimilate_local_nondiagR_si.F90 new file mode 100644 index 000000000..88b6c542a --- /dev/null +++ b/src/PDAFlocalomi_assimilate_local_nondiagR_si.F90 @@ -0,0 +1,80 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocalomi_assimilate_local_nondiagR_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocalomi_assimilate_local_nondiagR_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-07 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf ! Init state dimension for local ana. domain + EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain + obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain + init_dim_obs_l_pdafomi, & ! Get dimension of obs. vector for local analysis domain + prodRinvA_l_pdafomi ! Provide product of inverse of R with matrix A + + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocalomi_assimilate_local_nondiagR +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFlocalomi_assimilate_local_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, & + next_observation_pdaf, outflag) + +END SUBROUTINE PDAFlocalomi_assimilate_local_nondiagR_si diff --git a/src/PDAFlocalomi_assimilate_local_si.F90 b/src/PDAFlocalomi_assimilate_local_si.F90 new file mode 100644 index 000000000..768a16aa4 --- /dev/null +++ b/src/PDAFlocalomi_assimilate_local_si.F90 @@ -0,0 +1,80 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocalomi_assimilate_local_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocalomi_assimilate_local_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2021-10 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf ! Init state dimension for local ana. domain + EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain + obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain + init_dim_obs_l_pdafomi, & ! Get dimension of obs. vector for local analysis domain + localize_covar_pdafomi ! Apply localization to covariance matrix in LEnKF + + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocalomi_assimilate_local +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFlocalomi_assimilate_local(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, & + next_observation_pdaf, outflag) + +END SUBROUTINE PDAFlocalomi_assimilate_local_si diff --git a/src/PDAFlocalomi_put_state_en3dvar_lestkf.F90 b/src/PDAFlocalomi_put_state_en3dvar_lestkf.F90 new file mode 100644 index 000000000..07883a7c6 --- /dev/null +++ b/src/PDAFlocalomi_put_state_en3dvar_lestkf.F90 @@ -0,0 +1,108 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocalomi_put_state_en3dvar_lestkf --- Interface to PDAF for En3D-Var/LESTKF +! +! !INTERFACE: +SUBROUTINE PDAFlocalomi_put_state_en3dvar_lestkf(collect_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, & + init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & + prepoststep_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2021-04 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix + obs_op_lin_pdaf, & ! Linearized observation operator + obs_op_adj_pdaf ! Adjoint observation operator + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + obs_op_f_pdaf, & ! Full observation operator + init_dim_obs_l_pdaf ! Initialize local dimimension of obs. vector + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_prodRinvA_cb, & ! Provide product R^-1 A + PDAFomi_g2l_obs_cb, & ! Restrict full obs. vector to local analysis domain + PDAFomi_prodRinvA_l_cb, & ! Provide product R^-1 A on local analysis domain + PDAFomi_likelihood_l_cb ! Compute likelihood and apply localization + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (TRIM(filterstr) == '3DVAR') THEN + CALL PDAFlocal_put_state_en3dvar_lestkf(collect_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_prodRinvA_cb, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + PDAFomi_prodRinvA_l_cb, init_n_domains_pdaf, init_dim_l_pdaf, & + init_dim_obs_l_pdaf, PDAFomi_g2l_obs_cb, & + PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, prepoststep_pdaf, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: No valid filter type for PDAFlocalomi_put_state_3dvar' + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + +END SUBROUTINE PDAFlocalomi_put_state_en3dvar_lestkf diff --git a/src/PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR.F90 b/src/PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR.F90 new file mode 100644 index 000000000..73bd74d5e --- /dev/null +++ b/src/PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR.F90 @@ -0,0 +1,115 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR --- Interface to PDAF for En3D-Var/LESTKF +! +! !INTERFACE: +SUBROUTINE PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prodRinvA_pdafomi, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & + prodRinvA_l_pdafomi, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & + prepoststep_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf ! Apply adjoint control vector transform matrix + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + l2g_state_pdaf ! Init full state from local state + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector + obs_op_pdafomi, & ! Full observation operator + obs_op_lin_pdafomi, & ! Linearized observation operator + obs_op_adj_pdafomi, & ! Adjoint observation operator + init_dim_obs_l_pdafomi, & ! Initialize local dimimension of obs. vector + prodRinvA_pdafomi, & ! Provide product R^-1 A + prodRinvA_l_pdafomi ! Provide product R^-1 A + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_g2l_obs_cb ! Restrict full obs. vector to local analysis domain + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR -- START' + + IF (TRIM(filterstr) == '3DVAR') THEN + CALL PDAFlocal_put_state_en3dvar_lestkf(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, prodRinvA_pdafomi, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + prodRinvA_l_pdafomi, init_n_domains_pdaf, init_dim_l_pdaf, & + init_dim_obs_l_pdafomi, PDAFomi_g2l_obs_cb, & + PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, prepoststep_pdaf, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: No valid filter type for PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR' + outflag = 200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR -- END' + +END SUBROUTINE PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR diff --git a/src/PDAFlocalomi_put_state_hyb3dvar_lestkf.F90 b/src/PDAFlocalomi_put_state_hyb3dvar_lestkf.F90 new file mode 100644 index 000000000..fe9978600 --- /dev/null +++ b/src/PDAFlocalomi_put_state_hyb3dvar_lestkf.F90 @@ -0,0 +1,110 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocalomi_put_state_hyb3dvar_lestkf --- Interface to PDAF for Hyb3D-Var/LESTKF +! +! !INTERFACE: +SUBROUTINE PDAFlocalomi_put_state_hyb3dvar_lestkf(collect_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, & + init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & + prepoststep_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2021-04 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix + cvt_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_pdaf, & ! Apply adjoint control vector transform matrix + obs_op_lin_pdaf, & ! Linearized observation operator + obs_op_adj_pdaf ! Adjoint observation operator + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + obs_op_f_pdaf, & ! Full observation operator + init_dim_obs_l_pdaf ! Initialize local dimimension of obs. vector + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_prodRinvA_cb, & ! Provide product R^-1 A + PDAFomi_g2l_obs_cb, & ! Restrict full obs. vector to local analysis domain + PDAFomi_prodRinvA_l_cb, & ! Provide product R^-1 A on local analysis domain + PDAFomi_likelihood_l_cb ! Compute likelihood and apply localization + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (TRIM(filterstr) == '3DVAR') THEN + CALL PDAFlocal_put_state_hyb3dvar_lestkf(collect_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_prodRinvA_cb, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + PDAFomi_prodRinvA_l_cb, init_n_domains_pdaf, init_dim_l_pdaf, & + init_dim_obs_l_pdaf, PDAFomi_g2l_obs_cb, & + PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, prepoststep_pdaf, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: No valid filter type for PDAFlocalomi_put_state_3dvar' + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + +END SUBROUTINE PDAFlocalomi_put_state_hyb3dvar_lestkf diff --git a/src/PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR.F90 b/src/PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR.F90 new file mode 100644 index 000000000..96020f7f8 --- /dev/null +++ b/src/PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR.F90 @@ -0,0 +1,119 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR --- Interface to PDAF for Hyb3D-Var/LESTKF +! +! !INTERFACE: +SUBROUTINE PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prodRinvA_pdafomi, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, & + obs_op_lin_pdafomi, obs_op_adj_pdafomi, & + prodRinvA_l_pdafomi, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & + prepoststep_pdaf, outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all global filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix + cvt_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_pdaf ! Apply adjoint control vector transform matrix + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + l2g_state_pdaf ! Init full state from local state + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector + obs_op_pdafomi, & ! Full observation operator + obs_op_lin_pdafomi, & ! Linearized observation operator + obs_op_adj_pdafomi, & ! Adjoint observation operator + init_dim_obs_l_pdafomi, & ! Initialize local dimimension of obs. vector + prodRinvA_pdafomi, & ! Provide product R^-1 A + prodRinvA_l_pdafomi ! Provide product R^-1 A + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_prodRinvA_cb, & ! Provide product R^-1 A + PDAFomi_g2l_obs_cb ! Restrict full obs. vector to local analysis domain + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR -- START' + + IF (TRIM(filterstr) == '3DVAR') THEN + CALL PDAFlocal_put_state_hyb3dvar_lestkf(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, prodRinvA_pdafomi, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & + init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & + prodRinvA_l_pdafomi, init_n_domains_pdaf, init_dim_l_pdaf, & + init_dim_obs_l_pdafomi, PDAFomi_g2l_obs_cb, & + PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, prepoststep_pdaf, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: No valid filter type for PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR' + outflag = 200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR -- END' + +END SUBROUTINE PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR diff --git a/src/PDAFlocalomi_put_state_lknetf_nondiagR.F90 b/src/PDAFlocalomi_put_state_lknetf_nondiagR.F90 new file mode 100644 index 000000000..ccd9e169d --- /dev/null +++ b/src/PDAFlocalomi_put_state_lknetf_nondiagR.F90 @@ -0,0 +1,113 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocalomi_put_state_lknetf_nondiagR --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocalomi_put_state_lknetf_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, prodRinvA_hyb_l_pdafomi, & + likelihood_l_pdafomi, likelihood_hyb_l_pdafomi, & + outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + l2g_state_pdaf ! Init full state from local state + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector + obs_op_pdafomi, & ! Full observation operator + init_dim_obs_l_pdafomi, & ! Initialize local dimimension of obs. vector + prodRinvA_l_pdafomi, & ! Provide product R^-1 A on local analysis domain + likelihood_l_pdafomi, & ! Compute likelihood and apply localization + prodRinvA_hyb_l_pdafomi, & ! Product R^-1 A on local analysis domain with hybrid weight + likelihood_hyb_l_pdafomi ! Compute likelihood and apply localization with tempering + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize full observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_g2l_obs_cb ! Restrict full obs. vector to local analysis domain + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_put_state_lknetf_nondiagR -- START' + + IF (TRIM(filterstr) == 'LKNETF') THEN + CALL PDAFlocal_put_state_lknetf(collect_state_pdaf, init_dim_obs_pdafomi, obs_op_pdafomi, & + PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, prepoststep_pdaf, & + prodRinvA_l_pdafomi, prodRinvA_hyb_l_pdafomi, & + init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & + PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, & + PDAFomi_init_obsvar_l_cb, likelihood_l_pdafomi, likelihood_hyb_l_pdafomi, & + outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: Invalid filter choice for PDAFlocalomi_put_state_lknetf_nondiagR' + outflag=200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_put_state_lknetf_nondiagR -- END' + +END SUBROUTINE PDAFlocalomi_put_state_lknetf_nondiagR diff --git a/src/PDAFlocalomi_put_state_lknetf_nondiagR_si.F90 b/src/PDAFlocalomi_put_state_lknetf_nondiagR_si.F90 new file mode 100644 index 000000000..f694309a7 --- /dev/null +++ b/src/PDAFlocalomi_put_state_lknetf_nondiagR_si.F90 @@ -0,0 +1,83 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocalomi_put_state_lknetf_nondiagR_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocalomi_put_state_lknetf_nondiagR_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + l2g_state_pdaf ! Init full state from local state + EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain + obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain + init_dim_obs_l_pdafomi, & ! Get dimension of obs. vector for local analysis domain + prodRinvA_l_pdafomi, & ! Provide product R^-1 A on local analysis domain + prodRinvA_hyb_l_pdafomi, & ! Provide product R^-1 A on local analysis domain with hybrid weight + likelihood_l_pdafomi, & ! Compute observation likelihood for an ensemble member + likelihood_hyb_l_pdafomi ! Compute observation likelihood for an ensemble member with hybrid weight + + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocalomi_put_state_lknetf_nondiagR +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFlocalomi_put_state_lknetf_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, prodRinvA_hyb_l_pdafomi, & + likelihood_l_pdafomi, likelihood_hyb_l_pdafomi, & + outflag) + +END SUBROUTINE PDAFlocalomi_put_state_lknetf_nondiagR_si diff --git a/src/PDAFlocalomi_put_state_lnetf_nondiagR.F90 b/src/PDAFlocalomi_put_state_lnetf_nondiagR.F90 new file mode 100644 index 000000000..f4908f8bf --- /dev/null +++ b/src/PDAFlocalomi_put_state_lnetf_nondiagR.F90 @@ -0,0 +1,106 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocalomi_put_state_lnetf_nondiagR --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocalomi_put_state_lnetf_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, likelihood_l_pdafomi, & + outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + l2g_state_pdaf ! Init full state from local state + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector + obs_op_pdafomi, & ! Full observation operator + init_dim_obs_l_pdafomi, & ! Initialize local dimimension of obs. vector + likelihood_l_pdafomi ! Compute likelihood and apply localization + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize full observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_g2l_obs_cb ! Restrict full obs. vector to local analysis domain + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_put_state_lnetf_nondiagR -- START' + + IF (TRIM(filterstr) == 'LNETF') THEN + CALL PDAFlocal_put_state_lnetf(collect_state_pdaf, init_dim_obs_pdafomi, obs_op_pdafomi, & + PDAFomi_init_obs_l_cb, prepoststep_pdaf, likelihood_l_pdafomi, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, & + PDAFomi_g2l_obs_cb, outflag) + ELSE + WRITE (*,*) 'PDAF-ERROR: Invalid filter choice for PDAFlocalomi_put_state_lnetf_nondiagR' + outflag=200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_put_state_lnetf_nondiagR -- END' + +END SUBROUTINE PDAFlocalomi_put_state_lnetf_nondiagR diff --git a/src/PDAFlocalomi_put_state_lnetf_nondiagR_si.F90 b/src/PDAFlocalomi_put_state_lnetf_nondiagR_si.F90 new file mode 100644 index 000000000..c1d9940b8 --- /dev/null +++ b/src/PDAFlocalomi_put_state_lnetf_nondiagR_si.F90 @@ -0,0 +1,80 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocalomi_put_state_lnetf_nondiagR_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocalomi_put_state_lnetf_nondiagR_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + l2g_state_pdaf ! Init full state from local state + EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain + obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain + init_dim_obs_l_pdafomi, & ! Get dimension of obs. vector for local analysis domain + likelihood_l_pdafomi ! Compute likelihood and apply localization + + + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocalomi_put_state_lnetf_nondiagR +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFlocalomi_put_state_lnetf_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, likelihood_l_pdafomi, & + outflag) + +END SUBROUTINE PDAFlocalomi_put_state_lnetf_nondiagR_si diff --git a/src/PDAFlocalomi_put_state_local.F90 b/src/PDAFlocalomi_put_state_local.F90 new file mode 100644 index 000000000..59692f515 --- /dev/null +++ b/src/PDAFlocalomi_put_state_local.F90 @@ -0,0 +1,123 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocalomi_put_state_local --- Interface to PDAF for domain-local filters +! +! !INTERFACE: +SUBROUTINE PDAFlocalomi_put_state_local(collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & + prepoststep_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & + outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2020-11 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + obs_op_f_pdaf, & ! Full observation operator + init_dim_obs_l_pdaf ! Initialize local dimimension of obs. vector + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize full observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_g2l_obs_cb, & ! Restrict full obs. vector to local analysis domain + PDAFomi_prodRinvA_l_cb, & ! Provide product R^-1 A on local analysis domain + PDAFomi_likelihood_l_cb ! Compute likelihood and apply localization + EXTERNAL :: PDAFomi_prodRinvA_hyb_l_cb, & ! Product R^-1 A on local analysis domain with hybrid weight + PDAFomi_likelihood_hyb_l_cb ! Compute likelihood and apply localization with tempering + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (TRIM(filterstr) == 'LSEIK') THEN + CALL PDAFlocal_put_state_lseik(collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & + PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, prepoststep_pdaf, & + PDAFomi_prodRinvA_l_cb, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & + PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, & + PDAFomi_init_obsvar_l_cb, outflag) + ELSE IF (TRIM(filterstr) == 'LETKF') THEN + CALL PDAFlocal_put_state_letkf(collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & + PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, prepoststep_pdaf, & + PDAFomi_prodRinvA_l_cb, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & + PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, & + PDAFomi_init_obsvar_l_cb, outflag) + ELSE IF (TRIM(filterstr) == 'LESTKF') THEN + CALL PDAFlocal_put_state_lestkf(collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & + PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, prepoststep_pdaf, & + PDAFomi_prodRinvA_l_cb, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & + PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, & + PDAFomi_init_obsvar_l_cb, outflag) + ELSE IF (TRIM(filterstr) == 'LNETF') THEN + CALL PDAFlocal_put_state_lnetf(collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & + PDAFomi_init_obs_l_cb, prepoststep_pdaf, PDAFomi_likelihood_l_cb, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, & + PDAFomi_g2l_obs_cb, outflag) + ELSE IF (TRIM(filterstr) == 'LKNETF') THEN + CALL PDAFlocal_put_state_lknetf(collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & + PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, prepoststep_pdaf, & + PDAFomi_prodRinvA_l_cb, PDAFomi_prodRinvA_hyb_l_cb, & + init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & + PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, & + PDAFomi_init_obsvar_l_cb, PDAFomi_likelihood_l_cb, PDAFomi_likelihood_hyb_l_cb, outflag) + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + +END SUBROUTINE PDAFlocalomi_put_state_local diff --git a/src/PDAFlocalomi_put_state_local_nondiagR.F90 b/src/PDAFlocalomi_put_state_local_nondiagR.F90 new file mode 100644 index 000000000..c43dddf9a --- /dev/null +++ b/src/PDAFlocalomi_put_state_local_nondiagR.F90 @@ -0,0 +1,125 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocalomi_put_state_local_nondiagR --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocalomi_put_state_local_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, & + outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-07 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE PDAF_mod_filter, ONLY: filterstr, debug + USE PDAFomi, ONLY: PDAFomi_dealloc + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + l2g_state_pdaf ! Init full state from local state + EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector + obs_op_pdafomi, & ! Full observation operator + init_dim_obs_l_pdafomi, & ! Initialize local dimimension of obs. vector + prodRinvA_l_pdafomi ! Provide product of inverse of R with matrix A + EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize full observation vector + PDAFomi_init_obs_l_cb, & ! Initialize local observation vector + PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance + PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance + PDAFomi_g2l_obs_cb ! Restrict full obs. vector to local analysis domain + +! !CALLING SEQUENCE: +! Called by: model code +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_put_state_local_nondiagR -- START' + + IF (TRIM(filterstr) == 'LSEIK') THEN + CALL PDAFlocal_put_state_lseik(collect_state_pdaf, init_dim_obs_pdafomi, obs_op_pdafomi, & + PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, prepoststep_pdaf, & + prodRinvA_l_pdafomi, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & + PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, & + PDAFomi_init_obsvar_l_cb, outflag) + ELSE IF (TRIM(filterstr) == 'LETKF') THEN + CALL PDAFlocal_put_state_letkf(collect_state_pdaf, init_dim_obs_pdafomi, obs_op_pdafomi, & + PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, prepoststep_pdaf, & + prodRinvA_l_pdafomi, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & + PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, & + PDAFomi_init_obsvar_l_cb, outflag) + ELSE IF (TRIM(filterstr) == 'LESTKF') THEN + CALL PDAFlocal_put_state_lestkf(collect_state_pdaf, init_dim_obs_pdafomi, obs_op_pdafomi, & + PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, prepoststep_pdaf, & + prodRinvA_l_pdafomi, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & + PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, & + PDAFomi_init_obsvar_l_cb, outflag) + ELSE IF (TRIM(filterstr) == 'LNETF') THEN + WRITE (*,*) 'PDAF-ERROR: Use PDAFlocalomi_put_state_lnetf_nondiagR for LNETF' + outflag=200 + ELSE IF (TRIM(filterstr) == 'LKNETF') THEN + WRITE (*,*) 'PDAF-ERROR: Use PDAFlocalomi_put_state_lknetf_nondiagR for LKNETF' + outflag=200 + ELSE + WRITE (*,*) 'PDAF-ERROR: Invalid filter choice for PDAFlocalomi_put_state_local_nondiagR' + outflag=200 + END IF + + +! ******************************************* +! *** Deallocate and re-init observations *** +! ******************************************* + + CALL PDAFomi_dealloc() + + IF (debug>0) & + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_put_state_local_nondiagR -- END' + +END SUBROUTINE PDAFlocalomi_put_state_local_nondiagR diff --git a/src/PDAFlocalomi_put_state_local_nondiagR_si.F90 b/src/PDAFlocalomi_put_state_local_nondiagR_si.F90 new file mode 100644 index 000000000..0c4459594 --- /dev/null +++ b/src/PDAFlocalomi_put_state_local_nondiagR_si.F90 @@ -0,0 +1,79 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocalomi_put_state_local_nondiagR_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocalomi_put_state_local_nondiagR_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model during the +! forecast of each ensemble state to transfer data +! from the model to PDAF and to perform the analysis +! step. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-07 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + l2g_state_pdaf ! Init full state from local state + EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain + obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain + init_dim_obs_l_pdafomi, & ! Get dimension of obs. vector for local analysis domain + prodRinvA_l_pdafomi ! Provide product of inverse of R with matrix A + + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocalomi_put_state_local_nondiagR +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFlocalomi_put_state_local_nondiagR(collect_state_pdaf, & + init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, & + outflag) + +END SUBROUTINE PDAFlocalomi_put_state_local_nondiagR_si diff --git a/src/PDAFlocalomi_put_state_local_si.F90 b/src/PDAFlocalomi_put_state_local_si.F90 new file mode 100644 index 000000000..785a3f389 --- /dev/null +++ b/src/PDAFlocalomi_put_state_local_si.F90 @@ -0,0 +1,79 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocalomi_put_state_local_si --- Interface to transfer state to PDAF +! +! !INTERFACE: +SUBROUTINE PDAFlocalomi_put_state_local_si(outflag) + +! !DESCRIPTION: +! Interface routine called from the model after the +! forecast of each ensemble state to transfer data +! from the model to PDAF. +! +! This routine provides the simplified interface +! where names of user-provided subroutines are +! fixed. It simply calls the routine with the +! full interface using pre-defined routine names. +! +! The routine supports all domain-localized filters. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2021-10 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(inout) :: outflag ! Status flag + +! ! Names of external subroutines + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + ! Localization of state vector + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Initialize state dimension for local analysis domain + l2g_state_pdaf ! Update global state from state on local analysis domain + ! Interface to PDAF-OMI for local and global filters + EXTERNAL :: & + init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain + obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain + init_dim_obs_l_pdafomi, & ! Get dimension of obs. vector for local analysis domain + localize_covar_pdafomi ! Apply localization to covariance matrix in LEnKF + +! !CALLING SEQUENCE: +! Called by: model code +! Calls: PDAFlocalomi_put_state_local +!EOP + + +! ************************************************** +! *** Call the full put_state interface routine *** +! ************************************************** + + CALL PDAFlocalomi_put_state_local(collect_state_pdaf, init_dim_obs_pdafomi, & + obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & + init_dim_obs_l_pdafomi, outflag) + +END SUBROUTINE PDAFlocalomi_put_state_local_si From 1545427730f5cf5352379dc2e6e5eb16bc5c41d9 Mon Sep 17 00:00:00 2001 From: Yumeng Chen Date: Wed, 21 Aug 2024 12:40:39 +0100 Subject: [PATCH 53/83] remove PDAFomilocal --- src/PDAFomilocal_assimilate.F90 | 138 -------------------------------- 1 file changed, 138 deletions(-) delete mode 100644 src/PDAFomilocal_assimilate.F90 diff --git a/src/PDAFomilocal_assimilate.F90 b/src/PDAFomilocal_assimilate.F90 deleted file mode 100644 index 800756ca6..000000000 --- a/src/PDAFomilocal_assimilate.F90 +++ /dev/null @@ -1,138 +0,0 @@ -! Copyright (c) 2004-2024 Lars Nerger -! -! This file is part of PDAF. -! -! PDAF is free software: you can redistribute it and/or modify -! it under the terms of the GNU Lesser General Public License -! as published by the Free Software Foundation, either version -! 3 of the License, or (at your option) any later version. -! -! PDAF is distributed in the hope that it will be useful, -! but WITHOUT ANY WARRANTY; without even the implied warranty of -! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -! GNU Lesser General Public License for more details. -! -! You should have received a copy of the GNU Lesser General Public -! License along with PDAF. If not, see . -! -!$Id$ -!BOP -! -! !ROUTINE: PDAFomi_assimilate_local --- Interface to transfer state to PDAF -! -! !INTERFACE: -SUBROUTINE PDAFomilocal_assimilate(collect_state_pdaf, distribute_state_pdaf, & - init_dim_obs_f_pdaf, obs_op_f_pdaf, prepoststep_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdaf, next_observation_pdaf, outflag) - -! !DESCRIPTION: -! Interface routine called from the model during the -! forecast of each ensemble state to transfer data -! from the model to PDAF and to perform the analysis -! step. -! -! This routine provides the simplified interface -! where names of user-provided subroutines are -! fixed. It simply calls the routine with the -! full interface using pre-defined routine names. -! -! The routine supports all domain-localized filters. -! -! ! This is a core routine of PDAF and -! should not be changed by the user ! -! -! !REVISION HISTORY: -! 2020-11 - Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE PDAF_mod_filter, ONLY: filterstr, debug - USE PDAFomi, ONLY: PDAFomi_dealloc - - IMPLICIT NONE - -! !ARGUMENTS: - INTEGER, INTENT(inout) :: outflag ! Status flag - -! ! Names of external subroutines - EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector - distribute_state_pdaf, & ! Routine to distribute a state vector - next_observation_pdaf, & ! Provide time step, time and dimension of next observation - prepoststep_pdaf ! User supplied pre/poststep routine - EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains - init_dim_l_pdaf, & ! Init state dimension for local ana. domain - init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector - obs_op_f_pdaf, & ! Full observation operator - init_dim_obs_l_pdaf ! Initialize local dimimension of obs. vector - EXTERNAL :: PDAFomi_init_obs_f_cb, & ! Initialize full observation vector - PDAFomi_init_obs_l_cb, & ! Initialize local observation vector - PDAFomi_init_obsvar_cb, & ! Initialize mean observation error variance - PDAFomi_init_obsvar_l_cb, & ! Initialize local mean observation error variance - PDAFomi_g2l_obs_cb, & ! Restrict full obs. vector to local analysis domain - PDAFomi_prodRinvA_l_cb, & ! Provide product R^-1 A on local analysis domain - PDAFomi_likelihood_l_cb ! Compute likelihood and apply localization - EXTERNAL :: PDAFomi_prodRinvA_hyb_l_cb, & ! Product R^-1 A on local analysis domain with hybrid weight - PDAFomi_likelihood_hyb_l_cb ! Compute likelihood and apply localization with tempering - EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector - PDAFlocal_l2g_callback ! Project local to global state vector -! !CALLING SEQUENCE: -! Called by: model code -!EOP - - -! ************************************************** -! *** Call the full put_state interface routine *** -! ************************************************** - - IF (debug>0) & - WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_local -- START' - - IF (TRIM(filterstr) == 'LSEIK') THEN - CALL PDAF_assimilate_lseik(collect_state_pdaf, distribute_state_pdaf, & - init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & - prepoststep_pdaf, PDAFomi_prodRinvA_l_cb, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdaf, PDAFlocal_g2l_callback, PDAFlocal_l2g_callback, & - PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & - next_observation_pdaf, outflag) - ELSE IF (TRIM(filterstr) == 'LETKF') THEN - CALL PDAF_assimilate_letkf(collect_state_pdaf, distribute_state_pdaf, & - init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & - prepoststep_pdaf, PDAFomi_prodRinvA_l_cb, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdaf, PDAFlocal_g2l_callback, PDAFlocal_l2g_callback, & - PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & - next_observation_pdaf, outflag) - ELSE IF (TRIM(filterstr) == 'LESTKF') THEN - CALL PDAF_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & - init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & - prepoststep_pdaf, PDAFomi_prodRinvA_l_cb, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdaf, PDAFlocal_g2l_callback, PDAFlocal_l2g_callback, & - PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & - next_observation_pdaf, outflag) - ELSE IF (TRIM(filterstr) == 'LNETF') THEN - CALL PDAF_assimilate_lnetf(collect_state_pdaf, distribute_state_pdaf, & - init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_l_cb, & - prepoststep_pdaf, PDAFomi_likelihood_l_cb, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdaf, PDAFlocal_g2l_callback, PDAFlocal_l2g_callback, & - PDAFomi_g2l_obs_cb, next_observation_pdaf, outflag) - ELSE IF (TRIM(filterstr) == 'LKNETF') THEN - CALL PDAF_assimilate_lknetf(collect_state_pdaf, distribute_state_pdaf, & - init_dim_obs_f_pdaf, obs_op_f_pdaf, & - PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, prepoststep_pdaf, & - PDAFomi_prodRinvA_l_cb, PDAFomi_prodRinvA_hyb_l_cb, & - init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & - PDAFlocal_g2l_callback, PDAFlocal_l2g_callback, PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, & - PDAFomi_init_obsvar_l_cb, PDAFomi_likelihood_l_cb, PDAFomi_likelihood_hyb_l_cb, & - next_observation_pdaf, outflag) - END IF - - -! ******************************************* -! *** Deallocate and re-init observations *** -! ******************************************* - - CALL PDAFomi_dealloc() - - IF (debug>0) & - WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFomi_assimilate_local -- END' - -END SUBROUTINE PDAFomilocal_assimilate From c1238bad4e17fc47d5e39d8d1ae53bec998b17fa Mon Sep 17 00:00:00 2001 From: Yumeng Chen Date: Thu, 22 Aug 2024 09:40:38 +0100 Subject: [PATCH 54/83] correct subroutine calls in PDAFlocalomi_assimilate_* --- src/PDAFlocalomi_assimilate_en3dvar_lestkf.F90 | 2 +- ...PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.F90 | 2 +- src/PDAFlocalomi_assimilate_hyb3dvar_lestkf.F90 | 2 +- ...DAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 | 2 +- src/PDAFlocalomi_assimilate_lknetf_nondiagR.F90 | 2 +- src/PDAFlocalomi_assimilate_lnetf_nondiagR.F90 | 2 +- src/PDAFlocalomi_assimilate_local.F90 | 10 +++++----- src/PDAFlocalomi_assimilate_local_nondiagR.F90 | 6 +++--- 8 files changed, 14 insertions(+), 14 deletions(-) diff --git a/src/PDAFlocalomi_assimilate_en3dvar_lestkf.F90 b/src/PDAFlocalomi_assimilate_en3dvar_lestkf.F90 index 9278d3cbe..87c692e97 100644 --- a/src/PDAFlocalomi_assimilate_en3dvar_lestkf.F90 +++ b/src/PDAFlocalomi_assimilate_en3dvar_lestkf.F90 @@ -92,7 +92,7 @@ SUBROUTINE PDAFlocalomi_assimilate_en3dvar_lestkf(collect_state_pdaf, distribute WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_en3dvar_lestkf -- START' IF (TRIM(filterstr) == '3DVAR') THEN - CALL PDAF_assimilate_en3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocal_assimilate_en3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_prodRinvA_cb, & cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & diff --git a/src/PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.F90 b/src/PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.F90 index 648ec54b6..d00b7689b 100644 --- a/src/PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.F90 +++ b/src/PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.F90 @@ -91,7 +91,7 @@ SUBROUTINE PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR(collect_state_pdaf, d WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR -- START' IF (TRIM(filterstr) == '3DVAR') THEN - CALL PDAF_assimilate_en3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocal_assimilate_en3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, prodRinvA_pdafomi, & cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & diff --git a/src/PDAFlocalomi_assimilate_hyb3dvar_lestkf.F90 b/src/PDAFlocalomi_assimilate_hyb3dvar_lestkf.F90 index b6bee5cf9..383580947 100644 --- a/src/PDAFlocalomi_assimilate_hyb3dvar_lestkf.F90 +++ b/src/PDAFlocalomi_assimilate_hyb3dvar_lestkf.F90 @@ -94,7 +94,7 @@ SUBROUTINE PDAFlocalomi_assimilate_hyb3dvar_lestkf(collect_state_pdaf, distribut WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_hyb3dvar_lestkf -- START' IF (TRIM(filterstr) == '3DVAR') THEN - CALL PDAF_assimilate_hyb3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocal_assimilate_hyb3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, & PDAFomi_prodRinvA_cb, cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, & obs_op_lin_pdaf, obs_op_adj_pdaf, & diff --git a/src/PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 b/src/PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 index 6b9e7a793..7e10e0170 100644 --- a/src/PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 +++ b/src/PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 @@ -94,7 +94,7 @@ SUBROUTINE PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR(collect_state_pdaf, WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR -- START' IF (TRIM(filterstr) == '3DVAR') THEN - CALL PDAF_assimilate_hyb3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocal_assimilate_hyb3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, & prodRinvA_pdafomi, cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, & obs_op_lin_pdafomi, obs_op_adj_pdafomi, & diff --git a/src/PDAFlocalomi_assimilate_lknetf_nondiagR.F90 b/src/PDAFlocalomi_assimilate_lknetf_nondiagR.F90 index 23e6a4f2d..e9e136447 100644 --- a/src/PDAFlocalomi_assimilate_lknetf_nondiagR.F90 +++ b/src/PDAFlocalomi_assimilate_lknetf_nondiagR.F90 @@ -89,7 +89,7 @@ SUBROUTINE PDAFlocalomi_assimilate_lknetf_nondiagR(collect_state_pdaf, distribut WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_lknetf_nondiagR -- START' IF (TRIM(filterstr) == 'LKNETF') THEN - CALL PDAF_assimilate_lknetf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocal_assimilate_lknetf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, & PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, prepoststep_pdaf, & prodRinvA_l_pdafomi, prodRinvA_hyb_l_pdafomi, & diff --git a/src/PDAFlocalomi_assimilate_lnetf_nondiagR.F90 b/src/PDAFlocalomi_assimilate_lnetf_nondiagR.F90 index 007758256..3315e8585 100644 --- a/src/PDAFlocalomi_assimilate_lnetf_nondiagR.F90 +++ b/src/PDAFlocalomi_assimilate_lnetf_nondiagR.F90 @@ -85,7 +85,7 @@ SUBROUTINE PDAFlocalomi_assimilate_lnetf_nondiagR(collect_state_pdaf, distribute WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_lnetf_nondiagR -- START' IF (TRIM(filterstr) == 'LNETF') THEN - CALL PDAF_assimilate_lnetf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocal_assimilate_lnetf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_l_cb, & prepoststep_pdaf, likelihood_l_pdafomi, init_n_domains_pdaf, & init_dim_l_pdaf, init_dim_obs_l_pdafomi, & diff --git a/src/PDAFlocalomi_assimilate_local.F90 b/src/PDAFlocalomi_assimilate_local.F90 index 872f974ff..bbdc6c5f3 100644 --- a/src/PDAFlocalomi_assimilate_local.F90 +++ b/src/PDAFlocalomi_assimilate_local.F90 @@ -88,34 +88,34 @@ SUBROUTINE PDAFlocalomi_assimilate_local(collect_state_pdaf, distribute_state_pd WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_local -- START' IF (TRIM(filterstr) == 'LSEIK') THEN - CALL PDAF_assimilate_lseik(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocal_assimilate_lseik(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & prepoststep_pdaf, PDAFomi_prodRinvA_l_cb, init_n_domains_pdaf, & init_dim_l_pdaf, init_dim_obs_l_pdaf, & PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & next_observation_pdaf, outflag) ELSE IF (TRIM(filterstr) == 'LETKF') THEN - CALL PDAF_assimilate_letkf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocal_assimilate_letkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & prepoststep_pdaf, PDAFomi_prodRinvA_l_cb, init_n_domains_pdaf, & init_dim_l_pdaf, init_dim_obs_l_pdaf, & PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & next_observation_pdaf, outflag) ELSE IF (TRIM(filterstr) == 'LESTKF') THEN - CALL PDAF_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocal_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & prepoststep_pdaf, PDAFomi_prodRinvA_l_cb, init_n_domains_pdaf, & init_dim_l_pdaf, init_dim_obs_l_pdaf, & PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & next_observation_pdaf, outflag) ELSE IF (TRIM(filterstr) == 'LNETF') THEN - CALL PDAF_assimilate_lnetf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocal_assimilate_lnetf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, PDAFomi_init_obs_l_cb, & prepoststep_pdaf, PDAFomi_likelihood_l_cb, init_n_domains_pdaf, & init_dim_l_pdaf, init_dim_obs_l_pdaf, & PDAFomi_g2l_obs_cb, next_observation_pdaf, outflag) ELSE IF (TRIM(filterstr) == 'LKNETF') THEN - CALL PDAF_assimilate_lknetf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocal_assimilate_lknetf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, & PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, prepoststep_pdaf, & PDAFomi_prodRinvA_l_cb, PDAFomi_prodRinvA_hyb_l_cb, & diff --git a/src/PDAFlocalomi_assimilate_local_nondiagR.F90 b/src/PDAFlocalomi_assimilate_local_nondiagR.F90 index 1d8b52109..f64d02ee8 100644 --- a/src/PDAFlocalomi_assimilate_local_nondiagR.F90 +++ b/src/PDAFlocalomi_assimilate_local_nondiagR.F90 @@ -85,21 +85,21 @@ SUBROUTINE PDAFlocalomi_assimilate_local_nondiagR(collect_state_pdaf, distribute WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_local_nondiagR -- START' IF (TRIM(filterstr) == 'LSEIK') THEN - CALL PDAF_assimilate_lseik(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocal_assimilate_lseik(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & prepoststep_pdaf, prodRinvA_l_pdafomi, init_n_domains_pdaf, & init_dim_l_pdaf, init_dim_obs_l_pdafomi, & PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & next_observation_pdaf, outflag) ELSE IF (TRIM(filterstr) == 'LETKF') THEN - CALL PDAF_assimilate_letkf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocal_assimilate_letkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & prepoststep_pdaf, prodRinvA_l_pdafomi, init_n_domains_pdaf, & init_dim_l_pdaf, init_dim_obs_l_pdafomi, & PDAFomi_g2l_obs_cb, PDAFomi_init_obsvar_cb, PDAFomi_init_obsvar_l_cb, & next_observation_pdaf, outflag) ELSE IF (TRIM(filterstr) == 'LESTKF') THEN - CALL PDAF_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocal_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, PDAFomi_init_obs_f_cb, PDAFomi_init_obs_l_cb, & prepoststep_pdaf, prodRinvA_l_pdafomi, init_n_domains_pdaf, & init_dim_l_pdaf, init_dim_obs_l_pdafomi, & From db0f55e6ca8d493a90a90b9060d745df56c196f6 Mon Sep 17 00:00:00 2001 From: Yumeng Chen Date: Thu, 22 Aug 2024 10:10:43 +0100 Subject: [PATCH 55/83] using defined interface in PDAFlocal module; remove arguments in _si subroutines --- src/Makefile | 19 ++++++++++--------- src/PDAFlocal_put_state_en3dvar_lestkf.F90 | 7 ++++--- src/PDAFlocal_put_state_hyb3dvar_lestkf.F90 | 7 ++++--- src/PDAFlocal_put_state_lestkf.F90 | 10 +++++----- src/PDAFlocal_put_state_lestkf_si.F90 | 7 ++----- src/PDAFlocal_put_state_letkf.F90 | 7 ++++--- src/PDAFlocal_put_state_letkf_si.F90 | 7 ++----- src/PDAFlocal_put_state_lknetf.F90 | 7 ++++--- src/PDAFlocal_put_state_lknetf_si.F90 | 7 ++----- src/PDAFlocal_put_state_lnetf.F90 | 7 ++++--- src/PDAFlocal_put_state_lnetf_si.F90 | 7 ++----- src/PDAFlocal_put_state_lseik.F90 | 7 ++++--- src/PDAFlocal_put_state_lseik_si.F90 | 7 ++----- 13 files changed, 49 insertions(+), 57 deletions(-) diff --git a/src/Makefile b/src/Makefile index 36a7dc7b9..f93c182cb 100644 --- a/src/Makefile +++ b/src/Makefile @@ -105,6 +105,15 @@ OBJ_PDAF_GEN = PDAF_analysis_utils.o \ PDAFomi_assimilate_local_si.o \ PDAFomi_assimilate_local_nondiagR.o \ PDAFomi_assimilate_local_nondiagR_si.o \ + PDAF_reset_forget.o \ + PDAF_get_ensstats.o \ + PDAF_set_debug_flag.o \ + PDAF_set_offline_mode.o \ + PDAF_g2l.o \ + PDAF_l2g.o \ + PDAFlocal.o \ + PDAFlocal_g2l_callback.o \ + PDAFlocal_l2g_callback.o \ PDAFlocalomi_assimilate_local.o \ PDAFlocalomi_assimilate_local_nondiagR.o \ PDAFlocalomi_assimilate_local_nondiagR_si.o \ @@ -113,17 +122,9 @@ OBJ_PDAF_GEN = PDAF_analysis_utils.o \ PDAFlocalomi_put_state_local_nondiagR.o \ PDAFlocalomi_put_state_local_nondiagR_si.o \ PDAFlocalomi_put_state_local_si.o \ - PDAF_reset_forget.o \ - PDAF_get_ensstats.o \ - PDAF_set_debug_flag.o \ - PDAF_set_offline_mode.o \ - PDAF_g2l.o \ - PDAF_l2g.o \ - PDAFlocal.F90 \ - PDAFlocal_g2l_callback.F90 \ - PDAFlocal_l2g_callback.F90 \ PDAF_correlation_function.o + # Specific PDAF-routines for SEIK OBJ_SEIK = PDAF_seik_init.o \ PDAF_seik_alloc.o \ diff --git a/src/PDAFlocal_put_state_en3dvar_lestkf.F90 b/src/PDAFlocal_put_state_en3dvar_lestkf.F90 index 0c0b7e9be..5ce338c3b 100644 --- a/src/PDAFlocal_put_state_en3dvar_lestkf.F90 +++ b/src/PDAFlocal_put_state_en3dvar_lestkf.F90 @@ -76,7 +76,9 @@ SUBROUTINE PDAFlocal_put_state_en3dvar_lestkf(U_collect_state, U_init_dim_obs, U USE PDAF_mod_filtermpi, & ONLY: mype_world, filterpe, & dim_ens_l, modelpe, filter_no_model - + USE PDAFlocal, & + ONLY: PDAFlocal_g2l_callback, & ! Project global to local state vector + PDAFlocal_l2g_callback ! Project local to global state vecto IMPLICIT NONE ! !ARGUMENTS: @@ -105,8 +107,7 @@ SUBROUTINE PDAFlocal_put_state_en3dvar_lestkf(U_collect_state, U_init_dim_obs, U U_init_obsvar_l, & ! Initialize local mean observation error variance U_g2l_obs, & ! Restrict full obs. vector to local analysis domain U_prodRinvA_l ! Provide product R^-1 A on local analysis domain - EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector - PDAFlocal_l2g_callback ! Project local to global state vector + ! !CALLING SEQUENCE: ! Called by: model code ! Calls: U_collect_state diff --git a/src/PDAFlocal_put_state_hyb3dvar_lestkf.F90 b/src/PDAFlocal_put_state_hyb3dvar_lestkf.F90 index 526b724d6..f49a84c6d 100644 --- a/src/PDAFlocal_put_state_hyb3dvar_lestkf.F90 +++ b/src/PDAFlocal_put_state_hyb3dvar_lestkf.F90 @@ -76,7 +76,9 @@ SUBROUTINE PDAFlocal_put_state_hyb3dvar_lestkf(U_collect_state, & USE PDAF_mod_filtermpi, & ONLY: mype_world, filterpe, & dim_ens_l, modelpe, filter_no_model - + USE PDAFlocal, & + ONLY: PDAFlocal_g2l_callback, & ! Project global to local state vector + PDAFlocal_l2g_callback ! Project local to global state vector IMPLICIT NONE ! !ARGUMENTS: @@ -107,8 +109,7 @@ SUBROUTINE PDAFlocal_put_state_hyb3dvar_lestkf(U_collect_state, & U_init_obsvar_l, & ! Initialize local mean observation error variance U_g2l_obs, & ! Restrict full obs. vector to local analysis domain U_prodRinvA_l ! Provide product R^-1 A on local analysis domain - EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector - PDAFlocal_l2g_callback ! Project local to global state vector + ! !CALLING SEQUENCE: ! Called by: model code ! Calls: U_collect_state diff --git a/src/PDAFlocal_put_state_lestkf.F90 b/src/PDAFlocal_put_state_lestkf.F90 index e08abf566..4d833fa0d 100644 --- a/src/PDAFlocal_put_state_lestkf.F90 +++ b/src/PDAFlocal_put_state_lestkf.F90 @@ -69,7 +69,9 @@ SUBROUTINE PDAFlocal_put_state_lestkf(U_collect_state, U_init_dim_obs, U_obs_op, type_sqrt, sens, dim_lag, cnt_maxlag, offline_mode USE PDAF_mod_filtermpi, & ONLY: mype_world, filterpe, dim_ens_l, modelpe, filter_no_model - + USE PDAFlocal, & + ONLY: PDAFlocal_g2l_callback, & ! Project global to local state vector + PDAFlocal_l2g_callback ! Project local to global state vecto IMPLICIT NONE ! !ARGUMENTS: @@ -90,8 +92,7 @@ SUBROUTINE PDAFlocal_put_state_lestkf(U_collect_state, U_init_dim_obs, U_obs_op, U_g2l_obs, & ! Restrict full obs. vector to local analysis domain U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain U_prepoststep ! User supplied pre/poststep routine - EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector - PDAFlocal_l2g_callback ! Project local to global state vector + ! !CALLING SEQUENCE: ! Called by: model code ! Calls: U_collect_state @@ -189,8 +190,7 @@ SUBROUTINE PDAFlocal_put_state_lestkf(U_collect_state, U_init_dim_obs, U_obs_op, eofU, eofV, state_inc, U_init_dim_obs, & U_obs_op, U_init_obs, U_init_obs_l, U_prodRinvA_l, U_init_n_domains_p, & U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_callback, & - PDAFlocal_l2g_callback, & - U_g2l_obs, & + PDAFlocal_l2g_callback, U_g2l_obs, & U_init_obsvar, U_init_obsvar_l, U_prepoststep, screen, subtype_filter, & incremental, type_forget, type_sqrt, dim_lag, sens, & cnt_maxlag, flag) diff --git a/src/PDAFlocal_put_state_lestkf_si.F90 b/src/PDAFlocal_put_state_lestkf_si.F90 index 6ba963b63..488c6c9b4 100644 --- a/src/PDAFlocal_put_state_lestkf_si.F90 +++ b/src/PDAFlocal_put_state_lestkf_si.F90 @@ -62,8 +62,7 @@ SUBROUTINE PDAFlocal_put_state_lestkf_si(outflag) g2l_obs_pdaf, & ! Restrict full obs. vector to local analysis domain prodRinvA_l_pdaf, & ! Provide product R^-1 A on local analysis domain prepoststep_pdaf ! User supplied pre/poststep routine - EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector - PDAFlocal_l2g_callback ! Project local to global state vector + ! !CALLING SEQUENCE: ! Called by: model code ! Calls: PDAFlocal_put_state_lestkf @@ -77,8 +76,6 @@ SUBROUTINE PDAFlocal_put_state_lestkf_si(outflag) CALL PDAFlocal_put_state_lestkf(collect_state_pdaf, init_dim_obs_f_pdaf, & obs_op_f_pdaf, init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_pdaf, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, PDAFlocal_g2l_callback, & - PDAFlocal_l2g_callback, & - g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, outflag) + init_dim_obs_l_pdaf, g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, outflag) END SUBROUTINE PDAFlocal_put_state_lestkf_si diff --git a/src/PDAFlocal_put_state_letkf.F90 b/src/PDAFlocal_put_state_letkf.F90 index 6979b3443..e5ca61cd6 100644 --- a/src/PDAFlocal_put_state_letkf.F90 +++ b/src/PDAFlocal_put_state_letkf.F90 @@ -69,7 +69,9 @@ SUBROUTINE PDAFlocal_put_state_letkf(U_collect_state, U_init_dim_obs, U_obs_op, sens, dim_lag, cnt_maxlag, offline_mode USE PDAF_mod_filtermpi, & ONLY: mype_world, filterpe, dim_ens_l, modelpe, filter_no_model - + USE PDAFlocal, & + ONLY: PDAFlocal_g2l_callback, & ! Project global to local state vector + PDAFlocal_l2g_callback ! Project local to global state vecto IMPLICIT NONE ! !ARGUMENTS: @@ -90,8 +92,7 @@ SUBROUTINE PDAFlocal_put_state_letkf(U_collect_state, U_init_dim_obs, U_obs_op, U_g2l_obs, & ! Restrict full obs. vector to local analysis domain U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain U_prepoststep ! User supplied pre/poststep routine - EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector - PDAFlocal_l2g_callback ! Project local to global state vector + ! !CALLING SEQUENCE: ! Called by: model code ! Calls: U_collect_state diff --git a/src/PDAFlocal_put_state_letkf_si.F90 b/src/PDAFlocal_put_state_letkf_si.F90 index 58b0182f3..0a0d835a3 100644 --- a/src/PDAFlocal_put_state_letkf_si.F90 +++ b/src/PDAFlocal_put_state_letkf_si.F90 @@ -62,8 +62,7 @@ SUBROUTINE PDAFlocal_put_state_letkf_si(outflag) g2l_obs_pdaf, & ! Restrict full obs. vector to local analysis domain prodRinvA_l_pdaf, & ! Provide product R^-1 A on local analysis domain prepoststep_pdaf ! User supplied pre/poststep routine - EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector - PDAFlocal_l2g_callback ! Project local to global state vector + ! !CALLING SEQUENCE: ! Called by: model code ! Calls: PDAFlocal_put_state_letkf @@ -77,8 +76,6 @@ SUBROUTINE PDAFlocal_put_state_letkf_si(outflag) CALL PDAFlocal_put_state_letkf(collect_state_pdaf, init_dim_obs_f_pdaf, & obs_op_f_pdaf, init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_pdaf, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, PDAFlocal_g2l_callback, & - PDAFlocal_l2g_callback, & - g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, outflag) + init_dim_obs_l_pdaf, g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, outflag) END SUBROUTINE PDAFlocal_put_state_letkf_si diff --git a/src/PDAFlocal_put_state_lknetf.F90 b/src/PDAFlocal_put_state_lknetf.F90 index 5df6f6267..24df0b9a6 100644 --- a/src/PDAFlocal_put_state_lknetf.F90 +++ b/src/PDAFlocal_put_state_lknetf.F90 @@ -70,7 +70,9 @@ SUBROUTINE PDAFlocal_put_state_lknetf(U_collect_state, U_init_dim_obs, U_obs_op, sens, dim_lag, cnt_maxlag, offline_mode USE PDAF_mod_filtermpi, & ONLY: mype_world, filterpe, dim_ens_l, modelpe, filter_no_model - + USE PDAFlocal, & + ONLY: PDAFlocal_g2l_callback, & ! Project global to local state vector + PDAFlocal_l2g_callback ! Project local to global state vecto IMPLICIT NONE ! !ARGUMENTS: @@ -94,8 +96,7 @@ SUBROUTINE PDAFlocal_put_state_lknetf(U_collect_state, U_init_dim_obs, U_obs_op, U_likelihood_l, & ! Compute likelihood U_likelihood_hyb_l, & ! Compute likelihood with hybrid weight U_prepoststep ! User supplied pre/poststep routine - EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector - PDAFlocal_l2g_callback ! Project local to global state vector + ! !CALLING SEQUENCE: ! Called by: model code ! Calls: U_collect_state diff --git a/src/PDAFlocal_put_state_lknetf_si.F90 b/src/PDAFlocal_put_state_lknetf_si.F90 index 871180b16..a48e85e0f 100644 --- a/src/PDAFlocal_put_state_lknetf_si.F90 +++ b/src/PDAFlocal_put_state_lknetf_si.F90 @@ -65,8 +65,7 @@ SUBROUTINE PDAFlocal_put_state_lknetf_si(outflag) likelihood_l_pdaf, & ! Compute observation likelihood for an ensemble member likelihood_hyb_l_pdaf, & ! Compute observation likelihood for an ensemble member with hybrid weight prepoststep_pdaf ! User supplied pre/poststep routine - EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector - PDAFlocal_l2g_callback ! Project local to global state vector + ! !CALLING SEQUENCE: ! Called by: model code ! Calls: PDAFlocal_put_state_lknetf @@ -80,9 +79,7 @@ SUBROUTINE PDAFlocal_put_state_lknetf_si(outflag) CALL PDAFlocal_put_state_lknetf(collect_state_pdaf, init_dim_obs_f_pdaf, & obs_op_f_pdaf, init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_pdaf, & prodRinvA_l_pdaf, prodRinvA_hyb_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, PDAFlocal_g2l_callback, & - PDAFlocal_l2g_callback, & - g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, likelihood_l_pdaf, & + init_dim_obs_l_pdaf, g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, likelihood_l_pdaf, & likelihood_hyb_l_pdaf, outflag) END SUBROUTINE PDAFlocal_put_state_lknetf_si diff --git a/src/PDAFlocal_put_state_lnetf.F90 b/src/PDAFlocal_put_state_lnetf.F90 index 30745ad06..e07f74dc7 100644 --- a/src/PDAFlocal_put_state_lnetf.F90 +++ b/src/PDAFlocal_put_state_lnetf.F90 @@ -71,7 +71,9 @@ SUBROUTINE PDAFlocal_put_state_lnetf(U_collect_state, U_init_dim_obs, U_obs_op, eofU, screen, flag, sens, dim_lag, cnt_maxlag USE PDAF_mod_filtermpi, & ONLY: mype_world, filterpe, dim_ens_l - + USE PDAFlocal, & + ONLY: PDAFlocal_g2l_callback, & ! Project global to local state vector + PDAFlocal_l2g_callback ! Project local to global state vecto IMPLICIT NONE ! !ARGUMENTS: @@ -89,8 +91,7 @@ SUBROUTINE PDAFlocal_put_state_lnetf(U_collect_state, U_init_dim_obs, U_obs_op, U_g2l_obs, & ! Restrict full obs. vector to local analysis domain U_likelihood_l, & ! Compute observation likelihood for an ensemble member U_prepoststep ! User supplied pre/poststep routine - EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector - PDAFlocal_l2g_callback ! Project local to global state vector + ! !CALLING SEQUENCE: ! Called by: model code ! Calls: U_collect_state diff --git a/src/PDAFlocal_put_state_lnetf_si.F90 b/src/PDAFlocal_put_state_lnetf_si.F90 index 981e668c9..4a8771a94 100644 --- a/src/PDAFlocal_put_state_lnetf_si.F90 +++ b/src/PDAFlocal_put_state_lnetf_si.F90 @@ -59,8 +59,7 @@ SUBROUTINE PDAFlocal_put_state_lnetf_si(outflag) g2l_obs_pdaf, & ! Restrict full obs. vector to local analysis domain likelihood_l_pdaf, & ! Compute observation likelihood for an ensemble member prepoststep_pdaf ! User supplied pre/poststep routine - EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector - PDAFlocal_l2g_callback ! Project local to global state vector + ! !CALLING SEQUENCE: ! Called by: model code ! Calls: PDAFlocal_put_state_lnetf @@ -73,8 +72,6 @@ SUBROUTINE PDAFlocal_put_state_lnetf_si(outflag) CALL PDAFlocal_put_state_lnetf(collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_l_pdaf, prepoststep_pdaf, likelihood_l_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdaf, PDAFlocal_g2l_callback, & - PDAFlocal_l2g_callback, & - g2l_obs_pdaf, outflag) + init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_obs_pdaf, outflag) END SUBROUTINE PDAFlocal_put_state_lnetf_si diff --git a/src/PDAFlocal_put_state_lseik.F90 b/src/PDAFlocal_put_state_lseik.F90 index acd6ac3dc..f9ea3543b 100644 --- a/src/PDAFlocal_put_state_lseik.F90 +++ b/src/PDAFlocal_put_state_lseik.F90 @@ -68,7 +68,9 @@ SUBROUTINE PDAFlocal_put_state_lseik(U_collect_state, U_init_dim_obs, U_obs_op, state_inc, screen, flag, type_sqrt, offline_mode USE PDAF_mod_filtermpi, & ONLY: mype_world, filterpe, dim_ens_l, modelpe, filter_no_model - + USE PDAFlocal, & + ONLY: PDAFlocal_g2l_callback, & ! Project global to local state vector + PDAFlocal_l2g_callback ! Project local to global state vecto IMPLICIT NONE ! !ARGUMENTS: @@ -89,8 +91,7 @@ SUBROUTINE PDAFlocal_put_state_lseik(U_collect_state, U_init_dim_obs, U_obs_op, U_g2l_obs, & ! Restrict full obs. vector to local analysis domain U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain U_prepoststep ! User supplied pre/poststep routine - EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector - PDAFlocal_l2g_callback ! Project local to global state vector + ! !CALLING SEQUENCE: ! Called by: model code ! Calls: U_collect_state diff --git a/src/PDAFlocal_put_state_lseik_si.F90 b/src/PDAFlocal_put_state_lseik_si.F90 index 59456f558..ac345d897 100644 --- a/src/PDAFlocal_put_state_lseik_si.F90 +++ b/src/PDAFlocal_put_state_lseik_si.F90 @@ -62,8 +62,7 @@ SUBROUTINE PDAFlocal_put_state_lseik_si(outflag) g2l_obs_pdaf, & ! Restrict full obs. vector to local analysis domain prodRinvA_l_pdaf, & ! Provide product R^-1 A on local analysis domain prepoststep_pdaf ! User supplied pre/poststep routine - EXTERNAL :: PDAFlocal_g2l_callback, & ! Project global to local state vector - PDAFlocal_l2g_callback ! Project local to global state vector + ! !CALLING SEQUENCE: ! Called by: model code ! Calls: PDAFlocal_put_state_lseik @@ -77,8 +76,6 @@ SUBROUTINE PDAFlocal_put_state_lseik_si(outflag) CALL PDAFlocal_put_state_lseik(collect_state_pdaf, init_dim_obs_f_pdaf, & obs_op_f_pdaf, init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_pdaf, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, PDAFlocal_g2l_callback, & - PDAFlocal_l2g_callback, & - g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, outflag) + init_dim_obs_l_pdaf, g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, outflag) END SUBROUTINE PDAFlocal_put_state_lseik_si From 945be00a5e2c40da5923b8ef73236f3d8d6ff2ab Mon Sep 17 00:00:00 2001 From: Yumeng Chen Date: Fri, 23 Aug 2024 14:06:26 +0100 Subject: [PATCH 56/83] remove l2g_state_pdaf in external list; adding revision history; change _local names; change _callback to _cb --- src/PDAFlocal.F90 | 10 +++++----- src/PDAFlocal_assimilate_en3dvar_lestkf.F90 | 1 + src/PDAFlocal_assimilate_hyb3dvar_lestkf.F90 | 1 + src/PDAFlocal_assimilate_lestkf.F90 | 1 + src/PDAFlocal_assimilate_lestkf_si.F90 | 1 + src/PDAFlocal_assimilate_letkf.F90 | 1 + src/PDAFlocal_assimilate_letkf_si.F90 | 1 + src/PDAFlocal_assimilate_lknetf.F90 | 1 + src/PDAFlocal_assimilate_lknetf_si.F90 | 1 + src/PDAFlocal_assimilate_lnetf.F90 | 1 + src/PDAFlocal_assimilate_lnetf_si.F90 | 1 + src/PDAFlocal_assimilate_lseik.F90 | 1 + src/PDAFlocal_assimilate_lseik_si.F90 | 1 + ...cal_g2l_callback.F90 => PDAFlocal_g2l_cb.F90} | 6 +++--- ...cal_l2g_callback.F90 => PDAFlocal_l2g_cb.F90} | 6 +++--- src/PDAFlocal_put_state_en3dvar_lestkf.F90 | 10 +++++----- src/PDAFlocal_put_state_hyb3dvar_lestkf.F90 | 10 +++++----- src/PDAFlocal_put_state_lestkf.F90 | 10 +++++----- src/PDAFlocal_put_state_lestkf_si.F90 | 1 + src/PDAFlocal_put_state_letkf.F90 | 10 +++++----- src/PDAFlocal_put_state_letkf_si.F90 | 1 + src/PDAFlocal_put_state_lknetf.F90 | 13 +++++++------ src/PDAFlocal_put_state_lknetf_si.F90 | 1 + src/PDAFlocal_put_state_lnetf.F90 | 10 +++++----- src/PDAFlocal_put_state_lnetf_si.F90 | 1 + src/PDAFlocal_put_state_lseik.F90 | 8 ++++---- src/PDAFlocal_put_state_lseik_si.F90 | 1 + ...ate_local.F90 => PDAFlocalomi_assimilate.F90} | 11 ++++++----- src/PDAFlocalomi_assimilate_en3dvar_lestkf.F90 | 1 + ...calomi_assimilate_en3dvar_lestkf_nondiagR.F90 | 1 + src/PDAFlocalomi_assimilate_hyb3dvar_lestkf.F90 | 1 + ...alomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 | 1 + src/PDAFlocalomi_assimilate_lknetf_nondiagR.F90 | 1 + ...DAFlocalomi_assimilate_lknetf_nondiagR_si.F90 | 1 + src/PDAFlocalomi_assimilate_lnetf_nondiagR.F90 | 1 + ...PDAFlocalomi_assimilate_lnetf_nondiagR_si.F90 | 1 + ....F90 => PDAFlocalomi_assimilate_nondiagR.F90} | 13 +++++++------ ...0 => PDAFlocalomi_assimilate_nondiagR_si.F90} | 11 ++++++----- ...cal_si.F90 => PDAFlocalomi_assimilate_si.F90} | 11 ++++++----- ...tate_local.F90 => PDAFlocalomi_put_state.F90} | 7 ++++--- src/PDAFlocalomi_put_state_en3dvar_lestkf.F90 | 1 + ...ocalomi_put_state_en3dvar_lestkf_nondiagR.F90 | 4 ++-- src/PDAFlocalomi_put_state_hyb3dvar_lestkf.F90 | 1 + ...calomi_put_state_hyb3dvar_lestkf_nondiagR.F90 | 4 ++-- src/PDAFlocalomi_put_state_lknetf_nondiagR.F90 | 4 ++-- ...PDAFlocalomi_put_state_lknetf_nondiagR_si.F90 | 4 ++-- src/PDAFlocalomi_put_state_lnetf_nondiagR.F90 | 4 ++-- src/PDAFlocalomi_put_state_lnetf_nondiagR_si.F90 | 4 ++-- ...R.F90 => PDAFlocalomi_put_state_nondiagR.F90} | 16 ++++++++-------- ...90 => PDAFlocalomi_put_state_nondiagR_si.F90} | 14 +++++++------- ...ocal_si.F90 => PDAFlocalomi_put_state_si.F90} | 14 +++++++------- 51 files changed, 137 insertions(+), 104 deletions(-) rename src/{PDAFlocal_g2l_callback.F90 => PDAFlocal_g2l_cb.F90} (90%) rename src/{PDAFlocal_l2g_callback.F90 => PDAFlocal_l2g_cb.F90} (92%) rename src/{PDAFlocalomi_assimilate_local.F90 => PDAFlocalomi_assimilate.F90} (95%) rename src/{PDAFlocalomi_assimilate_local_nondiagR.F90 => PDAFlocalomi_assimilate_nondiagR.F90} (93%) rename src/{PDAFlocalomi_assimilate_local_nondiagR_si.F90 => PDAFlocalomi_assimilate_nondiagR_si.F90} (87%) rename src/{PDAFlocalomi_assimilate_local_si.F90 => PDAFlocalomi_assimilate_si.F90} (88%) rename src/{PDAFlocalomi_put_state_local.F90 => PDAFlocalomi_put_state.F90} (95%) rename src/{PDAFlocalomi_put_state_local_nondiagR.F90 => PDAFlocalomi_put_state_nondiagR.F90} (91%) rename src/{PDAFlocalomi_put_state_local_nondiagR_si.F90 => PDAFlocalomi_put_state_nondiagR_si.F90} (84%) rename src/{PDAFlocalomi_put_state_local_si.F90 => PDAFlocalomi_put_state_si.F90} (84%) diff --git a/src/PDAFlocal.F90 b/src/PDAFlocal.F90 index 065a4193f..925240af9 100644 --- a/src/PDAFlocal.F90 +++ b/src/PDAFlocal.F90 @@ -49,25 +49,25 @@ MODULE PDAFlocal !------------------------------------------------------------------------------- INTERFACE - SUBROUTINE PDAFlocal_g2l_callback(step, domain_p, dim_p, state_p, dim_l, state_l) + SUBROUTINE PDAFlocal_g2l_cb(step, domain_p, dim_p, state_p, dim_l, state_l) INTEGER, INTENT(in) :: step !< Current time step INTEGER, INTENT(in) :: domain_p !< Current local analysis domain INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension INTEGER, INTENT(in) :: dim_l !< Local state dimension REAL, INTENT(in) :: state_p(dim_p) !< PE-local full state vector REAL, INTENT(out) :: state_l(dim_l) !< State vector on local analysis domain - END SUBROUTINE PDAFlocal_g2l_callback + END SUBROUTINE PDAFlocal_g2l_cb END INTERFACE INTERFACE - SUBROUTINE PDAFlocal_l2g_callback(step, domain_p, dim_l, state_l, dim_p, state_p) + SUBROUTINE PDAFlocal_l2g_cb(step, domain_p, dim_l, state_l, dim_p, state_p) INTEGER, INTENT(in) :: step !< Current time step INTEGER, INTENT(in) :: domain_p !< Current local analysis domain INTEGER, INTENT(in) :: dim_l !< Local state dimension INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension REAL, INTENT(in) :: state_l(dim_l) !< State vector on local analysis domain REAL, INTENT(inout) :: state_p(dim_p) !< PE-local full state vector - END SUBROUTINE PDAFlocal_l2g_callback + END SUBROUTINE PDAFlocal_l2g_cb END INTERFACE !------------------------------------------------------------------------------- @@ -110,7 +110,7 @@ END SUBROUTINE PDAFlocal_set_indices !! !! This routine initializes a PDAF_internal local array !! of increment weights. The weights are applied in -!! in PDAF_local_l2g_callback, when the global state vector +!! in PDAF_local_l2g_cb, when the global state vector !! is initialized from the local state vector. These can !! e.g. be used to apply a vertical localization. !! diff --git a/src/PDAFlocal_assimilate_en3dvar_lestkf.F90 b/src/PDAFlocal_assimilate_en3dvar_lestkf.F90 index 8fc07f148..55797a605 100644 --- a/src/PDAFlocal_assimilate_en3dvar_lestkf.F90 +++ b/src/PDAFlocal_assimilate_en3dvar_lestkf.F90 @@ -52,6 +52,7 @@ SUBROUTINE PDAFlocal_assimilate_en3dvar_lestkf(U_collect_state, U_distribute_sta ! ! !REVISION HISTORY: ! 2013-08 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocal_assimilate_hyb3dvar_lestkf.F90 b/src/PDAFlocal_assimilate_hyb3dvar_lestkf.F90 index d5060c4e6..534fcc480 100644 --- a/src/PDAFlocal_assimilate_hyb3dvar_lestkf.F90 +++ b/src/PDAFlocal_assimilate_hyb3dvar_lestkf.F90 @@ -52,6 +52,7 @@ SUBROUTINE PDAFlocal_assimilate_hyb3dvar_lestkf(U_collect_state, U_distribute_st ! ! !REVISION HISTORY: ! 2013-08 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocal_assimilate_lestkf.F90 b/src/PDAFlocal_assimilate_lestkf.F90 index fff0300c4..4dd6c5442 100644 --- a/src/PDAFlocal_assimilate_lestkf.F90 +++ b/src/PDAFlocal_assimilate_lestkf.F90 @@ -50,6 +50,7 @@ SUBROUTINE PDAFlocal_assimilate_lestkf(U_collect_state, U_distribute_state, & ! ! !REVISION HISTORY: ! 2013-08 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocal_assimilate_lestkf_si.F90 b/src/PDAFlocal_assimilate_lestkf_si.F90 index 51f9ba88c..ddf37b626 100644 --- a/src/PDAFlocal_assimilate_lestkf_si.F90 +++ b/src/PDAFlocal_assimilate_lestkf_si.F90 @@ -41,6 +41,7 @@ SUBROUTINE PDAFlocal_assimilate_lestkf_si(outflag) ! ! !REVISION HISTORY: ! 2013-08 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocal_assimilate_letkf.F90 b/src/PDAFlocal_assimilate_letkf.F90 index a2d8dc831..b9aed02fc 100644 --- a/src/PDAFlocal_assimilate_letkf.F90 +++ b/src/PDAFlocal_assimilate_letkf.F90 @@ -50,6 +50,7 @@ SUBROUTINE PDAFlocal_assimilate_letkf(U_collect_state, U_distribute_state, & ! ! !REVISION HISTORY: ! 2013-08 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocal_assimilate_letkf_si.F90 b/src/PDAFlocal_assimilate_letkf_si.F90 index 6c0fb5482..74a43c5d3 100644 --- a/src/PDAFlocal_assimilate_letkf_si.F90 +++ b/src/PDAFlocal_assimilate_letkf_si.F90 @@ -41,6 +41,7 @@ SUBROUTINE PDAFlocal_assimilate_letkf_si(outflag) ! ! !REVISION HISTORY: ! 2013-08 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocal_assimilate_lknetf.F90 b/src/PDAFlocal_assimilate_lknetf.F90 index fb5568899..e2be00e27 100644 --- a/src/PDAFlocal_assimilate_lknetf.F90 +++ b/src/PDAFlocal_assimilate_lknetf.F90 @@ -52,6 +52,7 @@ SUBROUTINE PDAFlocal_assimilate_lknetf(U_collect_state, U_distribute_state, & ! ! !REVISION HISTORY: ! 2017-08 - Lars Nerger - Initial code based on LETKF +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocal_assimilate_lknetf_si.F90 b/src/PDAFlocal_assimilate_lknetf_si.F90 index b8c883472..4e79a202b 100644 --- a/src/PDAFlocal_assimilate_lknetf_si.F90 +++ b/src/PDAFlocal_assimilate_lknetf_si.F90 @@ -41,6 +41,7 @@ SUBROUTINE PDAFlocal_assimilate_lknetf_si(outflag) ! ! !REVISION HISTORY: ! 2017-08 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocal_assimilate_lnetf.F90 b/src/PDAFlocal_assimilate_lnetf.F90 index fb2b8402a..1e29a1666 100644 --- a/src/PDAFlocal_assimilate_lnetf.F90 +++ b/src/PDAFlocal_assimilate_lnetf.F90 @@ -49,6 +49,7 @@ SUBROUTINE PDAFlocal_assimilate_lnetf(U_collect_state, U_distribute_state, & ! ! !REVISION HISTORY: ! 2014-05 - Paul Kirchgessner - Initial code based on ETKF +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocal_assimilate_lnetf_si.F90 b/src/PDAFlocal_assimilate_lnetf_si.F90 index e4b8ebbb6..af7c8db98 100644 --- a/src/PDAFlocal_assimilate_lnetf_si.F90 +++ b/src/PDAFlocal_assimilate_lnetf_si.F90 @@ -41,6 +41,7 @@ SUBROUTINE PDAFlocal_assimilate_lnetf_si(outflag) ! ! !REVISION HISTORY: ! 2016-11 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocal_assimilate_lseik.F90 b/src/PDAFlocal_assimilate_lseik.F90 index 8d0aa6ed6..563e153bf 100644 --- a/src/PDAFlocal_assimilate_lseik.F90 +++ b/src/PDAFlocal_assimilate_lseik.F90 @@ -50,6 +50,7 @@ SUBROUTINE PDAFlocal_assimilate_lseik(U_collect_state, U_distribute_state, & ! ! !REVISION HISTORY: ! 2013-08 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocal_assimilate_lseik_si.F90 b/src/PDAFlocal_assimilate_lseik_si.F90 index 8e40b22a7..459e964bc 100644 --- a/src/PDAFlocal_assimilate_lseik_si.F90 +++ b/src/PDAFlocal_assimilate_lseik_si.F90 @@ -41,6 +41,7 @@ SUBROUTINE PDAFlocal_assimilate_lseik_si(outflag) ! ! !REVISION HISTORY: ! 2013-08 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocal_g2l_callback.F90 b/src/PDAFlocal_g2l_cb.F90 similarity index 90% rename from src/PDAFlocal_g2l_callback.F90 rename to src/PDAFlocal_g2l_cb.F90 index 548008902..cdcb1bc4f 100644 --- a/src/PDAFlocal_g2l_callback.F90 +++ b/src/PDAFlocal_g2l_cb.F90 @@ -18,10 +18,10 @@ !$Id$ !BOP ! -! !ROUTINE: PDAFlocal_g2l_callback - Project global to local vector according to index array +! !ROUTINE: PDAFlocal_g2l_cb - Project global to local vector according to index array ! ! !INTERFACE: -SUBROUTINE PDAFlocal_g2l_callback(step, domain_p, dim_p, state_p, dim_l, state_l) +SUBROUTINE PDAFlocal_g2l_cb(step, domain_p, dim_p, state_p, dim_l, state_l) ! !DESCRIPTION: ! Project a global to a local state vector for the localized filters. @@ -63,4 +63,4 @@ SUBROUTINE PDAFlocal_g2l_callback(step, domain_p, dim_p, state_p, dim_l, state_l state_l(i) = state_p(id_lstate_in_pstate(i)) END DO -END SUBROUTINE PDAFlocal_g2l_callback +END SUBROUTINE PDAFlocal_g2l_cb diff --git a/src/PDAFlocal_l2g_callback.F90 b/src/PDAFlocal_l2g_cb.F90 similarity index 92% rename from src/PDAFlocal_l2g_callback.F90 rename to src/PDAFlocal_l2g_cb.F90 index 907eedf7e..c64126f98 100644 --- a/src/PDAFlocal_l2g_callback.F90 +++ b/src/PDAFlocal_l2g_cb.F90 @@ -18,10 +18,10 @@ !$Id$ !BOP ! -! !ROUTINE: PDAFlocal_l2g_callback - Initialize global vector elements from local state vector +! !ROUTINE: PDAFlocal_l2g_cb - Initialize global vector elements from local state vector ! ! !INTERFACE: -SUBROUTINE PDAFlocal_l2g_callback(step, domain_p, dim_l, state_l, dim_p, state_p) +SUBROUTINE PDAFlocal_l2g_cb(step, domain_p, dim_l, state_l, dim_p, state_p) ! !DESCRIPTION: ! Initialize elements of a global state vector from a local state vector. @@ -75,4 +75,4 @@ SUBROUTINE PDAFlocal_l2g_callback(step, domain_p, dim_l, state_l, dim_p, state_p END DO END IF -END SUBROUTINE PDAFlocal_l2g_callback +END SUBROUTINE PDAFlocal_l2g_cb diff --git a/src/PDAFlocal_put_state_en3dvar_lestkf.F90 b/src/PDAFlocal_put_state_en3dvar_lestkf.F90 index 5ce338c3b..f8d27e16c 100644 --- a/src/PDAFlocal_put_state_en3dvar_lestkf.F90 +++ b/src/PDAFlocal_put_state_en3dvar_lestkf.F90 @@ -58,6 +58,7 @@ SUBROUTINE PDAFlocal_put_state_en3dvar_lestkf(U_collect_state, U_init_dim_obs, U ! ! !REVISION HISTORY: ! 2021-03 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: @@ -77,8 +78,8 @@ SUBROUTINE PDAFlocal_put_state_en3dvar_lestkf(U_collect_state, U_init_dim_obs, U ONLY: mype_world, filterpe, & dim_ens_l, modelpe, filter_no_model USE PDAFlocal, & - ONLY: PDAFlocal_g2l_callback, & ! Project global to local state vector - PDAFlocal_l2g_callback ! Project local to global state vecto + ONLY: PDAFlocal_g2l_cb, & ! Project global to local state vector + PDAFlocal_l2g_cb ! Project local to global state vecto IMPLICIT NONE ! !ARGUMENTS: @@ -218,9 +219,8 @@ SUBROUTINE PDAFlocal_put_state_en3dvar_lestkf(U_collect_state, U_init_dim_obs, U U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, U_prepoststep, & U_cvt_ens, U_cvt_adj_ens, U_obs_op_lin, U_obs_op_adj, & U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, U_init_obs_l, U_prodRinvA_l, & - U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_callback, & - PDAFlocal_l2g_callback, & - U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & + U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_cb, & + PDAFlocal_l2g_cb, U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & screen, subtype_filter, incremental, type_forget, type_opt, & flag) diff --git a/src/PDAFlocal_put_state_hyb3dvar_lestkf.F90 b/src/PDAFlocal_put_state_hyb3dvar_lestkf.F90 index f49a84c6d..a59505c49 100644 --- a/src/PDAFlocal_put_state_hyb3dvar_lestkf.F90 +++ b/src/PDAFlocal_put_state_hyb3dvar_lestkf.F90 @@ -58,6 +58,7 @@ SUBROUTINE PDAFlocal_put_state_hyb3dvar_lestkf(U_collect_state, & ! ! !REVISION HISTORY: ! 2021-03 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: @@ -77,8 +78,8 @@ SUBROUTINE PDAFlocal_put_state_hyb3dvar_lestkf(U_collect_state, & ONLY: mype_world, filterpe, & dim_ens_l, modelpe, filter_no_model USE PDAFlocal, & - ONLY: PDAFlocal_g2l_callback, & ! Project global to local state vector - PDAFlocal_l2g_callback ! Project local to global state vector + ONLY: PDAFlocal_g2l_cb, & ! Project global to local state vector + PDAFlocal_l2g_cb ! Project local to global state vector IMPLICIT NONE ! !ARGUMENTS: @@ -220,9 +221,8 @@ SUBROUTINE PDAFlocal_put_state_hyb3dvar_lestkf(U_collect_state, & U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, U_prepoststep, & U_cvt_ens, U_cvt_adj_ens, U_cvt, U_cvt_adj, U_obs_op_lin, U_obs_op_adj, & U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, U_init_obs_l, U_prodRinvA_l, & - U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_callback, & - PDAFlocal_l2g_callback, & - U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & + U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_cb, & + PDAFlocal_l2g_cb, U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & screen, subtype_filter, incremental, type_forget, type_opt, & flag) diff --git a/src/PDAFlocal_put_state_lestkf.F90 b/src/PDAFlocal_put_state_lestkf.F90 index 4d833fa0d..7136d4349 100644 --- a/src/PDAFlocal_put_state_lestkf.F90 +++ b/src/PDAFlocal_put_state_lestkf.F90 @@ -54,6 +54,7 @@ SUBROUTINE PDAFlocal_put_state_lestkf(U_collect_state, U_init_dim_obs, U_obs_op, ! ! !REVISION HISTORY: ! 2011-09 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: @@ -70,8 +71,8 @@ SUBROUTINE PDAFlocal_put_state_lestkf(U_collect_state, U_init_dim_obs, U_obs_op, USE PDAF_mod_filtermpi, & ONLY: mype_world, filterpe, dim_ens_l, modelpe, filter_no_model USE PDAFlocal, & - ONLY: PDAFlocal_g2l_callback, & ! Project global to local state vector - PDAFlocal_l2g_callback ! Project local to global state vecto + ONLY: PDAFlocal_g2l_cb, & ! Project global to local state vector + PDAFlocal_l2g_cb ! Project local to global state vecto IMPLICIT NONE ! !ARGUMENTS: @@ -189,9 +190,8 @@ SUBROUTINE PDAFlocal_put_state_lestkf(U_collect_state, U_init_dim_obs, U_obs_op, CALL PDAF_lestkf_update(step_obs, dim_p, dim_obs, dim_ens, rank, state, & eofU, eofV, state_inc, U_init_dim_obs, & U_obs_op, U_init_obs, U_init_obs_l, U_prodRinvA_l, U_init_n_domains_p, & - U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_callback, & - PDAFlocal_l2g_callback, U_g2l_obs, & - U_init_obsvar, U_init_obsvar_l, U_prepoststep, screen, subtype_filter, & + U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_cb, & + PDAFlocal_l2g_cb, U_g2l_obs, U_init_obsvar, U_init_obsvar_l, U_prepoststep, screen, subtype_filter, & incremental, type_forget, type_sqrt, dim_lag, sens, & cnt_maxlag, flag) END IF OnFilterPE diff --git a/src/PDAFlocal_put_state_lestkf_si.F90 b/src/PDAFlocal_put_state_lestkf_si.F90 index 488c6c9b4..9da7687e0 100644 --- a/src/PDAFlocal_put_state_lestkf_si.F90 +++ b/src/PDAFlocal_put_state_lestkf_si.F90 @@ -40,6 +40,7 @@ SUBROUTINE PDAFlocal_put_state_lestkf_si(outflag) ! ! !REVISION HISTORY: ! 2011-09 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocal_put_state_letkf.F90 b/src/PDAFlocal_put_state_letkf.F90 index e5ca61cd6..aca627599 100644 --- a/src/PDAFlocal_put_state_letkf.F90 +++ b/src/PDAFlocal_put_state_letkf.F90 @@ -54,6 +54,7 @@ SUBROUTINE PDAFlocal_put_state_letkf(U_collect_state, U_init_dim_obs, U_obs_op, ! ! !REVISION HISTORY: ! 2009-07 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: @@ -70,8 +71,8 @@ SUBROUTINE PDAFlocal_put_state_letkf(U_collect_state, U_init_dim_obs, U_obs_op, USE PDAF_mod_filtermpi, & ONLY: mype_world, filterpe, dim_ens_l, modelpe, filter_no_model USE PDAFlocal, & - ONLY: PDAFlocal_g2l_callback, & ! Project global to local state vector - PDAFlocal_l2g_callback ! Project local to global state vecto + ONLY: PDAFlocal_g2l_cb, & ! Project global to local state vector + PDAFlocal_l2g_cb ! Project local to global state vecto IMPLICIT NONE ! !ARGUMENTS: @@ -189,9 +190,8 @@ SUBROUTINE PDAFlocal_put_state_letkf(U_collect_state, U_init_dim_obs, U_obs_op, CALL PDAF_letkf_update(step_obs, dim_p, dim_obs, dim_ens, state, & eofU, eofV, state_inc, U_init_dim_obs, & U_obs_op, U_init_obs, U_init_obs_l, U_prodRinvA_l, U_init_n_domains_p, & - U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_callback, & - PDAFlocal_l2g_callback, & - U_g2l_obs, & + U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_cb, & + PDAFlocal_l2g_cb, U_g2l_obs, & U_init_obsvar, U_init_obsvar_l, U_prepoststep, screen, subtype_filter, & incremental, type_forget, dim_lag, sens, cnt_maxlag, flag) END IF OnFilterPE diff --git a/src/PDAFlocal_put_state_letkf_si.F90 b/src/PDAFlocal_put_state_letkf_si.F90 index 0a0d835a3..0b5a64d7e 100644 --- a/src/PDAFlocal_put_state_letkf_si.F90 +++ b/src/PDAFlocal_put_state_letkf_si.F90 @@ -40,6 +40,7 @@ SUBROUTINE PDAFlocal_put_state_letkf_si(outflag) ! ! !REVISION HISTORY: ! 2010-07 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocal_put_state_lknetf.F90 b/src/PDAFlocal_put_state_lknetf.F90 index 24df0b9a6..9bb67c417 100644 --- a/src/PDAFlocal_put_state_lknetf.F90 +++ b/src/PDAFlocal_put_state_lknetf.F90 @@ -55,6 +55,7 @@ SUBROUTINE PDAFlocal_put_state_lknetf(U_collect_state, U_init_dim_obs, U_obs_op, ! ! !REVISION HISTORY: ! 2017-08 - Lars Nerger - Initial code based on LETKF +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: @@ -71,8 +72,8 @@ SUBROUTINE PDAFlocal_put_state_lknetf(U_collect_state, U_init_dim_obs, U_obs_op, USE PDAF_mod_filtermpi, & ONLY: mype_world, filterpe, dim_ens_l, modelpe, filter_no_model USE PDAFlocal, & - ONLY: PDAFlocal_g2l_callback, & ! Project global to local state vector - PDAFlocal_l2g_callback ! Project local to global state vecto + ONLY: PDAFlocal_g2l_cb, & ! Project global to local state vector + PDAFlocal_l2g_cb ! Project local to global state vecto IMPLICIT NONE ! !ARGUMENTS: @@ -194,8 +195,8 @@ SUBROUTINE PDAFlocal_put_state_lknetf(U_collect_state, U_init_dim_obs, U_obs_op, CALL PDAF_lknetf_update(step_obs, dim_p, dim_obs, dim_ens, state, & eofU, eofV, state_inc, U_init_dim_obs, & U_obs_op, U_init_obs, U_init_obs_l, U_prodRinvA_l, U_init_n_domains_p, & - U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_callback, & - PDAFlocal_l2g_callback, U_g2l_obs, & + U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_cb, & + PDAFlocal_l2g_cb, U_g2l_obs, & U_init_obsvar, U_init_obsvar_l, U_likelihood_l, & U_prepoststep, screen, subtype_filter, incremental, type_forget, & dim_lag, sens, cnt_maxlag, flag) @@ -203,8 +204,8 @@ SUBROUTINE PDAFlocal_put_state_lknetf(U_collect_state, U_init_dim_obs, U_obs_op, CALL PDAF_lknetf_step_update(step_obs, dim_p, dim_obs, dim_ens, state, & eofU, eofV, state_inc, U_init_dim_obs, & U_obs_op, U_init_obs, U_init_obs_l, U_prodRinvA_hyb_l, U_init_n_domains_p, & - U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_callback, & - PDAFlocal_l2g_callback, U_g2l_obs, & + U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_cb, & + PDAFlocal_l2g_cb, U_g2l_obs, & U_init_obsvar, U_init_obsvar_l, U_likelihood_l, U_likelihood_hyb_l, U_prepoststep, & screen, subtype_filter, & incremental, type_forget, dim_lag, sens, cnt_maxlag, flag) diff --git a/src/PDAFlocal_put_state_lknetf_si.F90 b/src/PDAFlocal_put_state_lknetf_si.F90 index a48e85e0f..1b3756678 100644 --- a/src/PDAFlocal_put_state_lknetf_si.F90 +++ b/src/PDAFlocal_put_state_lknetf_si.F90 @@ -40,6 +40,7 @@ SUBROUTINE PDAFlocal_put_state_lknetf_si(outflag) ! ! !REVISION HISTORY: ! 2018-07 - Lars Nerger - Initial code based on LETKF +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocal_put_state_lnetf.F90 b/src/PDAFlocal_put_state_lnetf.F90 index e07f74dc7..a8bee8cf8 100644 --- a/src/PDAFlocal_put_state_lnetf.F90 +++ b/src/PDAFlocal_put_state_lnetf.F90 @@ -54,6 +54,7 @@ SUBROUTINE PDAFlocal_put_state_lnetf(U_collect_state, U_init_dim_obs, U_obs_op, ! ! !REVISION HISTORY: ! 2014-05 - Paul Kirchgessner - Initial code based on LETKF +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: @@ -72,8 +73,8 @@ SUBROUTINE PDAFlocal_put_state_lnetf(U_collect_state, U_init_dim_obs, U_obs_op, USE PDAF_mod_filtermpi, & ONLY: mype_world, filterpe, dim_ens_l USE PDAFlocal, & - ONLY: PDAFlocal_g2l_callback, & ! Project global to local state vector - PDAFlocal_l2g_callback ! Project local to global state vecto + ONLY: PDAFlocal_g2l_cb, & ! Project global to local state vector + PDAFlocal_l2g_cb ! Project local to global state vecto IMPLICIT NONE ! !ARGUMENTS: @@ -177,9 +178,8 @@ SUBROUTINE PDAFlocal_put_state_lnetf(U_collect_state, U_init_dim_obs, U_obs_op, CALL PDAF_lnetf_update(step_obs, dim_p, dim_obs, dim_ens, & state, eofU, eofV, type_forget, noise_type, pf_noise_amp, & U_obs_op, U_init_dim_obs, U_init_obs_l, U_likelihood_l, & - U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_callback, & - PDAFlocal_l2g_callback, & - U_g2l_obs, U_prepoststep, screen, subtype_filter, & + U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_cb, & + PDAFlocal_l2g_cb, U_g2l_obs, U_prepoststep, screen, subtype_filter, & dim_lag, sens, cnt_maxlag, flag) END IF OnFilterPE diff --git a/src/PDAFlocal_put_state_lnetf_si.F90 b/src/PDAFlocal_put_state_lnetf_si.F90 index 4a8771a94..1d0a90ae5 100644 --- a/src/PDAFlocal_put_state_lnetf_si.F90 +++ b/src/PDAFlocal_put_state_lnetf_si.F90 @@ -40,6 +40,7 @@ SUBROUTINE PDAFlocal_put_state_lnetf_si(outflag) ! ! !REVISION HISTORY: ! 2016-11 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocal_put_state_lseik.F90 b/src/PDAFlocal_put_state_lseik.F90 index f9ea3543b..cea6aac1b 100644 --- a/src/PDAFlocal_put_state_lseik.F90 +++ b/src/PDAFlocal_put_state_lseik.F90 @@ -54,6 +54,7 @@ SUBROUTINE PDAFlocal_put_state_lseik(U_collect_state, U_init_dim_obs, U_obs_op, ! ! !REVISION HISTORY: ! 2003-09 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: @@ -69,8 +70,8 @@ SUBROUTINE PDAFlocal_put_state_lseik(U_collect_state, U_init_dim_obs, U_obs_op, USE PDAF_mod_filtermpi, & ONLY: mype_world, filterpe, dim_ens_l, modelpe, filter_no_model USE PDAFlocal, & - ONLY: PDAFlocal_g2l_callback, & ! Project global to local state vector - PDAFlocal_l2g_callback ! Project local to global state vecto + ONLY: PDAFlocal_g2l_cb, & ! Project global to local state vector + PDAFlocal_l2g_cb ! Project local to global state vecto IMPLICIT NONE ! !ARGUMENTS: @@ -188,8 +189,7 @@ SUBROUTINE PDAFlocal_put_state_lseik(U_collect_state, U_init_dim_obs, U_obs_op, CALL PDAF_lseik_update(step_obs, dim_p, dim_obs, dim_ens, rank, state, & eofU, eofV, state_inc, U_init_dim_obs, & U_obs_op, U_init_obs, U_init_obs_l, U_prodRinvA_l, U_init_n_domains_p, & - U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_callback, & - PDAFlocal_l2g_callback, U_g2l_obs, & + U_init_dim_l, U_init_dim_obs_l, PDAFlocal_g2l_cb, PDAFlocal_l2g_cb, U_g2l_obs, & U_init_obsvar, U_init_obsvar_l, U_prepoststep, screen, subtype_filter, & incremental, type_forget, type_sqrt, flag) END IF OnFilterPE diff --git a/src/PDAFlocal_put_state_lseik_si.F90 b/src/PDAFlocal_put_state_lseik_si.F90 index ac345d897..5256d756b 100644 --- a/src/PDAFlocal_put_state_lseik_si.F90 +++ b/src/PDAFlocal_put_state_lseik_si.F90 @@ -40,6 +40,7 @@ SUBROUTINE PDAFlocal_put_state_lseik_si(outflag) ! ! !REVISION HISTORY: ! 2010-07 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocalomi_assimilate_local.F90 b/src/PDAFlocalomi_assimilate.F90 similarity index 95% rename from src/PDAFlocalomi_assimilate_local.F90 rename to src/PDAFlocalomi_assimilate.F90 index bbdc6c5f3..8d4949c2a 100644 --- a/src/PDAFlocalomi_assimilate_local.F90 +++ b/src/PDAFlocalomi_assimilate.F90 @@ -18,10 +18,10 @@ !$Id$ !BOP ! -! !ROUTINE: PDAFlocalomi_assimilate_local --- Interface to transfer state to PDAF +! !ROUTINE: PDAFlocalomi_assimilate --- Interface to transfer state to PDAF ! ! !INTERFACE: -SUBROUTINE PDAFlocalomi_assimilate_local(collect_state_pdaf, distribute_state_pdaf, & +SUBROUTINE PDAFlocalomi_assimilate(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, prepoststep_pdaf, init_n_domains_pdaf, & init_dim_l_pdaf, init_dim_obs_l_pdaf, & next_observation_pdaf, outflag) @@ -44,6 +44,7 @@ SUBROUTINE PDAFlocalomi_assimilate_local(collect_state_pdaf, distribute_state_pd ! ! !REVISION HISTORY: ! 2020-11 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: @@ -85,7 +86,7 @@ SUBROUTINE PDAFlocalomi_assimilate_local(collect_state_pdaf, distribute_state_pd ! ************************************************** IF (debug>0) & - WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_local -- START' + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate -- START' IF (TRIM(filterstr) == 'LSEIK') THEN CALL PDAFlocal_assimilate_lseik(collect_state_pdaf, distribute_state_pdaf, & @@ -133,6 +134,6 @@ SUBROUTINE PDAFlocalomi_assimilate_local(collect_state_pdaf, distribute_state_pd CALL PDAFomi_dealloc() IF (debug>0) & - WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_local -- END' + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate -- END' -END SUBROUTINE PDAFlocalomi_assimilate_local +END SUBROUTINE PDAFlocalomi_assimilate diff --git a/src/PDAFlocalomi_assimilate_en3dvar_lestkf.F90 b/src/PDAFlocalomi_assimilate_en3dvar_lestkf.F90 index 87c692e97..68226c06a 100644 --- a/src/PDAFlocalomi_assimilate_en3dvar_lestkf.F90 +++ b/src/PDAFlocalomi_assimilate_en3dvar_lestkf.F90 @@ -45,6 +45,7 @@ SUBROUTINE PDAFlocalomi_assimilate_en3dvar_lestkf(collect_state_pdaf, distribute ! ! !REVISION HISTORY: ! 2021-04 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.F90 b/src/PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.F90 index d00b7689b..0185fa586 100644 --- a/src/PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.F90 +++ b/src/PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.F90 @@ -45,6 +45,7 @@ SUBROUTINE PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR(collect_state_pdaf, d ! ! !REVISION HISTORY: ! 2024-08 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocalomi_assimilate_hyb3dvar_lestkf.F90 b/src/PDAFlocalomi_assimilate_hyb3dvar_lestkf.F90 index 383580947..64b3305ce 100644 --- a/src/PDAFlocalomi_assimilate_hyb3dvar_lestkf.F90 +++ b/src/PDAFlocalomi_assimilate_hyb3dvar_lestkf.F90 @@ -45,6 +45,7 @@ SUBROUTINE PDAFlocalomi_assimilate_hyb3dvar_lestkf(collect_state_pdaf, distribut ! ! !REVISION HISTORY: ! 2021-04 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 b/src/PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 index 7e10e0170..0928b74e0 100644 --- a/src/PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 +++ b/src/PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 @@ -45,6 +45,7 @@ SUBROUTINE PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR(collect_state_pdaf, ! ! !REVISION HISTORY: ! 2024-08 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocalomi_assimilate_lknetf_nondiagR.F90 b/src/PDAFlocalomi_assimilate_lknetf_nondiagR.F90 index e9e136447..a96fd25ee 100644 --- a/src/PDAFlocalomi_assimilate_lknetf_nondiagR.F90 +++ b/src/PDAFlocalomi_assimilate_lknetf_nondiagR.F90 @@ -45,6 +45,7 @@ SUBROUTINE PDAFlocalomi_assimilate_lknetf_nondiagR(collect_state_pdaf, distribut ! ! !REVISION HISTORY: ! 2024-08 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocalomi_assimilate_lknetf_nondiagR_si.F90 b/src/PDAFlocalomi_assimilate_lknetf_nondiagR_si.F90 index d548e6054..62451ce87 100644 --- a/src/PDAFlocalomi_assimilate_lknetf_nondiagR_si.F90 +++ b/src/PDAFlocalomi_assimilate_lknetf_nondiagR_si.F90 @@ -41,6 +41,7 @@ SUBROUTINE PDAFlocalomi_assimilate_lknetf_nondiagR_si(outflag) ! ! !REVISION HISTORY: ! 2024-08 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocalomi_assimilate_lnetf_nondiagR.F90 b/src/PDAFlocalomi_assimilate_lnetf_nondiagR.F90 index 3315e8585..2d34cb8ec 100644 --- a/src/PDAFlocalomi_assimilate_lnetf_nondiagR.F90 +++ b/src/PDAFlocalomi_assimilate_lnetf_nondiagR.F90 @@ -44,6 +44,7 @@ SUBROUTINE PDAFlocalomi_assimilate_lnetf_nondiagR(collect_state_pdaf, distribute ! ! !REVISION HISTORY: ! 2024-08 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocalomi_assimilate_lnetf_nondiagR_si.F90 b/src/PDAFlocalomi_assimilate_lnetf_nondiagR_si.F90 index b868ef0e1..88f84b9f7 100644 --- a/src/PDAFlocalomi_assimilate_lnetf_nondiagR_si.F90 +++ b/src/PDAFlocalomi_assimilate_lnetf_nondiagR_si.F90 @@ -41,6 +41,7 @@ SUBROUTINE PDAFlocalomi_assimilate_lnetf_nondiagR_si(outflag) ! ! !REVISION HISTORY: ! 2024-08 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocalomi_assimilate_local_nondiagR.F90 b/src/PDAFlocalomi_assimilate_nondiagR.F90 similarity index 93% rename from src/PDAFlocalomi_assimilate_local_nondiagR.F90 rename to src/PDAFlocalomi_assimilate_nondiagR.F90 index f64d02ee8..dbd917ee8 100644 --- a/src/PDAFlocalomi_assimilate_local_nondiagR.F90 +++ b/src/PDAFlocalomi_assimilate_nondiagR.F90 @@ -18,10 +18,10 @@ !$Id$ !BOP ! -! !ROUTINE: PDAFlocalomi_assimilate_local_nondiagR --- Interface to transfer state to PDAF +! !ROUTINE: PDAFlocalomi_assimilate_nondiagR --- Interface to transfer state to PDAF ! ! !INTERFACE: -SUBROUTINE PDAFlocalomi_assimilate_local_nondiagR(collect_state_pdaf, distribute_state_pdaf, & +SUBROUTINE PDAFlocalomi_assimilate_nondiagR(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, & next_observation_pdaf, outflag) @@ -44,6 +44,7 @@ SUBROUTINE PDAFlocalomi_assimilate_local_nondiagR(collect_state_pdaf, distribute ! ! !REVISION HISTORY: ! 2024-07 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: @@ -82,7 +83,7 @@ SUBROUTINE PDAFlocalomi_assimilate_local_nondiagR(collect_state_pdaf, distribute ! ************************************************** IF (debug>0) & - WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_local_nondiagR -- START' + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_nondiagR -- START' IF (TRIM(filterstr) == 'LSEIK') THEN CALL PDAFlocal_assimilate_lseik(collect_state_pdaf, distribute_state_pdaf, & @@ -112,7 +113,7 @@ SUBROUTINE PDAFlocalomi_assimilate_local_nondiagR(collect_state_pdaf, distribute WRITE (*,*) 'PDAF-ERROR: Use PDAFlocalomi_assimilate_lknetf_nondiagR for LKNETF' outflag=200 ELSE - WRITE (*,*) 'PDAF-ERROR: Invalid filter choice for PDAFlocalomi_assimilate_local_nondiagR' + WRITE (*,*) 'PDAF-ERROR: Invalid filter choice for PDAFlocalomi_assimilate_nondiagR' outflag=200 END IF @@ -124,6 +125,6 @@ SUBROUTINE PDAFlocalomi_assimilate_local_nondiagR(collect_state_pdaf, distribute CALL PDAFomi_dealloc() IF (debug>0) & - WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_local_nondiagR -- END' + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_assimilate_nondiagR -- END' -END SUBROUTINE PDAFlocalomi_assimilate_local_nondiagR +END SUBROUTINE PDAFlocalomi_assimilate_nondiagR diff --git a/src/PDAFlocalomi_assimilate_local_nondiagR_si.F90 b/src/PDAFlocalomi_assimilate_nondiagR_si.F90 similarity index 87% rename from src/PDAFlocalomi_assimilate_local_nondiagR_si.F90 rename to src/PDAFlocalomi_assimilate_nondiagR_si.F90 index 88b6c542a..51ecceaae 100644 --- a/src/PDAFlocalomi_assimilate_local_nondiagR_si.F90 +++ b/src/PDAFlocalomi_assimilate_nondiagR_si.F90 @@ -18,10 +18,10 @@ !$Id$ !BOP ! -! !ROUTINE: PDAFlocalomi_assimilate_local_nondiagR_si --- Interface to transfer state to PDAF +! !ROUTINE: PDAFlocalomi_assimilate_nondiagR_si --- Interface to transfer state to PDAF ! ! !INTERFACE: -SUBROUTINE PDAFlocalomi_assimilate_local_nondiagR_si(outflag) +SUBROUTINE PDAFlocalomi_assimilate_nondiagR_si(outflag) ! !DESCRIPTION: ! Interface routine called from the model during the @@ -41,6 +41,7 @@ SUBROUTINE PDAFlocalomi_assimilate_local_nondiagR_si(outflag) ! ! !REVISION HISTORY: ! 2024-07 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: @@ -64,7 +65,7 @@ SUBROUTINE PDAFlocalomi_assimilate_local_nondiagR_si(outflag) ! !CALLING SEQUENCE: ! Called by: model code -! Calls: PDAFlocalomi_assimilate_local_nondiagR +! Calls: PDAFlocalomi_assimilate_nondiagR !EOP @@ -72,9 +73,9 @@ SUBROUTINE PDAFlocalomi_assimilate_local_nondiagR_si(outflag) ! *** Call the full put_state interface routine *** ! ************************************************** - CALL PDAFlocalomi_assimilate_local_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocalomi_assimilate_nondiagR(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, & next_observation_pdaf, outflag) -END SUBROUTINE PDAFlocalomi_assimilate_local_nondiagR_si +END SUBROUTINE PDAFlocalomi_assimilate_nondiagR_si diff --git a/src/PDAFlocalomi_assimilate_local_si.F90 b/src/PDAFlocalomi_assimilate_si.F90 similarity index 88% rename from src/PDAFlocalomi_assimilate_local_si.F90 rename to src/PDAFlocalomi_assimilate_si.F90 index 768a16aa4..f98a2e2ee 100644 --- a/src/PDAFlocalomi_assimilate_local_si.F90 +++ b/src/PDAFlocalomi_assimilate_si.F90 @@ -18,10 +18,10 @@ !$Id$ !BOP ! -! !ROUTINE: PDAFlocalomi_assimilate_local_si --- Interface to transfer state to PDAF +! !ROUTINE: PDAFlocalomi_assimilate_si --- Interface to transfer state to PDAF ! ! !INTERFACE: -SUBROUTINE PDAFlocalomi_assimilate_local_si(outflag) +SUBROUTINE PDAFlocalomi_assimilate_si(outflag) ! !DESCRIPTION: ! Interface routine called from the model during the @@ -41,6 +41,7 @@ SUBROUTINE PDAFlocalomi_assimilate_local_si(outflag) ! ! !REVISION HISTORY: ! 2021-10 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: @@ -64,7 +65,7 @@ SUBROUTINE PDAFlocalomi_assimilate_local_si(outflag) ! !CALLING SEQUENCE: ! Called by: model code -! Calls: PDAFlocalomi_assimilate_local +! Calls: PDAFlocalomi_assimilate !EOP @@ -72,9 +73,9 @@ SUBROUTINE PDAFlocalomi_assimilate_local_si(outflag) ! *** Call the full put_state interface routine *** ! ************************************************** - CALL PDAFlocalomi_assimilate_local(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocalomi_assimilate(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & init_dim_l_pdaf, init_dim_obs_l_pdafomi, & next_observation_pdaf, outflag) -END SUBROUTINE PDAFlocalomi_assimilate_local_si +END SUBROUTINE PDAFlocalomi_assimilate_si diff --git a/src/PDAFlocalomi_put_state_local.F90 b/src/PDAFlocalomi_put_state.F90 similarity index 95% rename from src/PDAFlocalomi_put_state_local.F90 rename to src/PDAFlocalomi_put_state.F90 index 59692f515..272e2237a 100644 --- a/src/PDAFlocalomi_put_state_local.F90 +++ b/src/PDAFlocalomi_put_state.F90 @@ -18,10 +18,10 @@ !$Id$ !BOP ! -! !ROUTINE: PDAFlocalomi_put_state_local --- Interface to PDAF for domain-local filters +! !ROUTINE: PDAFlocalomi_put_state --- Interface to PDAF for domain-local filters ! ! !INTERFACE: -SUBROUTINE PDAFlocalomi_put_state_local(collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & +SUBROUTINE PDAFlocalomi_put_state(collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & prepoststep_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & outflag) @@ -43,6 +43,7 @@ SUBROUTINE PDAFlocalomi_put_state_local(collect_state_pdaf, init_dim_obs_f_pdaf, ! ! !REVISION HISTORY: ! 2020-11 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: @@ -120,4 +121,4 @@ SUBROUTINE PDAFlocalomi_put_state_local(collect_state_pdaf, init_dim_obs_f_pdaf, CALL PDAFomi_dealloc() -END SUBROUTINE PDAFlocalomi_put_state_local +END SUBROUTINE PDAFlocalomi_put_state diff --git a/src/PDAFlocalomi_put_state_en3dvar_lestkf.F90 b/src/PDAFlocalomi_put_state_en3dvar_lestkf.F90 index 07883a7c6..2b7606430 100644 --- a/src/PDAFlocalomi_put_state_en3dvar_lestkf.F90 +++ b/src/PDAFlocalomi_put_state_en3dvar_lestkf.F90 @@ -45,6 +45,7 @@ SUBROUTINE PDAFlocalomi_put_state_en3dvar_lestkf(collect_state_pdaf, & ! ! !REVISION HISTORY: ! 2021-04 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR.F90 b/src/PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR.F90 index 73bd74d5e..be6babc0b 100644 --- a/src/PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR.F90 +++ b/src/PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR.F90 @@ -45,6 +45,7 @@ SUBROUTINE PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR(collect_state_pdaf, & ! ! !REVISION HISTORY: ! 2024-08 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: @@ -62,8 +63,7 @@ SUBROUTINE PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR(collect_state_pdaf, & EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector cvt_adj_ens_pdaf ! Apply adjoint control vector transform matrix EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains - init_dim_l_pdaf, & ! Init state dimension for local ana. domain - l2g_state_pdaf ! Init full state from local state + init_dim_l_pdaf ! Init state dimension for local ana. domain EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector obs_op_pdafomi, & ! Full observation operator obs_op_lin_pdafomi, & ! Linearized observation operator diff --git a/src/PDAFlocalomi_put_state_hyb3dvar_lestkf.F90 b/src/PDAFlocalomi_put_state_hyb3dvar_lestkf.F90 index fe9978600..5d4db2bc3 100644 --- a/src/PDAFlocalomi_put_state_hyb3dvar_lestkf.F90 +++ b/src/PDAFlocalomi_put_state_hyb3dvar_lestkf.F90 @@ -45,6 +45,7 @@ SUBROUTINE PDAFlocalomi_put_state_hyb3dvar_lestkf(collect_state_pdaf, & ! ! !REVISION HISTORY: ! 2021-04 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: diff --git a/src/PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR.F90 b/src/PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR.F90 index 96020f7f8..890a8a32c 100644 --- a/src/PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR.F90 +++ b/src/PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR.F90 @@ -46,6 +46,7 @@ SUBROUTINE PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR(collect_state_pdaf, & ! ! !REVISION HISTORY: ! 2024-08 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: @@ -65,8 +66,7 @@ SUBROUTINE PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR(collect_state_pdaf, & cvt_pdaf, & ! Apply control vector transform matrix to control vector cvt_adj_pdaf ! Apply adjoint control vector transform matrix EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains - init_dim_l_pdaf, & ! Init state dimension for local ana. domain - l2g_state_pdaf ! Init full state from local state + init_dim_l_pdaf ! Init state dimension for local ana. domain EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector obs_op_pdafomi, & ! Full observation operator obs_op_lin_pdafomi, & ! Linearized observation operator diff --git a/src/PDAFlocalomi_put_state_lknetf_nondiagR.F90 b/src/PDAFlocalomi_put_state_lknetf_nondiagR.F90 index ccd9e169d..9750e98d6 100644 --- a/src/PDAFlocalomi_put_state_lknetf_nondiagR.F90 +++ b/src/PDAFlocalomi_put_state_lknetf_nondiagR.F90 @@ -45,6 +45,7 @@ SUBROUTINE PDAFlocalomi_put_state_lknetf_nondiagR(collect_state_pdaf, & ! ! !REVISION HISTORY: ! 2024-08 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: @@ -60,8 +61,7 @@ SUBROUTINE PDAFlocalomi_put_state_lknetf_nondiagR(collect_state_pdaf, & EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector prepoststep_pdaf ! User supplied pre/poststep routine EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains - init_dim_l_pdaf, & ! Init state dimension for local ana. domain - l2g_state_pdaf ! Init full state from local state + init_dim_l_pdaf ! Init state dimension for local ana. domain EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector obs_op_pdafomi, & ! Full observation operator init_dim_obs_l_pdafomi, & ! Initialize local dimimension of obs. vector diff --git a/src/PDAFlocalomi_put_state_lknetf_nondiagR_si.F90 b/src/PDAFlocalomi_put_state_lknetf_nondiagR_si.F90 index f694309a7..4ba77d36f 100644 --- a/src/PDAFlocalomi_put_state_lknetf_nondiagR_si.F90 +++ b/src/PDAFlocalomi_put_state_lknetf_nondiagR_si.F90 @@ -41,6 +41,7 @@ SUBROUTINE PDAFlocalomi_put_state_lknetf_nondiagR_si(outflag) ! ! !REVISION HISTORY: ! 2024-08 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: @@ -53,8 +54,7 @@ SUBROUTINE PDAFlocalomi_put_state_lknetf_nondiagR_si(outflag) EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector prepoststep_pdaf ! User supplied pre/poststep routine EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains - init_dim_l_pdaf, & ! Init state dimension for local ana. domain - l2g_state_pdaf ! Init full state from local state + init_dim_l_pdaf ! Init state dimension for local ana. domain EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain init_dim_obs_l_pdafomi, & ! Get dimension of obs. vector for local analysis domain diff --git a/src/PDAFlocalomi_put_state_lnetf_nondiagR.F90 b/src/PDAFlocalomi_put_state_lnetf_nondiagR.F90 index f4908f8bf..91956b47c 100644 --- a/src/PDAFlocalomi_put_state_lnetf_nondiagR.F90 +++ b/src/PDAFlocalomi_put_state_lnetf_nondiagR.F90 @@ -44,6 +44,7 @@ SUBROUTINE PDAFlocalomi_put_state_lnetf_nondiagR(collect_state_pdaf, & ! ! !REVISION HISTORY: ! 2024-08 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: @@ -59,8 +60,7 @@ SUBROUTINE PDAFlocalomi_put_state_lnetf_nondiagR(collect_state_pdaf, & EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector prepoststep_pdaf ! User supplied pre/poststep routine EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains - init_dim_l_pdaf, & ! Init state dimension for local ana. domain - l2g_state_pdaf ! Init full state from local state + init_dim_l_pdaf ! Init state dimension for local ana. domain EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector obs_op_pdafomi, & ! Full observation operator init_dim_obs_l_pdafomi, & ! Initialize local dimimension of obs. vector diff --git a/src/PDAFlocalomi_put_state_lnetf_nondiagR_si.F90 b/src/PDAFlocalomi_put_state_lnetf_nondiagR_si.F90 index c1d9940b8..dd2ad67a9 100644 --- a/src/PDAFlocalomi_put_state_lnetf_nondiagR_si.F90 +++ b/src/PDAFlocalomi_put_state_lnetf_nondiagR_si.F90 @@ -41,6 +41,7 @@ SUBROUTINE PDAFlocalomi_put_state_lnetf_nondiagR_si(outflag) ! ! !REVISION HISTORY: ! 2024-08 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: @@ -53,8 +54,7 @@ SUBROUTINE PDAFlocalomi_put_state_lnetf_nondiagR_si(outflag) EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector prepoststep_pdaf ! User supplied pre/poststep routine EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains - init_dim_l_pdaf, & ! Init state dimension for local ana. domain - l2g_state_pdaf ! Init full state from local state + init_dim_l_pdaf ! Init state dimension for local ana. domain EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain init_dim_obs_l_pdafomi, & ! Get dimension of obs. vector for local analysis domain diff --git a/src/PDAFlocalomi_put_state_local_nondiagR.F90 b/src/PDAFlocalomi_put_state_nondiagR.F90 similarity index 91% rename from src/PDAFlocalomi_put_state_local_nondiagR.F90 rename to src/PDAFlocalomi_put_state_nondiagR.F90 index c43dddf9a..5e1d2c2af 100644 --- a/src/PDAFlocalomi_put_state_local_nondiagR.F90 +++ b/src/PDAFlocalomi_put_state_nondiagR.F90 @@ -18,10 +18,10 @@ !$Id$ !BOP ! -! !ROUTINE: PDAFlocalomi_put_state_local_nondiagR --- Interface to transfer state to PDAF +! !ROUTINE: PDAFlocalomi_put_state_nondiagR --- Interface to transfer state to PDAF ! ! !INTERFACE: -SUBROUTINE PDAFlocalomi_put_state_local_nondiagR(collect_state_pdaf, & +SUBROUTINE PDAFlocalomi_put_state_nondiagR(collect_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, & outflag) @@ -44,6 +44,7 @@ SUBROUTINE PDAFlocalomi_put_state_local_nondiagR(collect_state_pdaf, & ! ! !REVISION HISTORY: ! 2024-07 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: @@ -59,8 +60,7 @@ SUBROUTINE PDAFlocalomi_put_state_local_nondiagR(collect_state_pdaf, & EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector prepoststep_pdaf ! User supplied pre/poststep routine EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains - init_dim_l_pdaf, & ! Init state dimension for local ana. domain - l2g_state_pdaf ! Init full state from local state + init_dim_l_pdaf ! Init state dimension for local ana. domain EXTERNAL :: init_dim_obs_pdafomi, & ! Initialize dimension of full observation vector obs_op_pdafomi, & ! Full observation operator init_dim_obs_l_pdafomi, & ! Initialize local dimimension of obs. vector @@ -81,7 +81,7 @@ SUBROUTINE PDAFlocalomi_put_state_local_nondiagR(collect_state_pdaf, & ! ************************************************** IF (debug>0) & - WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_put_state_local_nondiagR -- START' + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_put_state_nondiagR -- START' IF (TRIM(filterstr) == 'LSEIK') THEN CALL PDAFlocal_put_state_lseik(collect_state_pdaf, init_dim_obs_pdafomi, obs_op_pdafomi, & @@ -108,7 +108,7 @@ SUBROUTINE PDAFlocalomi_put_state_local_nondiagR(collect_state_pdaf, & WRITE (*,*) 'PDAF-ERROR: Use PDAFlocalomi_put_state_lknetf_nondiagR for LKNETF' outflag=200 ELSE - WRITE (*,*) 'PDAF-ERROR: Invalid filter choice for PDAFlocalomi_put_state_local_nondiagR' + WRITE (*,*) 'PDAF-ERROR: Invalid filter choice for PDAFlocalomi_put_state_nondiagR' outflag=200 END IF @@ -120,6 +120,6 @@ SUBROUTINE PDAFlocalomi_put_state_local_nondiagR(collect_state_pdaf, & CALL PDAFomi_dealloc() IF (debug>0) & - WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_put_state_local_nondiagR -- END' + WRITE (*,*) '++ PDAFomi-debug: ', debug, 'PDAFlocalomi_put_state_nondiagR -- END' -END SUBROUTINE PDAFlocalomi_put_state_local_nondiagR +END SUBROUTINE PDAFlocalomi_put_state_nondiagR diff --git a/src/PDAFlocalomi_put_state_local_nondiagR_si.F90 b/src/PDAFlocalomi_put_state_nondiagR_si.F90 similarity index 84% rename from src/PDAFlocalomi_put_state_local_nondiagR_si.F90 rename to src/PDAFlocalomi_put_state_nondiagR_si.F90 index 0c4459594..fb21b3622 100644 --- a/src/PDAFlocalomi_put_state_local_nondiagR_si.F90 +++ b/src/PDAFlocalomi_put_state_nondiagR_si.F90 @@ -18,10 +18,10 @@ !$Id$ !BOP ! -! !ROUTINE: PDAFlocalomi_put_state_local_nondiagR_si --- Interface to transfer state to PDAF +! !ROUTINE: PDAFlocalomi_put_state_nondiagR_si --- Interface to transfer state to PDAF ! ! !INTERFACE: -SUBROUTINE PDAFlocalomi_put_state_local_nondiagR_si(outflag) +SUBROUTINE PDAFlocalomi_put_state_nondiagR_si(outflag) ! !DESCRIPTION: ! Interface routine called from the model during the @@ -41,6 +41,7 @@ SUBROUTINE PDAFlocalomi_put_state_local_nondiagR_si(outflag) ! ! !REVISION HISTORY: ! 2024-07 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: @@ -53,8 +54,7 @@ SUBROUTINE PDAFlocalomi_put_state_local_nondiagR_si(outflag) EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector prepoststep_pdaf ! User supplied pre/poststep routine EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains - init_dim_l_pdaf, & ! Init state dimension for local ana. domain - l2g_state_pdaf ! Init full state from local state + init_dim_l_pdaf ! Init state dimension for local ana. domain EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain init_dim_obs_l_pdafomi, & ! Get dimension of obs. vector for local analysis domain @@ -63,7 +63,7 @@ SUBROUTINE PDAFlocalomi_put_state_local_nondiagR_si(outflag) ! !CALLING SEQUENCE: ! Called by: model code -! Calls: PDAFlocalomi_put_state_local_nondiagR +! Calls: PDAFlocalomi_put_state_nondiagR !EOP @@ -71,9 +71,9 @@ SUBROUTINE PDAFlocalomi_put_state_local_nondiagR_si(outflag) ! *** Call the full put_state interface routine *** ! ************************************************** - CALL PDAFlocalomi_put_state_local_nondiagR(collect_state_pdaf, & + CALL PDAFlocalomi_put_state_nondiagR(collect_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & init_dim_l_pdaf, init_dim_obs_l_pdafomi, prodRinvA_l_pdafomi, & outflag) -END SUBROUTINE PDAFlocalomi_put_state_local_nondiagR_si +END SUBROUTINE PDAFlocalomi_put_state_nondiagR_si diff --git a/src/PDAFlocalomi_put_state_local_si.F90 b/src/PDAFlocalomi_put_state_si.F90 similarity index 84% rename from src/PDAFlocalomi_put_state_local_si.F90 rename to src/PDAFlocalomi_put_state_si.F90 index 785a3f389..f3ad304c5 100644 --- a/src/PDAFlocalomi_put_state_local_si.F90 +++ b/src/PDAFlocalomi_put_state_si.F90 @@ -18,10 +18,10 @@ !$Id$ !BOP ! -! !ROUTINE: PDAFlocalomi_put_state_local_si --- Interface to transfer state to PDAF +! !ROUTINE: PDAFlocalomi_put_state_si --- Interface to transfer state to PDAF ! ! !INTERFACE: -SUBROUTINE PDAFlocalomi_put_state_local_si(outflag) +SUBROUTINE PDAFlocalomi_put_state_si(outflag) ! !DESCRIPTION: ! Interface routine called from the model after the @@ -40,6 +40,7 @@ SUBROUTINE PDAFlocalomi_put_state_local_si(outflag) ! ! !REVISION HISTORY: ! 2021-10 - Lars Nerger - Initial code +! 2024-08 - Yumeng Chen - Initial code based on non-PDAFlocal routine ! Later revisions - see svn log ! ! !USES: @@ -53,8 +54,7 @@ SUBROUTINE PDAFlocalomi_put_state_local_si(outflag) prepoststep_pdaf ! User supplied pre/poststep routine ! Localization of state vector EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains - init_dim_l_pdaf, & ! Initialize state dimension for local analysis domain - l2g_state_pdaf ! Update global state from state on local analysis domain + init_dim_l_pdaf ! Initialize state dimension for local analysis domain ! Interface to PDAF-OMI for local and global filters EXTERNAL :: & init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain @@ -64,7 +64,7 @@ SUBROUTINE PDAFlocalomi_put_state_local_si(outflag) ! !CALLING SEQUENCE: ! Called by: model code -! Calls: PDAFlocalomi_put_state_local +! Calls: PDAFlocalomi_put_state !EOP @@ -72,8 +72,8 @@ SUBROUTINE PDAFlocalomi_put_state_local_si(outflag) ! *** Call the full put_state interface routine *** ! ************************************************** - CALL PDAFlocalomi_put_state_local(collect_state_pdaf, init_dim_obs_pdafomi, & + CALL PDAFlocalomi_put_state(collect_state_pdaf, init_dim_obs_pdafomi, & obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & init_dim_obs_l_pdafomi, outflag) -END SUBROUTINE PDAFlocalomi_put_state_local_si +END SUBROUTINE PDAFlocalomi_put_state_si From d1bfe3c666fc2201a589d7fa25fec2f22564deef Mon Sep 17 00:00:00 2001 From: Yumeng Chen Date: Fri, 23 Aug 2024 13:23:57 +0000 Subject: [PATCH 57/83] Change corresponding Makefile --- src/Makefile | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/src/Makefile b/src/Makefile index f93c182cb..a087ca3f0 100644 --- a/src/Makefile +++ b/src/Makefile @@ -112,16 +112,16 @@ OBJ_PDAF_GEN = PDAF_analysis_utils.o \ PDAF_g2l.o \ PDAF_l2g.o \ PDAFlocal.o \ - PDAFlocal_g2l_callback.o \ - PDAFlocal_l2g_callback.o \ - PDAFlocalomi_assimilate_local.o \ - PDAFlocalomi_assimilate_local_nondiagR.o \ - PDAFlocalomi_assimilate_local_nondiagR_si.o \ - PDAFlocalomi_assimilate_local_si.o \ - PDAFlocalomi_put_state_local.o \ - PDAFlocalomi_put_state_local_nondiagR.o \ - PDAFlocalomi_put_state_local_nondiagR_si.o \ - PDAFlocalomi_put_state_local_si.o \ + PDAFlocal_g2l_cb.o \ + PDAFlocal_l2g_cb.o \ + PDAFlocalomi_assimilate.o \ + PDAFlocalomi_assimilate_nondiagR.o \ + PDAFlocalomi_assimilate_nondiagR_si.o \ + PDAFlocalomi_assimilate_si.o \ + PDAFlocalomi_put_state.o \ + PDAFlocalomi_put_state_nondiagR.o \ + PDAFlocalomi_put_state_nondiagR_si.o \ + PDAFlocalomi_put_state_si.o \ PDAF_correlation_function.o From 373016296ee0dd817b901d696097348b07864c08 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Sat, 24 Aug 2024 08:44:26 +0200 Subject: [PATCH 58/83] Remove PDAF_g2l.F90 and PDAF_l2g.F90 as they are now provided from PDAFlocal. Adapt src/Makefile and include full set of PDAFlocal and PDAFlocalomi routines in /Makefile --- Makefile | 66 +++++++++++++++++++++++++++++++++++++++-------- src/Makefile | 3 +-- src/PDAF_g2l.F90 | 67 ------------------------------------------------ src/PDAF_l2g.F90 | 67 ------------------------------------------------ 4 files changed, 57 insertions(+), 146 deletions(-) delete mode 100644 src/PDAF_g2l.F90 delete mode 100644 src/PDAF_l2g.F90 diff --git a/Makefile b/Makefile index 665c794d0..a947d7203 100644 --- a/Makefile +++ b/Makefile @@ -123,11 +123,17 @@ SRC_PDAF_GEN = PDAF_analysis_utils.F90 \ PDAF_get_ensstats.F90 \ PDAF_set_debug_flag.F90 \ PDAF_set_offline_mode.F90 \ - PDAF_g2l.F90 \ - PDAF_l2g.F90 \ PDAFlocal.F90 \ - PDAFlocal_g2l_callback.F90 \ - PDAFlocal_l2g_callback.F90 \ + PDAFlocal_g2l_cb.F90 \ + PDAFlocal_l2g_cb.F90 \ + PDAFlocalomi_assimilate.F90 \ + PDAFlocalomi_assimilate_nondiagR.F90 \ + PDAFlocalomi_assimilate_nondiagR_si.F90 \ + PDAFlocalomi_assimilate_si.F90 \ + PDAFlocalomi_put_state.F90 \ + PDAFlocalomi_put_state_nondiagR.F90 \ + PDAFlocalomi_put_state_nondiagR_si.F90 \ + PDAFlocalomi_put_state_si.F90 \ PDAF_correlation_function.F90 # Specific PDAF-routines for SEIK @@ -162,7 +168,11 @@ SRC_LSEIK = PDAF_lseik_init.F90 \ PDAF_lseik_update.F90 \ PDAF_lseik_analysis.F90 \ PDAF_lseik_resample.F90 \ - PDAF_lseik_analysis_trans.F90 + PDAF_lseik_analysis_trans.F90 \ + PDAFlocal_put_state_lseik.F90 \ + PDAFlocal_put_state_lseik_si.F90 \ + PDAFlocal_assimilate_lseik.F90 \ + PDAFlocal_assimilate_lseik_si.F90 # Specific PDAF-routines for SEEK SRC_SEEK = PDAF_seek_init.F90 \ @@ -227,7 +237,11 @@ SRC_LETKF = PDAF_letkf_init.F90 \ PDAF_letkf_update.F90 \ PDAF_letkf_analysis.F90 \ PDAF_letkf_analysis_T.F90 \ - PDAF_letkf_analysis_fixed.F90 + PDAF_letkf_analysis_fixed.F90 \ + PDAFlocal_put_state_letkf.F90 \ + PDAFlocal_put_state_letkf_si.F90 \ + PDAFlocal_assimilate_letkf.F90 \ + PDAFlocal_assimilate_letkf_si.F90 # Specific PDAF-routines for ESTKF SRC_ESTKF = PDAF_estkf_init.F90 \ @@ -255,7 +269,11 @@ SRC_LESTKF = PDAF_lestkf_init.F90 \ PDAF_assimilate_lestkf_si.F90 \ PDAF_lestkf_update.F90 \ PDAF_lestkf_analysis.F90 \ - PDAF_lestkf_analysis_fixed.F90 + PDAF_lestkf_analysis_fixed.F90 \ + PDAFlocal_put_state_lestkf.F90 \ + PDAFlocal_put_state_lestkf_si.F90 \ + PDAFlocal_assimilate_lestkf.F90 \ + PDAFlocal_assimilate_lestkf_si.F90 # Specific PDAF-routines for LEnKF SRC_LENKF = PDAF_lenkf_init.F90 \ @@ -312,7 +330,15 @@ SRC_LNETF = PDAF_lnetf_init.F90 \ PDAFomi_put_state_lnetf_nondiagR.F90 \ PDAFomi_put_state_lnetf_nondiagR_si.F90 \ PDAFomi_assimilate_lnetf_nondiagR.F90 \ - PDAFomi_assimilate_lnetf_nondiagR_si.F90 + PDAFomi_assimilate_lnetf_nondiagR_si.F90 \ + PDAFlocal_put_state_lnetf.F90 \ + PDAFlocal_put_state_lnetf_si.F90 \ + PDAFlocal_assimilate_lnetf.F90 \ + PDAFlocal_assimilate_lnetf_si.F90 \ + PDAFlocalomi_assimilate_lnetf_nondiagR.F90 \ + PDAFlocalomi_assimilate_lnetf_nondiagR_si.F90 \ + PDAFlocalomi_put_state_lnetf_nondiagR.F90 \ + PDAFlocalomi_put_state_lnetf_nondiagR_si.F90 # Specific PDAF-routines for PF SRC_PF = PDAF_pf_init.F90 \ @@ -349,7 +375,15 @@ SRC_LKNETF = PDAF_lknetf_init.F90 \ PDAFomi_put_state_lknetf_nondiagR.F90 \ PDAFomi_put_state_lknetf_nondiagR_si.F90 \ PDAFomi_assimilate_lknetf_nondiagR.F90 \ - PDAFomi_assimilate_lknetf_nondiagR_si.F90 + PDAFomi_assimilate_lknetf_nondiagR_si.F90 \ + PDAFlocal_put_state_lknetf.F90 \ + PDAFlocal_put_state_lknetf_si.F90 \ + PDAFlocal_assimilate_lknetf.F90 \ + PDAFlocal_assimilate_lknetf_si.F90 \ + PDAFlocalomi_assimilate_lknetf_nondiagR.F90 \ + PDAFlocalomi_assimilate_lknetf_nondiagR_si.F90 \ + PDAFlocalomi_put_state_lknetf_nondiagR.F90 \ + PDAFlocalomi_put_state_lknetf_nondiagR_si.F90 # Specific PDAF-routines for generating observations SRC_OBSGEN = PDAF_genobs_init.F90 \ @@ -403,6 +437,10 @@ SRC_3DVAR = PDAF_put_state_3dvar.F90 \ PDAF_hyb3dvar_optim_cg.F90 \ PDAF_hyb3dvar_costf_cvt.F90 \ PDAF_hyb3dvar_costf_cg_cvt.F90 \ + PDAFlocal_put_state_en3dvar_lestkf.F90 \ + PDAFlocal_put_state_hyb3dvar_lestkf.F90 \ + PDAFlocal_assimilate_en3dvar_lestkf.F90 \ + PDAFlocal_assimilate_hyb3dvar_lestkf.F90 \ PDAFomi_assimilate_3dvar.F90 \ PDAFomi_assimilate_en3dvar_estkf.F90 \ PDAFomi_assimilate_en3dvar_lestkf.F90 \ @@ -413,6 +451,10 @@ SRC_3DVAR = PDAF_put_state_3dvar.F90 \ PDAFomi_assimilate_en3dvar_lestkf_nondiagR.F90 \ PDAFomi_assimilate_hyb3dvar_estkf_nondiagR.F90 \ PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 \ + PDAFlocalomi_assimilate_en3dvar_lestkf.F90 \ + PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.F90 \ + PDAFlocalomi_assimilate_hyb3dvar_lestkf.F90 \ + PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 \ PDAFomi_put_state_3dvar.F90 \ PDAFomi_put_state_en3dvar_estkf.F90 \ PDAFomi_put_state_en3dvar_lestkf.F90 \ @@ -422,7 +464,11 @@ SRC_3DVAR = PDAF_put_state_3dvar.F90 \ PDAFomi_put_state_en3dvar_estkf_nondiagR.F90 \ PDAFomi_put_state_en3dvar_lestkf_nondiagR.F90 \ PDAFomi_put_state_hyb3dvar_estkf_nondiagR.F90 \ - PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.F90 + PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.F90 \ + PDAFlocalomi_put_state_en3dvar_lestkf.F90 \ + PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR.F90 \ + PDAFlocalomi_put_state_hyb3dvar_lestkf.F90 \ + PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR.F90 # Additional file for 3DVar already specified in SRC_3DVAR_ini # PDAF_3dvar_memtime.F90 diff --git a/src/Makefile b/src/Makefile index a087ca3f0..4c4258414 100644 --- a/src/Makefile +++ b/src/Makefile @@ -109,8 +109,6 @@ OBJ_PDAF_GEN = PDAF_analysis_utils.o \ PDAF_get_ensstats.o \ PDAF_set_debug_flag.o \ PDAF_set_offline_mode.o \ - PDAF_g2l.o \ - PDAF_l2g.o \ PDAFlocal.o \ PDAFlocal_g2l_cb.o \ PDAFlocal_l2g_cb.o \ @@ -373,6 +371,7 @@ OBJ_LKNETF = PDAF_lknetf_init.o \ PDAFlocalomi_assimilate_lknetf_nondiagR_si.o \ PDAFlocalomi_put_state_lknetf_nondiagR.o \ PDAFlocalomi_put_state_lknetf_nondiagR_si.o + # Specific PDAF-routines for generating observations OBJ_OBSGEN = PDAF_genobs_init.o \ PDAF_genobs_alloc.o \ diff --git a/src/PDAF_g2l.F90 b/src/PDAF_g2l.F90 deleted file mode 100644 index cc533af57..000000000 --- a/src/PDAF_g2l.F90 +++ /dev/null @@ -1,67 +0,0 @@ -! Copyright (c) 2004-2024 Lars Nerger -! -! This file is part of PDAF. -! -! PDAF is free software: you can redistribute it and/or modify -! it under the terms of the GNU Lesser General Public License -! as published by the Free Software Foundation, either version -! 3 of the License, or (at your option) any later version. -! -! PDAF is distributed in the hope that it will be useful, -! but WITHOUT ANY WARRANTY; without even the implied warranty of -! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -! GNU Lesser General Public License for more details. -! -! You should have received a copy of the GNU Lesser General Public -! License along with PDAF. If not, see . -! -!$Id$ -!BOP -! -! !ROUTINE: PDAF_g2l - Project global to local vector according to index array -! -! !INTERFACE: -SUBROUTINE PDAF_g2l(dim_p, dim_l, idx_l_in_p, state_p, state_l) - -! !DESCRIPTION: -! Project a global to a local state vector for the localized filters. -! The mapping is done using the provided index array. -! -! !REVISION HISTORY: -! 2024-08 - Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: -! Include definitions for real type of different precision -! (Defines BLAS/LAPACK routines and MPI_REALTYPE) -#include "typedefs.h" - - IMPLICIT NONE - -! !ARGUMENTS: - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - INTEGER, INTENT(in) :: dim_l !< Local state dimension - INTEGER, INTENT(in) :: idx_l_in_p(dim_l) !< Index array for projection - REAL, INTENT(in) :: state_p(dim_p) !< PE-local full state vector - REAL, INTENT(out) :: state_l(dim_l) !< State vector on local analysis domain - -! !CALLING SEQUENCE: -! Called by user code -!EOP - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************* -! *** Initialize local state vector *** -! ************************************* - - DO i = 1, dim_l - ! Only use the index value if it is in a valid range - IF (idx_l_in_p(i) > 0 .and. idx_l_in_p(i) <= dim_p) THEN - state_l(i) = state_p(idx_l_in_p(i)) - END IF - END DO - -END SUBROUTINE PDAF_g2l diff --git a/src/PDAF_l2g.F90 b/src/PDAF_l2g.F90 deleted file mode 100644 index 0196c5405..000000000 --- a/src/PDAF_l2g.F90 +++ /dev/null @@ -1,67 +0,0 @@ -! Copyright (c) 2004-2024 Lars Nerger -! -! This file is part of PDAF. -! -! PDAF is free software: you can redistribute it and/or modify -! it under the terms of the GNU Lesser General Public License -! as published by the Free Software Foundation, either version -! 3 of the License, or (at your option) any later version. -! -! PDAF is distributed in the hope that it will be useful, -! but WITHOUT ANY WARRANTY; without even the implied warranty of -! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -! GNU Lesser General Public License for more details. -! -! You should have received a copy of the GNU Lesser General Public -! License along with PDAF. If not, see . -! -!$Id$ -!BOP -! -! !ROUTINE: PDAF_l2g - Initialize global vector elements from local state vector -! -! !INTERFACE: -SUBROUTINE PDAF_l2g(dim_p, dim_l, idx_l_in_p, state_p, state_l) - -! !DESCRIPTION: -! Initialize elements of a global state vector from a local state vector -! utilizing the provided index array. This is used for localized filters. -! -! To exclude any element of the local state vector from the initialization -! one can set the corresponding index value to 0. -! -! !REVISION HISTORY: -! 2024-08 - Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - - IMPLICIT NONE - -! !ARGUMENTS: - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - INTEGER, INTENT(in) :: dim_l !< Local state dimension - INTEGER, INTENT(in) :: idx_l_in_p(dim_l) !< Index array for projection - REAL, INTENT(inout) :: state_p(dim_p) !< PE-local full state vector - REAL, INTENT(in) :: state_l(dim_l) !< State vector on local analysis domain - -! !CALLING SEQUENCE: -! Called by user code -!EOP - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************************** -! *** Initialize elements of global state vector *** -! ************************************************** - - DO i = 1, dim_l - ! Only use the index value if it is in a valid range - IF (idx_l_in_p(i) > 0 .and. idx_l_in_p(i) <= dim_p) THEN - state_p(idx_l_in_p(i)) = state_l(i) - END IF - END DO - -END SUBROUTINE PDAF_l2g From b6f88c7bce26918cc32af0f52c02ab75305e1971 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Tue, 27 Aug 2024 14:37:58 +0200 Subject: [PATCH 59/83] REvise structur eof PDAFlocal separating PDAFlocal_set_indices, PDAFlocal_set_increment_weights, PDAFlocal_clear_increment_weights from PDAFlocal module to make the easier usable. Also revise all tutorials and templates for using PDAFlocal and removing g2l_state_pdaf and l2g_state_pdaf. --- Depends | 62 +- Makefile | 11 +- make.arch/linux_gfortran.h | 62 ++ src/Makefile | 6 +- src/PDAF_interfaces_module.F90 | 38 +- src/PDAFlocal.F90 | 102 +- src/PDAFlocal_clear_increment_weights.F90 | 48 + src/PDAFlocal_interfaces.F90 | 881 ++++++++++++++++++ src/PDAFlocal_set_increment_weights.F90 | 59 ++ src/PDAFlocal_set_indices.F90 | 55 ++ templates/classical/offline/Makefile | 2 - .../offline/assimilation_pdaf_offline.F90 | 29 +- .../classical/offline/g2l_state_pdaf.F90 | 61 -- .../classical/offline/init_dim_l_pdaf.F90 | 14 +- .../classical/offline/init_pdaf_parse.F90 | 8 +- .../classical/offline/l2g_state_pdaf.F90 | 62 -- .../classical/offline/mod_assimilation.F90 | 59 +- templates/classical/online/Makefile | 2 - .../classical/online/assimilate_pdaf.F90 | 34 +- templates/classical/online/g2l_state_pdaf.F90 | 63 -- .../classical/online/init_dim_l_pdaf.F90 | 14 +- templates/classical/online/l2g_state_pdaf.F90 | 64 -- .../classical/online/mod_assimilation.F90 | 12 +- templates/offline_omi/Makefile | 4 +- .../offline_omi/assimilate_pdaf_offline.F90 | 26 +- templates/offline_omi/g2l_state_pdaf.F90 | 49 - templates/offline_omi/init_dim_l_pdaf.F90 | 16 +- templates/offline_omi/l2g_state_pdaf.F90 | 50 - templates/offline_omi/mod_assimilation.F90 | 16 +- templates/online_omi/Makefile | 2 +- templates/online_omi/assimilate_pdaf.F90 | 18 +- templates/online_omi/g2l_state_pdaf.F90 | 49 - templates/online_omi/init_dim_l_pdaf.F90 | 14 +- templates/online_omi/l2g_state_pdaf.F90 | 50 - templates/online_omi/mod_assimilation.F90 | 19 +- templates/online_omi_flexible/Makefile | 10 +- .../online_omi_flexible/assimilate_pdaf.F90 | 10 +- .../online_omi_flexible/g2l_state_pdaf.F90 | 49 - .../online_omi_flexible/init_dim_l_pdaf.F90 | 14 +- .../online_omi_flexible/l2g_state_pdaf.F90 | 50 - .../online_omi_flexible/mod_assimilation.F90 | 19 +- tutorial/3dvar/offline_2D_serial/Makefile | 6 +- .../assimilate_pdaf_offline.F90 | 19 +- .../offline_2D_serial/g2l_state_pdaf.F90 | 49 - .../offline_2D_serial/init_dim_l_pdaf.F90 | 14 +- .../offline_2D_serial/l2g_state_pdaf.F90 | 50 - .../offline_2D_serial/mod_assimilation.F90 | 19 +- .../3dvar/online_2D_parallelmodel/Makefile | 6 +- .../assimilate_pdaf.F90 | 17 +- .../g2l_state_pdaf.F90 | 49 - .../init_dim_l_pdaf.F90 | 12 +- .../l2g_state_pdaf.F90 | 50 - .../mod_assimilation.F90 | 19 +- tutorial/3dvar/online_2D_serialmodel/Makefile | 6 +- .../online_2D_serialmodel/assimilate_pdaf.F90 | 19 +- .../online_2D_serialmodel/g2l_state_pdaf.F90 | 49 - .../online_2D_serialmodel/init_dim_l_pdaf.F90 | 14 +- .../online_2D_serialmodel/l2g_state_pdaf.F90 | 50 - .../mod_assimilation.F90 | 16 +- .../classical/offline_2D_parallel/Makefile | 4 +- .../assimilation_pdaf_offline.F90 | 14 +- .../offline_2D_parallel/dummympi/mpif.h | 14 - .../offline_2D_parallel/finalize_pdaf.F90 | 2 +- .../offline_2D_parallel/g2l_state_pdaf.F90 | 60 -- .../offline_2D_parallel/init_dim_l_pdaf.F90 | 20 +- .../offline_2D_parallel/l2g_state_pdaf.F90 | 61 -- .../offline_2D_parallel/mod_assimilation.F90 | 14 +- tutorial/classical/offline_2D_serial/Makefile | 4 +- .../assimilation_pdaf_offline.F90 | 14 +- .../offline_2D_serial/g2l_state_pdaf.F90 | 60 -- .../offline_2D_serial/init_dim_l_pdaf.F90 | 14 +- .../offline_2D_serial/init_dim_obs_l_pdaf.F90 | 1 - .../offline_2D_serial/l2g_state_pdaf.F90 | 61 -- .../offline_2D_serial/mod_assimilation.F90 | 27 +- .../online_2D_parallelmodel/Makefile | 4 +- .../assimilate_pdaf.F90 | 8 +- .../g2l_state_pdaf.F90 | 60 -- .../init_dim_l_pdaf.F90 | 20 +- .../l2g_state_pdaf.F90 | 61 -- .../mod_assimilation.F90 | 18 +- .../online_2D_parallelmodel_fullpar/Makefile | 4 +- .../assimilate_pdaf.F90 | 8 +- .../g2l_state_pdaf.F90 | 60 -- .../init_dim_l_pdaf.F90 | 20 +- .../l2g_state_pdaf.F90 | 61 -- .../mod_assimilation.F90 | 18 +- .../Makefile | 4 +- .../assimilate_pdaf.F90 | 8 +- .../g2l_state_pdaf.F90 | 60 -- .../init_dim_l_pdaf.F90 | 20 +- .../l2g_state_pdaf.F90 | 61 -- .../mod_assimilation.F90 | 18 +- .../classical/online_2D_serialmodel/Makefile | 4 +- .../online_2D_serialmodel/assimilate_pdaf.F90 | 10 +- .../online_2D_serialmodel/g2l_state_pdaf.F90 | 62 -- .../online_2D_serialmodel/init_dim_l_pdaf.F90 | 14 +- .../online_2D_serialmodel/l2g_state_pdaf.F90 | 64 -- .../mod_assimilation.F90 | 17 +- tutorial/offline_2D_parallel/Makefile | 4 +- .../assimilate_pdaf_offline.F90 | 30 +- .../offline_2D_parallel/finalize_pdaf.F90 | 2 +- .../offline_2D_parallel/g2l_state_pdaf.F90 | 49 - .../offline_2D_parallel/init_dim_l_pdaf.F90 | 13 +- .../offline_2D_parallel/l2g_state_pdaf.F90 | 50 - .../offline_2D_parallel/mod_assimilation.F90 | 11 +- tutorial/offline_2D_serial/Makefile | 4 +- .../assimilate_pdaf_offline.F90 | 24 +- tutorial/offline_2D_serial/g2l_state_pdaf.F90 | 49 - .../offline_2D_serial/init_dim_l_pdaf.F90 | 14 +- tutorial/offline_2D_serial/l2g_state_pdaf.F90 | 50 - .../offline_2D_serial/mod_assimilation.F90 | 22 +- tutorial/online_2D_parallelmodel/Makefile | 4 +- .../assimilate_pdaf.F90 | 13 +- .../g2l_state_pdaf.F90 | 49 - .../init_dim_l_pdaf.F90 | 12 +- .../l2g_state_pdaf.F90 | 50 - .../mod_assimilation.F90 | 20 +- .../online_2D_parallelmodel_fullpar/Makefile | 4 +- .../assimilate_pdaf.F90 | 13 +- .../g2l_state_pdaf.F90 | 49 - .../init_dim_l_pdaf.F90 | 12 +- .../l2g_state_pdaf.F90 | 50 - .../mod_assimilation.F90 | 19 +- .../Makefile | 4 +- .../assimilate_pdaf.F90 | 13 +- .../g2l_state_pdaf.F90 | 49 - .../init_dim_l_pdaf.F90 | 12 +- .../l2g_state_pdaf.F90 | 50 - .../mod_assimilation.F90 | 19 +- tutorial/online_2D_serialmodel/Makefile | 6 +- .../online_2D_serialmodel/assimilate_pdaf.F90 | 16 +- .../online_2D_serialmodel/init_dim_l_pdaf.F90 | 14 +- .../mod_assimilation.F90 | 16 +- .../online_2D_serialmodel_2fields/Makefile | 6 +- .../assimilate_pdaf.F90 | 13 +- .../g2l_state_pdaf.F90 | 49 - .../init_dim_l_pdaf.F90 | 12 +- .../l2g_state_pdaf.F90 | 50 - .../mod_assimilation.F90 | 19 +- 139 files changed, 1777 insertions(+), 2919 deletions(-) create mode 100644 make.arch/linux_gfortran.h create mode 100644 src/PDAFlocal_clear_increment_weights.F90 create mode 100644 src/PDAFlocal_interfaces.F90 create mode 100644 src/PDAFlocal_set_increment_weights.F90 create mode 100644 src/PDAFlocal_set_indices.F90 delete mode 100644 templates/classical/offline/g2l_state_pdaf.F90 delete mode 100644 templates/classical/offline/l2g_state_pdaf.F90 delete mode 100644 templates/classical/online/g2l_state_pdaf.F90 delete mode 100644 templates/classical/online/l2g_state_pdaf.F90 delete mode 100644 templates/offline_omi/g2l_state_pdaf.F90 delete mode 100644 templates/offline_omi/l2g_state_pdaf.F90 delete mode 100644 templates/online_omi/g2l_state_pdaf.F90 delete mode 100644 templates/online_omi/l2g_state_pdaf.F90 delete mode 100644 templates/online_omi_flexible/g2l_state_pdaf.F90 delete mode 100644 templates/online_omi_flexible/l2g_state_pdaf.F90 delete mode 100644 tutorial/3dvar/offline_2D_serial/g2l_state_pdaf.F90 delete mode 100644 tutorial/3dvar/offline_2D_serial/l2g_state_pdaf.F90 delete mode 100644 tutorial/3dvar/online_2D_parallelmodel/g2l_state_pdaf.F90 delete mode 100644 tutorial/3dvar/online_2D_parallelmodel/l2g_state_pdaf.F90 delete mode 100644 tutorial/3dvar/online_2D_serialmodel/g2l_state_pdaf.F90 delete mode 100644 tutorial/3dvar/online_2D_serialmodel/l2g_state_pdaf.F90 delete mode 100644 tutorial/classical/offline_2D_parallel/dummympi/mpif.h delete mode 100644 tutorial/classical/offline_2D_parallel/g2l_state_pdaf.F90 delete mode 100644 tutorial/classical/offline_2D_parallel/l2g_state_pdaf.F90 delete mode 100644 tutorial/classical/offline_2D_serial/g2l_state_pdaf.F90 delete mode 100644 tutorial/classical/offline_2D_serial/l2g_state_pdaf.F90 delete mode 100644 tutorial/classical/online_2D_parallelmodel/g2l_state_pdaf.F90 delete mode 100644 tutorial/classical/online_2D_parallelmodel/l2g_state_pdaf.F90 delete mode 100644 tutorial/classical/online_2D_parallelmodel_fullpar/g2l_state_pdaf.F90 delete mode 100644 tutorial/classical/online_2D_parallelmodel_fullpar/l2g_state_pdaf.F90 delete mode 100644 tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/g2l_state_pdaf.F90 delete mode 100644 tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/l2g_state_pdaf.F90 delete mode 100644 tutorial/classical/online_2D_serialmodel/g2l_state_pdaf.F90 delete mode 100644 tutorial/classical/online_2D_serialmodel/l2g_state_pdaf.F90 delete mode 100644 tutorial/offline_2D_parallel/g2l_state_pdaf.F90 delete mode 100644 tutorial/offline_2D_parallel/l2g_state_pdaf.F90 delete mode 100644 tutorial/offline_2D_serial/g2l_state_pdaf.F90 delete mode 100644 tutorial/offline_2D_serial/l2g_state_pdaf.F90 delete mode 100644 tutorial/online_2D_parallelmodel/g2l_state_pdaf.F90 delete mode 100644 tutorial/online_2D_parallelmodel/l2g_state_pdaf.F90 delete mode 100644 tutorial/online_2D_parallelmodel_fullpar/g2l_state_pdaf.F90 delete mode 100644 tutorial/online_2D_parallelmodel_fullpar/l2g_state_pdaf.F90 delete mode 100644 tutorial/online_2D_parallelmodel_fullpar_1fpe/g2l_state_pdaf.F90 delete mode 100644 tutorial/online_2D_parallelmodel_fullpar_1fpe/l2g_state_pdaf.F90 delete mode 100644 tutorial/online_2D_serialmodel_2fields/g2l_state_pdaf.F90 delete mode 100644 tutorial/online_2D_serialmodel_2fields/l2g_state_pdaf.F90 diff --git a/Depends b/Depends index 7be34a096..eabea45b2 100644 --- a/Depends +++ b/Depends @@ -93,7 +93,6 @@ $(OBJDIR)/PDAF_etkf_memtime.o: ./src/PDAF_etkf_memtime.F90 $(OBJDIR)/PDAF_timer. $(OBJDIR)/PDAF_etkf_options.o: ./src/PDAF_etkf_options.F90 $(OBJDIR)/PDAF_etkf_update.o: ./src/PDAF_etkf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_force_analysis.o: ./src/PDAF_force_analysis.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_g2l.o: ./src/PDAF_g2l.F90 ./src/typedefs.h $(OBJDIR)/PDAF_gather_dim_obs_f.o: ./src/PDAF_gather_dim_obs_f.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h $(OBJDIR)/PDAF_gather_obs_f.o: ./src/PDAF_gather_obs_f.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h $(OBJDIR)/PDAF_gather_obs_f2.o: ./src/PDAF_gather_obs_f2.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h @@ -130,8 +129,7 @@ $(OBJDIR)/PDAF_inflate_weights.o: ./src/PDAF_inflate_weights.F90 $(OBJDIR)/PDAF_init.o: ./src/PDAF_init.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_init_filters.o: ./src/PDAF_init_filters.F90 $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_init_si.o: ./src/PDAF_init_si.F90 -$(OBJDIR)/PDAF_interfaces_module.o: ./src/PDAF_interfaces_module.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_l2g.o: ./src/PDAF_l2g.F90 +$(OBJDIR)/PDAF_interfaces_module.o: ./src/PDAF_interfaces_module.F90 $(OBJDIR)/PDAFlocal_interfaces.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h $(OBJDIR)/PDAF_lenkf_alloc.o: ./src/PDAF_lenkf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_lenkf_analysis_rsm.o: ./src/PDAF_lenkf_analysis_rsm.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h $(OBJDIR)/PDAF_lenkf_init.o: ./src/PDAF_lenkf_init.F90 $(OBJDIR)/PDAF_mod_filter.o @@ -283,9 +281,61 @@ $(OBJDIR)/PDAF_smoother_netf.o: ./src/PDAF_smoother_netf.F90 $(OBJDIR)/PDAF_time $(OBJDIR)/PDAF_smoother_shift.o: ./src/PDAF_smoother_shift.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h $(OBJDIR)/PDAF_timer.o: ./src/PDAF_timer.F90 $(OBJDIR)/PDAF_timer_mpi.o: ./src/PDAF_timer_mpi.F90 -$(OBJDIR)/PDAFlocal.o: ./src/PDAFlocal.F90 -$(OBJDIR)/PDAFlocal_g2l_callback.o: ./src/PDAFlocal_g2l_callback.F90 $(OBJDIR)/PDAFlocal.o -$(OBJDIR)/PDAFlocal_l2g_callback.o: ./src/PDAFlocal_l2g_callback.F90 $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocal.o: ./src/PDAFlocal.F90 $(OBJDIR)/PDAFlocal_interfaces.o +$(OBJDIR)/PDAFlocal_assimilate_en3dvar_lestkf.o: ./src/PDAFlocal_assimilate_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAFlocal_assimilate_hyb3dvar_lestkf.o: ./src/PDAFlocal_assimilate_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAFlocal_assimilate_lestkf.o: ./src/PDAFlocal_assimilate_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAFlocal_assimilate_lestkf_si.o: ./src/PDAFlocal_assimilate_lestkf_si.F90 +$(OBJDIR)/PDAFlocal_assimilate_letkf.o: ./src/PDAFlocal_assimilate_letkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAFlocal_assimilate_letkf_si.o: ./src/PDAFlocal_assimilate_letkf_si.F90 +$(OBJDIR)/PDAFlocal_assimilate_lknetf.o: ./src/PDAFlocal_assimilate_lknetf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAFlocal_assimilate_lknetf_si.o: ./src/PDAFlocal_assimilate_lknetf_si.F90 +$(OBJDIR)/PDAFlocal_assimilate_lnetf.o: ./src/PDAFlocal_assimilate_lnetf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAFlocal_assimilate_lnetf_si.o: ./src/PDAFlocal_assimilate_lnetf_si.F90 +$(OBJDIR)/PDAFlocal_assimilate_lseik.o: ./src/PDAFlocal_assimilate_lseik.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAFlocal_assimilate_lseik_si.o: ./src/PDAFlocal_assimilate_lseik_si.F90 +$(OBJDIR)/PDAFlocal_clear_increment_weights.o: ./src/PDAFlocal_clear_increment_weights.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocal_g2l_cb.o: ./src/PDAFlocal_g2l_cb.F90 $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocal_interfaces.o: ./src/PDAFlocal_interfaces.F90 ./src/typedefs.h +$(OBJDIR)/PDAFlocal_l2g_cb.o: ./src/PDAFlocal_l2g_cb.F90 $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocal_put_state_en3dvar_lestkf.o: ./src/PDAFlocal_put_state_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocal_put_state_hyb3dvar_lestkf.o: ./src/PDAFlocal_put_state_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocal_put_state_lestkf.o: ./src/PDAFlocal_put_state_lestkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocal_put_state_lestkf_si.o: ./src/PDAFlocal_put_state_lestkf_si.F90 +$(OBJDIR)/PDAFlocal_put_state_letkf.o: ./src/PDAFlocal_put_state_letkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocal_put_state_letkf_si.o: ./src/PDAFlocal_put_state_letkf_si.F90 +$(OBJDIR)/PDAFlocal_put_state_lknetf.o: ./src/PDAFlocal_put_state_lknetf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocal_put_state_lknetf_si.o: ./src/PDAFlocal_put_state_lknetf_si.F90 +$(OBJDIR)/PDAFlocal_put_state_lnetf.o: ./src/PDAFlocal_put_state_lnetf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocal_put_state_lnetf_si.o: ./src/PDAFlocal_put_state_lnetf_si.F90 +$(OBJDIR)/PDAFlocal_put_state_lseik.o: ./src/PDAFlocal_put_state_lseik.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocal_put_state_lseik_si.o: ./src/PDAFlocal_put_state_lseik_si.F90 +$(OBJDIR)/PDAFlocal_set_increment_weights.o: ./src/PDAFlocal_set_increment_weights.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocal_set_indices.o: ./src/PDAFlocal_set_indices.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocalomi_assimilate.o: ./src/PDAFlocalomi_assimilate.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_assimilate_en3dvar_lestkf.o: ./src/PDAFlocalomi_assimilate_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.o: ./src/PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_assimilate_hyb3dvar_lestkf.o: ./src/PDAFlocalomi_assimilate_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.o: ./src/PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_assimilate_lknetf_nondiagR.o: ./src/PDAFlocalomi_assimilate_lknetf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_assimilate_lknetf_nondiagR_si.o: ./src/PDAFlocalomi_assimilate_lknetf_nondiagR_si.F90 +$(OBJDIR)/PDAFlocalomi_assimilate_lnetf_nondiagR.o: ./src/PDAFlocalomi_assimilate_lnetf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_assimilate_lnetf_nondiagR_si.o: ./src/PDAFlocalomi_assimilate_lnetf_nondiagR_si.F90 +$(OBJDIR)/PDAFlocalomi_assimilate_nondiagR.o: ./src/PDAFlocalomi_assimilate_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_assimilate_nondiagR_si.o: ./src/PDAFlocalomi_assimilate_nondiagR_si.F90 +$(OBJDIR)/PDAFlocalomi_assimilate_si.o: ./src/PDAFlocalomi_assimilate_si.F90 +$(OBJDIR)/PDAFlocalomi_put_state.o: ./src/PDAFlocalomi_put_state.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_put_state_en3dvar_lestkf.o: ./src/PDAFlocalomi_put_state_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR.o: ./src/PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_put_state_hyb3dvar_lestkf.o: ./src/PDAFlocalomi_put_state_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR.o: ./src/PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_put_state_lknetf_nondiagR.o: ./src/PDAFlocalomi_put_state_lknetf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_put_state_lknetf_nondiagR_si.o: ./src/PDAFlocalomi_put_state_lknetf_nondiagR_si.F90 +$(OBJDIR)/PDAFlocalomi_put_state_lnetf_nondiagR.o: ./src/PDAFlocalomi_put_state_lnetf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_put_state_lnetf_nondiagR_si.o: ./src/PDAFlocalomi_put_state_lnetf_nondiagR_si.F90 +$(OBJDIR)/PDAFlocalomi_put_state_nondiagR.o: ./src/PDAFlocalomi_put_state_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_put_state_nondiagR_si.o: ./src/PDAFlocalomi_put_state_nondiagR_si.F90 +$(OBJDIR)/PDAFlocalomi_put_state_si.o: ./src/PDAFlocalomi_put_state_si.F90 $(OBJDIR)/PDAFomi.o: ./src/PDAFomi.F90 $(OBJDIR)/PDAFomi_obs_f.o $(OBJDIR)/PDAFomi_obs_l.o $(OBJDIR)/PDAFomi_obs_op.o $(OBJDIR)/PDAFomi_assimilate_3dvar.o: ./src/PDAFomi_assimilate_3dvar.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAFomi_assimilate_3dvar_nondiagR.o: ./src/PDAFomi_assimilate_3dvar_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o diff --git a/Makefile b/Makefile index a947d7203..4ed9c5113 100644 --- a/Makefile +++ b/Makefile @@ -41,7 +41,8 @@ SRC_MOD_PDAF = PDAF_timer.F90 \ PDAF_mod_filter.F90 # Module file with interface definitions -SRC_MOD_INTERFACE = PDAF_interfaces_module.F90 +SRC_MOD_INTERFACE = PDAFlocal_interfaces.F90 \ + PDAF_interfaces_module.F90 # Generic routines in PDAF SRC_PDAF_GEN = PDAF_analysis_utils.F90 \ @@ -124,6 +125,9 @@ SRC_PDAF_GEN = PDAF_analysis_utils.F90 \ PDAF_set_debug_flag.F90 \ PDAF_set_offline_mode.F90 \ PDAFlocal.F90 \ + PDAFlocal_set_indices.F90 \ + PDAFlocal_set_increment_weights.F90 \ + PDAFlocal_clear_increment_weights.F90 \ PDAFlocal_g2l_cb.F90 \ PDAFlocal_l2g_cb.F90 \ PDAFlocalomi_assimilate.F90 \ @@ -480,11 +484,12 @@ SRC_PDAFOMI = PDAFomi_obs_f.F90 \ PDAFomi_callback.F90 # collect all PDAF sources -SRC_PDAF = $(SRC_PDAFOMI) $(SRC_PDAF_GEN) $(SRC_SEIK) $(SRC_LSEIK) $(SRC_SEEK) \ +SRC_PDAF = $(SRC_MOD_INTERFACE) $(SRC_PDAFOMI) $(SRC_PDAF_GEN) \ + $(SRC_SEIK) $(SRC_LSEIK) $(SRC_SEEK) \ $(SRC_ENKF) $(SRC_ETKF) $(SRC_LETKF) \ $(SRC_ESTKF) $(SRC_LESTKF) $(SRC_LENKF) $(SRC_NETF) $(SRC_LNETF) \ $(SRC_LKNETF) $(SRC_PF) $(SRC_OBSGEN) $(SRC_3DVAR_INI) \ - $(SRC_MOD_PDAF) $(SRC_MOD_INTERFACE) + $(SRC_MOD_PDAF) # external sources SRC_SANGOMA = $(EXTDIR)/SANGOMA/SANGOMA_quicksort.F90 diff --git a/make.arch/linux_gfortran.h b/make.arch/linux_gfortran.h new file mode 100644 index 000000000..67e28ba94 --- /dev/null +++ b/make.arch/linux_gfortran.h @@ -0,0 +1,62 @@ +###################################################### +# Include file with machine-specific definitions # +# for building PDAF. # +# # +# Variant for Linux with gfortran and OpenMPI # +# # +# In the case of compilation without MPI, a dummy # +# implementation of MPI, like provided in the # +# directory nullmpi/ has to be linked when building # +# an executable. # +###################################################### +# $Id: linux_gfortran_openmpi.h 1565 2015-02-28 17:04:41Z lnerger $ + + +# Compiler, Linker, and Archiver +FC = mpif90 +LD = $(FC) +AR = ar +RANLIB = ranlib + +# C preprocessor +# (only required, if preprocessing is not performed via the compiler) +CPP = /usr/bin/cpp + +# Definitions for CPP +# Define USE_PDAF to include PDAF +# Define BLOCKING_MPI_EXCHANGE to use blocking MPI commands to exchange data between model and PDAF +# Define PDAF_NO_UPDATE to deactivate the analysis step of the filter +# (if the compiler does not support get_command_argument() +# from Fortran 2003 you should define F77 here.) +CPP_DEFS = -DUSE_PDAF + +# Optimization specs for compiler +# To use OpenMP parallelization in PDAF, specify it here (-fopenmp (gfortran) or -openmp (ifort)) +# (You should explicitly define double precision for floating point +# variables in the compilation) +OPT = -O3 -fdefault-real-8 + +# Optimization specifications for Linker +OPT_LNK = $(OPT) + +# Linking libraries (BLAS, LAPACK, if required: MPI) +LINK_LIBS =-L/usr/lib -llapack -lblas -lm + +# Specifications for the archiver +AR_SPEC = + +# Specifications for ranlib +RAN_SPEC = + +# Specification for directory holding modules (-module for Intel, -J for GNU) +MODULEOPT = -J + +# Include path for MPI header file +MPI_INC = + +# Object for nullMPI - if compiled without MPI library +OBJ_MPI = + +# NetCDF (only required for Lorenz96) +NC_LIB = +NC_INC = diff --git a/src/Makefile b/src/Makefile index 4c4258414..513c8d721 100644 --- a/src/Makefile +++ b/src/Makefile @@ -27,7 +27,8 @@ MOD_PDAF = PDAF_timer_mpi.o \ PDAF_mod_filter.o # Module file with interface definitions -MOD_INTERFACE = PDAF_interfaces_module.o +MOD_INTERFACE = PDAFlocal_interfaces.o \ + PDAF_interfaces_module.o # Generic routines in PDAF OBJ_PDAF_GEN = PDAF_analysis_utils.o \ @@ -110,6 +111,9 @@ OBJ_PDAF_GEN = PDAF_analysis_utils.o \ PDAF_set_debug_flag.o \ PDAF_set_offline_mode.o \ PDAFlocal.o \ + PDAFlocal_set_indices.o \ + PDAFlocal_set_increment_weights.o \ + PDAFlocal_clear_increment_weights.o \ PDAFlocal_g2l_cb.o \ PDAFlocal_l2g_cb.o \ PDAFlocalomi_assimilate.o \ diff --git a/src/PDAF_interfaces_module.F90 b/src/PDAF_interfaces_module.F90 index f7f353165..68a685966 100644 --- a/src/PDAF_interfaces_module.F90 +++ b/src/PDAF_interfaces_module.F90 @@ -40,6 +40,8 @@ MODULE PDAF_interfaces_module ! (Defines BLAS/LAPACK routines and MPI_REALTYPE) #include "typedefs.h" + USE PDAFlocal_interfaces + INTERFACE SUBROUTINE PDAF_init(filtertype, subtype, stepnull, param_int, dim_pint, & param_real, dim_preal, COMM_model, COMM_filter, COMM_couple, & @@ -590,12 +592,7 @@ SUBROUTINE PDAF_put_state_lnetf(U_collect_state, U_init_dim_obs, U_obs_op, & U_init_obs_l, U_prepoststep, U_likelihood_l, U_init_n_domains_p, & U_init_dim_l, U_init_dim_obs_l, U_g2l_state, U_l2g_state, U_g2l_obs, & outflag) - -! !ARGUMENTS: INTEGER, INTENT(out) :: outflag ! Status flag - -! ! External subroutines -! ! (PDAF-internal names, real names are defined in the call to PDAF) EXTERNAL :: U_collect_state, & ! Routine to collect a state vector U_obs_op, & ! Observation operator U_init_n_domains_p, & ! Provide number of local analysis domains @@ -653,12 +650,7 @@ SUBROUTINE PDAF_put_state_lknetf(U_collect_state, U_init_dim_obs, U_obs_op, & U_init_n_domains_p, & U_init_dim_l, U_init_dim_obs_l, U_g2l_state, U_l2g_state, U_g2l_obs, & U_init_obsvar, U_init_obsvar_l, U_likelihood_l, U_likelihood_hyb_l, outflag) - -! !ARGUMENTS: INTEGER, INTENT(out) :: outflag ! Status flag - -! ! External subroutines -! ! (PDAF-internal names, real names are defined in the call to PDAF) EXTERNAL :: U_collect_state, & ! Routine to collect a state vector U_obs_op, & ! Observation operator U_init_n_domains_p, & ! Provide number of local analysis domains @@ -1777,46 +1769,46 @@ SUBROUTINE PDAFomi_assimilate_local_si(flag) END SUBROUTINE PDAFomi_assimilate_local_si END INTERFACE - INTERFACE + INTERFACE SUBROUTINE PDAFomi_assimilate_local_nondiagR_si(flag) INTEGER, INTENT(out) :: flag ! Status flag END SUBROUTINE PDAFomi_assimilate_local_nondiagR_si END INTERFACE - INTERFACE + INTERFACE SUBROUTINE PDAFomi_assimilate_global_nondiagR_si(flag) INTEGER, INTENT(out) :: flag ! Status flag END SUBROUTINE PDAFomi_assimilate_global_nondiagR_si END INTERFACE - INTERFACE + INTERFACE SUBROUTINE PDAFomi_assimilate_enkf_nondiagR_si(flag) INTEGER, INTENT(out) :: flag ! Status flag END SUBROUTINE PDAFomi_assimilate_enkf_nondiagR_si END INTERFACE - INTERFACE + INTERFACE SUBROUTINE PDAFomi_assimilate_nonlin_nondiagR_si(flag) INTEGER, INTENT(out) :: flag ! Status flag END SUBROUTINE PDAFomi_assimilate_nonlin_nondiagR_si END INTERFACE - INTERFACE + INTERFACE SUBROUTINE PDAFomi_assimilate_lenkf_nondiagR_si(flag) INTEGER, INTENT(out) :: flag ! Status flag END SUBROUTINE PDAFomi_assimilate_lenkf_nondiagR_si END INTERFACE - INTERFACE - SUBROUTINE PDAFomi_assimilate_lknetf_nondiagR_si(flag) + INTERFACE + SUBROUTINE PDAFomi_assimilate_lnetf_nondiagR_si(flag) INTEGER, INTENT(out) :: flag ! Status flag - END SUBROUTINE PDAFomi_assimilate_lknetf_nondiagR_si + END SUBROUTINE PDAFomi_assimilate_lnetf_nondiagR_si END INTERFACE - INTERFACE - SUBROUTINE PDAFomi_assimilate_lnetf_nondiagR_si(flag) + INTERFACE + SUBROUTINE PDAFomi_assimilate_lknetf_nondiagR_si(flag) INTEGER, INTENT(out) :: flag ! Status flag - END SUBROUTINE PDAFomi_assimilate_lnetf_nondiagR_si + END SUBROUTINE PDAFomi_assimilate_lknetf_nondiagR_si END INTERFACE INTERFACE @@ -2266,9 +2258,9 @@ SUBROUTINE PDAFomi_put_state_en3dvar_lestkf_nondiagR(collect_state_pdaf, & cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & g2l_state_pdaf, l2g_state_pdaf, prepoststep_pdaf, outflag) - INTEGER, INTENT(inout) :: outflag ! Status flag + INTEGER, INTENT(inout) :: outflag ! Status flag EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector - prepoststep_pdaf ! User supplied pre/poststep routine + prepoststep_pdaf ! User supplied pre/poststep routine EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix obs_op_lin_pdaf, & ! Linearized observation operator diff --git a/src/PDAFlocal.F90 b/src/PDAFlocal.F90 index 925240af9..850e64c14 100644 --- a/src/PDAFlocal.F90 +++ b/src/PDAFlocal.F90 @@ -35,8 +35,9 @@ !! MODULE PDAFlocal - USE PDAF_mod_filter, & - ONLY: debug +! USE PDAF_mod_filter, & +! ONLY: debug + USE PDAFlocal_interfaces ! Interface defintions for put_state and assimilate routines IMPLICIT NONE SAVE @@ -70,101 +71,4 @@ SUBROUTINE PDAFlocal_l2g_cb(step, domain_p, dim_l, state_l, dim_p, state_p) END SUBROUTINE PDAFlocal_l2g_cb END INTERFACE -!------------------------------------------------------------------------------- - -CONTAINS - -!> Set index vector to map between global and local state vectors -!! -!! This routine initializes a PDAF_internal local index array -!! for the mapping between the global and local state vectors -!! - SUBROUTINE PDAFlocal_set_indices(dim_l, map) - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: dim_l !< Dimension of local state vector - INTEGER, INTENT(in) :: map(dim_l) !< Index array for mapping - - -! ******************************************** -! *** Initialize PDAF_internal index array *** -! ******************************************** - - IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) - ALLOCATE(id_lstate_in_pstate(dim_l)) - - id_lstate_in_pstate(:) = map(:) - - IF (debug>0) THEN - WRITE (*,*) '++ PDAF-debug PDAFlocal_set_indices:', debug, 'indices', id_lstate_in_pstate(1:dim_l) - END IF - - END SUBROUTINE PDAFlocal_set_indices - - - -!------------------------------------------------------------------------------- -!> Set vector of local increment weights -!! -!! This routine initializes a PDAF_internal local array -!! of increment weights. The weights are applied in -!! in PDAF_local_l2g_cb, when the global state vector -!! is initialized from the local state vector. These can -!! e.g. be used to apply a vertical localization. -!! - SUBROUTINE PDAFlocal_set_increment_weights(dim_l, weights) - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: dim_l !< Dimension of local state vector - REAL, INTENT(in) :: weights(dim_l) !< Weights array - -! *** Local variables *** - - -! ******************************************** -! *** Initialize PDAF_internal index array *** -! ******************************************** - - IF (ALLOCATED(l2g_weights)) DEALLOCATE(l2g_weights) - ALLOCATE(l2g_weights(dim_l)) - - l2g_weights(:) = weights(:) - - IF (debug>0) THEN - WRITE (*,*) '++ PDAF-debug: ', debug, 'PDAFlocal_set_increment_weights -- Set local increment weights' - WRITE (*,*) '++ PDAF-debug PDAFlocal_set_increment_weights:', debug, 'weights', l2g_weights(1:dim_l) - END IF - - END SUBROUTINE PDAFlocal_set_increment_weights - - - -!------------------------------------------------------------------------------- -!> Deallocate vector of local increment weights -!! -!! This routine simply deallocates the local increment -!! weight vector if it is allocated. -!! - SUBROUTINE PDAFlocal_clear_increment_weights() - - IMPLICIT NONE - -! *** Arguments *** - -! ***************************************** -! *** Deallocate increment weight array *** -! ***************************************** - - IF (ALLOCATED(l2g_weights)) DEALLOCATE(l2g_weights) - - IF (debug>0) THEN - WRITE (*,*) '++ PDAF-debug: ', debug, 'PDAFlocal_free_increment_weights -- Unset local increment weights' - END IF - - END SUBROUTINE PDAFlocal_clear_increment_weights - END MODULE PDAFlocal diff --git a/src/PDAFlocal_clear_increment_weights.F90 b/src/PDAFlocal_clear_increment_weights.F90 new file mode 100644 index 000000000..ba86d805f --- /dev/null +++ b/src/PDAFlocal_clear_increment_weights.F90 @@ -0,0 +1,48 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! + +!> Deallocate vector of local increment weights +!! +!! This routine simply deallocates the local increment +!! weight vector if it is allocated. +!! +!! __Revision history:__ +!! * 2024-08 - Lars Nerger - Initial code +!! * Later revisions - see repository log +!! +SUBROUTINE PDAFlocal_clear_increment_weights() + + USE PDAF_mod_filter, & + ONLY: debug + USE PDAFlocal, & + ONLY: l2g_weights + + IMPLICIT NONE + + +! ***************************************** +! *** Deallocate increment weight array *** +! ***************************************** + + IF (ALLOCATED(l2g_weights)) DEALLOCATE(l2g_weights) + + IF (debug>0) THEN + WRITE (*,*) '++ PDAF-debug: ', debug, 'PDAFlocal_free_increment_weights -- Unset local increment weights' + END IF + +END SUBROUTINE PDAFlocal_clear_increment_weights diff --git a/src/PDAFlocal_interfaces.F90 b/src/PDAFlocal_interfaces.F90 new file mode 100644 index 000000000..6d045d8e9 --- /dev/null +++ b/src/PDAFlocal_interfaces.F90 @@ -0,0 +1,881 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id$ +!BOP +! +! !ROUTINE: PDAFlocal_interfaces --- Interface definitions for PDAFlocal +! +! !INTERFACE: +MODULE PDAFlocal_interfaces + +! !DESCRIPTION: +! Module providing interface definition of the PDAFlocal routines that +! are called from the model code. +! +! ! This is a core routine of PDAF and +! should not be changed by the user ! +! +! !REVISION HISTORY: +! 2024-08 - Lars Nerger - Initial code +! Later revisions - see svn log +!EOP +! +! !USES: +! Include definitions for real type of different precision +! (Defines BLAS/LAPACK routines and MPI_REALTYPE) +#include "typedefs.h" + + INTERFACE + SUBROUTINE PDAFlocal_put_state_lseik(U_collect_state, U_init_dim_obs, U_obs_op, & + U_init_obs, U_init_obs_l, U_prepoststep, U_prodRinvA_l, U_init_n_domains_p, & + U_init_dim_l, U_init_dim_obs_l, U_g2l_obs, & + U_init_obsvar, U_init_obsvar_l, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain + U_prepoststep ! User supplied pre/poststep routine + END SUBROUTINE PDAFlocal_put_state_lseik + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_put_state_lseik_si(flag) + INTEGER, INTENT(inout) :: flag ! Status flag + END SUBROUTINE PDAFlocal_put_state_lseik_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_assimilate_lseik(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_init_obs, U_init_obs_l, U_prepoststep, & + U_prodRinvA_l, U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, & + U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & + U_next_observation, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_distribute_state, & ! Routine to distribute a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain + U_prepoststep, & ! User supplied pre/poststep routine + U_next_observation ! Provide time step and time of next observation + END SUBROUTINE PDAFlocal_assimilate_lseik + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_assimilate_lseik_si(flag) + INTEGER, INTENT(inout) :: flag ! Status flag + END SUBROUTINE PDAFlocal_assimilate_lseik_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_put_state_letkf(U_collect_state, U_init_dim_obs, U_obs_op, & + U_init_obs, U_init_obs_l, U_prepoststep, U_prodRinvA_l, U_init_n_domains_p, & + U_init_dim_l, U_init_dim_obs_l, U_g2l_obs, & + U_init_obsvar, U_init_obsvar_l, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain + U_prepoststep ! User supplied pre/poststep routine + END SUBROUTINE PDAFlocal_put_state_letkf + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_put_state_letkf_si(flag) + INTEGER, INTENT(inout) :: flag ! Status flag + END SUBROUTINE PDAFlocal_put_state_letkf_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_assimilate_letkf(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_init_obs, U_init_obs_l, U_prepoststep, & + U_prodRinvA_l, U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, & + U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & + U_next_observation, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_distribute_state, & ! Routine to distribute a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain + U_prepoststep, & ! User supplied pre/poststep routine + U_next_observation ! Provide time step and time of next observation + END SUBROUTINE PDAFlocal_assimilate_letkf + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_assimilate_letkf_si(flag) + INTEGER, INTENT(inout) :: flag ! Status flag + END SUBROUTINE PDAFlocal_assimilate_letkf_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_put_state_lestkf(U_collect_state, U_init_dim_obs, U_obs_op, & + U_init_obs, U_init_obs_l, U_prepoststep, U_prodRinvA_l, U_init_n_domains_p, & + U_init_dim_l, U_init_dim_obs_l, U_g2l_obs, & + U_init_obsvar, U_init_obsvar_l, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain + U_prepoststep ! User supplied pre/poststep routine + END SUBROUTINE PDAFlocal_put_state_lestkf + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_put_state_lestkf_si(flag) + INTEGER, INTENT(inout) :: flag ! Status flag + END SUBROUTINE PDAFlocal_put_state_lestkf_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_assimilate_lestkf(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_init_obs, U_init_obs_l, U_prepoststep, & + U_prodRinvA_l, U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, & + U_g2l_obs, U_init_obsvar, U_init_obsvar_l, U_next_observation, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_distribute_state, & ! Routine to distribute a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain + U_prepoststep, & ! User supplied pre/poststep routine + U_next_observation ! Provide time step and time of next observation + END SUBROUTINE PDAFlocal_assimilate_lestkf + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_assimilate_lestkf_si(flag) + INTEGER, INTENT(inout) :: flag ! Status flag + END SUBROUTINE PDAFlocal_assimilate_lestkf_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_put_state_lnetf(U_collect_state, U_init_dim_obs, U_obs_op, & + U_init_obs_l, U_prepoststep, U_likelihood_l, U_init_n_domains_p, & + U_init_dim_l, U_init_dim_obs_l, U_g2l_obs, & + outflag) + INTEGER, INTENT(out) :: outflag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_likelihood_l, & ! Compute observation likelihood for an ensemble member + U_prepoststep ! User supplied pre/poststep routine + END SUBROUTINE PDAFlocal_put_state_lnetf + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_put_state_lnetf_si(flag) + INTEGER, INTENT(inout) :: flag ! Status flag + END SUBROUTINE PDAFlocal_put_state_lnetf_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_assimilate_lnetf(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_init_obs_l, U_prepoststep, & + U_likelihood_l, U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, & + U_g2l_obs, U_next_observation, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_distribute_state, & ! Routine to distribute a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_likelihood_l, & ! Compute observation likelihood for an ensemble member + U_prepoststep, & ! User supplied pre/poststep routine + U_next_observation ! Provide time step and time of next observation + END SUBROUTINE PDAFlocal_assimilate_lnetf + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_assimilate_lnetf_si(flag) + INTEGER, INTENT(inout) :: flag ! Status flag + END SUBROUTINE PDAFlocal_assimilate_lnetf_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_put_state_lknetf(U_collect_state, U_init_dim_obs, U_obs_op, & + U_init_obs, U_init_obs_l, U_prepoststep, U_prodRinvA_l, U_prodRinvA_hyb_l, & + U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, U_g2l_obs, & + U_init_obsvar, U_init_obsvar_l, U_likelihood_l, U_likelihood_hyb_l, outflag) + INTEGER, INTENT(out) :: outflag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain + U_prodRinvA_hyb_l, & ! Provide product R^-1 A on local analysis domain with hybrid weight + U_likelihood_l, & ! Compute likelihood + U_likelihood_hyb_l, & ! Compute likelihood with hybrid weight + U_prepoststep ! User supplied pre/poststep routine + END SUBROUTINE PDAFlocal_put_state_lknetf + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_put_state_lknetf_si(flag) + INTEGER, INTENT(inout) :: flag ! Status flag + END SUBROUTINE PDAFlocal_put_state_lknetf_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_assimilate_lknetf(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_init_obs, U_init_obs_l, U_prepoststep, & + U_prodRinvA_l, U_prodRinvA_hyb_l, U_init_n_domains_p, U_init_dim_l, & + U_init_dim_obs_l, U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & + U_likelihood_l, U_likelihood_hyb_l, U_next_observation, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain + U_prodRinvA_hyb_l, & ! Provide product R^-1 A on local analysis domain with hybrid weight + U_likelihood_l, & ! Compute likelihood + U_likelihood_hyb_l, & ! Compute likelihood with hybrid weight + U_prepoststep, & ! User supplied pre/poststep routine + U_next_observation, & ! Routine to provide time step, time and dimension + ! of next observation + U_distribute_state ! Routine to distribute a state vector + END SUBROUTINE PDAFlocal_assimilate_lknetf + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_assimilate_lknetf_si(flag) + INTEGER, INTENT(inout) :: flag ! Status flag + END SUBROUTINE PDAFlocal_assimilate_lknetf_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_put_state_en3dvar_lestkf(U_collect_state, U_init_dim_obs, U_obs_op, & + U_init_obs, U_prodRinvA, & + U_cvt_ens, U_cvt_adj_ens, U_obs_op_lin, U_obs_op_adj, & + U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, U_init_obs_l, U_prodRinvA_l, & + U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, U_g2l_obs, & + U_init_obsvar, U_init_obsvar_l, U_prepoststep, outflag) + INTEGER, INTENT(out) :: outflag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_init_obs, & ! Initialize observation vector + U_prepoststep, & ! User supplied pre/poststep routine + U_prodRinvA, & ! Provide product R^-1 A + U_cvt_ens, & ! Apply control vector transform matrix (ensemble) + U_cvt_adj_ens, & ! Apply adjoint control vector transform matrix (ensemble var) + U_obs_op_lin, & ! Linearized observation operator + U_obs_op_adj ! Adjoint observation operator + EXTERNAL :: U_obs_op_f, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs_f, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs_f, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l ! Provide product R^-1 A on local analysis domain + END SUBROUTINE PDAFlocal_put_state_en3dvar_lestkf + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_assimilate_en3dvar_lestkf(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & + U_cvt_ens, U_cvt_adj_ens, U_obs_op_lin, U_obs_op_adj, & + U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, U_init_obs_l, U_prodRinvA_l, & + U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, & + U_g2l_obs, U_init_obsvar, U_init_obsvar_l, & + U_prepoststep, U_next_observation, outflag) + INTEGER, INTENT(inout) :: outflag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obs, & ! Initialize observation vector + U_prepoststep, & ! User supplied pre/poststep routine + U_prodRinvA, & ! Provide product R^-1 A + U_next_observation, & ! Routine to provide time step, time and dimension + ! of next observation + U_distribute_state, & ! Routine to distribute a state vector + U_cvt_ens, & ! Apply control vector transform matrix (ensemble) + U_cvt_adj_ens, & ! Apply adjoint control vector transform matrix (ensemble var) + U_cvt, & ! Apply control vector transform matrix to control vector + U_cvt_adj, & ! Apply adjoint control vector transform matrix + U_obs_op_lin, & ! Linearized observation operator + U_obs_op_adj ! Adjoint observation operator + EXTERNAL :: U_obs_op_f, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs_f, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs_f, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l ! Provide product R^-1 A on local analysis domain + END SUBROUTINE PDAFlocal_assimilate_en3dvar_lestkf + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_put_state_hyb3dvar_lestkf(U_collect_state, & + U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & + U_cvt_ens, U_cvt_adj_ens, U_cvt, U_cvt_adj, U_obs_op_lin, U_obs_op_adj, & + U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, U_init_obs_l, U_prodRinvA_l, & + U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, U_g2l_obs, & + U_init_obsvar, U_init_obsvar_l, U_prepoststep, outflag) + INTEGER, INTENT(out) :: outflag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_init_obs, & ! Initialize observation vector + U_prepoststep, & ! User supplied pre/poststep routine + U_prodRinvA, & ! Provide product R^-1 A + U_cvt_ens, & ! Apply control vector transform matrix (ensemble) + U_cvt_adj_ens, & ! Apply adjoint control vector transform matrix (ensemble var) + U_cvt, & ! Apply control vector transform matrix to control vector + U_cvt_adj, & ! Apply adjoint control vector transform matrix + U_obs_op_lin, & ! Linearized observation operator + U_obs_op_adj ! Adjoint observation operator + EXTERNAL :: U_obs_op_f, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs_f, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs_f, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l ! Provide product R^-1 A on local analysis domain + END SUBROUTINE PDAFlocal_put_state_hyb3dvar_lestkf + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_assimilate_hyb3dvar_lestkf(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_init_obs, U_prodRinvA, & + U_cvt_ens, U_cvt_adj_ens, U_cvt, U_cvt_adj, U_obs_op_lin, U_obs_op_adj, & + U_init_dim_obs_f, U_obs_op_f, U_init_obs_f, U_init_obs_l, U_prodRinvA_l, & + U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, U_g2l_obs, & + U_init_obsvar, U_init_obsvar_l, U_prepoststep, U_next_observation, outflag) + INTEGER, INTENT(out) :: outflag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_init_dim_obs, & ! Initialize dimension of observation vector + U_obs_op, & ! Observation operator + U_init_obsvar, & ! Initialize mean observation error variance + U_init_obs, & ! Initialize observation vector + U_prepoststep, & ! User supplied pre/poststep routine + U_prodRinvA, & ! Provide product R^-1 A + U_next_observation, & ! Routine to provide time step, time and dimension + ! of next observation + U_distribute_state, & ! Routine to distribute a state vector + U_cvt_ens, & ! Apply control vector transform matrix (ensemble) + U_cvt_adj_ens, & ! Apply adjoint control vector transform matrix (ensemble var) + U_cvt, & ! Apply control vector transform matrix to control vector + U_cvt_adj, & ! Apply adjoint control vector transform matrix + U_obs_op_lin, & ! Linearized observation operator + U_obs_op_adj ! Adjoint observation operator + EXTERNAL :: U_obs_op_f, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs_f, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_init_obs_f, & ! Initialize PE-local observation vector + U_init_obs_l, & ! Init. observation vector on local analysis domain + U_init_obsvar_l, & ! Initialize local mean observation error variance + U_g2l_obs, & ! Restrict full obs. vector to local analysis domain + U_prodRinvA_l ! Provide product R^-1 A on local analysis domain + END SUBROUTINE PDAFlocal_assimilate_hyb3dvar_lestkf + END INTERFACE + +! PDAFlocal INTERFACES --------------------- + + INTERFACE + SUBROUTINE PDAFlocalomi_put_state(U_collect_state, U_init_dim_obs, U_obs_op, & + U_prepoststep, U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, & + flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_prepoststep ! User supplied pre/poststep routine + END SUBROUTINE PDAFlocalomi_put_state + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocalomi_put_state_si(flag) + INTEGER, INTENT(out) :: flag ! Status flag + END SUBROUTINE PDAFlocalomi_put_state_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocalomi_assimilate(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_prepoststep, U_init_n_domains_p, U_init_dim_l, & + U_l2g_state, U_next_observation, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_distribute_state, & ! Routine to distribute a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_prepoststep, & ! User supplied pre/poststep routine + U_next_observation ! Provide time step and time of next observation + END SUBROUTINE PDAFlocalomi_assimilate + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocalomi_assimilate_si(flag) + INTEGER, INTENT(out) :: flag ! Status flag + END SUBROUTINE PDAFlocalomi_assimilate_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocalomi_put_state_nondiagR(U_collect_state, U_init_dim_obs, U_obs_op, & + U_prepoststep, U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, U_prodRinvA_l, & + flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain + U_prepoststep ! User supplied pre/poststep routine + END SUBROUTINE PDAFlocalomi_put_state_nondiagR + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocalomi_put_state_nondiagR_si(flag) + INTEGER, INTENT(out) :: flag ! Status flag + END SUBROUTINE PDAFlocalomi_put_state_nondiagR_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocalomi_assimilate_nondiagR(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_prepoststep, U_init_n_domains_p, U_init_dim_l, & + U_init_dim_obs_l, U_prodRinvA_l, U_next_observation, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_distribute_state, & ! Routine to distribute a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain + U_prepoststep, & ! User supplied pre/poststep routine + U_next_observation ! Provide time step and time of next observation + END SUBROUTINE PDAFlocalomi_assimilate_nondiagR + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocalomi_assimilate_nondiagR_si(flag) + INTEGER, INTENT(out) :: flag ! Status flag + END SUBROUTINE PDAFlocalomi_assimilate_nondiagR_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocalomi_put_state_lnetf_nondiagR(U_collect_state, U_init_dim_obs, U_obs_op, & + U_prepoststep, U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, U_likelihood_l, & + flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_likelihood_l, & ! Compute likelihood and apply localization + U_prepoststep ! User supplied pre/poststep routine + END SUBROUTINE PDAFlocalomi_put_state_lnetf_nondiagR + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocalomi_put_state_lnetf_nondiagR_si(flag) + INTEGER, INTENT(out) :: flag ! Status flag + END SUBROUTINE PDAFlocalomi_put_state_lnetf_nondiagR_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocalomi_assimilate_lnetf_nondiagR(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_prepoststep, U_init_n_domains_p, U_init_dim_l, & + U_init_dim_obs_l, U_likelihood_l, U_next_observation, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_distribute_state, & ! Routine to distribute a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_likelihood_l, & ! Compute likelihood and apply localization + U_prepoststep, & ! User supplied pre/poststep routine + U_next_observation ! Provide time step and time of next observation + END SUBROUTINE PDAFlocalomi_assimilate_lnetf_nondiagR + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocalomi_assimilate_lnetf_nondiagR_si(flag) + INTEGER, INTENT(out) :: flag ! Status flag + END SUBROUTINE PDAFlocalomi_assimilate_lnetf_nondiagR_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocalomi_put_state_lknetf_nondiagR(U_collect_state, U_init_dim_obs, U_obs_op, & + U_prepoststep, U_init_n_domains_p, U_init_dim_l, U_init_dim_obs_l, & + U_prodRinvA_l, U_prodRinvA_hyb_l, U_likelihood_l, U_likelihood_hyb_l, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain + U_prodRinvA_hyb_l, & ! Product R^-1 A on local analysis domain with hybrid weight + U_likelihood_l, & ! Compute likelihood and apply localization + U_likelihood_hyb_l, & ! Compute likelihood and apply localization with tempering + U_prepoststep ! User supplied pre/poststep routine + END SUBROUTINE PDAFlocalomi_put_state_lknetf_nondiagR + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocalomi_put_state_lknetf_nondiagR_si(flag) + INTEGER, INTENT(out) :: flag ! Status flag + END SUBROUTINE PDAFlocalomi_put_state_lknetf_nondiagR_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocalomi_assimilate_lknetf_nondiagR(U_collect_state, U_distribute_state, & + U_init_dim_obs, U_obs_op, U_prepoststep, U_init_n_domains_p, U_init_dim_l, & + U_init_dim_obs_l, U_prodRinvA_l, U_prodRinvA_hyb_l, U_likelihood_l, U_likelihood_hyb_l, & + U_next_observation, flag) + INTEGER, INTENT(out) :: flag ! Status flag + EXTERNAL :: U_collect_state, & ! Routine to collect a state vector + U_distribute_state, & ! Routine to distribute a state vector + U_obs_op, & ! Observation operator + U_init_n_domains_p, & ! Provide number of local analysis domains + U_init_dim_l, & ! Init state dimension for local ana. domain + U_init_dim_obs, & ! Initialize dimension of observation vector + U_init_dim_obs_l, & ! Initialize dim. of obs. vector for local ana. domain + U_prodRinvA_l, & ! Provide product R^-1 A on local analysis domain + U_prodRinvA_hyb_l, & ! Product R^-1 A on local analysis domain with hybrid weight + U_likelihood_l, & ! Compute likelihood and apply localization + U_likelihood_hyb_l, & ! Compute likelihood and apply localization with tempering + U_prepoststep, & ! User supplied pre/poststep routine + U_next_observation ! Provide time step and time of next observation + END SUBROUTINE PDAFlocalomi_assimilate_lknetf_nondiagR + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocalomi_assimilate_lknetf_nondiagR_si(flag) + INTEGER, INTENT(out) :: flag ! Status flag + END SUBROUTINE PDAFlocalomi_assimilate_lknetf_nondiagR_si + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocalomi_put_state_en3dvar_lestkf(collect_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, & + init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & + prepoststep_pdaf, outflag) + INTEGER, INTENT(inout) :: outflag ! Status flag + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix + obs_op_lin_pdaf, & ! Linearized observation operator + obs_op_adj_pdaf ! Adjoint observation operator + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + obs_op_f_pdaf, & ! Full observation operator + init_dim_obs_l_pdaf ! Initialize local dimimension of obs. vector + END SUBROUTINE PDAFlocalomi_put_state_en3dvar_lestkf + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocalomi_assimilate_en3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, & + init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & + prepoststep_pdaf, next_observation_pdaf, outflag) + INTEGER, INTENT(inout) :: outflag ! Status flag + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix + obs_op_lin_pdaf, & ! Linearized observation operator + obs_op_adj_pdaf ! Adjoint observation operator + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + obs_op_f_pdaf, & ! Full observation operator + init_dim_obs_l_pdaf ! Initialize local dimimension of obs. vector + END SUBROUTINE PDAFlocalomi_assimilate_en3dvar_lestkf + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR(collect_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, prodRinvA_pdaf, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, & + prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & + prepoststep_pdaf, outflag) + INTEGER, INTENT(inout) :: outflag ! Status flag + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix + obs_op_lin_pdaf, & ! Linearized observation operator + obs_op_adj_pdaf ! Adjoint observation operator + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + prodRinvA_pdaf, & ! Provide product R^-1 A + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + obs_op_f_pdaf, & ! Full observation operator + init_dim_obs_l_pdaf, & ! Initialize local dimimension of obs. vector + prodRinvA_l_pdaf ! Provide product R^-1 A with localization + END SUBROUTINE PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, prodRinvA_pdaf, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, & + prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & + prepoststep_pdaf, next_observation_pdaf, outflag) + INTEGER, INTENT(inout) :: outflag ! Status flag + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix + obs_op_lin_pdaf, & ! Linearized observation operator + obs_op_adj_pdaf ! Adjoint observation operator + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + prodRinvA_pdaf, & ! Provide product R^-1 A + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + obs_op_f_pdaf, & ! Full observation operator + init_dim_obs_l_pdaf, & ! Initialize local dimimension of obs. vector + prodRinvA_l_pdaf ! Provide product R^-1 A with localization + END SUBROUTINE PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocalomi_put_state_hyb3dvar_lestkf(collect_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, & + init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & + prepoststep_pdaf, outflag) + INTEGER, INTENT(inout) :: outflag ! Status flag + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix + cvt_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_pdaf, & ! Apply adjoint control vector transform matrix + obs_op_lin_pdaf, & ! Linearized observation operator + obs_op_adj_pdaf ! Adjoint observation operator + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + obs_op_f_pdaf, & ! Full observation operator + init_dim_obs_l_pdaf ! Initialize local dimimension of obs. vector + END SUBROUTINE PDAFlocalomi_put_state_hyb3dvar_lestkf + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocalomi_assimilate_hyb3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, & + init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & + prepoststep_pdaf, next_observation_pdaf, outflag) + INTEGER, INTENT(inout) :: outflag ! Status flag + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix + cvt_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_pdaf, & ! Apply adjoint control vector transform matrix + obs_op_lin_pdaf, & ! Linearized observation operator + obs_op_adj_pdaf ! Adjoint observation operator + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + obs_op_f_pdaf, & ! Full observation operator + init_dim_obs_l_pdaf ! Initialize local dimimension of obs. vector + END SUBROUTINE PDAFlocalomi_assimilate_hyb3dvar_lestkf + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR(collect_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, prodRinvA_pdaf, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, & + prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & + prepoststep_pdaf, outflag) + INTEGER, INTENT(inout) :: outflag ! Status flag + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix + cvt_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_pdaf, & ! Apply adjoint control vector transform matrix + obs_op_lin_pdaf, & ! Linearized observation operator + obs_op_adj_pdaf ! Adjoint observation operator + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + prodRinvA_pdaf, & ! Provide product R^-1 A + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + obs_op_f_pdaf, & ! Full observation operator + init_dim_obs_l_pdaf, & ! Initialize local dimimension of obs. vector + prodRinvA_l_pdaf ! Provide product R^-1 A with localization + END SUBROUTINE PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, prodRinvA_pdaf, & + cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdaf, obs_op_adj_pdaf, & + prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdaf, & + prepoststep_pdaf, next_observation_pdaf, outflag) + INTEGER, INTENT(inout) :: outflag ! Status flag + EXTERNAL :: collect_state_pdaf, & ! Routine to collect a state vector + distribute_state_pdaf, & ! Routine to distribute a state vector + next_observation_pdaf, & ! Provide time step, time and dimension of next observation + prepoststep_pdaf ! User supplied pre/poststep routine + EXTERNAL :: cvt_ens_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_ens_pdaf, & ! Apply adjoint control vector transform matrix + cvt_pdaf, & ! Apply control vector transform matrix to control vector + cvt_adj_pdaf, & ! Apply adjoint control vector transform matrix + obs_op_lin_pdaf, & ! Linearized observation operator + obs_op_adj_pdaf ! Adjoint observation operator + EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains + prodRinvA_pdaf, & ! Provide product R^-1 A + init_dim_l_pdaf, & ! Init state dimension for local ana. domain + init_dim_obs_f_pdaf, & ! Initialize dimension of full observation vector + obs_op_f_pdaf, & ! Full observation operator + init_dim_obs_l_pdaf, & ! Initialize local dimimension of obs. vector + prodRinvA_l_pdaf ! Provide product R^-1 A with localization + END SUBROUTINE PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_set_indices(dim_l, map) + INTEGER, INTENT(in) :: dim_l !< Dimension of local state vector + INTEGER, INTENT(in) :: map(dim_l) !< Index array for mapping + END SUBROUTINE PDAFlocal_set_indices + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_set_increment_weights(dim_l, weights) + INTEGER, INTENT(in) :: dim_l !< Dimension of local state vector + REAL, INTENT(in) :: weights(dim_l) !< Weights array + END SUBROUTINE PDAFlocal_set_increment_weights + END INTERFACE + + INTERFACE + SUBROUTINE PDAFlocal_clear_increment_weights() + END SUBROUTINE PDAFlocal_clear_increment_weights + END INTERFACE + +END MODULE PDAFlocal_interfaces diff --git a/src/PDAFlocal_set_increment_weights.F90 b/src/PDAFlocal_set_increment_weights.F90 new file mode 100644 index 000000000..2507c8b7f --- /dev/null +++ b/src/PDAFlocal_set_increment_weights.F90 @@ -0,0 +1,59 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! + +!> Set vector of local increment weights +!! +!! This routine initializes a PDAF_internal local array +!! of increment weights. The weights are applied in +!! in PDAF_local_l2g_cb, when the global state vector +!! is initialized from the local state vector. These can +!! e.g. be used to apply a vertical localization. +!! +!! __Revision history:__ +!! * 2024-08 - Lars Nerger - Initial code +!! * Later revisions - see repository log +!! +SUBROUTINE PDAFlocal_set_increment_weights(dim_l, weights) + + USE PDAF_mod_filter, & + ONLY: debug + USE PDAFlocal, & + ONLY: l2g_weights + + IMPLICIT NONE + +! *** Arguments *** + INTEGER, INTENT(in) :: dim_l !< Dimension of local state vector + REAL, INTENT(in) :: weights(dim_l) !< Weights array + + +! ******************************************** +! *** Initialize PDAF_internal index array *** +! ******************************************** + + IF (ALLOCATED(l2g_weights)) DEALLOCATE(l2g_weights) + ALLOCATE(l2g_weights(dim_l)) + + l2g_weights(:) = weights(:) + + IF (debug>0) THEN + WRITE (*,*) '++ PDAF-debug: ', debug, 'PDAFlocal_set_increment_weights -- Set local increment weights' + WRITE (*,*) '++ PDAF-debug PDAFlocal_set_increment_weights:', debug, 'weights', l2g_weights(1:dim_l) + END IF + +END SUBROUTINE PDAFlocal_set_increment_weights diff --git a/src/PDAFlocal_set_indices.F90 b/src/PDAFlocal_set_indices.F90 new file mode 100644 index 000000000..c3899c8b6 --- /dev/null +++ b/src/PDAFlocal_set_indices.F90 @@ -0,0 +1,55 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! + +!> Set index vector to map between global and local state vectors +!! +!! This routine initializes a PDAF_internal local index array +!! for the mapping between the global and local state vectors +!! +!! __Revision history:__ +!! * 2024-08 - Lars Nerger - Initial code +!! * Later revisions - see repository log +!! +SUBROUTINE PDAFlocal_set_indices(dim_l, map) + + USE PDAF_mod_filter, & + ONLY: debug + USE PDAFlocal, & + ONLY: id_lstate_in_pstate + + IMPLICIT NONE + +! *** Arguments *** + INTEGER, INTENT(in) :: dim_l !< Dimension of local state vector + INTEGER, INTENT(in) :: map(dim_l) !< Index array for mapping + + +! ******************************************** +! *** Initialize PDAF_internal index array *** +! ******************************************** + + IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) + ALLOCATE(id_lstate_in_pstate(dim_l)) + + id_lstate_in_pstate(:) = map(:) + + IF (debug>0) THEN + WRITE (*,*) '++ PDAF-debug PDAFlocal_set_indices:', debug, 'indices', id_lstate_in_pstate(1:dim_l) + END IF + +END SUBROUTINE PDAFlocal_set_indices diff --git a/templates/classical/offline/Makefile b/templates/classical/offline/Makefile index 6e52683fe..e8e5cd13c 100644 --- a/templates/classical/offline/Makefile +++ b/templates/classical/offline/Makefile @@ -70,8 +70,6 @@ OBJ_USER_ENKF = add_obs_error_pdaf.o \ # User-supplied routines for localized analysis (LSEIK) OBJ_USER_LOCAL = init_n_domains_pdaf.o \ init_dim_l_pdaf.o \ - g2l_state_pdaf.o \ - l2g_state_pdaf.o \ prodrinva_l_pdaf.o \ init_obs_l_pdaf.o \ init_dim_obs_l_pdaf.o \ diff --git a/templates/classical/offline/assimilation_pdaf_offline.F90 b/templates/classical/offline/assimilation_pdaf_offline.F90 index d2569b5ff..d3d4c190a 100644 --- a/templates/classical/offline/assimilation_pdaf_offline.F90 +++ b/templates/classical/offline/assimilation_pdaf_offline.F90 @@ -54,8 +54,6 @@ SUBROUTINE assimilation_pdaf_offline() EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains init_dim_l_pdaf, & ! Initialize state dimension for local ana. domain init_dim_obs_l_pdaf,& ! Initialize dim. of obs. vector for local ana. domain - g2l_state_pdaf, & ! Get state on local ana. domain from global state - l2g_state_pdaf, & ! Init global state from state on local analysis domain g2l_obs_pdaf, & ! Restrict a global obs. vector to local analysis domain init_obs_l_pdaf, & ! Provide vector of measurements for local ana. domain prodRinvA_l_pdaf, & ! Provide product R^-1 A for some matrix A @@ -111,32 +109,32 @@ SUBROUTINE assimilation_pdaf_offline() init_obs_pdaf, prepoststep_ens_offline, add_obs_error_pdaf, init_obscovar_pdaf, & status) ELSE IF (filtertype == 3) THEN - CALL PDAF_put_state_lseik( & + CALL PDAFlocal_put_state_lseik( & collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_offline, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & - g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, status) + init_dim_obs_l_pdaf, g2l_obs_pdaf, init_obsvar_pdaf, & + init_obsvar_l_pdaf, status) ELSE IF (filtertype == 4) THEN CALL PDAF_put_state_etkf(collect_state_pdaf, init_dim_obs_pdaf, obs_op_pdaf, & init_obs_pdaf, prepoststep_ens_offline, prodRinvA_pdaf, init_obsvar_pdaf, status) ELSE IF (filtertype == 5) THEN - CALL PDAF_put_state_letkf( & + CALL PDAFlocal_put_state_letkf( & collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_offline, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & - g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, status) + init_dim_obs_l_pdaf, g2l_obs_pdaf, init_obsvar_pdaf, & + init_obsvar_l_pdaf, status) ELSE IF (filtertype == 6) THEN CALL PDAF_put_state_estkf(collect_state_pdaf, init_dim_obs_pdaf, obs_op_pdaf, & init_obs_pdaf, prepoststep_ens_offline, prodRinvA_pdaf, init_obsvar_pdaf, status) ELSE IF (filtertype == 7) THEN - CALL PDAF_put_state_lestkf( & + CALL PDAFlocal_put_state_lestkf( & collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_offline, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & - g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, status) + init_dim_obs_l_pdaf, g2l_obs_pdaf, init_obsvar_pdaf, & + init_obsvar_l_pdaf, status) ELSE IF (filtertype == 8) THEN CALL PDAF_put_state_lenkf(collect_state_pdaf, init_dim_obs_pdaf, obs_op_pdaf, & init_obs_pdaf, prepoststep_ens_offline, localize_covar_pdaf, add_obs_error_pdaf, & @@ -146,17 +144,16 @@ SUBROUTINE assimilation_pdaf_offline() obs_op_pdaf, init_obs_pdaf, prepoststep_ens_offline, & likelihood_pdaf, status) ELSE IF (filtertype == 10) THEN - CALL PDAF_put_state_lnetf(collect_state_pdaf, init_dim_obs_f_pdaf, & + CALL PDAFlocal_put_state_lnetf(collect_state_pdaf, init_dim_obs_f_pdaf, & obs_op_f_pdaf, init_obs_l_pdaf, prepoststep_ens_offline, & likelihood_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & - g2l_obs_pdaf, status) + init_dim_obs_l_pdaf, g2l_obs_pdaf, status) ELSE IF (filtertype == 11) THEN - CALL PDAF_put_state_lknetf( & + CALL PDAFlocal_put_state_lknetf( & collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_offline, & prodRinvA_l_pdaf, prodRinvA_hyb_l_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, & g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, & likelihood_l_pdaf, likelihood_hyb_l_pdaf, status) ELSE IF (filtertype == 12) THEN diff --git a/templates/classical/offline/g2l_state_pdaf.F90 b/templates/classical/offline/g2l_state_pdaf.F90 deleted file mode 100644 index f0dc52dfd..000000000 --- a/templates/classical/offline/g2l_state_pdaf.F90 +++ /dev/null @@ -1,61 +0,0 @@ -!$Id$ -!BOP -! -! !ROUTINE: g2l_state_pdaf --- Restrict a model state to a local analysis domain -! -! !INTERFACE: -SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) - -! !DESCRIPTION: -! User-supplied routine for PDAF. -! Used in the filters: LSEIK/LETKF/LESTKF -! -! The routine is called during the loop over all -! local analysis domains in PDAF\_lseik\_update -! before the analysis on a single local analysis -! domain. It has to project the full PE-local -! model state onto the current local analysis -! domain. -! -! Generic implementation using index vector -! ID_LSTATE_IN_PSTATE. -! -! !REVISION HISTORY: -! 2013-02 - Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! !ARGUMENTS: - INTEGER, INTENT(in) :: step ! Current time step - INTEGER, INTENT(in) :: domain_p ! Current local analysis domain - INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension - INTEGER, INTENT(in) :: dim_l ! Local state dimension - REAL, INTENT(in) :: state_p(dim_p) ! PE-local full state vector - REAL, INTENT(out) :: state_l(dim_l) ! State vector on local analysis domain - -! !CALLING SEQUENCE: -! Called by: PDAF_lseik_update (as U_g2l_state) -! Called by: PDAF_letkf_update (as U_g2l_state) -! Called by: PDAF_lestkf_update (as U_g2l_state) -! Called by: PDAF_lnetf_update (as U_g2l_state) -!EOP - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************* -! *** Initialize local state vector *** -! ************************************* - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_l(i) = state_p(id_lstate_in_pstate(i)) - END DO - -END SUBROUTINE g2l_state_pdaf diff --git a/templates/classical/offline/init_dim_l_pdaf.F90 b/templates/classical/offline/init_dim_l_pdaf.F90 index d8b544482..d3bcd8b5c 100644 --- a/templates/classical/offline/init_dim_l_pdaf.F90 +++ b/templates/classical/offline/init_dim_l_pdaf.F90 @@ -20,8 +20,10 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! Later revisions - see svn log ! ! !USES: + USE PDAFlocal, & ! Routine to provide local indices to PDAF + ONLY: PDAFlocal_set_indices USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l, id_lstate_in_pstate + ONLY: coords_l IMPLICIT NONE @@ -30,6 +32,9 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) INTEGER, INTENT(in) :: domain_p ! Current local analysis domain INTEGER, INTENT(out) :: dim_l ! Local state dimension +! !LOCAL VARIABLES: + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector + ! !CALLING SEQUENCE: ! Called by: PDAF_lseik_update (as U_init_dim_l) ! Called by: PDAF_lestkf_update (as U_init_dim_l) @@ -63,9 +68,14 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array - IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! id_lstate_in_pstate = ?? + ! Provide the index vector to PDAF + CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) + + ! Deallocate index array + DEALLOCATE(id_lstate_in_pstate) + END SUBROUTINE init_dim_l_pdaf diff --git a/templates/classical/offline/init_pdaf_parse.F90 b/templates/classical/offline/init_pdaf_parse.F90 index 4be0eae19..07718f727 100644 --- a/templates/classical/offline/init_pdaf_parse.F90 +++ b/templates/classical/offline/init_pdaf_parse.F90 @@ -25,8 +25,8 @@ SUBROUTINE init_pdaf_parse() USE mod_assimilation, & ! Variables for assimilation ONLY: screen, filtertype, subtype, dim_ens, delt_obs, & rms_obs, model_error, model_err_amp, incremental, type_forget, & - forget, epsilon, rank_ana_enkf, locweight, cradius, & - sradius, int_rediag, filename, type_trans, dim_obs, & + forget, rank_ana_enkf, locweight, cradius, & + sradius, filename, type_trans, dim_obs, & type_sqrt IMPLICIT NONE @@ -73,10 +73,6 @@ SUBROUTINE init_pdaf_parse() ! Filter-specific settings handle = 'type_trans' ! Type of ensemble transformation in SEIK/ETKF/LSEIK/LETKF CALL parse(handle, type_trans) - handle = 'epsilon' ! Set EPSILON for SEEK - CALL parse(handle, epsilon) - handle = 'int_rediag' ! Time step interval for rediagonalization in SEEK - CALL parse(handle, int_rediag) handle = 'rank_ana_enkf' ! Set rank for pseudo inverse in EnKF CALL parse(handle, rank_ana_enkf) handle = 'type_forget' ! Set type of forgetting factor diff --git a/templates/classical/offline/l2g_state_pdaf.F90 b/templates/classical/offline/l2g_state_pdaf.F90 deleted file mode 100644 index b02229803..000000000 --- a/templates/classical/offline/l2g_state_pdaf.F90 +++ /dev/null @@ -1,62 +0,0 @@ -!$Id$ -!BOP -! -! !ROUTINE: l2g_state_pdaf --- Initialize full state from local analysis -! -! !INTERFACE: -SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) - -! !DESCRIPTION: -! User-supplied routine for PDAF. -! Used in the filters: LSEIK/LETKF/LESTKF -! -! The routine is called during the loop over all -! local analysis domains in PDAF\_X\_update -! after the analysis and ensemble transformation -! on a single local analysis domain. It has to -! initialize elements of the PE-local full state -! vector from the provided analysis state vector -! on the local analysis domain. -! -! Generic implementation using index vector -! ID_LSTATE_IN_PSTATE. -! -! !REVISION HISTORY: -! 2013-02 - Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! !ARGUMENTS: - INTEGER, INTENT(in) :: step ! Current time step - INTEGER, INTENT(in) :: domain_p ! Current local analysis domain - INTEGER, INTENT(in) :: dim_l ! Local state dimension - INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension - REAL, INTENT(in) :: state_l(dim_l) ! State vector on local analysis domain - REAL, INTENT(inout) :: state_p(dim_p) ! PE-local full state vector - -! !CALLING SEQUENCE: -! Called by: PDAF_lseik_update (as U_l2g_state) -! Called by: PDAF_lestkf_update (as U_l2g_state) -! Called by: PDAF_letkf_update (as U_l2g_state) -! Called by: PDAF_lnetf_update (as U_l2g_state) -!EOP - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************************** -! *** Initialize elements of global state vector *** -! ************************************************** - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_p(id_lstate_in_pstate(i)) = state_l(i) - END DO - -END SUBROUTINE l2g_state_pdaf diff --git a/templates/classical/offline/mod_assimilation.F90 b/templates/classical/offline/mod_assimilation.F90 index db8731bd9..70e4f31e7 100644 --- a/templates/classical/offline/mod_assimilation.F90 +++ b/templates/classical/offline/mod_assimilation.F90 @@ -34,6 +34,29 @@ MODULE mod_assimilation REAL, ALLOCATABLE :: obs_f(:) ! Vector holding full vector of observations REAL, ALLOCATABLE :: coords_obs_f(:,:) ! Array for full observation coordinates + REAL :: coords_l(2) ! Coordinates of local analysis domain + INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector + REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations + +! *** Variables to handle multiple fields in the state vector *** + + INTEGER :: n_fields !< number of fields in state vector + INTEGER, ALLOCATABLE :: off_fields(:) !< Offsets of fields in state vector + INTEGER, ALLOCATABLE :: dim_fields(:) !< Dimension of fields in state vector + + ! Declare Fortran type holding the indices of model fields in the state vector + ! This can be extended to any number of fields - it severs to give each field a name + TYPE field_ids + INTEGER :: NAME_OF_FIELD_1 +! INTEGER :: NAME_OF_FIELD_2 +! INTEGER :: ... + END TYPE field_ids + + ! Type variable holding field IDs in state vector + TYPE(field_ids) :: id + +!$OMP THREADPRIVATE(coords_l, id_lobs_in_fobs, distance_l) + ! *** Below are the generic variables used for configuring PDAF *** ! *** Their values are set in init_PDAF_offline *** @@ -52,18 +75,12 @@ MODULE mod_assimilation INTEGER :: screen ! Control verbosity of PDAF ! (0) no outputs, (1) progess info, (2) add timings ! (3) debugging output - INTEGER :: dim_ens ! Size of ensemble for SEIK/LSEIK/EnKF/ETKF - ! Number of EOFs to be used for SEEK + INTEGER :: dim_ens ! Size of ensemble INTEGER :: filtertype ! Select filter algorithm: - ! SEEK (0), SEIK (1), EnKF (2), LSEIK (3), ETKF (4), LETKF (5) + ! SEIK (1), EnKF (2), LSEIK (3), ETKF (4), LETKF (5) ! ESTKF (6), LESTKF (7), LEnKF (8) ! NETF (9), LNETF (10), LKNETF(11), PF (12), 3DVAR (200) INTEGER :: subtype ! Subtype of filter algorithm - ! SEEK: - ! (0) evolve normalized modes - ! (1) evolve scaled modes with unit U - ! (2) fixed basis (V); variable U matrix - ! (3) fixed covar matrix (V,U kept static) ! SEIK: ! (0) ensemble forecast; new formulation ! (1) ensemble forecast; old formulation @@ -130,9 +147,6 @@ MODULE mod_assimilation ! (2) apply inflation on analysis ensemble REAL :: forget ! Forgetting factor for filter analysis INTEGER :: dim_bias ! dimension of bias vector -! ! SEEK - INTEGER :: int_rediag ! Interval to perform re-diagonalization in SEEK - REAL :: epsilon ! Epsilon for gradient approx. in SEEK forecast ! ! ENKF INTEGER :: rank_ana_enkf ! Rank to be considered for inversion of HPH ! ! SEIK/ETKF/ESTKF/LSEIK/LETKF/LESTKF/NETF/LNETF/LKNETF @@ -235,28 +249,5 @@ MODULE mod_assimilation ! ! Other variables - _NOT_ available as command line options! REAL :: time ! model time - REAL :: coords_l(2) ! Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector - INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector - REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations - -! *** Variables to handle multiple fields in the state vector *** - - INTEGER :: n_fields !< number of fields in state vector - INTEGER, ALLOCATABLE :: off_fields(:) !< Offsets of fields in state vector - INTEGER, ALLOCATABLE :: dim_fields(:) !< Dimension of fields in state vector - - ! Declare Fortran type holding the indices of model fields in the state vector - ! This can be extended to any number of fields - it severs to give each field a name - TYPE field_ids - INTEGER :: NAME_OF_FIELD_1 -! INTEGER :: NAME_OF_FIELD_2 -! INTEGER :: ... - END TYPE field_ids - - ! Type variable holding field IDs in state vector - TYPE(field_ids) :: id - -!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate, id_lobs_in_fobs, distance_l) END MODULE mod_assimilation diff --git a/templates/classical/online/Makefile b/templates/classical/online/Makefile index e115c1d9e..41ac05904 100644 --- a/templates/classical/online/Makefile +++ b/templates/classical/online/Makefile @@ -68,8 +68,6 @@ OBJ_USER_ENKF = add_obs_error_pdaf.o \ # User-supplied routines for localized analysis (LSEIK) OBJ_USER_LOCAL = init_n_domains_pdaf.o \ init_dim_l_pdaf.o \ - g2l_state_pdaf.o \ - l2g_state_pdaf.o \ prodrinva_l_pdaf.o \ init_obs_l_pdaf.o \ init_dim_obs_l_pdaf.o \ diff --git a/templates/classical/online/assimilate_pdaf.F90 b/templates/classical/online/assimilate_pdaf.F90 index e2fcc0221..89aabd9b6 100644 --- a/templates/classical/online/assimilate_pdaf.F90 +++ b/templates/classical/online/assimilate_pdaf.F90 @@ -54,8 +54,6 @@ SUBROUTINE assimilate_pdaf() EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains init_dim_l_pdaf, & ! Initialize state dimension for local ana. domain init_dim_obs_l_pdaf,& ! Initialize dim. of obs. vector for local ana. domain - g2l_state_pdaf, & ! Get state on local ana. domain from global state - l2g_state_pdaf, & ! Init global state from state on local analysis domain g2l_obs_pdaf, & ! Restrict a global obs. vector to local analysis domain init_obs_l_pdaf, & ! Provide vector of measurements for local ana. domain prodRinvA_l_pdaf, & ! Provide product R^-1 A for some local matrix A @@ -91,34 +89,33 @@ SUBROUTINE assimilate_pdaf() init_obs_pdaf, prepoststep_ens_pdaf, add_obs_error_pdaf, init_obscovar_pdaf, & next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 3) THEN - CALL PDAF_assimilate_lseik(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocal_assimilate_lseik(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_pdaf, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & - g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, next_observation_pdaf, status_pdaf) + init_dim_obs_l_pdaf, g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, & + next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 4) THEN CALL PDAF_assimilate_etkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdaf, obs_op_pdaf, & init_obs_pdaf, prepoststep_ens_pdaf, prodRinvA_pdaf, init_obsvar_pdaf, next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 5) THEN - CALL PDAF_assimilate_letkf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocal_assimilate_letkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_pdaf, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & - g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, next_observation_pdaf, status_pdaf) + init_dim_obs_l_pdaf, g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, & + next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 6) THEN CALL PDAF_assimilate_estkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdaf, obs_op_pdaf, & init_obs_pdaf, prepoststep_ens_pdaf, prodRinvA_pdaf, init_obsvar_pdaf, next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 7) THEN - CALL PDAF_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & - init_dim_obs_f_pdaf, obs_op_f_pdaf, & - init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_pdaf, & - prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & - g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, next_observation_pdaf, status_pdaf) + CALL PDAFlocal_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, init_obs_f_pdaf, init_obs_l_pdaf, & + prepoststep_ens_pdaf, prodRinvA_l_pdaf, init_n_domains_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_obs_pdaf, init_obsvar_pdaf, & + init_obsvar_l_pdaf, next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 8) THEN CALL PDAF_assimilate_lenkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdaf, obs_op_pdaf, & @@ -130,18 +127,17 @@ SUBROUTINE assimilate_pdaf() obs_op_pdaf, init_obs_pdaf, prepoststep_ens_pdaf, & likelihood_pdaf, next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 10) THEN - CALL PDAF_assimilate_lnetf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocal_assimilate_lnetf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, & obs_op_f_pdaf, init_obs_l_pdaf, prepoststep_ens_pdaf, & likelihood_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & - g2l_obs_pdaf, next_observation_pdaf, status_pdaf) + init_dim_obs_l_pdaf, g2l_obs_pdaf, next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 11) THEN - CALL PDAF_assimilate_lknetf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocal_assimilate_lknetf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_pdaf, & prodRinvA_l_pdaf, prodRinvA_hyb_l_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, & g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, & likelihood_l_pdaf, likelihood_hyb_l_pdaf, next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 12) THEN diff --git a/templates/classical/online/g2l_state_pdaf.F90 b/templates/classical/online/g2l_state_pdaf.F90 deleted file mode 100644 index bac45d3a2..000000000 --- a/templates/classical/online/g2l_state_pdaf.F90 +++ /dev/null @@ -1,63 +0,0 @@ -!$Id$ -!BOP -! -! !ROUTINE: g2l_state_pdaf --- Restrict a model state to a local analysis domain -! -! !INTERFACE: -SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) - -! !DESCRIPTION: -! User-supplied routine for PDAF. -! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -! -! The routine is called during the loop over all -! local analysis domains in PDAF\_lseik\_update -! before the analysis on a single local analysis -! domain. It has to project the full PE-local -! model state onto the current local analysis -! domain. -! -! Generic implementation using index vector -! ID_LSTATE_IN_PSTATE. -! -! The routine is called by each filter process. -! -! !REVISION HISTORY: -! 2005-09 - Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! !ARGUMENTS: - INTEGER, INTENT(in) :: step ! Current time step - INTEGER, INTENT(in) :: domain_p ! Current local analysis domain - INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension - INTEGER, INTENT(in) :: dim_l ! Local state dimension - REAL, INTENT(in) :: state_p(dim_p) ! PE-local full state vector - REAL, INTENT(out) :: state_l(dim_l) ! State vector on local analysis domain - -! !CALLING SEQUENCE: -! Called by: PDAF_lseik_update (as U_g2l_state) -! Called by: PDAF_letkf_update (as U_g2l_state) -! Called by: PDAF_lestkf_update (as U_g2l_state) -!EOP - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************* -! *** Initialize local state vector *** -! ************************************* - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_l(i) = state_p(id_lstate_in_pstate(i)) - END DO - - -END SUBROUTINE g2l_state_pdaf diff --git a/templates/classical/online/init_dim_l_pdaf.F90 b/templates/classical/online/init_dim_l_pdaf.F90 index c2acd109d..082d2c795 100644 --- a/templates/classical/online/init_dim_l_pdaf.F90 +++ b/templates/classical/online/init_dim_l_pdaf.F90 @@ -22,8 +22,10 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! Later revisions - see svn log ! ! !USES: + USE PDAFlocal, & ! Routine to provide local indices to PDAF + ONLY: PDAFlocal_set_indices USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l, id_lstate_in_pstate + ONLY: coords_l IMPLICIT NONE @@ -32,6 +34,9 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) INTEGER, INTENT(in) :: domain_p ! Current local analysis domain INTEGER, INTENT(out) :: dim_l ! Local state dimension +! !LOCAL VARIABLES: + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector + ! !CALLING SEQUENCE: ! Called by: PDAF_lseik_update (as U_init_dim_l) ! Called by: PDAF_lestkf_update (as U_init_dim_l) @@ -65,9 +70,14 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array - IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! id_lstate_in_pstate = ?? + ! Provide the index vector to PDAF + CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) + + ! Deallocate index array + DEALLOCATE(id_lstate_in_pstate) + END SUBROUTINE init_dim_l_pdaf diff --git a/templates/classical/online/l2g_state_pdaf.F90 b/templates/classical/online/l2g_state_pdaf.F90 deleted file mode 100644 index 05197184b..000000000 --- a/templates/classical/online/l2g_state_pdaf.F90 +++ /dev/null @@ -1,64 +0,0 @@ -!$Id$ -!BOP -! -! !ROUTINE: l2g_state_pdaf --- Initialize full state from local analysis -! -! !INTERFACE: -SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) - -! !DESCRIPTION: -! User-supplied routine for PDAF. -! Used in the filters: LSEIK/LETKF/LESTKF -! -! The routine is called during the loop over all -! local analysis domains in PDAF\_X\_update -! after the analysis and ensemble transformation -! on a single local analysis domain. It has to -! initialize elements of the PE-local full state -! vector from the provided analysis state vector -! on the local analysis domain. -! -! Generic implementation using index vector -! ID_LSTATE_IN_PSTATE. -! -! The routine is called by each filter process. -! -! !REVISION HISTORY: -! 2005-09 - Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! !ARGUMENTS: - INTEGER, INTENT(in) :: step ! Current time step - INTEGER, INTENT(in) :: domain_p ! Current local analysis domain - INTEGER, INTENT(in) :: dim_l ! Local state dimension - INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension - REAL, INTENT(in) :: state_l(dim_l) ! State vector on local analysis domain - REAL, INTENT(inout) :: state_p(dim_p) ! PE-local full state vector - -! !CALLING SEQUENCE: -! Called by: PDAF_lseik_update (as U_l2g_state) -! Called by: PDAF_lestkf_update (as U_l2g_state) -! Called by: PDAF_letkf_update (as U_l2g_state) -! Called by: PDAF_lnetf_update (as U_l2g_state) -!EOP - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************************** -! *** Initialize elements of global state vector *** -! ************************************************** - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_p(id_lstate_in_pstate(i)) = state_l(i) - END DO - -END SUBROUTINE l2g_state_pdaf diff --git a/templates/classical/online/mod_assimilation.F90 b/templates/classical/online/mod_assimilation.F90 index 8789a7e9a..f562776d0 100644 --- a/templates/classical/online/mod_assimilation.F90 +++ b/templates/classical/online/mod_assimilation.F90 @@ -33,6 +33,12 @@ MODULE mod_assimilation REAL, ALLOCATABLE :: obs_f(:) ! Vector holding full vector of observations REAL, ALLOCATABLE :: coords_obs_f(:,:) ! Array for full observation coordinates + REAL :: coords_l(2) ! Coordinates of local analysis domain + INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector + REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations + +!$OMP THREADPRIVATE(coords_l, id_lobs_in_fobs, distance_l) + ! *** Below are the generic variables used for configuring PDAF *** ! *** Their values are set in init_PDAF *** @@ -225,11 +231,5 @@ MODULE mod_assimilation ! ! Other variables - _NOT_ available as command line options! REAL :: time ! model time - REAL :: coords_l(2) ! Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector - INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector - REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations - -!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate, id_lobs_in_fobs, distance_l) END MODULE mod_assimilation diff --git a/templates/offline_omi/Makefile b/templates/offline_omi/Makefile index 8974ff69e..470d98b62 100644 --- a/templates/offline_omi/Makefile +++ b/templates/offline_omi/Makefile @@ -62,9 +62,7 @@ OBJ_USER_GEN = init_ens_offline.o \ # User-supplied routines for localized analysis OBJ_USER_LOCAL = init_n_domains_pdaf.o \ - init_dim_l_pdaf.o \ - g2l_state_pdaf.o \ - l2g_state_pdaf.o + init_dim_l_pdaf.o # Full list of user-supplied routines for online modes OBJ_PDAF_USER = $(OBJ_USER_PDAFOMI) $(OBJ_USER_GEN) $(OBJ_USER_LOCAL) diff --git a/templates/offline_omi/assimilate_pdaf_offline.F90 b/templates/offline_omi/assimilate_pdaf_offline.F90 index ea930f4cb..a75f7687f 100644 --- a/templates/offline_omi/assimilate_pdaf_offline.F90 +++ b/templates/offline_omi/assimilate_pdaf_offline.F90 @@ -15,8 +15,10 @@ SUBROUTINE assimilate_pdaf_offline() USE PDAF_interfaces_module, & ! Interface definitions to PDAF core routines - ONLY: PDAFomi_assimilate_local, PDAFomi_assimilate_global, & - PDAFomi_assimilate_lenkf, PDAF_get_localfilter + ONLY: PDAFomi_put_state_global, & + PDAFomi_put_state_lenkf, PDAF_get_localfilter + USE PDAFlocal, & ! Interface definitions for PDAFlocal + ONLY: PDAFlocalomi_put_state USE mod_parallel_pdaf, & ! Parallelization ONLY: mype_world, abort_parallel USE mod_assimilation, & ! Variables for assimilation @@ -43,9 +45,7 @@ SUBROUTINE assimilate_pdaf_offline() prepoststep_ens_offline ! User supplied pre/poststep routine ! Localization of state vector EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains - init_dim_l_pdaf, & ! Initialize state dimension for local analysis domain - g2l_state_pdaf, & ! Get state on local analysis domain from global state - l2g_state_pdaf ! Update global state from state on local analysis domain + init_dim_l_pdaf ! Initialize state dimension for local analysis domain ! Interface to PDAF-OMI for local and global filters EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain @@ -62,7 +62,7 @@ SUBROUTINE assimilate_pdaf_offline() ! *** PDAF_get_state is not required as no forecasting *** ! *** is performed in this mode. However, it is save *** ! *** to call PDAF_get_state, even it is not necessary. *** -! *** The functionality of PDAF_get_state is deactived *** +! *** The functionality of PDAF_get_state is deactivated *** ! *** for the offline mode. *** ! Check whether the filter is domain-localized @@ -71,18 +71,18 @@ SUBROUTINE assimilate_pdaf_offline() ! Call assimilate routine for global or local filter IF (localfilter == 1) THEN ! Call generic OMI interface routine for domain-localized filters - CALL PDAFomi_put_state_local(collect_state_pdaf, init_dim_obs_pdafomi, & + CALL PDAFlocalomi_put_state(collect_state_pdaf, init_dim_obs_pdafomi, & obs_op_pdafomi, prepoststep_ens_offline, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, status_pdaf) + init_dim_obs_l_pdafomi, status_pdaf) ELSE - IF (filtertype == 8) THEN - ! LEnKF has its own OMI interface routine - CALL PDAFomi_put_state_lenkf(collect_state_pdaf, init_dim_obs_pdafomi, & - obs_op_pdafomi, prepoststep_ens_offline, localize_covar_pdafomi, status_pdaf) - ELSE + IF (filtertype /= 8) THEN ! Call generic OMI interface routine for global filters CALL PDAFomi_put_state_global(collect_state_pdaf, init_dim_obs_pdafomi, & obs_op_pdafomi, prepoststep_ens_offline, status_pdaf) + ELSE + ! LEnKF has its own OMI interface routine + CALL PDAFomi_put_state_lenkf(collect_state_pdaf, init_dim_obs_pdafomi, & + obs_op_pdafomi, prepoststep_ens_offline, localize_covar_pdafomi, status_pdaf) END IF END IF diff --git a/templates/offline_omi/g2l_state_pdaf.F90 b/templates/offline_omi/g2l_state_pdaf.F90 deleted file mode 100644 index 177740d1a..000000000 --- a/templates/offline_omi/g2l_state_pdaf.F90 +++ /dev/null @@ -1,49 +0,0 @@ -!> Restrict a model state to a local analysis domain -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! before the analysis on a single local analysis -!! domain. It has to initialize elements of the -!! state vector for the local analysis domains from -!! the PE-local full state vector. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - INTEGER, INTENT(in) :: dim_l !< Local state dimension - REAL, INTENT(in) :: state_p(dim_p) !< PE-local full state vector - REAL, INTENT(out) :: state_l(dim_l) !< State vector on local analysis domain - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************* -! *** Initialize local state vector *** -! ************************************* - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_l(i) = state_p(id_lstate_in_pstate(i)) - END DO - -END SUBROUTINE g2l_state_pdaf diff --git a/templates/offline_omi/init_dim_l_pdaf.F90 b/templates/offline_omi/init_dim_l_pdaf.F90 index 13245a69c..1d81fdb09 100644 --- a/templates/offline_omi/init_dim_l_pdaf.F90 +++ b/templates/offline_omi/init_dim_l_pdaf.F90 @@ -11,13 +11,15 @@ !! domain. !! !! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code +!! * 2005-09 - Lars Nerger - Initial code !! * Later revisions - see repository log !! SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) + USE PDAFlocal, & ! Routine to provide local indices to PDAF + ONLY: PDAFlocal_set_indices USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l, id_lstate_in_pstate + ONLY: coords_l IMPLICIT NONE @@ -26,6 +28,9 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) INTEGER, INTENT(in) :: domain_p !< Current local analysis domain INTEGER, INTENT(out) :: dim_l !< Local state dimension +! *** local variables *** + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector + ! **************************************** ! *** Initialize local state dimension *** @@ -52,9 +57,14 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array - IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! id_lstate_in_pstate = ?? + ! Provide the index vector to PDAF + CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) + + ! Deallocate index array + DEALLOCATE(id_lstate_in_pstate) + END SUBROUTINE init_dim_l_pdaf diff --git a/templates/offline_omi/l2g_state_pdaf.F90 b/templates/offline_omi/l2g_state_pdaf.F90 deleted file mode 100644 index 1a27e44f2..000000000 --- a/templates/offline_omi/l2g_state_pdaf.F90 +++ /dev/null @@ -1,50 +0,0 @@ -!> Initialize full state from local analysis -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! after the analysis and ensemble transformation -!! on a single local analysis domain. It has to -!! initialize elements of the PE-local full state -!! vector from the provided analysis state vector -!! on the local analysis domain. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_l !< Local state dimension - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - REAL, INTENT(in) :: state_l(dim_l) !< State vector on local analysis domain - REAL, INTENT(inout) :: state_p(dim_p) !< PE-local full state vector - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************************** -! *** Initialize elements of global state vector *** -! ************************************************** - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_p(id_lstate_in_pstate(i)) = state_l(i) - END DO - -END SUBROUTINE l2g_state_pdaf diff --git a/templates/offline_omi/mod_assimilation.F90 b/templates/offline_omi/mod_assimilation.F90 index 9d62dea0f..bda8d8a6c 100644 --- a/templates/offline_omi/mod_assimilation.F90 +++ b/templates/offline_omi/mod_assimilation.F90 @@ -21,7 +21,6 @@ MODULE mod_assimilation ! *** Variables specific for model setup *** REAL :: coords_l(2) !< Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector ! Variables to handle multiple fields in the state vector INTEGER :: n_fields !< number of fields in state vector @@ -39,7 +38,7 @@ MODULE mod_assimilation ! Type variable holding field IDs in state vector TYPE(field_ids) :: id -!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate) +!$OMP THREADPRIVATE(coords_l) ! ----------------------------------------------------------------- @@ -64,18 +63,12 @@ MODULE mod_assimilation !< * (1) progress info !< * (2) add timings !< * (3) debugging output - INTEGER :: dim_ens !< Size of ensemble for SEIK/LSEIK/EnKF/ETKF \n - !< Number of EOFs to be used for SEEK + INTEGER :: dim_ens !< Size of ensemble INTEGER :: filtertype !< Select filter algorithm: - !< * SEEK (0), SEIK (1), EnKF (2), LSEIK (3), ETKF (4) + !< * SEIK (1), EnKF (2), LSEIK (3), ETKF (4) !< LETKF (5), ESTKF (6), LESTKF (7), NETF (9), LNETF (10) !< LKNETF (11), PF (12), GENOBS (100), 3DVAR (200) INTEGER :: subtype !< Subtype of filter algorithm - !< * SEEK: - !< (0) evolve normalized modes - !< (1) evolve scaled modes with unit U - !< (2) fixed basis (V); variable U matrix - !< (3) fixed covar matrix (V,U kept static) !< * SEIK: !< (0) ensemble forecast; new formulation !< (1) ensemble forecast; old formulation @@ -149,9 +142,6 @@ MODULE mod_assimilation !< (4) regulated localization of R with single-point error variance REAL :: sradius !< Support radius for 5th order polynomial !< or radius for 1/e for exponential weighting -! ! SEEK - INTEGER :: int_rediag !< Interval to perform re-diagonalization in SEEK - REAL :: epsilon !< Epsilon for gradient approx. in SEEK forecast ! ! ENKF INTEGER :: rank_ana_enkf !< Rank to be considered for inversion of HPH in analysis of EnKF !< (0) for analysis w/o eigendecomposition diff --git a/templates/online_omi/Makefile b/templates/online_omi/Makefile index 8100743b2..e1871f108 100644 --- a/templates/online_omi/Makefile +++ b/templates/online_omi/Makefile @@ -39,7 +39,7 @@ MODULES = mod_parallel_pdaf.o \ OBJ_MODEL = main.o # Moduls used for PDAF -MOD_ASSIM = mod_assimilation.o +MOD_ASSIM = mod_assimilation.o # Routines of observation handling (PDAF-OMI) OBJ_USER_PDAFOMI = obs_OBSTYPE_pdafomi_TEMPLATE.o \ diff --git a/templates/online_omi/assimilate_pdaf.F90 b/templates/online_omi/assimilate_pdaf.F90 index b6c9dd3f1..318c0e6d6 100644 --- a/templates/online_omi/assimilate_pdaf.F90 +++ b/templates/online_omi/assimilate_pdaf.F90 @@ -5,15 +5,20 @@ !! (PDAFomi_assimilate_X), which checks whether the forecast phase !! is completed. If so, the analysis step is computed inside PDAF. !! +!! In this routine, the real names of most of the +!! user-supplied routines for PDAF are specified (see below). +!! !! __Revision history:__ !! * 2020-11 - Lars Nerger - Initial code for OMI !! * Later revisions - see repository log !! SUBROUTINE assimilate_pdaf() - USE pdaf_interfaces_module, & ! Interface definitions to PDAF core routines - ONLY: PDAFomi_assimilate_local, PDAFomi_assimilate_global, & + USE PDAF_interfaces_module, & ! Interface definitions to PDAF core routines + ONLY: PDAFomi_assimilate_global, & PDAFomi_assimilate_lenkf, PDAF_get_localfilter, PDAFomi_generate_obs + USE PDAFlocal, & ! Interface definitions for PDAFlocal + ONLY: PDAFlocalomi_assimilate USE mod_parallel_pdaf, & ! Parallelization variables ONLY: mype_world, abort_parallel USE mod_assimilation, & ! Variables for assimilation @@ -40,9 +45,7 @@ SUBROUTINE assimilate_pdaf() prepoststep_pdaf ! User supplied pre/poststep routine ! Localization of state vector EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains - init_dim_l_pdaf, & ! Initialize state dimension for local analysis domain - g2l_state_pdaf, & ! Get state on local analysis domain from global state - l2g_state_pdaf ! Update global state from state on local analysis domain + init_dim_l_pdaf ! Initialize state dimension for local analysis domain ! Interface to PDAF-OMI for local and global filters EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain @@ -62,10 +65,9 @@ SUBROUTINE assimilate_pdaf() ! Call assimilate routine for global or local filter IF (localfilter == 1) THEN ! Call generic OMI interface routine for domain-localized filters - CALL PDAFomi_assimilate_local(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocalomi_assimilate(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, & - next_observation_pdaf, status_pdaf) + init_dim_l_pdaf, init_dim_obs_l_pdafomi, next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 8) THEN ! LEnKF has its own OMI interface routine diff --git a/templates/online_omi/g2l_state_pdaf.F90 b/templates/online_omi/g2l_state_pdaf.F90 deleted file mode 100644 index 177740d1a..000000000 --- a/templates/online_omi/g2l_state_pdaf.F90 +++ /dev/null @@ -1,49 +0,0 @@ -!> Restrict a model state to a local analysis domain -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! before the analysis on a single local analysis -!! domain. It has to initialize elements of the -!! state vector for the local analysis domains from -!! the PE-local full state vector. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - INTEGER, INTENT(in) :: dim_l !< Local state dimension - REAL, INTENT(in) :: state_p(dim_p) !< PE-local full state vector - REAL, INTENT(out) :: state_l(dim_l) !< State vector on local analysis domain - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************* -! *** Initialize local state vector *** -! ************************************* - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_l(i) = state_p(id_lstate_in_pstate(i)) - END DO - -END SUBROUTINE g2l_state_pdaf diff --git a/templates/online_omi/init_dim_l_pdaf.F90 b/templates/online_omi/init_dim_l_pdaf.F90 index 43a9c70cc..1d81fdb09 100644 --- a/templates/online_omi/init_dim_l_pdaf.F90 +++ b/templates/online_omi/init_dim_l_pdaf.F90 @@ -16,8 +16,10 @@ !! SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) + USE PDAFlocal, & ! Routine to provide local indices to PDAF + ONLY: PDAFlocal_set_indices USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l, id_lstate_in_pstate + ONLY: coords_l IMPLICIT NONE @@ -26,6 +28,9 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) INTEGER, INTENT(in) :: domain_p !< Current local analysis domain INTEGER, INTENT(out) :: dim_l !< Local state dimension +! *** local variables *** + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector + ! **************************************** ! *** Initialize local state dimension *** @@ -52,9 +57,14 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array - IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! id_lstate_in_pstate = ?? + ! Provide the index vector to PDAF + CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) + + ! Deallocate index array + DEALLOCATE(id_lstate_in_pstate) + END SUBROUTINE init_dim_l_pdaf diff --git a/templates/online_omi/l2g_state_pdaf.F90 b/templates/online_omi/l2g_state_pdaf.F90 deleted file mode 100644 index 1a27e44f2..000000000 --- a/templates/online_omi/l2g_state_pdaf.F90 +++ /dev/null @@ -1,50 +0,0 @@ -!> Initialize full state from local analysis -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! after the analysis and ensemble transformation -!! on a single local analysis domain. It has to -!! initialize elements of the PE-local full state -!! vector from the provided analysis state vector -!! on the local analysis domain. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_l !< Local state dimension - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - REAL, INTENT(in) :: state_l(dim_l) !< State vector on local analysis domain - REAL, INTENT(inout) :: state_p(dim_p) !< PE-local full state vector - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************************** -! *** Initialize elements of global state vector *** -! ************************************************** - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_p(id_lstate_in_pstate(i)) = state_l(i) - END DO - -END SUBROUTINE l2g_state_pdaf diff --git a/templates/online_omi/mod_assimilation.F90 b/templates/online_omi/mod_assimilation.F90 index 9d62dea0f..1b0e51f25 100644 --- a/templates/online_omi/mod_assimilation.F90 +++ b/templates/online_omi/mod_assimilation.F90 @@ -21,9 +21,9 @@ MODULE mod_assimilation ! *** Variables specific for model setup *** REAL :: coords_l(2) !< Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector - ! Variables to handle multiple fields in the state vector +! *** Variables to handle multiple fields in the state vector *** + INTEGER :: n_fields !< number of fields in state vector INTEGER, ALLOCATABLE :: off_fields(:) !< Offsets of fields in state vector INTEGER, ALLOCATABLE :: dim_fields(:) !< Dimension of fields in state vector @@ -39,7 +39,7 @@ MODULE mod_assimilation ! Type variable holding field IDs in state vector TYPE(field_ids) :: id -!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate) +!$OMP THREADPRIVATE(coords_l) ! ----------------------------------------------------------------- @@ -64,18 +64,12 @@ MODULE mod_assimilation !< * (1) progress info !< * (2) add timings !< * (3) debugging output - INTEGER :: dim_ens !< Size of ensemble for SEIK/LSEIK/EnKF/ETKF \n - !< Number of EOFs to be used for SEEK + INTEGER :: dim_ens !< Size of ensemble INTEGER :: filtertype !< Select filter algorithm: - !< * SEEK (0), SEIK (1), EnKF (2), LSEIK (3), ETKF (4) + !< * SEIK (1), EnKF (2), LSEIK (3), ETKF (4) !< LETKF (5), ESTKF (6), LESTKF (7), NETF (9), LNETF (10) !< LKNETF (11), PF (12), GENOBS (100), 3DVAR (200) INTEGER :: subtype !< Subtype of filter algorithm - !< * SEEK: - !< (0) evolve normalized modes - !< (1) evolve scaled modes with unit U - !< (2) fixed basis (V); variable U matrix - !< (3) fixed covar matrix (V,U kept static) !< * SEIK: !< (0) ensemble forecast; new formulation !< (1) ensemble forecast; old formulation @@ -149,9 +143,6 @@ MODULE mod_assimilation !< (4) regulated localization of R with single-point error variance REAL :: sradius !< Support radius for 5th order polynomial !< or radius for 1/e for exponential weighting -! ! SEEK - INTEGER :: int_rediag !< Interval to perform re-diagonalization in SEEK - REAL :: epsilon !< Epsilon for gradient approx. in SEEK forecast ! ! ENKF INTEGER :: rank_ana_enkf !< Rank to be considered for inversion of HPH in analysis of EnKF !< (0) for analysis w/o eigendecomposition diff --git a/templates/online_omi_flexible/Makefile b/templates/online_omi_flexible/Makefile index 2572b4a73..78fdfa6ae 100644 --- a/templates/online_omi_flexible/Makefile +++ b/templates/online_omi_flexible/Makefile @@ -31,15 +31,15 @@ EXE = PDAF_online .SUFFIXES: .F90 .o # Modules used for the model part -MODULES = mod_model.o \ +MODULES = mod_parallel_pdaf.o \ + mod_model.o \ parser_mpi.o # Model routines OBJ_MODEL = main.o # Moduls used for PDAF -MOD_ASSIM = mod_parallel_pdaf.o \ - mod_assimilation.o +MOD_ASSIM = mod_assimilation.o # Routines of observation handling (PDAF-OMI) OBJ_USER_PDAFOMI = obs_OBSTYPE_pdafomi_TEMPLATE.o \ @@ -62,9 +62,7 @@ OBJ_USER_GEN = init_ens_pdaf.o \ # User-supplied routines for localized analysis OBJ_USER_LOCAL = init_n_domains_pdaf.o \ - init_dim_l_pdaf.o \ - g2l_state_pdaf.o \ - l2g_state_pdaf.o + init_dim_l_pdaf.o # Full list of user-supplied routines for online modes OBJ_PDAF_USER = $(OBJ_USER_PDAFOMI) $(OBJ_PDAF_INT) $(OBJ_USER_GEN) $(OBJ_USER_LOCAL) diff --git a/templates/online_omi_flexible/assimilate_pdaf.F90 b/templates/online_omi_flexible/assimilate_pdaf.F90 index 2a00e7210..d9f5d0eba 100644 --- a/templates/online_omi_flexible/assimilate_pdaf.F90 +++ b/templates/online_omi_flexible/assimilate_pdaf.F90 @@ -15,6 +15,8 @@ SUBROUTINE assimilate_pdaf() USE pdaf_interfaces_module, & ! Interface definitions to PDAF core routines ONLY: PDAFomi_put_state_local, PDAFomi_put_state_global, & PDAFomi_put_state_lenkf, PDAF_get_localfilter, PDAFomi_generate_obs + USE PDAFlocal, & ! Interface definitions for PDAFlocal + ONLY: PDAFlocalomi_put_state USE mod_parallel_pdaf, & ! Parallelization variables ONLY: mype_world, abort_parallel USE mod_assimilation, & ! Variables for assimilation @@ -39,9 +41,7 @@ SUBROUTINE assimilate_pdaf() prepoststep_pdaf ! User supplied pre/poststep routine ! Localization of state vector EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains - init_dim_l_pdaf, & ! Initialize state dimension for local analysis domain - g2l_state_pdaf, & ! Get state on local analysis domain from global state - l2g_state_pdaf ! Update global state from state on local analysis domain + init_dim_l_pdaf ! Initialize state dimension for local analysis domain ! Interface to PDAF-OMI for local and global filters EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain @@ -59,9 +59,9 @@ SUBROUTINE assimilate_pdaf() ! Call assimilate routine for global or local filter IF (localfilter == 1) THEN ! Call generic OMI interface routine for domain-localized filters - CALL PDAFomi_put_state_local(collect_state_pdaf, init_dim_obs_pdafomi, & + CALL PDAFlocalomi_put_state(collect_state_pdaf, init_dim_obs_pdafomi, & obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, status_pdaf) + init_dim_obs_l_pdafomi, status_pdaf) ELSE IF (filtertype == 8) THEN ! LEnKF has its own OMI interface routine diff --git a/templates/online_omi_flexible/g2l_state_pdaf.F90 b/templates/online_omi_flexible/g2l_state_pdaf.F90 deleted file mode 100644 index 177740d1a..000000000 --- a/templates/online_omi_flexible/g2l_state_pdaf.F90 +++ /dev/null @@ -1,49 +0,0 @@ -!> Restrict a model state to a local analysis domain -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! before the analysis on a single local analysis -!! domain. It has to initialize elements of the -!! state vector for the local analysis domains from -!! the PE-local full state vector. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - INTEGER, INTENT(in) :: dim_l !< Local state dimension - REAL, INTENT(in) :: state_p(dim_p) !< PE-local full state vector - REAL, INTENT(out) :: state_l(dim_l) !< State vector on local analysis domain - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************* -! *** Initialize local state vector *** -! ************************************* - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_l(i) = state_p(id_lstate_in_pstate(i)) - END DO - -END SUBROUTINE g2l_state_pdaf diff --git a/templates/online_omi_flexible/init_dim_l_pdaf.F90 b/templates/online_omi_flexible/init_dim_l_pdaf.F90 index 43a9c70cc..1d81fdb09 100644 --- a/templates/online_omi_flexible/init_dim_l_pdaf.F90 +++ b/templates/online_omi_flexible/init_dim_l_pdaf.F90 @@ -16,8 +16,10 @@ !! SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) + USE PDAFlocal, & ! Routine to provide local indices to PDAF + ONLY: PDAFlocal_set_indices USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l, id_lstate_in_pstate + ONLY: coords_l IMPLICIT NONE @@ -26,6 +28,9 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) INTEGER, INTENT(in) :: domain_p !< Current local analysis domain INTEGER, INTENT(out) :: dim_l !< Local state dimension +! *** local variables *** + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector + ! **************************************** ! *** Initialize local state dimension *** @@ -52,9 +57,14 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array - IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! id_lstate_in_pstate = ?? + ! Provide the index vector to PDAF + CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) + + ! Deallocate index array + DEALLOCATE(id_lstate_in_pstate) + END SUBROUTINE init_dim_l_pdaf diff --git a/templates/online_omi_flexible/l2g_state_pdaf.F90 b/templates/online_omi_flexible/l2g_state_pdaf.F90 deleted file mode 100644 index 1a27e44f2..000000000 --- a/templates/online_omi_flexible/l2g_state_pdaf.F90 +++ /dev/null @@ -1,50 +0,0 @@ -!> Initialize full state from local analysis -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! after the analysis and ensemble transformation -!! on a single local analysis domain. It has to -!! initialize elements of the PE-local full state -!! vector from the provided analysis state vector -!! on the local analysis domain. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_l !< Local state dimension - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - REAL, INTENT(in) :: state_l(dim_l) !< State vector on local analysis domain - REAL, INTENT(inout) :: state_p(dim_p) !< PE-local full state vector - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************************** -! *** Initialize elements of global state vector *** -! ************************************************** - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_p(id_lstate_in_pstate(i)) = state_l(i) - END DO - -END SUBROUTINE l2g_state_pdaf diff --git a/templates/online_omi_flexible/mod_assimilation.F90 b/templates/online_omi_flexible/mod_assimilation.F90 index 9d62dea0f..1b0e51f25 100644 --- a/templates/online_omi_flexible/mod_assimilation.F90 +++ b/templates/online_omi_flexible/mod_assimilation.F90 @@ -21,9 +21,9 @@ MODULE mod_assimilation ! *** Variables specific for model setup *** REAL :: coords_l(2) !< Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector - ! Variables to handle multiple fields in the state vector +! *** Variables to handle multiple fields in the state vector *** + INTEGER :: n_fields !< number of fields in state vector INTEGER, ALLOCATABLE :: off_fields(:) !< Offsets of fields in state vector INTEGER, ALLOCATABLE :: dim_fields(:) !< Dimension of fields in state vector @@ -39,7 +39,7 @@ MODULE mod_assimilation ! Type variable holding field IDs in state vector TYPE(field_ids) :: id -!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate) +!$OMP THREADPRIVATE(coords_l) ! ----------------------------------------------------------------- @@ -64,18 +64,12 @@ MODULE mod_assimilation !< * (1) progress info !< * (2) add timings !< * (3) debugging output - INTEGER :: dim_ens !< Size of ensemble for SEIK/LSEIK/EnKF/ETKF \n - !< Number of EOFs to be used for SEEK + INTEGER :: dim_ens !< Size of ensemble INTEGER :: filtertype !< Select filter algorithm: - !< * SEEK (0), SEIK (1), EnKF (2), LSEIK (3), ETKF (4) + !< * SEIK (1), EnKF (2), LSEIK (3), ETKF (4) !< LETKF (5), ESTKF (6), LESTKF (7), NETF (9), LNETF (10) !< LKNETF (11), PF (12), GENOBS (100), 3DVAR (200) INTEGER :: subtype !< Subtype of filter algorithm - !< * SEEK: - !< (0) evolve normalized modes - !< (1) evolve scaled modes with unit U - !< (2) fixed basis (V); variable U matrix - !< (3) fixed covar matrix (V,U kept static) !< * SEIK: !< (0) ensemble forecast; new formulation !< (1) ensemble forecast; old formulation @@ -149,9 +143,6 @@ MODULE mod_assimilation !< (4) regulated localization of R with single-point error variance REAL :: sradius !< Support radius for 5th order polynomial !< or radius for 1/e for exponential weighting -! ! SEEK - INTEGER :: int_rediag !< Interval to perform re-diagonalization in SEEK - REAL :: epsilon !< Epsilon for gradient approx. in SEEK forecast ! ! ENKF INTEGER :: rank_ana_enkf !< Rank to be considered for inversion of HPH in analysis of EnKF !< (0) for analysis w/o eigendecomposition diff --git a/tutorial/3dvar/offline_2D_serial/Makefile b/tutorial/3dvar/offline_2D_serial/Makefile index 21914e993..48a5abf33 100644 --- a/tutorial/3dvar/offline_2D_serial/Makefile +++ b/tutorial/3dvar/offline_2D_serial/Makefile @@ -66,9 +66,7 @@ OBJ_USER_GEN = init_ens_offline.o \ # User-supplied routines for localized analysis OBJ_USER_LOCAL = init_n_domains_pdaf.o \ - init_dim_l_pdaf.o \ - g2l_state_pdaf.o \ - l2g_state_pdaf.o + init_dim_l_pdaf.o # User-supplied routines for 3D-Var methods OBJ_USER_3DVAR = init_3dvar_offline.o \ @@ -95,7 +93,7 @@ $(EXE) : libpdaf-var.a \ libpdaf-var.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR); make pdaf-var; + @cd $(BASEDIR); make; ###################################################### diff --git a/tutorial/3dvar/offline_2D_serial/assimilate_pdaf_offline.F90 b/tutorial/3dvar/offline_2D_serial/assimilate_pdaf_offline.F90 index b23e19ada..ae137b988 100644 --- a/tutorial/3dvar/offline_2D_serial/assimilate_pdaf_offline.F90 +++ b/tutorial/3dvar/offline_2D_serial/assimilate_pdaf_offline.F90 @@ -14,10 +14,11 @@ !! SUBROUTINE assimilate_pdaf_offline() - USE pdaf_interfaces_module, & ! Interface definitions to PDAF core routines - ONLY: PDAFomi_put_state_3dvar, PDAFomi_put_state_en3dvar_lestkf, & - PDAFomi_put_state_en3dvar_estkf, PDAFomi_put_state_hyb3dvar_lestkf, & + USE PDAF_interfaces_module, & ! Interface definitions to PDAF core routines + ONLY: PDAFomi_put_state_3dvar, PDAFomi_put_state_en3dvar_estkf, & PDAFomi_put_state_hyb3dvar_estkf + USE PDAFlocal, & ! Interface definitions for PDAFlocal + ONLY: PDAFlocalomi_put_state_en3dvar_lestkf, PDAFlocalomi_put_state_hyb3dvar_lestkf USE mod_parallel_pdaf, & ! Parallelization ONLY: mype_world, abort_parallel USE mod_assimilation, & ! Variables for assimilation @@ -43,9 +44,7 @@ SUBROUTINE assimilate_pdaf_offline() prepoststep_ens_offline ! User supplied pre/poststep routine ! Localization of state vector EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains - init_dim_l_pdaf, & ! Initialize state dimension for local analysis domain - g2l_state_pdaf, & ! Get state on local analysis domain from global state - l2g_state_pdaf ! Update global state from state on local analysis domain + init_dim_l_pdaf ! Initialize state dimension for local analysis domain ! Interface to PDAF-OMI for local and global filters EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain @@ -80,11 +79,11 @@ SUBROUTINE assimilate_pdaf_offline() prepoststep_3dvar_offline, status_pdaf) ELSEIF (subtype==1) THEN ! Ensemble 3D-Var with local ESTKF update of ensemble perturbations - CALL PDAFomi_put_state_en3dvar_lestkf(collect_state_pdaf, & + CALL PDAFlocalomi_put_state_en3dvar_lestkf(collect_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, & cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & - g2l_state_pdaf, l2g_state_pdaf, prepoststep_ens_offline, status_pdaf) + prepoststep_ens_offline, status_pdaf) ELSEIF (subtype==4) THEN ! Ensemble 3D-Var with global ESTKF update of ensemble perturbations CALL PDAFomi_put_state_en3dvar_estkf(collect_state_pdaf, & @@ -93,11 +92,11 @@ SUBROUTINE assimilate_pdaf_offline() prepoststep_ens_offline, status_pdaf) ELSEIF (subtype==6) THEN ! Hybrid 3D-Var with local ESTKF update of ensemble perturbations - CALL PDAFomi_put_state_hyb3dvar_lestkf(collect_state_pdaf, & + CALL PDAFlocalomi_put_state_hyb3dvar_lestkf(collect_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, cvt_ens_pdaf, cvt_adj_ens_pdaf, & cvt_pdaf, cvt_adj_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & - g2l_state_pdaf, l2g_state_pdaf, prepoststep_ens_offline, status_pdaf) + prepoststep_ens_offline, status_pdaf) ELSEIF (subtype==7) THEN ! Hybrid 3D-Var with global ESTKF update of ensemble perturbations CALL PDAFomi_put_state_hyb3dvar_estkf(collect_state_pdaf, & diff --git a/tutorial/3dvar/offline_2D_serial/g2l_state_pdaf.F90 b/tutorial/3dvar/offline_2D_serial/g2l_state_pdaf.F90 deleted file mode 100644 index 177740d1a..000000000 --- a/tutorial/3dvar/offline_2D_serial/g2l_state_pdaf.F90 +++ /dev/null @@ -1,49 +0,0 @@ -!> Restrict a model state to a local analysis domain -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! before the analysis on a single local analysis -!! domain. It has to initialize elements of the -!! state vector for the local analysis domains from -!! the PE-local full state vector. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - INTEGER, INTENT(in) :: dim_l !< Local state dimension - REAL, INTENT(in) :: state_p(dim_p) !< PE-local full state vector - REAL, INTENT(out) :: state_l(dim_l) !< State vector on local analysis domain - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************* -! *** Initialize local state vector *** -! ************************************* - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_l(i) = state_p(id_lstate_in_pstate(i)) - END DO - -END SUBROUTINE g2l_state_pdaf diff --git a/tutorial/3dvar/offline_2D_serial/init_dim_l_pdaf.F90 b/tutorial/3dvar/offline_2D_serial/init_dim_l_pdaf.F90 index 7ce79b7b8..f682e0cf4 100644 --- a/tutorial/3dvar/offline_2D_serial/init_dim_l_pdaf.F90 +++ b/tutorial/3dvar/offline_2D_serial/init_dim_l_pdaf.F90 @@ -16,8 +16,10 @@ !! SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) + USE PDAFlocal, & ! Routine to provide local indices to PDAF + ONLY: PDAFlocal_set_indices USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l, id_lstate_in_pstate, ny + ONLY: coords_l, ny IMPLICIT NONE @@ -26,6 +28,9 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) INTEGER, INTENT(in) :: domain_p !< Current local analysis domain INTEGER, INTENT(out) :: dim_l !< Local state dimension +! *** local variables *** + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector + ! **************************************** ! *** Initialize local state dimension *** @@ -49,10 +54,15 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array - IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! Here the local domain is a single grid point and variable given by DOMAIN_P id_lstate_in_pstate(1) = domain_p + ! Provide the index vector to PDAF + CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) + + ! Deallocate index array + DEALLOCATE(id_lstate_in_pstate) + END SUBROUTINE init_dim_l_pdaf diff --git a/tutorial/3dvar/offline_2D_serial/l2g_state_pdaf.F90 b/tutorial/3dvar/offline_2D_serial/l2g_state_pdaf.F90 deleted file mode 100644 index 1a27e44f2..000000000 --- a/tutorial/3dvar/offline_2D_serial/l2g_state_pdaf.F90 +++ /dev/null @@ -1,50 +0,0 @@ -!> Initialize full state from local analysis -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! after the analysis and ensemble transformation -!! on a single local analysis domain. It has to -!! initialize elements of the PE-local full state -!! vector from the provided analysis state vector -!! on the local analysis domain. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_l !< Local state dimension - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - REAL, INTENT(in) :: state_l(dim_l) !< State vector on local analysis domain - REAL, INTENT(inout) :: state_p(dim_p) !< PE-local full state vector - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************************** -! *** Initialize elements of global state vector *** -! ************************************************** - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_p(id_lstate_in_pstate(i)) = state_l(i) - END DO - -END SUBROUTINE l2g_state_pdaf diff --git a/tutorial/3dvar/offline_2D_serial/mod_assimilation.F90 b/tutorial/3dvar/offline_2D_serial/mod_assimilation.F90 index fa3d69e84..67caf9844 100644 --- a/tutorial/3dvar/offline_2D_serial/mod_assimilation.F90 +++ b/tutorial/3dvar/offline_2D_serial/mod_assimilation.F90 @@ -29,9 +29,9 @@ MODULE mod_assimilation ! *** Variables specific for model setup *** REAL :: coords_l(2) !< Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector - ! Variables to handle multiple fields in the state vector +! *** Variables to handle multiple fields in the state vector *** + INTEGER :: n_fields !< number of fields in state vector INTEGER, ALLOCATABLE :: off_fields(:) !< Offsets of fields in state vector INTEGER, ALLOCATABLE :: dim_fields(:) !< Dimension of fields in state vector @@ -46,7 +46,7 @@ MODULE mod_assimilation ! Type variable holding field IDs in state vector TYPE(field_ids) :: id -!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate) +!$OMP THREADPRIVATE(coords_l) ! ----------------------------------------------------------------- @@ -71,18 +71,12 @@ MODULE mod_assimilation !< * (1) progress info !< * (2) add timings !< * (3) debugging output - INTEGER :: dim_ens !< Size of ensemble for SEIK/LSEIK/EnKF/ETKF \n - !< Number of EOFs to be used for SEEK + INTEGER :: dim_ens !< Size of ensemble INTEGER :: filtertype !< Select filter algorithm: - !< * SEEK (0), SEIK (1), EnKF (2), LSEIK (3), ETKF (4) + !< * SEIK (1), EnKF (2), LSEIK (3), ETKF (4) !< LETKF (5), ESTKF (6), LESTKF (7), NETF (9), LNETF (10) !< LKNETF (11), PF (12), GENOBS (100), 3DVAR (200) INTEGER :: subtype !< Subtype of filter algorithm - !< * SEEK: - !< (0) evolve normalized modes - !< (1) evolve scaled modes with unit U - !< (2) fixed basis (V); variable U matrix - !< (3) fixed covar matrix (V,U kept static) !< * SEIK: !< (0) ensemble forecast; new formulation !< (1) ensemble forecast; old formulation @@ -156,9 +150,6 @@ MODULE mod_assimilation !< (4) regulated localization of R with single-point error variance REAL :: sradius !< Support radius for 5th order polynomial !< or radius for 1/e for exponential weighting -! ! SEEK - INTEGER :: int_rediag !< Interval to perform re-diagonalization in SEEK - REAL :: epsilon !< Epsilon for gradient approx. in SEEK forecast ! ! ENKF INTEGER :: rank_ana_enkf !< Rank to be considered for inversion of HPH in analysis of EnKF !< (0) for analysis w/o eigendecomposition diff --git a/tutorial/3dvar/online_2D_parallelmodel/Makefile b/tutorial/3dvar/online_2D_parallelmodel/Makefile index bca8ed06c..d593d26f1 100644 --- a/tutorial/3dvar/online_2D_parallelmodel/Makefile +++ b/tutorial/3dvar/online_2D_parallelmodel/Makefile @@ -69,9 +69,7 @@ OBJ_USER_GEN = init_ens_pdaf.o \ # User-supplied routines for localized analysis (LESTKF/LSEIK/LETKF) OBJ_USER_LOCAL = init_n_domains_pdaf.o \ - init_dim_l_pdaf.o \ - g2l_state_pdaf.o \ - l2g_state_pdaf.o + init_dim_l_pdaf.o # User-supplied routines for 3D-Var methods OBJ_USER_3DVAR = init_3dvar_pdaf.o \ @@ -117,7 +115,7 @@ model_pdaf : libpdaf-var.a \ libpdaf-var.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR); make pdaf-var; + @cd $(BASEDIR); make; ###################################################### diff --git a/tutorial/3dvar/online_2D_parallelmodel/assimilate_pdaf.F90 b/tutorial/3dvar/online_2D_parallelmodel/assimilate_pdaf.F90 index 7a19af55d..89492c51f 100644 --- a/tutorial/3dvar/online_2D_parallelmodel/assimilate_pdaf.F90 +++ b/tutorial/3dvar/online_2D_parallelmodel/assimilate_pdaf.F90 @@ -12,9 +12,10 @@ SUBROUTINE assimilate_pdaf() USE pdaf_interfaces_module, & ! Interface definitions to PDAF core routines - ONLY: PDAFomi_assimilate_3dvar, & - PDAFomi_assimilate_en3dvar_lestkf, PDAFomi_assimilate_en3dvar_estkf, & - PDAFomi_assimilate_hyb3dvar_lestkf, PDAFomi_assimilate_hyb3dvar_estkf + ONLY: PDAFomi_assimilate_3dvar, PDAFomi_assimilate_en3dvar_estkf, & + PDAFomi_assimilate_hyb3dvar_estkf + USE PDAFlocal, & ! Interface definitions for PDAFlocal + ONLY: PDAFlocalomi_assimilate_en3dvar_lestkf, PDAFlocalomi_assimilate_hyb3dvar_lestkf USE mod_parallel_model, & ! Parallelization variables ONLY: mype_world, abort_parallel USE mod_assimilation, & ! Variables for assimilation @@ -40,9 +41,7 @@ SUBROUTINE assimilate_pdaf() prepoststep_ens_pdaf ! User supplied pre/poststep routine ! Localization of state vector EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains - init_dim_l_pdaf, & ! Initialize state dimension for local analysis domain - g2l_state_pdaf, & ! Get state on local analysis domain from global state - l2g_state_pdaf ! Update global state from state on local analysis domain + init_dim_l_pdaf ! Initialize state dimension for local analysis domain ! Interface to PDAF-OMI for local and global filters EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain @@ -69,11 +68,10 @@ SUBROUTINE assimilate_pdaf() prepoststep_3dvar_pdaf, next_observation_pdaf, status_pdaf) ELSEIF (subtype==1) THEN ! Ensemble 3D-Var with local ESTKF update of ensemble perturbations - CALL PDAFomi_assimilate_en3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocalomi_assimilate_en3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, & cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & - g2l_state_pdaf, l2g_state_pdaf, & prepoststep_ens_pdaf, next_observation_pdaf, status_pdaf) ELSEIF (subtype==4) THEN ! Ensemble 3D-Var with global ESTKF update of ensemble perturbations @@ -83,12 +81,11 @@ SUBROUTINE assimilate_pdaf() prepoststep_ens_pdaf, next_observation_pdaf, status_pdaf) ELSEIF (subtype==6) THEN ! Hybrid 3D-Var with local ESTKF update of ensemble perturbations - CALL PDAFomi_assimilate_hyb3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocalomi_assimilate_hyb3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, & cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, & obs_op_lin_pdafomi, obs_op_adj_pdafomi, & init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & - g2l_state_pdaf, l2g_state_pdaf, & prepoststep_ens_pdaf, next_observation_pdaf, status_pdaf) ELSEIF (subtype==7) THEN ! Hybrid 3D-Var with global ESTKF update of ensemble perturbations diff --git a/tutorial/3dvar/online_2D_parallelmodel/g2l_state_pdaf.F90 b/tutorial/3dvar/online_2D_parallelmodel/g2l_state_pdaf.F90 deleted file mode 100644 index 177740d1a..000000000 --- a/tutorial/3dvar/online_2D_parallelmodel/g2l_state_pdaf.F90 +++ /dev/null @@ -1,49 +0,0 @@ -!> Restrict a model state to a local analysis domain -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! before the analysis on a single local analysis -!! domain. It has to initialize elements of the -!! state vector for the local analysis domains from -!! the PE-local full state vector. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - INTEGER, INTENT(in) :: dim_l !< Local state dimension - REAL, INTENT(in) :: state_p(dim_p) !< PE-local full state vector - REAL, INTENT(out) :: state_l(dim_l) !< State vector on local analysis domain - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************* -! *** Initialize local state vector *** -! ************************************* - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_l(i) = state_p(id_lstate_in_pstate(i)) - END DO - -END SUBROUTINE g2l_state_pdaf diff --git a/tutorial/3dvar/online_2D_parallelmodel/init_dim_l_pdaf.F90 b/tutorial/3dvar/online_2D_parallelmodel/init_dim_l_pdaf.F90 index c9425efb5..70aea27f7 100644 --- a/tutorial/3dvar/online_2D_parallelmodel/init_dim_l_pdaf.F90 +++ b/tutorial/3dvar/online_2D_parallelmodel/init_dim_l_pdaf.F90 @@ -16,10 +16,12 @@ !! SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) + USE PDAFlocal, & ! Routine to provide local indices to PDAF + ONLY: PDAFlocal_set_indices USE mod_model, & ! Model variables ONLY: ny, nx_p USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l, id_lstate_in_pstate + ONLY: coords_l USE mod_parallel_pdaf, & ! assimilation parallelization variables ONLY: mype_filter @@ -33,6 +35,7 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! *** local variables *** INTEGER :: i ! Counters INTEGER :: off_p ! Process-local offset in global state vector + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector ! **************************************** @@ -62,10 +65,15 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array - IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! Here the local domain is a single grid point and variable given by DOMAIN_P id_lstate_in_pstate(1) = domain_p + ! Provide the index vector to PDAF + CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) + + ! Deallocate index array + DEALLOCATE(id_lstate_in_pstate) + END SUBROUTINE init_dim_l_pdaf diff --git a/tutorial/3dvar/online_2D_parallelmodel/l2g_state_pdaf.F90 b/tutorial/3dvar/online_2D_parallelmodel/l2g_state_pdaf.F90 deleted file mode 100644 index 1a27e44f2..000000000 --- a/tutorial/3dvar/online_2D_parallelmodel/l2g_state_pdaf.F90 +++ /dev/null @@ -1,50 +0,0 @@ -!> Initialize full state from local analysis -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! after the analysis and ensemble transformation -!! on a single local analysis domain. It has to -!! initialize elements of the PE-local full state -!! vector from the provided analysis state vector -!! on the local analysis domain. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_l !< Local state dimension - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - REAL, INTENT(in) :: state_l(dim_l) !< State vector on local analysis domain - REAL, INTENT(inout) :: state_p(dim_p) !< PE-local full state vector - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************************** -! *** Initialize elements of global state vector *** -! ************************************************** - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_p(id_lstate_in_pstate(i)) = state_l(i) - END DO - -END SUBROUTINE l2g_state_pdaf diff --git a/tutorial/3dvar/online_2D_parallelmodel/mod_assimilation.F90 b/tutorial/3dvar/online_2D_parallelmodel/mod_assimilation.F90 index fde1bde58..20eb899c1 100644 --- a/tutorial/3dvar/online_2D_parallelmodel/mod_assimilation.F90 +++ b/tutorial/3dvar/online_2D_parallelmodel/mod_assimilation.F90 @@ -35,9 +35,9 @@ MODULE mod_assimilation ! *** Variables specific for model setup *** REAL :: coords_l(2) !< Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector - ! Variables to handle multiple fields in the state vector +! *** Variables to handle multiple fields in the state vector *** + INTEGER :: n_fields !< number of fields in state vector INTEGER, ALLOCATABLE :: off_fields(:) !< Offsets of fields in state vector INTEGER, ALLOCATABLE :: dim_fields(:) !< Dimension of fields in state vector @@ -52,7 +52,7 @@ MODULE mod_assimilation ! Type variable holding field IDs in state vector TYPE(field_ids) :: id -!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate) +!$OMP THREADPRIVATE(coords_l) ! ----------------------------------------------------------------- @@ -77,18 +77,12 @@ MODULE mod_assimilation !< * (1) progress info !< * (2) add timings !< * (3) debugging output - INTEGER :: dim_ens !< Size of ensemble for SEIK/LSEIK/EnKF/ETKF \n - !< Number of EOFs to be used for SEEK + INTEGER :: dim_ens !< Size of ensemble INTEGER :: filtertype !< Select filter algorithm: - !< * SEEK (0), SEIK (1), EnKF (2), LSEIK (3), ETKF (4) + !< * SEIK (1), EnKF (2), LSEIK (3), ETKF (4) !< LETKF (5), ESTKF (6), LESTKF (7), NETF (9), LNETF (10) !< LKNETF (11), PF (12), GENOBS (100), 3DVAR (200) INTEGER :: subtype !< Subtype of filter algorithm - !< * SEEK: - !< (0) evolve normalized modes - !< (1) evolve scaled modes with unit U - !< (2) fixed basis (V); variable U matrix - !< (3) fixed covar matrix (V,U kept static) !< * SEIK: !< (0) ensemble forecast; new formulation !< (1) ensemble forecast; old formulation @@ -162,9 +156,6 @@ MODULE mod_assimilation !< (4) regulated localization of R with single-point error variance REAL :: sradius !< Support radius for 5th order polynomial !< or radius for 1/e for exponential weighting -! ! SEEK - INTEGER :: int_rediag !< Interval to perform re-diagonalization in SEEK - REAL :: epsilon !< Epsilon for gradient approx. in SEEK forecast ! ! ENKF INTEGER :: rank_ana_enkf !< Rank to be considered for inversion of HPH in analysis of EnKF !< (0) for analysis w/o eigendecomposition diff --git a/tutorial/3dvar/online_2D_serialmodel/Makefile b/tutorial/3dvar/online_2D_serialmodel/Makefile index 335bbcfe3..83e1d885d 100644 --- a/tutorial/3dvar/online_2D_serialmodel/Makefile +++ b/tutorial/3dvar/online_2D_serialmodel/Makefile @@ -69,9 +69,7 @@ OBJ_USER_GEN = init_ens_pdaf.o \ # User-supplied routines for state in localized analysis (LESTKF/LSEIK/LETKF) OBJ_USER_LOCAL = init_n_domains_pdaf.o \ - init_dim_l_pdaf.o \ - g2l_state_pdaf.o \ - l2g_state_pdaf.o + init_dim_l_pdaf.o # User-supplied routines for 3D-Var methods OBJ_USER_3DVAR = init_3dvar_pdaf.o \ @@ -115,7 +113,7 @@ model_pdaf : libpdaf-var.a \ libpdaf-var.a: @echo "++++++ Generate Filter library ++++++" - @cd $(BASEDIR); make pdaf-var; + @cd $(BASEDIR); make; ###################################################### diff --git a/tutorial/3dvar/online_2D_serialmodel/assimilate_pdaf.F90 b/tutorial/3dvar/online_2D_serialmodel/assimilate_pdaf.F90 index 4e4a38ca5..dc2dfe806 100644 --- a/tutorial/3dvar/online_2D_serialmodel/assimilate_pdaf.F90 +++ b/tutorial/3dvar/online_2D_serialmodel/assimilate_pdaf.F90 @@ -1,4 +1,4 @@ -!> Routine to call PDAF for analysis step +!> Routine to call PDAF for analysis step in fully-parallel mode !! !! This routine is called during the model integrations at each time !! step. It calls the filter-specific assimilation routine of PDAF @@ -12,9 +12,10 @@ SUBROUTINE assimilate_pdaf() USE pdaf_interfaces_module, & ! Interface definitions to PDAF core routines - ONLY: PDAFomi_assimilate_3dvar, & - PDAFomi_assimilate_en3dvar_lestkf, PDAFomi_assimilate_en3dvar_estkf, & - PDAFomi_assimilate_hyb3dvar_lestkf, PDAFomi_assimilate_hyb3dvar_estkf + ONLY: PDAFomi_assimilate_3dvar, PDAFomi_assimilate_en3dvar_estkf, & + PDAFomi_assimilate_hyb3dvar_estkf + USE PDAFlocal, & ! Interface definitions for PDAFlocal + ONLY: PDAFlocalomi_assimilate_en3dvar_lestkf, PDAFlocalomi_assimilate_hyb3dvar_lestkf USE mod_parallel_pdaf, & ! Parallelization variables ONLY: mype_world, abort_parallel USE mod_assimilation, & ! Variables for assimilation @@ -40,9 +41,7 @@ SUBROUTINE assimilate_pdaf() prepoststep_ens_pdaf ! User supplied pre/poststep routine ! Localization of state vector EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains - init_dim_l_pdaf, & ! Initialize state dimension for local analysis domain - g2l_state_pdaf, & ! Get state on local analysis domain from global state - l2g_state_pdaf ! Update global state from state on local analysis domain + init_dim_l_pdaf ! Initialize state dimension for local analysis domain ! Interface to PDAF-OMI for local and global filters EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain @@ -69,11 +68,10 @@ SUBROUTINE assimilate_pdaf() prepoststep_3dvar_pdaf, next_observation_pdaf, status_pdaf) ELSEIF (subtype==1) THEN ! Ensemble 3D-Var with local ESTKF update of ensemble perturbations - CALL PDAFomi_assimilate_en3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocalomi_assimilate_en3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, & cvt_ens_pdaf, cvt_adj_ens_pdaf, obs_op_lin_pdafomi, obs_op_adj_pdafomi, & init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & - g2l_state_pdaf, l2g_state_pdaf, & prepoststep_ens_pdaf, next_observation_pdaf, status_pdaf) ELSEIF (subtype==4) THEN ! Ensemble 3D-Var with global ESTKF update of ensemble perturbations @@ -83,12 +81,11 @@ SUBROUTINE assimilate_pdaf() prepoststep_ens_pdaf, next_observation_pdaf, status_pdaf) ELSEIF (subtype==6) THEN ! Hybrid 3D-Var with local ESTKF update of ensemble perturbations - CALL PDAFomi_assimilate_hyb3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocalomi_assimilate_hyb3dvar_lestkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, & cvt_ens_pdaf, cvt_adj_ens_pdaf, cvt_pdaf, cvt_adj_pdaf, & obs_op_lin_pdafomi, obs_op_adj_pdafomi, & init_n_domains_pdaf, init_dim_l_pdaf, init_dim_obs_l_pdafomi, & - g2l_state_pdaf, l2g_state_pdaf, & prepoststep_ens_pdaf, next_observation_pdaf, status_pdaf) ELSEIF (subtype==7) THEN ! Hybrid 3D-Var with global ESTKF update of ensemble perturbations diff --git a/tutorial/3dvar/online_2D_serialmodel/g2l_state_pdaf.F90 b/tutorial/3dvar/online_2D_serialmodel/g2l_state_pdaf.F90 deleted file mode 100644 index 177740d1a..000000000 --- a/tutorial/3dvar/online_2D_serialmodel/g2l_state_pdaf.F90 +++ /dev/null @@ -1,49 +0,0 @@ -!> Restrict a model state to a local analysis domain -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! before the analysis on a single local analysis -!! domain. It has to initialize elements of the -!! state vector for the local analysis domains from -!! the PE-local full state vector. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - INTEGER, INTENT(in) :: dim_l !< Local state dimension - REAL, INTENT(in) :: state_p(dim_p) !< PE-local full state vector - REAL, INTENT(out) :: state_l(dim_l) !< State vector on local analysis domain - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************* -! *** Initialize local state vector *** -! ************************************* - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_l(i) = state_p(id_lstate_in_pstate(i)) - END DO - -END SUBROUTINE g2l_state_pdaf diff --git a/tutorial/3dvar/online_2D_serialmodel/init_dim_l_pdaf.F90 b/tutorial/3dvar/online_2D_serialmodel/init_dim_l_pdaf.F90 index 711074f13..3d751a495 100644 --- a/tutorial/3dvar/online_2D_serialmodel/init_dim_l_pdaf.F90 +++ b/tutorial/3dvar/online_2D_serialmodel/init_dim_l_pdaf.F90 @@ -16,10 +16,12 @@ !! SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) + USE PDAFlocal, & ! Routine to provide local indices to PDAF + ONLY: PDAFlocal_set_indices USE mod_model, & ! Model variables ONLY: ny USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l, id_lstate_in_pstate + ONLY: coords_l IMPLICIT NONE @@ -28,6 +30,9 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) INTEGER, INTENT(in) :: domain_p !< Current local analysis domain INTEGER, INTENT(out) :: dim_l !< Local state dimension +! *** local variables *** + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector + ! **************************************** ! *** Initialize local state dimension *** @@ -51,10 +56,15 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array - IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! Here the local domain is a single grid point and variable given by DOMAIN_P id_lstate_in_pstate(1) = domain_p + ! Provide the index vector to PDAF + CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) + + ! Deallocate index array + DEALLOCATE(id_lstate_in_pstate) + END SUBROUTINE init_dim_l_pdaf diff --git a/tutorial/3dvar/online_2D_serialmodel/l2g_state_pdaf.F90 b/tutorial/3dvar/online_2D_serialmodel/l2g_state_pdaf.F90 deleted file mode 100644 index 1a27e44f2..000000000 --- a/tutorial/3dvar/online_2D_serialmodel/l2g_state_pdaf.F90 +++ /dev/null @@ -1,50 +0,0 @@ -!> Initialize full state from local analysis -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! after the analysis and ensemble transformation -!! on a single local analysis domain. It has to -!! initialize elements of the PE-local full state -!! vector from the provided analysis state vector -!! on the local analysis domain. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_l !< Local state dimension - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - REAL, INTENT(in) :: state_l(dim_l) !< State vector on local analysis domain - REAL, INTENT(inout) :: state_p(dim_p) !< PE-local full state vector - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************************** -! *** Initialize elements of global state vector *** -! ************************************************** - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_p(id_lstate_in_pstate(i)) = state_l(i) - END DO - -END SUBROUTINE l2g_state_pdaf diff --git a/tutorial/3dvar/online_2D_serialmodel/mod_assimilation.F90 b/tutorial/3dvar/online_2D_serialmodel/mod_assimilation.F90 index 1e07ef849..75a88fff0 100644 --- a/tutorial/3dvar/online_2D_serialmodel/mod_assimilation.F90 +++ b/tutorial/3dvar/online_2D_serialmodel/mod_assimilation.F90 @@ -31,7 +31,6 @@ MODULE mod_assimilation ! *** Variables specific for model setup *** REAL :: coords_l(2) !< Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector ! *** Variables to handle multiple fields in the state vector *** @@ -49,7 +48,7 @@ MODULE mod_assimilation ! Type variable holding field IDs in state vector TYPE(field_ids) :: id -!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate) +!$OMP THREADPRIVATE(coords_l) ! ----------------------------------------------------------------- @@ -74,18 +73,12 @@ MODULE mod_assimilation !< * (1) progress info !< * (2) add timings !< * (3) debugging output - INTEGER :: dim_ens !< Size of ensemble for SEIK/LSEIK/EnKF/ETKF \n - !< Number of EOFs to be used for SEEK + INTEGER :: dim_ens !< Size of ensemble INTEGER :: filtertype !< Select filter algorithm: - !< * SEEK (0), SEIK (1), EnKF (2), LSEIK (3), ETKF (4) + !< * SEIK (1), EnKF (2), LSEIK (3), ETKF (4) !< LETKF (5), ESTKF (6), LESTKF (7), NETF (9), LNETF (10) !< LKNETF (11), PF (12), GENOBS (100), 3DVAR (200) INTEGER :: subtype !< Subtype of filter algorithm - !< * SEEK: - !< (0) evolve normalized modes - !< (1) evolve scaled modes with unit U - !< (2) fixed basis (V); variable U matrix - !< (3) fixed covar matrix (V,U kept static) !< * SEIK: !< (0) ensemble forecast; new formulation !< (1) ensemble forecast; old formulation @@ -159,9 +152,6 @@ MODULE mod_assimilation !< (4) regulated localization of R with single-point error variance REAL :: sradius !< Support radius for 5th order polynomial !< or radius for 1/e for exponential weighting -! ! SEEK - INTEGER :: int_rediag !< Interval to perform re-diagonalization in SEEK - REAL :: epsilon !< Epsilon for gradient approx. in SEEK forecast ! ! ENKF INTEGER :: rank_ana_enkf !< Rank to be considered for inversion of HPH in analysis of EnKF !< (0) for analysis w/o eigendecomposition diff --git a/tutorial/classical/offline_2D_parallel/Makefile b/tutorial/classical/offline_2D_parallel/Makefile index 9a10210c5..a92f1123a 100644 --- a/tutorial/classical/offline_2D_parallel/Makefile +++ b/tutorial/classical/offline_2D_parallel/Makefile @@ -71,8 +71,6 @@ OBJ_USER_ENKF = add_obs_error_pdaf.o \ # User-supplied routines for localized analysis (LSEIK) OBJ_USER_LOCAL = init_n_domains_pdaf.o \ init_dim_l_pdaf.o \ - g2l_state_pdaf.o \ - l2g_state_pdaf.o \ prodrinva_l_pdaf.o \ init_obs_l_pdaf.o \ init_dim_obs_l_pdaf.o \ @@ -104,7 +102,7 @@ libpdaf-d.a: ###################################################### .F90.o : - $(FC) $(OPT) $(CPP_DEFS) $(MPI_INC) -c $*.F90 + $(FC) $(OPT) $(CPP_DEFS) -I$(BASEDIR)/include $(MPI_INC) -c $*.F90 # For older compilers one might need to separate the # preprocessing from the compilation as defined below: diff --git a/tutorial/classical/offline_2D_parallel/assimilation_pdaf_offline.F90 b/tutorial/classical/offline_2D_parallel/assimilation_pdaf_offline.F90 index 8db0c8baa..6de7873a4 100644 --- a/tutorial/classical/offline_2D_parallel/assimilation_pdaf_offline.F90 +++ b/tutorial/classical/offline_2D_parallel/assimilation_pdaf_offline.F90 @@ -53,8 +53,6 @@ SUBROUTINE assimilation_pdaf_offline() EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains init_dim_l_pdaf, & ! Initialize state dimension for local ana. domain init_dim_obs_l_pdaf,& ! Initialize dim. of obs. vector for local ana. domain - g2l_state_pdaf, & ! Get state on local ana. domain from global state - l2g_state_pdaf, & ! Init global state from state on local analysis domain g2l_obs_pdaf, & ! Restrict a global obs. vector to local analysis domain init_obs_l_pdaf, & ! Provide vector of measurements for local ana. domain prodRinvA_l_pdaf, & ! Provide product R^-1 A for some matrix A (for LSEIK) @@ -98,31 +96,31 @@ SUBROUTINE assimilation_pdaf_offline() init_obs_pdaf, prepoststep_ens_offline, add_obs_error_pdaf, init_obscovar_pdaf, & status) ELSE IF (filtertype == 3) THEN - CALL PDAF_put_state_lseik( & + CALL PDAFlocal_put_state_lseik( & collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_offline, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + init_dim_obs_l_pdaf, & g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, status) ELSE IF (filtertype == 4) THEN CALL PDAF_put_state_etkf(collect_state_pdaf, init_dim_obs_pdaf, obs_op_pdaf, & init_obs_pdaf, prepoststep_ens_offline, prodRinvA_pdaf, init_obsvar_pdaf, status) ELSE IF (filtertype == 5) THEN - CALL PDAF_put_state_letkf( & + CALL PDAFlocal_put_state_letkf( & collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_offline, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + init_dim_obs_l_pdaf, & g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, status) ELSE IF (filtertype == 6) THEN CALL PDAF_put_state_estkf(collect_state_pdaf, init_dim_obs_pdaf, obs_op_pdaf, & init_obs_pdaf, prepoststep_ens_offline, prodRinvA_pdaf, init_obsvar_pdaf, status) ELSE IF (filtertype == 7) THEN - CALL PDAF_put_state_lestkf( & + CALL PDAFlocal_put_state_lestkf( & collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_offline, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + init_dim_obs_l_pdaf, & g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, status) END IF diff --git a/tutorial/classical/offline_2D_parallel/dummympi/mpif.h b/tutorial/classical/offline_2D_parallel/dummympi/mpif.h deleted file mode 100644 index bce5f7650..000000000 --- a/tutorial/classical/offline_2D_parallel/dummympi/mpif.h +++ /dev/null @@ -1,14 +0,0 @@ -! This is a strongly reduced header file for those -! MPI variables used in PDAF MPI calls. This is only -! intended for compilation without a real MPI library. - - INTEGER MPI_STATUS_SIZE - PARAMETER (MPI_STATUS_SIZE=4) - - INTEGER MPI_INTEGER, MPI_REAL, MPI_DOUBLE_PRECISION - PARAMETER (MPI_REAL=26,MPI_DOUBLE_PRECISION=27,MPI_INTEGER=28) - - INTEGER MPI_COMM_WORLD - PARAMETER (MPI_COMM_WORLD=91) - - INTEGER MPI_SUM, MPI_MAX diff --git a/tutorial/classical/offline_2D_parallel/finalize_pdaf.F90 b/tutorial/classical/offline_2D_parallel/finalize_pdaf.F90 index 9c4cd494d..026673622 100644 --- a/tutorial/classical/offline_2D_parallel/finalize_pdaf.F90 +++ b/tutorial/classical/offline_2D_parallel/finalize_pdaf.F90 @@ -24,7 +24,7 @@ SUBROUTINE finalize_pdaf() !EOP ! *** Show allocated memory for PDAF *** - CALL PDAF_print_info(11) + IF (mype_world==0) CALL PDAF_print_info(10) ! *** Print PDAF timings onto screen *** IF (mype_world==0) CALL PDAF_print_info(3) diff --git a/tutorial/classical/offline_2D_parallel/g2l_state_pdaf.F90 b/tutorial/classical/offline_2D_parallel/g2l_state_pdaf.F90 deleted file mode 100644 index de3486955..000000000 --- a/tutorial/classical/offline_2D_parallel/g2l_state_pdaf.F90 +++ /dev/null @@ -1,60 +0,0 @@ -!$Id: g2l_state_pdaf.F90 1369 2013-04-24 16:38:17Z lnerger $ -!BOP -! -! !ROUTINE: g2l_state_pdaf --- Restrict a model state to a local analysis domain -! -! !INTERFACE: -SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) - -! !DESCRIPTION: -! User-supplied routine for PDAF. -! Used in the filters: LSEIK/LETKF/LESTKF -! -! The routine is called during the loop over all -! local analysis domains in PDAF\_lseik\_update -! before the analysis on a single local analysis -! domain. It has to project the full PE-local -! model state onto the current local analysis -! domain. -! -! Generic implementation using index vector -! ID_LSTATE_IN_PSTATE. -! -! !REVISION HISTORY: -! 2013-02 - Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! !ARGUMENTS: - INTEGER, INTENT(in) :: step ! Current time step - INTEGER, INTENT(in) :: domain_p ! Current local analysis domain - INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension - INTEGER, INTENT(in) :: dim_l ! Local state dimension - REAL, INTENT(in) :: state_p(dim_p) ! PE-local full state vector - REAL, INTENT(out) :: state_l(dim_l) ! State vector on local analysis domain - -! !CALLING SEQUENCE: -! Called by: PDAF_lseik_update (as U_g2l_state) -! Called by: PDAF_letkf_update (as U_g2l_state) -! Called by: PDAF_lestkf_update (as U_g2l_state) -!EOP - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************* -! *** Initialize local state vector *** -! ************************************* - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_l(i) = state_p(id_lstate_in_pstate(i)) - END DO - -END SUBROUTINE g2l_state_pdaf diff --git a/tutorial/classical/offline_2D_parallel/init_dim_l_pdaf.F90 b/tutorial/classical/offline_2D_parallel/init_dim_l_pdaf.F90 index 9a6777cd2..4ea2086e2 100644 --- a/tutorial/classical/offline_2D_parallel/init_dim_l_pdaf.F90 +++ b/tutorial/classical/offline_2D_parallel/init_dim_l_pdaf.F90 @@ -23,8 +23,10 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! Later revisions - see svn log ! ! !USES: + USE PDAFlocal, & ! Routine to provide local indices to PDAF + ONLY: PDAFlocal_set_indices USE mod_assimilation, & ! Variables for assimilation - ONLY: ny, local_dims, coords_l, id_lstate_in_pstate + ONLY: ny, local_dims, coords_l USE mod_parallel, & ! assimilation parallelization variables ONLY: mype_filter @@ -35,16 +37,17 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) INTEGER, INTENT(in) :: domain_p ! Current local analysis domain INTEGER, INTENT(out) :: dim_l ! Local state dimension +! !LOCAL VARIABLES: + INTEGER :: i ! Counters + INTEGER :: off_p ! Process-local offset in global state vector + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector + ! !CALLING SEQUENCE: ! Called by: PDAF_lseik_update (as U_init_dim_l) ! Called by: PDAF_lestkf_update (as U_init_dim_l) ! Called by: PDAF_letkf_update (as U_init_dim_l) !EOP -! *** local variables *** - INTEGER :: i ! Counters - INTEGER :: off_p ! Process-local offset in global state vector - ! **************************************** ! *** Initialize local state dimension *** @@ -74,10 +77,15 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array - IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! Here the local domain is a single grid point and variable given by DOMAIN_P id_lstate_in_pstate(1) = domain_p + ! Provide the index vector to PDAF + CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) + + ! Deallocate index array + DEALLOCATE(id_lstate_in_pstate) + END SUBROUTINE init_dim_l_pdaf diff --git a/tutorial/classical/offline_2D_parallel/l2g_state_pdaf.F90 b/tutorial/classical/offline_2D_parallel/l2g_state_pdaf.F90 deleted file mode 100644 index aa4b03b45..000000000 --- a/tutorial/classical/offline_2D_parallel/l2g_state_pdaf.F90 +++ /dev/null @@ -1,61 +0,0 @@ -!$Id: l2g_state_pdaf.F90 1369 2013-04-24 16:38:17Z lnerger $ -!BOP -! -! !ROUTINE: l2g_state_pdaf --- Initialize full state from local analysis -! -! !INTERFACE: -SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) - -! !DESCRIPTION: -! User-supplied routine for PDAF. -! Used in the filters: LSEIK/LETKF/LESTKF -! -! The routine is called during the loop over all -! local analysis domains in PDAF\_X\_update -! after the analysis and ensemble transformation -! on a single local analysis domain. It has to -! initialize elements of the PE-local full state -! vector from the provided analysis state vector -! on the local analysis domain. -! -! Generic implementation using index vector -! ID_LSTATE_IN_PSTATE. -! -! !REVISION HISTORY: -! 2013-02 - Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! !ARGUMENTS: - INTEGER, INTENT(in) :: step ! Current time step - INTEGER, INTENT(in) :: domain_p ! Current local analysis domain - INTEGER, INTENT(in) :: dim_l ! Local state dimension - INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension - REAL, INTENT(in) :: state_l(dim_l) ! State vector on local analysis domain - REAL, INTENT(inout) :: state_p(dim_p) ! PE-local full state vector - -! !CALLING SEQUENCE: -! Called by: PDAF_lseik_update (as U_l2g_state) -! Called by: PDAF_lestkf_update (as U_l2g_state) -! Called by: PDAF_letkf_update (as U_l2g_state) -!EOP - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************************** -! *** Initialize elements of global state vector *** -! ************************************************** - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_p(id_lstate_in_pstate(i)) = state_l(i) - END DO - -END SUBROUTINE l2g_state_pdaf diff --git a/tutorial/classical/offline_2D_parallel/mod_assimilation.F90 b/tutorial/classical/offline_2D_parallel/mod_assimilation.F90 index efd48b2ed..0d39d3076 100644 --- a/tutorial/classical/offline_2D_parallel/mod_assimilation.F90 +++ b/tutorial/classical/offline_2D_parallel/mod_assimilation.F90 @@ -41,6 +41,12 @@ MODULE mod_assimilation REAL, ALLOCATABLE :: obs_f(:) ! Vector holding full vector of observations REAL, ALLOCATABLE :: coords_obs_f(:,:) ! Array for full observation coordinates + REAL :: coords_l(2) ! Coordinates of local analysis domain + INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector + REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations + +!$OMP THREADPRIVATE(coords_l, id_lobs_in_fobs, distance_l) + ! *** Below are the generic variables used for configuring PDAF *** ! *** Their values are set in init_PDAF_offline *** @@ -146,7 +152,7 @@ MODULE mod_assimilation ! (2) use 5th-order polynomial ! (3) regulated localization of R with mean error variance ! (4) regulated localization of R with single-point error variance - REAL :: sradius ! Support radius for 5th order polynomial + REAL :: sradius ! Support radius for 5th order polynomial ! or radius for 1/e for exponential weighting ! ! SEIK-subtype4/LSEIK-subtype4/ESTKF/LESTKF INTEGER :: type_sqrt ! Type of the transform matrix square-root @@ -163,11 +169,5 @@ MODULE mod_assimilation ! of P has also to be specified in PDAF_filter_init. ! Only for upward-compatibility of PDAF! REAL :: time ! model time - REAL :: coords_l(2) ! Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector - INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector - REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations - -!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate, id_lobs_in_fobs, distance_l) END MODULE mod_assimilation diff --git a/tutorial/classical/offline_2D_serial/Makefile b/tutorial/classical/offline_2D_serial/Makefile index 9e2c5ffe2..c5386914c 100644 --- a/tutorial/classical/offline_2D_serial/Makefile +++ b/tutorial/classical/offline_2D_serial/Makefile @@ -71,8 +71,6 @@ OBJ_USER_ENKF = add_obs_error_pdaf.o \ # User-supplied routines for localized analysis (LSEIK) OBJ_USER_LOCAL = init_n_domains_pdaf.o \ init_dim_l_pdaf.o \ - g2l_state_pdaf.o \ - l2g_state_pdaf.o \ prodrinva_l_pdaf.o \ init_obs_l_pdaf.o \ init_dim_obs_l_pdaf.o \ @@ -104,7 +102,7 @@ libpdaf-d.a: ###################################################### .F90.o : - $(FC) $(OPT) $(CPP_DEFS) $(MPI_INC) -c $*.F90 + $(FC) $(OPT) $(CPP_DEFS) -I$(BASEDIR)/include $(MPI_INC) -c $*.F90 # For older compilers one might need to separate the # preprocessing from the compilation as defined below: diff --git a/tutorial/classical/offline_2D_serial/assimilation_pdaf_offline.F90 b/tutorial/classical/offline_2D_serial/assimilation_pdaf_offline.F90 index 8bc18fb93..67c5aaeca 100644 --- a/tutorial/classical/offline_2D_serial/assimilation_pdaf_offline.F90 +++ b/tutorial/classical/offline_2D_serial/assimilation_pdaf_offline.F90 @@ -53,8 +53,6 @@ SUBROUTINE assimilation_pdaf_offline() EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains init_dim_l_pdaf, & ! Initialize state dimension for local ana. domain init_dim_obs_l_pdaf,& ! Initialize dim. of obs. vector for local ana. domain - g2l_state_pdaf, & ! Get state on local ana. domain from global state - l2g_state_pdaf, & ! Init global state from state on local analysis domain g2l_obs_pdaf, & ! Restrict a global obs. vector to local analysis domain init_obs_l_pdaf, & ! Provide vector of measurements for local ana. domain prodRinvA_l_pdaf, & ! Provide product R^-1 A for some matrix A (for LSEIK) @@ -98,31 +96,31 @@ SUBROUTINE assimilation_pdaf_offline() init_obs_pdaf, prepoststep_ens_offline, add_obs_error_pdaf, init_obscovar_pdaf, & status) ELSE IF (filtertype == 3) THEN - CALL PDAF_put_state_lseik( & + CALL PDAFlocal_put_state_lseik( & collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_offline, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + init_dim_obs_l_pdaf, & g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, status) ELSE IF (filtertype == 4) THEN CALL PDAF_put_state_etkf(collect_state_pdaf, init_dim_obs_pdaf, obs_op_pdaf, & init_obs_pdaf, prepoststep_ens_offline, prodRinvA_pdaf, init_obsvar_pdaf, status) ELSE IF (filtertype == 5) THEN - CALL PDAF_put_state_letkf( & + CALL PDAFlocal_put_state_letkf( & collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_offline, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + init_dim_obs_l_pdaf, & g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, status) ELSE IF (filtertype == 6) THEN CALL PDAF_put_state_estkf(collect_state_pdaf, init_dim_obs_pdaf, obs_op_pdaf, & init_obs_pdaf, prepoststep_ens_offline, prodRinvA_pdaf, init_obsvar_pdaf, status) ELSE IF (filtertype == 7) THEN - CALL PDAF_put_state_lestkf( & + CALL PDAFlocal_put_state_lestkf( & collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_offline, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + init_dim_obs_l_pdaf, & g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, status) END IF diff --git a/tutorial/classical/offline_2D_serial/g2l_state_pdaf.F90 b/tutorial/classical/offline_2D_serial/g2l_state_pdaf.F90 deleted file mode 100644 index de3486955..000000000 --- a/tutorial/classical/offline_2D_serial/g2l_state_pdaf.F90 +++ /dev/null @@ -1,60 +0,0 @@ -!$Id: g2l_state_pdaf.F90 1369 2013-04-24 16:38:17Z lnerger $ -!BOP -! -! !ROUTINE: g2l_state_pdaf --- Restrict a model state to a local analysis domain -! -! !INTERFACE: -SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) - -! !DESCRIPTION: -! User-supplied routine for PDAF. -! Used in the filters: LSEIK/LETKF/LESTKF -! -! The routine is called during the loop over all -! local analysis domains in PDAF\_lseik\_update -! before the analysis on a single local analysis -! domain. It has to project the full PE-local -! model state onto the current local analysis -! domain. -! -! Generic implementation using index vector -! ID_LSTATE_IN_PSTATE. -! -! !REVISION HISTORY: -! 2013-02 - Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! !ARGUMENTS: - INTEGER, INTENT(in) :: step ! Current time step - INTEGER, INTENT(in) :: domain_p ! Current local analysis domain - INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension - INTEGER, INTENT(in) :: dim_l ! Local state dimension - REAL, INTENT(in) :: state_p(dim_p) ! PE-local full state vector - REAL, INTENT(out) :: state_l(dim_l) ! State vector on local analysis domain - -! !CALLING SEQUENCE: -! Called by: PDAF_lseik_update (as U_g2l_state) -! Called by: PDAF_letkf_update (as U_g2l_state) -! Called by: PDAF_lestkf_update (as U_g2l_state) -!EOP - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************* -! *** Initialize local state vector *** -! ************************************* - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_l(i) = state_p(id_lstate_in_pstate(i)) - END DO - -END SUBROUTINE g2l_state_pdaf diff --git a/tutorial/classical/offline_2D_serial/init_dim_l_pdaf.F90 b/tutorial/classical/offline_2D_serial/init_dim_l_pdaf.F90 index a34eb9cb1..c3e2f744a 100644 --- a/tutorial/classical/offline_2D_serial/init_dim_l_pdaf.F90 +++ b/tutorial/classical/offline_2D_serial/init_dim_l_pdaf.F90 @@ -23,8 +23,10 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! Later revisions - see svn log ! ! !USES: + USE PDAFlocal, & ! Routine to provide local indices to PDAF + ONLY: PDAFlocal_set_indices USE mod_assimilation, & ! Variables for assimilation - ONLY: ny, coords_l, id_lstate_in_pstate + ONLY: ny, coords_l IMPLICIT NONE @@ -33,6 +35,9 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) INTEGER, INTENT(in) :: domain_p ! Current local analysis domain INTEGER, INTENT(out) :: dim_l ! Local state dimension +! !LOCAL VARIABLES: + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector + ! !CALLING SEQUENCE: ! Called by: PDAF_lseik_update (as U_init_dim_l) ! Called by: PDAF_lestkf_update (as U_init_dim_l) @@ -62,10 +67,15 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array - IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! Here the local domain is a single grid point and variable given by DOMAIN_P id_lstate_in_pstate(1) = domain_p + ! Provide the index vector to PDAF + CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) + + ! Deallocate index array + DEALLOCATE(id_lstate_in_pstate) + END SUBROUTINE init_dim_l_pdaf diff --git a/tutorial/classical/offline_2D_serial/init_dim_obs_l_pdaf.F90 b/tutorial/classical/offline_2D_serial/init_dim_obs_l_pdaf.F90 index b6642d253..a9b5569c6 100644 --- a/tutorial/classical/offline_2D_serial/init_dim_obs_l_pdaf.F90 +++ b/tutorial/classical/offline_2D_serial/init_dim_obs_l_pdaf.F90 @@ -98,4 +98,3 @@ SUBROUTINE init_dim_obs_l_pdaf(domain_p, step, dim_obs_f, dim_obs_l) END DO END SUBROUTINE init_dim_obs_l_pdaf - diff --git a/tutorial/classical/offline_2D_serial/l2g_state_pdaf.F90 b/tutorial/classical/offline_2D_serial/l2g_state_pdaf.F90 deleted file mode 100644 index aa4b03b45..000000000 --- a/tutorial/classical/offline_2D_serial/l2g_state_pdaf.F90 +++ /dev/null @@ -1,61 +0,0 @@ -!$Id: l2g_state_pdaf.F90 1369 2013-04-24 16:38:17Z lnerger $ -!BOP -! -! !ROUTINE: l2g_state_pdaf --- Initialize full state from local analysis -! -! !INTERFACE: -SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) - -! !DESCRIPTION: -! User-supplied routine for PDAF. -! Used in the filters: LSEIK/LETKF/LESTKF -! -! The routine is called during the loop over all -! local analysis domains in PDAF\_X\_update -! after the analysis and ensemble transformation -! on a single local analysis domain. It has to -! initialize elements of the PE-local full state -! vector from the provided analysis state vector -! on the local analysis domain. -! -! Generic implementation using index vector -! ID_LSTATE_IN_PSTATE. -! -! !REVISION HISTORY: -! 2013-02 - Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! !ARGUMENTS: - INTEGER, INTENT(in) :: step ! Current time step - INTEGER, INTENT(in) :: domain_p ! Current local analysis domain - INTEGER, INTENT(in) :: dim_l ! Local state dimension - INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension - REAL, INTENT(in) :: state_l(dim_l) ! State vector on local analysis domain - REAL, INTENT(inout) :: state_p(dim_p) ! PE-local full state vector - -! !CALLING SEQUENCE: -! Called by: PDAF_lseik_update (as U_l2g_state) -! Called by: PDAF_lestkf_update (as U_l2g_state) -! Called by: PDAF_letkf_update (as U_l2g_state) -!EOP - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************************** -! *** Initialize elements of global state vector *** -! ************************************************** - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_p(id_lstate_in_pstate(i)) = state_l(i) - END DO - -END SUBROUTINE l2g_state_pdaf diff --git a/tutorial/classical/offline_2D_serial/mod_assimilation.F90 b/tutorial/classical/offline_2D_serial/mod_assimilation.F90 index 28657383a..13fc3f751 100644 --- a/tutorial/classical/offline_2D_serial/mod_assimilation.F90 +++ b/tutorial/classical/offline_2D_serial/mod_assimilation.F90 @@ -41,6 +41,12 @@ MODULE mod_assimilation REAL, ALLOCATABLE :: obs_f(:) ! Vector holding full vector of observations REAL, ALLOCATABLE :: coords_obs_f(:,:) ! Array for full observation coordinates + REAL :: coords_l(2) ! Coordinates of local analysis domain + INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector + REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations + +!$OMP THREADPRIVATE(coords_l, id_lobs_in_fobs, distance_l) + ! *** Below are the generic variables used for configuring PDAF *** ! *** Their values are set in init_PDAF_offline *** @@ -59,17 +65,11 @@ MODULE mod_assimilation INTEGER :: screen ! Control verbosity of PDAF ! (0) no outputs, (1) progess info, (2) add timings ! (3) debugging output - INTEGER :: dim_ens ! Size of ensemble for SEIK/LSEIK/EnKF/ETKF - ! Number of EOFs to be used for SEEK + INTEGER :: dim_ens ! Size of ensemble INTEGER :: filtertype ! Select filter algorithm: - ! SEEK (0), SEIK (1), EnKF (2), LSEIK (3), ETKF (4) + ! SEIK (1), EnKF (2), LSEIK (3), ETKF (4) ! LETKF (5), ESTKF (6), LESTKF (7), NETF (9), LNETF (10) INTEGER :: subtype ! Subtype of filter algorithm - ! SEEK: - ! (0) evolve normalized modes - ! (1) evolve scaled modes with unit U - ! (2) fixed basis (V); variable U matrix - ! (3) fixed covar matrix (V,U kept static) ! SEIK: ! (0) ensemble forecast; new formulation ! (1) ensemble forecast; old formulation @@ -114,11 +114,8 @@ MODULE mod_assimilation INTEGER :: type_forget ! Type of forgetting factor REAL :: forget ! Forgetting factor for filter analysis INTEGER :: dim_bias ! dimension of bias vector -! ! SEEK - INTEGER :: int_rediag ! Interval to perform re-diagonalization in SEEK - REAL :: epsilon ! Epsilon for gradient approx. in SEEK forecast ! ! ENKF - INTEGER :: rank_ana_enkf ! Rank to be considered for inversion of HPH + INTEGER :: rank_ana_enkf ! Rank to be considered for inversion of HPH ! ! SEIK/ETKF/ESTKF/LSEIK/LETKF/LESTKF INTEGER :: type_trans ! Type of ensemble transformation ! SEIK/LSEIK: @@ -163,11 +160,5 @@ MODULE mod_assimilation ! of P has also to be specified in PDAF_filter_init. ! Only for upward-compatibility of PDAF! REAL :: time ! model time - REAL :: coords_l(2) ! Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector - INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector - REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations - -!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate, id_lobs_in_fobs, distance_l) END MODULE mod_assimilation diff --git a/tutorial/classical/online_2D_parallelmodel/Makefile b/tutorial/classical/online_2D_parallelmodel/Makefile index ef360aea0..ef83200c2 100644 --- a/tutorial/classical/online_2D_parallelmodel/Makefile +++ b/tutorial/classical/online_2D_parallelmodel/Makefile @@ -76,8 +76,6 @@ OBJ_USER_ENKF = add_obs_error_pdaf.o \ # User-supplied routines for localized analysis (LESTKF/LSEIK/LETKF) OBJ_USER_LOCAL = init_n_domains_pdaf.o \ init_dim_l_pdaf.o \ - g2l_state_pdaf.o \ - l2g_state_pdaf.o \ prodrinva_l_pdaf.o \ init_obs_l_pdaf.o \ init_dim_obs_l_pdaf.o \ @@ -127,7 +125,7 @@ libpdaf-d.a: ###################################################### .F90.o : - $(FC) $(OPT) $(CPP_DEFS) -c $*.F90 + $(FC) $(OPT) $(CPP_DEFS) -I$(BASEDIR)/include $(MPI_INC) -c $*.F90 # For older compilers one might need to separate the # preprocessing from the compilation as defined below: diff --git a/tutorial/classical/online_2D_parallelmodel/assimilate_pdaf.F90 b/tutorial/classical/online_2D_parallelmodel/assimilate_pdaf.F90 index 8d0c17ce4..4c5ddf6ed 100644 --- a/tutorial/classical/online_2D_parallelmodel/assimilate_pdaf.F90 +++ b/tutorial/classical/online_2D_parallelmodel/assimilate_pdaf.F90 @@ -46,8 +46,6 @@ SUBROUTINE assimilate_pdaf() EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains init_dim_l_pdaf, & ! Initialize state dimension for local ana. domain init_dim_obs_l_pdaf,& ! Initialize dim. of obs. vector for local ana. domain - g2l_state_pdaf, & ! Get state on local ana. domain from global state - l2g_state_pdaf, & ! Init global state from state on local analysis domain g2l_obs_pdaf, & ! Restrict a global obs. vector to local analysis domain init_obs_l_pdaf, & ! Provide vector of measurements for local ana. domain prodRinvA_l_pdaf, & ! Provide product R^-1 A for some local matrix A @@ -66,11 +64,11 @@ SUBROUTINE assimilate_pdaf() init_dim_obs_pdaf, obs_op_pdaf, init_obs_pdaf, prepoststep_ens_pdaf, & prodRinvA_pdaf, init_obsvar_pdaf, next_observation_pdaf, status_pdaf) ELSEIF (filtertype == 7) THEN - CALL PDAF_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocal_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, init_obs_f_pdaf, init_obs_l_pdaf, & prepoststep_ens_pdaf, prodRinvA_l_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & - g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, next_observation_pdaf, status_pdaf) + init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_obs_pdaf, init_obsvar_pdaf, & + init_obsvar_l_pdaf, next_observation_pdaf, status_pdaf) END IF ! Check for errors during execution of PDAF diff --git a/tutorial/classical/online_2D_parallelmodel/g2l_state_pdaf.F90 b/tutorial/classical/online_2D_parallelmodel/g2l_state_pdaf.F90 deleted file mode 100644 index 8e9415dc4..000000000 --- a/tutorial/classical/online_2D_parallelmodel/g2l_state_pdaf.F90 +++ /dev/null @@ -1,60 +0,0 @@ -!$Id: g2l_state_pdaf.F90 1565 2015-02-28 17:04:41Z lnerger $ -!BOP -! -! !ROUTINE: g2l_state_pdaf --- Restrict a model state to a local analysis domain -! -! !INTERFACE: -SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) - -! !DESCRIPTION: -! User-supplied routine for PDAF. -! Used in the filters: LSEIK/LETKF/LESTKF -! -! The routine is called during the loop over all -! local analysis domains in PDAF\_lseik\_update -! before the analysis on a single local analysis -! domain. It has to project the full PE-local -! model state onto the current local analysis -! domain. -! -! Generic implementation using index vector -! ID_LSTATE_IN_PSTATE. -! -! !REVISION HISTORY: -! 2013-02 - Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! !ARGUMENTS: - INTEGER, INTENT(in) :: step ! Current time step - INTEGER, INTENT(in) :: domain_p ! Current local analysis domain - INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension - INTEGER, INTENT(in) :: dim_l ! Local state dimension - REAL, INTENT(in) :: state_p(dim_p) ! PE-local full state vector - REAL, INTENT(out) :: state_l(dim_l) ! State vector on local analysis domain - -! !CALLING SEQUENCE: -! Called by: PDAF_lseik_update (as U_g2l_state) -! Called by: PDAF_letkf_update (as U_g2l_state) -! Called by: PDAF_lestkf_update (as U_g2l_state) -!EOP - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************* -! *** Initialize local state vector *** -! ************************************* - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_l(i) = state_p(id_lstate_in_pstate(i)) - END DO - -END SUBROUTINE g2l_state_pdaf diff --git a/tutorial/classical/online_2D_parallelmodel/init_dim_l_pdaf.F90 b/tutorial/classical/online_2D_parallelmodel/init_dim_l_pdaf.F90 index dcf3f3401..44ebf8235 100644 --- a/tutorial/classical/online_2D_parallelmodel/init_dim_l_pdaf.F90 +++ b/tutorial/classical/online_2D_parallelmodel/init_dim_l_pdaf.F90 @@ -23,10 +23,12 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! Later revisions - see svn log ! ! !USES: + USE PDAFlocal, & ! Routine to provide local indices to PDAF + ONLY: PDAFlocal_set_indices USE mod_model, & ! Model variables ONLY: ny, nx_p USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l, id_lstate_in_pstate + ONLY: coords_l USE mod_parallel_pdaf, & ! assimilation parallelization variables ONLY: mype_filter @@ -37,16 +39,17 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) INTEGER, INTENT(in) :: domain_p ! Current local analysis domain INTEGER, INTENT(out) :: dim_l ! Local state dimension +! !LOCAL VARIABLES: + INTEGER :: i ! Counters + INTEGER :: off_p ! Process-local offset in global state vector + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector + ! !CALLING SEQUENCE: ! Called by: PDAF_lseik_update (as U_init_dim_l) ! Called by: PDAF_lestkf_update (as U_init_dim_l) ! Called by: PDAF_letkf_update (as U_init_dim_l) !EOP -! *** local variables *** - INTEGER :: i ! Counters - INTEGER :: off_p ! Process-local offset in global state vector - ! **************************************** ! *** Initialize local state dimension *** @@ -75,10 +78,15 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array - IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! Here the local domain is a single grid point and variable given by DOMAIN_P id_lstate_in_pstate(1) = domain_p + ! Provide the index vector to PDAF + CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) + + ! Deallocate index array + DEALLOCATE(id_lstate_in_pstate) + END SUBROUTINE init_dim_l_pdaf diff --git a/tutorial/classical/online_2D_parallelmodel/l2g_state_pdaf.F90 b/tutorial/classical/online_2D_parallelmodel/l2g_state_pdaf.F90 deleted file mode 100644 index 143f2a36b..000000000 --- a/tutorial/classical/online_2D_parallelmodel/l2g_state_pdaf.F90 +++ /dev/null @@ -1,61 +0,0 @@ -!$Id: l2g_state_pdaf.F90 1565 2015-02-28 17:04:41Z lnerger $ -!BOP -! -! !ROUTINE: l2g_state_pdaf --- Initialize full state from local analysis -! -! !INTERFACE: -SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) - -! !DESCRIPTION: -! User-supplied routine for PDAF. -! Used in the filters: LSEIK/LETKF/LESTKF -! -! The routine is called during the loop over all -! local analysis domains in PDAF\_X\_update -! after the analysis and ensemble transformation -! on a single local analysis domain. It has to -! initialize elements of the PE-local full state -! vector from the provided analysis state vector -! on the local analysis domain. -! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -! -! !REVISION HISTORY: -! 2013-02 - Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! !ARGUMENTS: - INTEGER, INTENT(in) :: step ! Current time step - INTEGER, INTENT(in) :: domain_p ! Current local analysis domain - INTEGER, INTENT(in) :: dim_l ! Local state dimension - INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension - REAL, INTENT(in) :: state_l(dim_l) ! State vector on local analysis domain - REAL, INTENT(inout) :: state_p(dim_p) ! PE-local full state vector - -! !CALLING SEQUENCE: -! Called by: PDAF_lseik_update (as U_l2g_state) -! Called by: PDAF_lestkf_update (as U_l2g_state) -! Called by: PDAF_letkf_update (as U_l2g_state) -!EOP - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************************** -! *** Initialize elements of global state vector *** -! ************************************************** - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_p(id_lstate_in_pstate(i)) = state_l(i) - END DO - -END SUBROUTINE l2g_state_pdaf diff --git a/tutorial/classical/online_2D_parallelmodel/mod_assimilation.F90 b/tutorial/classical/online_2D_parallelmodel/mod_assimilation.F90 index da59084b3..2dd076d10 100644 --- a/tutorial/classical/online_2D_parallelmodel/mod_assimilation.F90 +++ b/tutorial/classical/online_2D_parallelmodel/mod_assimilation.F90 @@ -25,7 +25,7 @@ MODULE mod_assimilation SAVE !EOP -! *** Model- and data specific variables *** +! *** Variables specific for online tutorial example *** INTEGER :: dim_state ! Global model state dimension INTEGER :: dim_state_p ! Model state dimension for PE-local domain @@ -36,6 +36,14 @@ MODULE mod_assimilation REAL, ALLOCATABLE :: obs_f(:) ! Vector holding full vector of observations REAL, ALLOCATABLE :: coords_obs_f(:,:) ! Array for full observation coordinates + INTEGER :: ensgroup ! Type of initial ensemble + + REAL :: coords_l(2) ! Coordinates of local analysis domain + INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector + REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations + +!$OMP THREADPRIVATE(coords_l, id_lobs_in_fobs, distance_l) + ! *** Below are the generic variables used for configuring PDAF *** ! *** Their values are set in init_PDAF *** @@ -141,7 +149,7 @@ MODULE mod_assimilation ! (2) use 5th-order polynomial ! (3) regulated localization of R with mean error variance ! (4) regulated localization of R with single-point error variance - REAL :: sradius ! Support radius for 5th order polynomial + REAL :: sradius ! Support radius for 5th order polynomial ! or radius for 1/e for exponential weighting ! ! SEIK-subtype4/LSEIK-subtype4/ESTKF/LESTKF INTEGER :: type_sqrt ! Type of the transform matrix square-root @@ -158,11 +166,5 @@ MODULE mod_assimilation ! of P has also to be specified in PDAF_filter_init. ! Only for upward-compatibility of PDAF! REAL :: time ! model time - REAL :: coords_l(2) ! Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector - INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector - REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations - -!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate, id_lobs_in_fobs, distance_l) END MODULE mod_assimilation diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar/Makefile b/tutorial/classical/online_2D_parallelmodel_fullpar/Makefile index 3a6136ddf..e97afe890 100644 --- a/tutorial/classical/online_2D_parallelmodel_fullpar/Makefile +++ b/tutorial/classical/online_2D_parallelmodel_fullpar/Makefile @@ -77,8 +77,6 @@ OBJ_USER_ENKF = add_obs_error_pdaf.o \ # User-supplied routines for localized analysis (LESTKF/LSEIK/LETKF) OBJ_USER_LOCAL = init_n_domains_pdaf.o \ init_dim_l_pdaf.o \ - g2l_state_pdaf.o \ - l2g_state_pdaf.o \ prodrinva_l_pdaf.o \ init_obs_l_pdaf.o \ init_dim_obs_l_pdaf.o \ @@ -127,7 +125,7 @@ libpdaf-d.a: ###################################################### .F90.o : - $(FC) $(OPT) $(CPP_DEFS) -c $*.F90 + $(FC) $(OPT) $(CPP_DEFS) -I$(BASEDIR)/include $(MPI_INC) -c $*.F90 # For older compilers one might need to separate the # preprocessing from the compilation as defined below: diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar/assimilate_pdaf.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar/assimilate_pdaf.F90 index 8d0c17ce4..4c5ddf6ed 100644 --- a/tutorial/classical/online_2D_parallelmodel_fullpar/assimilate_pdaf.F90 +++ b/tutorial/classical/online_2D_parallelmodel_fullpar/assimilate_pdaf.F90 @@ -46,8 +46,6 @@ SUBROUTINE assimilate_pdaf() EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains init_dim_l_pdaf, & ! Initialize state dimension for local ana. domain init_dim_obs_l_pdaf,& ! Initialize dim. of obs. vector for local ana. domain - g2l_state_pdaf, & ! Get state on local ana. domain from global state - l2g_state_pdaf, & ! Init global state from state on local analysis domain g2l_obs_pdaf, & ! Restrict a global obs. vector to local analysis domain init_obs_l_pdaf, & ! Provide vector of measurements for local ana. domain prodRinvA_l_pdaf, & ! Provide product R^-1 A for some local matrix A @@ -66,11 +64,11 @@ SUBROUTINE assimilate_pdaf() init_dim_obs_pdaf, obs_op_pdaf, init_obs_pdaf, prepoststep_ens_pdaf, & prodRinvA_pdaf, init_obsvar_pdaf, next_observation_pdaf, status_pdaf) ELSEIF (filtertype == 7) THEN - CALL PDAF_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocal_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, init_obs_f_pdaf, init_obs_l_pdaf, & prepoststep_ens_pdaf, prodRinvA_l_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & - g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, next_observation_pdaf, status_pdaf) + init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_obs_pdaf, init_obsvar_pdaf, & + init_obsvar_l_pdaf, next_observation_pdaf, status_pdaf) END IF ! Check for errors during execution of PDAF diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar/g2l_state_pdaf.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar/g2l_state_pdaf.F90 deleted file mode 100644 index 8e9415dc4..000000000 --- a/tutorial/classical/online_2D_parallelmodel_fullpar/g2l_state_pdaf.F90 +++ /dev/null @@ -1,60 +0,0 @@ -!$Id: g2l_state_pdaf.F90 1565 2015-02-28 17:04:41Z lnerger $ -!BOP -! -! !ROUTINE: g2l_state_pdaf --- Restrict a model state to a local analysis domain -! -! !INTERFACE: -SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) - -! !DESCRIPTION: -! User-supplied routine for PDAF. -! Used in the filters: LSEIK/LETKF/LESTKF -! -! The routine is called during the loop over all -! local analysis domains in PDAF\_lseik\_update -! before the analysis on a single local analysis -! domain. It has to project the full PE-local -! model state onto the current local analysis -! domain. -! -! Generic implementation using index vector -! ID_LSTATE_IN_PSTATE. -! -! !REVISION HISTORY: -! 2013-02 - Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! !ARGUMENTS: - INTEGER, INTENT(in) :: step ! Current time step - INTEGER, INTENT(in) :: domain_p ! Current local analysis domain - INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension - INTEGER, INTENT(in) :: dim_l ! Local state dimension - REAL, INTENT(in) :: state_p(dim_p) ! PE-local full state vector - REAL, INTENT(out) :: state_l(dim_l) ! State vector on local analysis domain - -! !CALLING SEQUENCE: -! Called by: PDAF_lseik_update (as U_g2l_state) -! Called by: PDAF_letkf_update (as U_g2l_state) -! Called by: PDAF_lestkf_update (as U_g2l_state) -!EOP - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************* -! *** Initialize local state vector *** -! ************************************* - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_l(i) = state_p(id_lstate_in_pstate(i)) - END DO - -END SUBROUTINE g2l_state_pdaf diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar/init_dim_l_pdaf.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar/init_dim_l_pdaf.F90 index dcf3f3401..44ebf8235 100644 --- a/tutorial/classical/online_2D_parallelmodel_fullpar/init_dim_l_pdaf.F90 +++ b/tutorial/classical/online_2D_parallelmodel_fullpar/init_dim_l_pdaf.F90 @@ -23,10 +23,12 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! Later revisions - see svn log ! ! !USES: + USE PDAFlocal, & ! Routine to provide local indices to PDAF + ONLY: PDAFlocal_set_indices USE mod_model, & ! Model variables ONLY: ny, nx_p USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l, id_lstate_in_pstate + ONLY: coords_l USE mod_parallel_pdaf, & ! assimilation parallelization variables ONLY: mype_filter @@ -37,16 +39,17 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) INTEGER, INTENT(in) :: domain_p ! Current local analysis domain INTEGER, INTENT(out) :: dim_l ! Local state dimension +! !LOCAL VARIABLES: + INTEGER :: i ! Counters + INTEGER :: off_p ! Process-local offset in global state vector + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector + ! !CALLING SEQUENCE: ! Called by: PDAF_lseik_update (as U_init_dim_l) ! Called by: PDAF_lestkf_update (as U_init_dim_l) ! Called by: PDAF_letkf_update (as U_init_dim_l) !EOP -! *** local variables *** - INTEGER :: i ! Counters - INTEGER :: off_p ! Process-local offset in global state vector - ! **************************************** ! *** Initialize local state dimension *** @@ -75,10 +78,15 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array - IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! Here the local domain is a single grid point and variable given by DOMAIN_P id_lstate_in_pstate(1) = domain_p + ! Provide the index vector to PDAF + CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) + + ! Deallocate index array + DEALLOCATE(id_lstate_in_pstate) + END SUBROUTINE init_dim_l_pdaf diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar/l2g_state_pdaf.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar/l2g_state_pdaf.F90 deleted file mode 100644 index 143f2a36b..000000000 --- a/tutorial/classical/online_2D_parallelmodel_fullpar/l2g_state_pdaf.F90 +++ /dev/null @@ -1,61 +0,0 @@ -!$Id: l2g_state_pdaf.F90 1565 2015-02-28 17:04:41Z lnerger $ -!BOP -! -! !ROUTINE: l2g_state_pdaf --- Initialize full state from local analysis -! -! !INTERFACE: -SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) - -! !DESCRIPTION: -! User-supplied routine for PDAF. -! Used in the filters: LSEIK/LETKF/LESTKF -! -! The routine is called during the loop over all -! local analysis domains in PDAF\_X\_update -! after the analysis and ensemble transformation -! on a single local analysis domain. It has to -! initialize elements of the PE-local full state -! vector from the provided analysis state vector -! on the local analysis domain. -! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -! -! !REVISION HISTORY: -! 2013-02 - Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! !ARGUMENTS: - INTEGER, INTENT(in) :: step ! Current time step - INTEGER, INTENT(in) :: domain_p ! Current local analysis domain - INTEGER, INTENT(in) :: dim_l ! Local state dimension - INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension - REAL, INTENT(in) :: state_l(dim_l) ! State vector on local analysis domain - REAL, INTENT(inout) :: state_p(dim_p) ! PE-local full state vector - -! !CALLING SEQUENCE: -! Called by: PDAF_lseik_update (as U_l2g_state) -! Called by: PDAF_lestkf_update (as U_l2g_state) -! Called by: PDAF_letkf_update (as U_l2g_state) -!EOP - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************************** -! *** Initialize elements of global state vector *** -! ************************************************** - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_p(id_lstate_in_pstate(i)) = state_l(i) - END DO - -END SUBROUTINE l2g_state_pdaf diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar/mod_assimilation.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar/mod_assimilation.F90 index da59084b3..2dd076d10 100644 --- a/tutorial/classical/online_2D_parallelmodel_fullpar/mod_assimilation.F90 +++ b/tutorial/classical/online_2D_parallelmodel_fullpar/mod_assimilation.F90 @@ -25,7 +25,7 @@ MODULE mod_assimilation SAVE !EOP -! *** Model- and data specific variables *** +! *** Variables specific for online tutorial example *** INTEGER :: dim_state ! Global model state dimension INTEGER :: dim_state_p ! Model state dimension for PE-local domain @@ -36,6 +36,14 @@ MODULE mod_assimilation REAL, ALLOCATABLE :: obs_f(:) ! Vector holding full vector of observations REAL, ALLOCATABLE :: coords_obs_f(:,:) ! Array for full observation coordinates + INTEGER :: ensgroup ! Type of initial ensemble + + REAL :: coords_l(2) ! Coordinates of local analysis domain + INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector + REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations + +!$OMP THREADPRIVATE(coords_l, id_lobs_in_fobs, distance_l) + ! *** Below are the generic variables used for configuring PDAF *** ! *** Their values are set in init_PDAF *** @@ -141,7 +149,7 @@ MODULE mod_assimilation ! (2) use 5th-order polynomial ! (3) regulated localization of R with mean error variance ! (4) regulated localization of R with single-point error variance - REAL :: sradius ! Support radius for 5th order polynomial + REAL :: sradius ! Support radius for 5th order polynomial ! or radius for 1/e for exponential weighting ! ! SEIK-subtype4/LSEIK-subtype4/ESTKF/LESTKF INTEGER :: type_sqrt ! Type of the transform matrix square-root @@ -158,11 +166,5 @@ MODULE mod_assimilation ! of P has also to be specified in PDAF_filter_init. ! Only for upward-compatibility of PDAF! REAL :: time ! model time - REAL :: coords_l(2) ! Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector - INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector - REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations - -!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate, id_lobs_in_fobs, distance_l) END MODULE mod_assimilation diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/Makefile b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/Makefile index 9d3170e1a..9c2e40ad0 100644 --- a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/Makefile +++ b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/Makefile @@ -77,8 +77,6 @@ OBJ_USER_ENKF = add_obs_error_pdaf.o \ # User-supplied routines for localized analysis (LESTKF/LSEIK/LETKF) OBJ_USER_LOCAL = init_n_domains_pdaf.o \ init_dim_l_pdaf.o \ - g2l_state_pdaf.o \ - l2g_state_pdaf.o \ prodrinva_l_pdaf.o \ init_obs_l_pdaf.o \ init_dim_obs_l_pdaf.o \ @@ -127,7 +125,7 @@ libpdaf-d.a: ###################################################### .F90.o : - $(FC) $(OPT) $(CPP_DEFS) -c $*.F90 + $(FC) $(OPT) $(CPP_DEFS) -I$(BASEDIR)/include $(MPI_INC) -c $*.F90 # For older compilers one might need to separate the # preprocessing from the compilation as defined below: diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/assimilate_pdaf.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/assimilate_pdaf.F90 index 8d0c17ce4..4c5ddf6ed 100644 --- a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/assimilate_pdaf.F90 +++ b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/assimilate_pdaf.F90 @@ -46,8 +46,6 @@ SUBROUTINE assimilate_pdaf() EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains init_dim_l_pdaf, & ! Initialize state dimension for local ana. domain init_dim_obs_l_pdaf,& ! Initialize dim. of obs. vector for local ana. domain - g2l_state_pdaf, & ! Get state on local ana. domain from global state - l2g_state_pdaf, & ! Init global state from state on local analysis domain g2l_obs_pdaf, & ! Restrict a global obs. vector to local analysis domain init_obs_l_pdaf, & ! Provide vector of measurements for local ana. domain prodRinvA_l_pdaf, & ! Provide product R^-1 A for some local matrix A @@ -66,11 +64,11 @@ SUBROUTINE assimilate_pdaf() init_dim_obs_pdaf, obs_op_pdaf, init_obs_pdaf, prepoststep_ens_pdaf, & prodRinvA_pdaf, init_obsvar_pdaf, next_observation_pdaf, status_pdaf) ELSEIF (filtertype == 7) THEN - CALL PDAF_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocal_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, init_obs_f_pdaf, init_obs_l_pdaf, & prepoststep_ens_pdaf, prodRinvA_l_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & - g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, next_observation_pdaf, status_pdaf) + init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_obs_pdaf, init_obsvar_pdaf, & + init_obsvar_l_pdaf, next_observation_pdaf, status_pdaf) END IF ! Check for errors during execution of PDAF diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/g2l_state_pdaf.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/g2l_state_pdaf.F90 deleted file mode 100644 index 8e9415dc4..000000000 --- a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/g2l_state_pdaf.F90 +++ /dev/null @@ -1,60 +0,0 @@ -!$Id: g2l_state_pdaf.F90 1565 2015-02-28 17:04:41Z lnerger $ -!BOP -! -! !ROUTINE: g2l_state_pdaf --- Restrict a model state to a local analysis domain -! -! !INTERFACE: -SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) - -! !DESCRIPTION: -! User-supplied routine for PDAF. -! Used in the filters: LSEIK/LETKF/LESTKF -! -! The routine is called during the loop over all -! local analysis domains in PDAF\_lseik\_update -! before the analysis on a single local analysis -! domain. It has to project the full PE-local -! model state onto the current local analysis -! domain. -! -! Generic implementation using index vector -! ID_LSTATE_IN_PSTATE. -! -! !REVISION HISTORY: -! 2013-02 - Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! !ARGUMENTS: - INTEGER, INTENT(in) :: step ! Current time step - INTEGER, INTENT(in) :: domain_p ! Current local analysis domain - INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension - INTEGER, INTENT(in) :: dim_l ! Local state dimension - REAL, INTENT(in) :: state_p(dim_p) ! PE-local full state vector - REAL, INTENT(out) :: state_l(dim_l) ! State vector on local analysis domain - -! !CALLING SEQUENCE: -! Called by: PDAF_lseik_update (as U_g2l_state) -! Called by: PDAF_letkf_update (as U_g2l_state) -! Called by: PDAF_lestkf_update (as U_g2l_state) -!EOP - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************* -! *** Initialize local state vector *** -! ************************************* - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_l(i) = state_p(id_lstate_in_pstate(i)) - END DO - -END SUBROUTINE g2l_state_pdaf diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/init_dim_l_pdaf.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/init_dim_l_pdaf.F90 index dcf3f3401..44ebf8235 100644 --- a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/init_dim_l_pdaf.F90 +++ b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/init_dim_l_pdaf.F90 @@ -23,10 +23,12 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! Later revisions - see svn log ! ! !USES: + USE PDAFlocal, & ! Routine to provide local indices to PDAF + ONLY: PDAFlocal_set_indices USE mod_model, & ! Model variables ONLY: ny, nx_p USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l, id_lstate_in_pstate + ONLY: coords_l USE mod_parallel_pdaf, & ! assimilation parallelization variables ONLY: mype_filter @@ -37,16 +39,17 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) INTEGER, INTENT(in) :: domain_p ! Current local analysis domain INTEGER, INTENT(out) :: dim_l ! Local state dimension +! !LOCAL VARIABLES: + INTEGER :: i ! Counters + INTEGER :: off_p ! Process-local offset in global state vector + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector + ! !CALLING SEQUENCE: ! Called by: PDAF_lseik_update (as U_init_dim_l) ! Called by: PDAF_lestkf_update (as U_init_dim_l) ! Called by: PDAF_letkf_update (as U_init_dim_l) !EOP -! *** local variables *** - INTEGER :: i ! Counters - INTEGER :: off_p ! Process-local offset in global state vector - ! **************************************** ! *** Initialize local state dimension *** @@ -75,10 +78,15 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array - IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! Here the local domain is a single grid point and variable given by DOMAIN_P id_lstate_in_pstate(1) = domain_p + ! Provide the index vector to PDAF + CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) + + ! Deallocate index array + DEALLOCATE(id_lstate_in_pstate) + END SUBROUTINE init_dim_l_pdaf diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/l2g_state_pdaf.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/l2g_state_pdaf.F90 deleted file mode 100644 index 143f2a36b..000000000 --- a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/l2g_state_pdaf.F90 +++ /dev/null @@ -1,61 +0,0 @@ -!$Id: l2g_state_pdaf.F90 1565 2015-02-28 17:04:41Z lnerger $ -!BOP -! -! !ROUTINE: l2g_state_pdaf --- Initialize full state from local analysis -! -! !INTERFACE: -SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) - -! !DESCRIPTION: -! User-supplied routine for PDAF. -! Used in the filters: LSEIK/LETKF/LESTKF -! -! The routine is called during the loop over all -! local analysis domains in PDAF\_X\_update -! after the analysis and ensemble transformation -! on a single local analysis domain. It has to -! initialize elements of the PE-local full state -! vector from the provided analysis state vector -! on the local analysis domain. -! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -! -! !REVISION HISTORY: -! 2013-02 - Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! !ARGUMENTS: - INTEGER, INTENT(in) :: step ! Current time step - INTEGER, INTENT(in) :: domain_p ! Current local analysis domain - INTEGER, INTENT(in) :: dim_l ! Local state dimension - INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension - REAL, INTENT(in) :: state_l(dim_l) ! State vector on local analysis domain - REAL, INTENT(inout) :: state_p(dim_p) ! PE-local full state vector - -! !CALLING SEQUENCE: -! Called by: PDAF_lseik_update (as U_l2g_state) -! Called by: PDAF_lestkf_update (as U_l2g_state) -! Called by: PDAF_letkf_update (as U_l2g_state) -!EOP - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************************** -! *** Initialize elements of global state vector *** -! ************************************************** - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_p(id_lstate_in_pstate(i)) = state_l(i) - END DO - -END SUBROUTINE l2g_state_pdaf diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/mod_assimilation.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/mod_assimilation.F90 index da59084b3..2dd076d10 100644 --- a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/mod_assimilation.F90 +++ b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/mod_assimilation.F90 @@ -25,7 +25,7 @@ MODULE mod_assimilation SAVE !EOP -! *** Model- and data specific variables *** +! *** Variables specific for online tutorial example *** INTEGER :: dim_state ! Global model state dimension INTEGER :: dim_state_p ! Model state dimension for PE-local domain @@ -36,6 +36,14 @@ MODULE mod_assimilation REAL, ALLOCATABLE :: obs_f(:) ! Vector holding full vector of observations REAL, ALLOCATABLE :: coords_obs_f(:,:) ! Array for full observation coordinates + INTEGER :: ensgroup ! Type of initial ensemble + + REAL :: coords_l(2) ! Coordinates of local analysis domain + INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector + REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations + +!$OMP THREADPRIVATE(coords_l, id_lobs_in_fobs, distance_l) + ! *** Below are the generic variables used for configuring PDAF *** ! *** Their values are set in init_PDAF *** @@ -141,7 +149,7 @@ MODULE mod_assimilation ! (2) use 5th-order polynomial ! (3) regulated localization of R with mean error variance ! (4) regulated localization of R with single-point error variance - REAL :: sradius ! Support radius for 5th order polynomial + REAL :: sradius ! Support radius for 5th order polynomial ! or radius for 1/e for exponential weighting ! ! SEIK-subtype4/LSEIK-subtype4/ESTKF/LESTKF INTEGER :: type_sqrt ! Type of the transform matrix square-root @@ -158,11 +166,5 @@ MODULE mod_assimilation ! of P has also to be specified in PDAF_filter_init. ! Only for upward-compatibility of PDAF! REAL :: time ! model time - REAL :: coords_l(2) ! Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector - INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector - REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations - -!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate, id_lobs_in_fobs, distance_l) END MODULE mod_assimilation diff --git a/tutorial/classical/online_2D_serialmodel/Makefile b/tutorial/classical/online_2D_serialmodel/Makefile index 20b935ece..2bb254274 100644 --- a/tutorial/classical/online_2D_serialmodel/Makefile +++ b/tutorial/classical/online_2D_serialmodel/Makefile @@ -75,8 +75,6 @@ OBJ_USER_ENKF = add_obs_error_pdaf.o \ # User-supplied routines for localized analysis (LESTKF/LSEIK/LETKF) OBJ_USER_LOCAL = init_n_domains_pdaf.o \ init_dim_l_pdaf.o \ - g2l_state_pdaf.o \ - l2g_state_pdaf.o \ prodrinva_l_pdaf.o \ init_obs_l_pdaf.o \ init_dim_obs_l_pdaf.o \ @@ -125,7 +123,7 @@ libpdaf-d.a: ###################################################### .F90.o : - $(FC) $(OPT) $(CPP_DEFS) -c $*.F90 + $(FC) $(OPT) $(CPP_DEFS) -I$(BASEDIR)/include $(MPI_INC) -c $*.F90 # For older compilers one might need to separate the # preprocessing from the compilation as defined below: diff --git a/tutorial/classical/online_2D_serialmodel/assimilate_pdaf.F90 b/tutorial/classical/online_2D_serialmodel/assimilate_pdaf.F90 index 6e621a209..23d697907 100644 --- a/tutorial/classical/online_2D_serialmodel/assimilate_pdaf.F90 +++ b/tutorial/classical/online_2D_serialmodel/assimilate_pdaf.F90 @@ -46,8 +46,6 @@ SUBROUTINE assimilate_pdaf() EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains init_dim_l_pdaf, & ! Initialize state dimension for local ana. domain init_dim_obs_l_pdaf,& ! Initialize dim. of obs. vector for local ana. domain - g2l_state_pdaf, & ! Get state on local ana. domain from global state - l2g_state_pdaf, & ! Init global state from state on local analysis domain g2l_obs_pdaf, & ! Restrict a global obs. vector to local analysis domain init_obs_l_pdaf, & ! Provide vector of measurements for local ana. domain prodRinvA_l_pdaf, & ! Provide product R^-1 A for some local matrix A @@ -66,11 +64,11 @@ SUBROUTINE assimilate_pdaf() init_dim_obs_pdaf, obs_op_pdaf, init_obs_pdaf, prepoststep_ens_pdaf, & prodRinvA_pdaf, init_obsvar_pdaf, next_observation_pdaf, status_pdaf) ELSEIF (filtertype == 7) THEN - CALL PDAF_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocal_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, init_obs_f_pdaf, init_obs_l_pdaf, & prepoststep_ens_pdaf, prodRinvA_l_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & - g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, next_observation_pdaf, status_pdaf) + init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_obs_pdaf, init_obsvar_pdaf, & + init_obsvar_l_pdaf, next_observation_pdaf, status_pdaf) END IF ! Check for errors during execution of PDAF @@ -78,7 +76,7 @@ SUBROUTINE assimilate_pdaf() IF (status_pdaf /= 0) THEN WRITE (*,'(/1x,a6,i3,a43,i4,a1/)') & 'ERROR ', status_pdaf, & - ' in PDAF_put_state - stopping! (PE ', mype_world,')' + ' in PDAF_assimilate - stopping! (PE ', mype_world,')' CALL abort_parallel() END IF diff --git a/tutorial/classical/online_2D_serialmodel/g2l_state_pdaf.F90 b/tutorial/classical/online_2D_serialmodel/g2l_state_pdaf.F90 deleted file mode 100644 index dc1337ed6..000000000 --- a/tutorial/classical/online_2D_serialmodel/g2l_state_pdaf.F90 +++ /dev/null @@ -1,62 +0,0 @@ -!$Id: g2l_state_pdaf.F90 82 2019-02-26 15:12:22Z lnerger $ -!BOP -! -! !ROUTINE: g2l_state_pdaf --- Restrict a model state to a local analysis domain -! -! !INTERFACE: -SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) - -! !DESCRIPTION: -! User-supplied routine for PDAF. -! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -! -! The routine is called during the loop over all -! local analysis domains in PDAF\_lseik\_update -! before the analysis on a single local analysis -! domain. It has to project the full PE-local -! model state onto the current local analysis -! domain. -! -! Generic implementation using index vector -! ID_LSTATE_IN_PSTATE. -! -! The routine is called by each filter process. -! -! !REVISION HISTORY: -! 2005-09 - Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! !ARGUMENTS: - INTEGER, INTENT(in) :: step ! Current time step - INTEGER, INTENT(in) :: domain_p ! Current local analysis domain - INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension - INTEGER, INTENT(in) :: dim_l ! Local state dimension - REAL, INTENT(in) :: state_p(dim_p) ! PE-local full state vector - REAL, INTENT(out) :: state_l(dim_l) ! State vector on local analysis domain - -! !CALLING SEQUENCE: -! Called by: PDAF_lseik_update (as U_g2l_state) -! Called by: PDAF_letkf_update (as U_g2l_state) -! Called by: PDAF_lestkf_update (as U_g2l_state) -!EOP - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************* -! *** Initialize local state vector *** -! ************************************* - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_l(i) = state_p(id_lstate_in_pstate(i)) - END DO - -END SUBROUTINE g2l_state_pdaf diff --git a/tutorial/classical/online_2D_serialmodel/init_dim_l_pdaf.F90 b/tutorial/classical/online_2D_serialmodel/init_dim_l_pdaf.F90 index d75d2a0b6..59525751e 100644 --- a/tutorial/classical/online_2D_serialmodel/init_dim_l_pdaf.F90 +++ b/tutorial/classical/online_2D_serialmodel/init_dim_l_pdaf.F90 @@ -23,10 +23,12 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! Later revisions - see svn log ! ! !USES: + USE PDAFlocal, & ! Routine to provide local indices to PDAF + ONLY: PDAFlocal_set_indices USE mod_model, & ! Model variables ONLY: ny USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l, id_lstate_in_pstate + ONLY: coords_l IMPLICIT NONE @@ -35,6 +37,9 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) INTEGER, INTENT(in) :: domain_p ! Current local analysis domain INTEGER, INTENT(out) :: dim_l ! Local state dimension +! !LOCAL VARIABLES: + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector + ! !CALLING SEQUENCE: ! Called by: PDAF_lseik_update (as U_init_dim_l) ! Called by: PDAF_lestkf_update (as U_init_dim_l) @@ -64,10 +69,15 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array - IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! Here the local domain is a single grid point and variable given by DOMAIN_P id_lstate_in_pstate(1) = domain_p + ! Provide the index vector to PDAF + CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) + + ! Deallocate index array + DEALLOCATE(id_lstate_in_pstate) + END SUBROUTINE init_dim_l_pdaf diff --git a/tutorial/classical/online_2D_serialmodel/l2g_state_pdaf.F90 b/tutorial/classical/online_2D_serialmodel/l2g_state_pdaf.F90 deleted file mode 100644 index adaed6a4d..000000000 --- a/tutorial/classical/online_2D_serialmodel/l2g_state_pdaf.F90 +++ /dev/null @@ -1,64 +0,0 @@ -!$Id: l2g_state_pdaf.F90 82 2019-02-26 15:12:22Z lnerger $ -!BOP -! -! !ROUTINE: l2g_state_pdaf --- Initialize full state from local analysis -! -! !INTERFACE: -SUBROUTINE l2g_state_pdaf(step, domain, dim_l, state_l, dim_p, state_p) - -! !DESCRIPTION: -! User-supplied routine for PDAF. -! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -! -! The routine is called during the loop over all -! local analysis domains in PDAF\_X\_update -! after the analysis and ensemble transformation -! on a single local analysis domain. It has to -! initialize elements of the PE-local full state -! vector from the provided analysis state vector -! on the local analysis domain. -! -! Generic implementation using index vector -! ID_LSTATE_IN_PSTATE. -! -! The routine is called by each filter process. -! -! !REVISION HISTORY: -! 2005-09 - Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! !ARGUMENTS: - INTEGER, INTENT(in) :: step ! Current time step - INTEGER, INTENT(in) :: domain ! Current local analysis domain - INTEGER, INTENT(in) :: dim_l ! Local state dimension - INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension - REAL, INTENT(in) :: state_l(dim_l) ! State vector on local analysis domain - REAL, INTENT(inout) :: state_p(dim_p) ! PE-local full state vector - -! !CALLING SEQUENCE: -! Called by: PDAF_lseik_update (as U_l2g_state) -! Called by: PDAF_lestkf_update (as U_l2g_state) -! Called by: PDAF_letkf_update (as U_l2g_state) -! Called by: PDAF_lnetf_update (as U_l2g_state) -!EOP - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************************** -! *** Initialize elements of global state vector *** -! ************************************************** - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_p(id_lstate_in_pstate(i)) = state_l(i) - END DO - -END SUBROUTINE l2g_state_pdaf diff --git a/tutorial/classical/online_2D_serialmodel/mod_assimilation.F90 b/tutorial/classical/online_2D_serialmodel/mod_assimilation.F90 index c7d6aea7b..2dd076d10 100644 --- a/tutorial/classical/online_2D_serialmodel/mod_assimilation.F90 +++ b/tutorial/classical/online_2D_serialmodel/mod_assimilation.F90 @@ -36,6 +36,14 @@ MODULE mod_assimilation REAL, ALLOCATABLE :: obs_f(:) ! Vector holding full vector of observations REAL, ALLOCATABLE :: coords_obs_f(:,:) ! Array for full observation coordinates + INTEGER :: ensgroup ! Type of initial ensemble + + REAL :: coords_l(2) ! Coordinates of local analysis domain + INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector + REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations + +!$OMP THREADPRIVATE(coords_l, id_lobs_in_fobs, distance_l) + ! *** Below are the generic variables used for configuring PDAF *** ! *** Their values are set in init_PDAF *** @@ -103,7 +111,6 @@ MODULE mod_assimilation ! (0) standard LNETF INTEGER :: incremental ! Perform incremental updating in LSEIK INTEGER :: dim_lag ! Number of time instances for smoother - INTEGER :: ensgroup ! Type of initial ensemble ! ! Filter settings - available as command line options ! ! General @@ -142,7 +149,7 @@ MODULE mod_assimilation ! (2) use 5th-order polynomial ! (3) regulated localization of R with mean error variance ! (4) regulated localization of R with single-point error variance - REAL :: sradius ! Support radius for 5th order polynomial + REAL :: sradius ! Support radius for 5th order polynomial ! or radius for 1/e for exponential weighting ! ! SEIK-subtype4/LSEIK-subtype4/ESTKF/LESTKF INTEGER :: type_sqrt ! Type of the transform matrix square-root @@ -159,11 +166,5 @@ MODULE mod_assimilation ! of P has also to be specified in PDAF_filter_init. ! Only for upward-compatibility of PDAF! REAL :: time ! model time - REAL :: coords_l(2) ! Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector - INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector - REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations - -!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate, id_lobs_in_fobs, distance_l) END MODULE mod_assimilation diff --git a/tutorial/offline_2D_parallel/Makefile b/tutorial/offline_2D_parallel/Makefile index dad71c1fb..661cdd406 100644 --- a/tutorial/offline_2D_parallel/Makefile +++ b/tutorial/offline_2D_parallel/Makefile @@ -65,9 +65,7 @@ OBJ_USER_GEN = init_ens_offline.o \ # User-supplied routines for localized analysis OBJ_USER_LOCAL = init_n_domains_pdaf.o \ - init_dim_l_pdaf.o \ - g2l_state_pdaf.o \ - l2g_state_pdaf.o + init_dim_l_pdaf.o # Full list of user-supplied routines for online modes OBJ_PDAF_USER = $(OBJ_USER_PDAFOMI) $(OBJ_USER_GEN) $(OBJ_USER_LOCAL) diff --git a/tutorial/offline_2D_parallel/assimilate_pdaf_offline.F90 b/tutorial/offline_2D_parallel/assimilate_pdaf_offline.F90 index 0b2625b62..a75f7687f 100644 --- a/tutorial/offline_2D_parallel/assimilate_pdaf_offline.F90 +++ b/tutorial/offline_2D_parallel/assimilate_pdaf_offline.F90 @@ -1,9 +1,9 @@ !> Routine to call PDAF for analysis step !! !! This routine performs a single analysis step in the -!! offline implementation. For this, it calls the -!! filter-specific assimilation routine of PDAF -!! (PDAF_assimilate_X or PDAF_put_state_X) +!! offline implementation of PDAF. For this, it calls the +!! filter-specific assimilation routine of PDAF. For the +!! offline implementation this is PDAF_put_state_X. !! !! In this routine, the real names of most of the !! user-supplied routines for PDAF are specified (see below). @@ -15,9 +15,11 @@ SUBROUTINE assimilate_pdaf_offline() USE PDAF_interfaces_module, & ! Interface definitions to PDAF core routines - ONLY: PDAFomi_assimilate_local, PDAFomi_assimilate_global, & - PDAFomi_assimilate_lenkf, PDAF_get_localfilter - USE mod_parallel_pdaf, & ! Parallelization + ONLY: PDAFomi_put_state_global, & + PDAFomi_put_state_lenkf, PDAF_get_localfilter + USE PDAFlocal, & ! Interface definitions for PDAFlocal + ONLY: PDAFlocalomi_put_state + USE mod_parallel_pdaf, & ! Parallelization ONLY: mype_world, abort_parallel USE mod_assimilation, & ! Variables for assimilation ONLY: filtertype @@ -49,9 +51,6 @@ SUBROUTINE assimilate_pdaf_offline() obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain init_dim_obs_l_pdafomi, & ! Get dimension of obs. vector for local analysis domain localize_covar_pdafomi ! Apply localization to covariance matrix in LEnKF - ! PDAF-provided callback routines for g2l and l2g initializations - EXTERNAL :: PDAFlocal_g2l_callback, & ! Get state on local analysis domain from global state - PDAFlocal_l2g_callback ! Update global state from state on local analysis domain ! ***************************** @@ -63,24 +62,25 @@ SUBROUTINE assimilate_pdaf_offline() ! *** PDAF_get_state is not required as no forecasting *** ! *** is performed in this mode. However, it is save *** ! *** to call PDAF_get_state, even it is not necessary. *** -! *** The functionality of PDAF_get_state is deactived *** +! *** The functionality of PDAF_get_state is deactivated *** ! *** for the offline mode. *** ! Check whether the filter is domain-localized CALL PDAF_get_localfilter(localfilter) ! Call assimilate routine for global or local filter - IF (localfilter==1) THEN - CALL PDAFomi_put_state_local(collect_state_pdaf, init_dim_obs_pdafomi, & + IF (localfilter == 1) THEN + ! Call generic OMI interface routine for domain-localized filters + CALL PDAFlocalomi_put_state(collect_state_pdaf, init_dim_obs_pdafomi, & obs_op_pdafomi, prepoststep_ens_offline, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdafomi, PDAFlocal_g2l_callback, PDAFlocal_l2g_callback, status_pdaf) + init_dim_obs_l_pdafomi, status_pdaf) ELSE IF (filtertype /= 8) THEN - ! All other filters can use one of the two generic OMI interface routines + ! Call generic OMI interface routine for global filters CALL PDAFomi_put_state_global(collect_state_pdaf, init_dim_obs_pdafomi, & obs_op_pdafomi, prepoststep_ens_offline, status_pdaf) ELSE - ! localized EnKF has its own OMI interface routine + ! LEnKF has its own OMI interface routine CALL PDAFomi_put_state_lenkf(collect_state_pdaf, init_dim_obs_pdafomi, & obs_op_pdafomi, prepoststep_ens_offline, localize_covar_pdafomi, status_pdaf) END IF diff --git a/tutorial/offline_2D_parallel/finalize_pdaf.F90 b/tutorial/offline_2D_parallel/finalize_pdaf.F90 index 6504f0685..5d55c75d9 100644 --- a/tutorial/offline_2D_parallel/finalize_pdaf.F90 +++ b/tutorial/offline_2D_parallel/finalize_pdaf.F90 @@ -19,7 +19,7 @@ SUBROUTINE finalize_pdaf() ! *** Show allocated memory for PDAF *** - CALL PDAF_print_info(11) + IF (mype_world==0) CALL PDAF_print_info(10) ! *** Print PDAF timings onto screen *** IF (mype_world==0) CALL PDAF_print_info(3) diff --git a/tutorial/offline_2D_parallel/g2l_state_pdaf.F90 b/tutorial/offline_2D_parallel/g2l_state_pdaf.F90 deleted file mode 100644 index 177740d1a..000000000 --- a/tutorial/offline_2D_parallel/g2l_state_pdaf.F90 +++ /dev/null @@ -1,49 +0,0 @@ -!> Restrict a model state to a local analysis domain -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! before the analysis on a single local analysis -!! domain. It has to initialize elements of the -!! state vector for the local analysis domains from -!! the PE-local full state vector. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - INTEGER, INTENT(in) :: dim_l !< Local state dimension - REAL, INTENT(in) :: state_p(dim_p) !< PE-local full state vector - REAL, INTENT(out) :: state_l(dim_l) !< State vector on local analysis domain - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************* -! *** Initialize local state vector *** -! ************************************* - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_l(i) = state_p(id_lstate_in_pstate(i)) - END DO - -END SUBROUTINE g2l_state_pdaf diff --git a/tutorial/offline_2D_parallel/init_dim_l_pdaf.F90 b/tutorial/offline_2D_parallel/init_dim_l_pdaf.F90 index f4cd5275a..2c36ac2df 100644 --- a/tutorial/offline_2D_parallel/init_dim_l_pdaf.F90 +++ b/tutorial/offline_2D_parallel/init_dim_l_pdaf.F90 @@ -16,12 +16,12 @@ !! SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) + USE PDAFlocal, & ! Routine to provide local indices to PDAF + ONLY: PDAFlocal_set_indices USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l, id_lstate_in_pstate, ny, local_dims + ONLY: coords_l, ny, local_dims USE mod_parallel_pdaf, & ! Parallelization ONLY: mype_filter - USE PDAFlocal, & ! Localization helper routine - ONLY: PDAFlocal_set_indices IMPLICIT NONE @@ -33,6 +33,7 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! *** local variables *** INTEGER :: i ! Counters INTEGER :: off_p ! Process-local offset in global state vector + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector ! **************************************** @@ -63,13 +64,15 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array - IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! Here the local domain is a single grid point and variable given by DOMAIN_P id_lstate_in_pstate(1) = domain_p - ! Provide index array to PDAF + ! Provide the index vector to PDAF CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) + ! Deallocate index array + DEALLOCATE(id_lstate_in_pstate) + END SUBROUTINE init_dim_l_pdaf diff --git a/tutorial/offline_2D_parallel/l2g_state_pdaf.F90 b/tutorial/offline_2D_parallel/l2g_state_pdaf.F90 deleted file mode 100644 index 1a27e44f2..000000000 --- a/tutorial/offline_2D_parallel/l2g_state_pdaf.F90 +++ /dev/null @@ -1,50 +0,0 @@ -!> Initialize full state from local analysis -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! after the analysis and ensemble transformation -!! on a single local analysis domain. It has to -!! initialize elements of the PE-local full state -!! vector from the provided analysis state vector -!! on the local analysis domain. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_l !< Local state dimension - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - REAL, INTENT(in) :: state_l(dim_l) !< State vector on local analysis domain - REAL, INTENT(inout) :: state_p(dim_p) !< PE-local full state vector - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************************** -! *** Initialize elements of global state vector *** -! ************************************************** - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_p(id_lstate_in_pstate(i)) = state_l(i) - END DO - -END SUBROUTINE l2g_state_pdaf diff --git a/tutorial/offline_2D_parallel/mod_assimilation.F90 b/tutorial/offline_2D_parallel/mod_assimilation.F90 index d0ffcf985..ba03ac05c 100644 --- a/tutorial/offline_2D_parallel/mod_assimilation.F90 +++ b/tutorial/offline_2D_parallel/mod_assimilation.F90 @@ -28,7 +28,6 @@ MODULE mod_assimilation ! *** Variables specific for model setup *** REAL :: coords_l(2) !< Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector ! Variables to handle multiple fields in the state vector INTEGER :: n_fields !< number of fields in state vector @@ -45,7 +44,7 @@ MODULE mod_assimilation ! Type variable holding field IDs in state vector TYPE(field_ids) :: id -!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate) +!$OMP THREADPRIVATE(coords_l) ! ----------------------------------------------------------------- @@ -70,18 +69,12 @@ MODULE mod_assimilation !< * (1) progress info !< * (2) add timings !< * (3) debugging output - INTEGER :: dim_ens !< Size of ensemble for SEIK/LSEIK/EnKF/ETKF \n - !< Number of EOFs to be used for SEEK + INTEGER :: dim_ens !< Size of ensemble INTEGER :: filtertype !< Select filter algorithm: !< * SEIK (1), EnKF (2), LSEIK (3), ETKF (4) !< LETKF (5), ESTKF (6), LESTKF (7), NETF (9), LNETF (10) !< LKNETF (11), PF (12), GENOBS (100), 3DVAR (200) INTEGER :: subtype !< Subtype of filter algorithm - !< * SEEK: - !< (0) evolve normalized modes - !< (1) evolve scaled modes with unit U - !< (2) fixed basis (V); variable U matrix - !< (3) fixed covar matrix (V,U kept static) !< * SEIK: !< (0) ensemble forecast; new formulation !< (1) ensemble forecast; old formulation diff --git a/tutorial/offline_2D_serial/Makefile b/tutorial/offline_2D_serial/Makefile index 53ad7e6f6..c86ca20ff 100644 --- a/tutorial/offline_2D_serial/Makefile +++ b/tutorial/offline_2D_serial/Makefile @@ -66,9 +66,7 @@ OBJ_USER_GEN = init_ens_offline.o \ # User-supplied routines for localized analysis OBJ_USER_LOCAL = init_n_domains_pdaf.o \ - init_dim_l_pdaf.o \ - g2l_state_pdaf.o \ - l2g_state_pdaf.o + init_dim_l_pdaf.o # Full list of user-supplied routines for online modes OBJ_PDAF_USER = $(OBJ_USER_PDAFOMI) $(OBJ_USER_GEN) $(OBJ_USER_LOCAL) diff --git a/tutorial/offline_2D_serial/assimilate_pdaf_offline.F90 b/tutorial/offline_2D_serial/assimilate_pdaf_offline.F90 index b8c22927f..a75f7687f 100644 --- a/tutorial/offline_2D_serial/assimilate_pdaf_offline.F90 +++ b/tutorial/offline_2D_serial/assimilate_pdaf_offline.F90 @@ -15,8 +15,10 @@ SUBROUTINE assimilate_pdaf_offline() USE PDAF_interfaces_module, & ! Interface definitions to PDAF core routines - ONLY: PDAFomi_assimilate_local, PDAFomi_assimilate_global, & - PDAFomi_assimilate_lenkf, PDAF_get_localfilter + ONLY: PDAFomi_put_state_global, & + PDAFomi_put_state_lenkf, PDAF_get_localfilter + USE PDAFlocal, & ! Interface definitions for PDAFlocal + ONLY: PDAFlocalomi_put_state USE mod_parallel_pdaf, & ! Parallelization ONLY: mype_world, abort_parallel USE mod_assimilation, & ! Variables for assimilation @@ -43,9 +45,7 @@ SUBROUTINE assimilate_pdaf_offline() prepoststep_ens_offline ! User supplied pre/poststep routine ! Localization of state vector EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains - init_dim_l_pdaf, & ! Initialize state dimension for local analysis domain - g2l_state_pdaf, & ! Get state on local analysis domain from global state - l2g_state_pdaf ! Update global state from state on local analysis domain + init_dim_l_pdaf ! Initialize state dimension for local analysis domain ! Interface to PDAF-OMI for local and global filters EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain @@ -71,18 +71,18 @@ SUBROUTINE assimilate_pdaf_offline() ! Call assimilate routine for global or local filter IF (localfilter == 1) THEN ! Call generic OMI interface routine for domain-localized filters - CALL PDAFomi_put_state_local(collect_state_pdaf, init_dim_obs_pdafomi, & + CALL PDAFlocalomi_put_state(collect_state_pdaf, init_dim_obs_pdafomi, & obs_op_pdafomi, prepoststep_ens_offline, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, status_pdaf) + init_dim_obs_l_pdafomi, status_pdaf) ELSE - IF (filtertype == 8) THEN - ! LEnKF has its own OMI interface routine - CALL PDAFomi_put_state_lenkf(collect_state_pdaf, init_dim_obs_pdafomi, & - obs_op_pdafomi, prepoststep_ens_offline, localize_covar_pdafomi, status_pdaf) - ELSE + IF (filtertype /= 8) THEN ! Call generic OMI interface routine for global filters CALL PDAFomi_put_state_global(collect_state_pdaf, init_dim_obs_pdafomi, & obs_op_pdafomi, prepoststep_ens_offline, status_pdaf) + ELSE + ! LEnKF has its own OMI interface routine + CALL PDAFomi_put_state_lenkf(collect_state_pdaf, init_dim_obs_pdafomi, & + obs_op_pdafomi, prepoststep_ens_offline, localize_covar_pdafomi, status_pdaf) END IF END IF diff --git a/tutorial/offline_2D_serial/g2l_state_pdaf.F90 b/tutorial/offline_2D_serial/g2l_state_pdaf.F90 deleted file mode 100644 index 177740d1a..000000000 --- a/tutorial/offline_2D_serial/g2l_state_pdaf.F90 +++ /dev/null @@ -1,49 +0,0 @@ -!> Restrict a model state to a local analysis domain -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! before the analysis on a single local analysis -!! domain. It has to initialize elements of the -!! state vector for the local analysis domains from -!! the PE-local full state vector. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - INTEGER, INTENT(in) :: dim_l !< Local state dimension - REAL, INTENT(in) :: state_p(dim_p) !< PE-local full state vector - REAL, INTENT(out) :: state_l(dim_l) !< State vector on local analysis domain - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************* -! *** Initialize local state vector *** -! ************************************* - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_l(i) = state_p(id_lstate_in_pstate(i)) - END DO - -END SUBROUTINE g2l_state_pdaf diff --git a/tutorial/offline_2D_serial/init_dim_l_pdaf.F90 b/tutorial/offline_2D_serial/init_dim_l_pdaf.F90 index 7ce79b7b8..f682e0cf4 100644 --- a/tutorial/offline_2D_serial/init_dim_l_pdaf.F90 +++ b/tutorial/offline_2D_serial/init_dim_l_pdaf.F90 @@ -16,8 +16,10 @@ !! SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) + USE PDAFlocal, & ! Routine to provide local indices to PDAF + ONLY: PDAFlocal_set_indices USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l, id_lstate_in_pstate, ny + ONLY: coords_l, ny IMPLICIT NONE @@ -26,6 +28,9 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) INTEGER, INTENT(in) :: domain_p !< Current local analysis domain INTEGER, INTENT(out) :: dim_l !< Local state dimension +! *** local variables *** + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector + ! **************************************** ! *** Initialize local state dimension *** @@ -49,10 +54,15 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array - IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! Here the local domain is a single grid point and variable given by DOMAIN_P id_lstate_in_pstate(1) = domain_p + ! Provide the index vector to PDAF + CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) + + ! Deallocate index array + DEALLOCATE(id_lstate_in_pstate) + END SUBROUTINE init_dim_l_pdaf diff --git a/tutorial/offline_2D_serial/l2g_state_pdaf.F90 b/tutorial/offline_2D_serial/l2g_state_pdaf.F90 deleted file mode 100644 index 1a27e44f2..000000000 --- a/tutorial/offline_2D_serial/l2g_state_pdaf.F90 +++ /dev/null @@ -1,50 +0,0 @@ -!> Initialize full state from local analysis -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! after the analysis and ensemble transformation -!! on a single local analysis domain. It has to -!! initialize elements of the PE-local full state -!! vector from the provided analysis state vector -!! on the local analysis domain. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_l !< Local state dimension - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - REAL, INTENT(in) :: state_l(dim_l) !< State vector on local analysis domain - REAL, INTENT(inout) :: state_p(dim_p) !< PE-local full state vector - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************************** -! *** Initialize elements of global state vector *** -! ************************************************** - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_p(id_lstate_in_pstate(i)) = state_l(i) - END DO - -END SUBROUTINE l2g_state_pdaf diff --git a/tutorial/offline_2D_serial/mod_assimilation.F90 b/tutorial/offline_2D_serial/mod_assimilation.F90 index 2a450f15d..085aa5fae 100644 --- a/tutorial/offline_2D_serial/mod_assimilation.F90 +++ b/tutorial/offline_2D_serial/mod_assimilation.F90 @@ -8,6 +8,9 @@ !! Most variables can be specified as a command line !! argument. !! +!! Implementation for the 2D offline example +!! with or without parallelization. +!! !! __Revision history:__ !! * 2013-02 - Lars Nerger - Initial code !! * Later revisions - see repository log @@ -25,9 +28,9 @@ MODULE mod_assimilation ! *** Variables specific for model setup *** REAL :: coords_l(2) !< Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector - ! Variables to handle multiple fields in the state vector +! *** Variables to handle multiple fields in the state vector *** + INTEGER :: n_fields !< number of fields in state vector INTEGER, ALLOCATABLE :: off_fields(:) !< Offsets of fields in state vector INTEGER, ALLOCATABLE :: dim_fields(:) !< Dimension of fields in state vector @@ -42,7 +45,7 @@ MODULE mod_assimilation ! Type variable holding field IDs in state vector TYPE(field_ids) :: id -!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate) +!$OMP THREADPRIVATE(coords_l) ! ----------------------------------------------------------------- @@ -67,18 +70,12 @@ MODULE mod_assimilation !< * (1) progress info !< * (2) add timings !< * (3) debugging output - INTEGER :: dim_ens !< Size of ensemble for SEIK/LSEIK/EnKF/ETKF \n - !< Number of EOFs to be used for SEEK + INTEGER :: dim_ens !< Size of ensemble INTEGER :: filtertype !< Select filter algorithm: - !< * SEEK (0), SEIK (1), EnKF (2), LSEIK (3), ETKF (4) + !< * SEIK (1), EnKF (2), LSEIK (3), ETKF (4) !< LETKF (5), ESTKF (6), LESTKF (7), NETF (9), LNETF (10) !< LKNETF (11), PF (12), GENOBS (100), 3DVAR (200) INTEGER :: subtype !< Subtype of filter algorithm - !< * SEEK: - !< (0) evolve normalized modes - !< (1) evolve scaled modes with unit U - !< (2) fixed basis (V); variable U matrix - !< (3) fixed covar matrix (V,U kept static) !< * SEIK: !< (0) ensemble forecast; new formulation !< (1) ensemble forecast; old formulation @@ -152,9 +149,6 @@ MODULE mod_assimilation !< (4) regulated localization of R with single-point error variance REAL :: sradius !< Support radius for 5th order polynomial !< or radius for 1/e for exponential weighting -! ! SEEK - INTEGER :: int_rediag !< Interval to perform re-diagonalization in SEEK - REAL :: epsilon !< Epsilon for gradient approx. in SEEK forecast ! ! ENKF INTEGER :: rank_ana_enkf !< Rank to be considered for inversion of HPH in analysis of EnKF !< (0) for analysis w/o eigendecomposition diff --git a/tutorial/online_2D_parallelmodel/Makefile b/tutorial/online_2D_parallelmodel/Makefile index 4881b2702..311294708 100644 --- a/tutorial/online_2D_parallelmodel/Makefile +++ b/tutorial/online_2D_parallelmodel/Makefile @@ -69,9 +69,7 @@ OBJ_USER_GEN = init_ens_pdaf.o \ # User-supplied routines for localized analysis (LESTKF/LSEIK/LETKF) OBJ_USER_LOCAL = init_n_domains_pdaf.o \ - init_dim_l_pdaf.o \ - g2l_state_pdaf.o \ - l2g_state_pdaf.o + init_dim_l_pdaf.o # Full list of user-supplied routines for online modes OBJ_PDAF_USER = $(OBJ_USER_PDAFOMI) $(OBJ_PDAF_INT) $(OBJ_USER_GEN) $(OBJ_USER_LOCAL) diff --git a/tutorial/online_2D_parallelmodel/assimilate_pdaf.F90 b/tutorial/online_2D_parallelmodel/assimilate_pdaf.F90 index 53ac9324c..ab3397b58 100644 --- a/tutorial/online_2D_parallelmodel/assimilate_pdaf.F90 +++ b/tutorial/online_2D_parallelmodel/assimilate_pdaf.F90 @@ -11,9 +11,11 @@ !! SUBROUTINE assimilate_pdaf() - USE pdaf_interfaces_module, & ! Interface definitions to PDAF core routines + USE PDAF_interfaces_module, & ! Interface definitions to PDAF core routines ONLY: PDAFomi_assimilate_local, PDAFomi_assimilate_global, & PDAFomi_assimilate_lenkf, PDAF_get_localfilter + USE PDAFlocal, & ! Interface definitions for PDAFlocal + ONLY: PDAFlocalomi_put_state USE mod_parallel_model, & ! Parallelization ONLY: mype_world, abort_parallel USE mod_assimilation, & ! Variables for assimilation @@ -40,9 +42,7 @@ SUBROUTINE assimilate_pdaf() prepoststep_pdaf ! User supplied pre/poststep routine ! Localization of state vector EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains - init_dim_l_pdaf, & ! Initialize state dimension for local analysis domain - g2l_state_pdaf, & ! Get state on local analysis domain from global state - l2g_state_pdaf ! Update global state from state on local analysis domain + init_dim_l_pdaf ! Initialize state dimension for local analysis domain ! Interface to PDAF-OMI for local and global filters EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain @@ -60,10 +60,9 @@ SUBROUTINE assimilate_pdaf() ! Call assimilate routine for global or local filter IF (localfilter == 1) THEN ! Call generic OMI interface routine for domain-localized filters - CALL PDAFomi_assimilate_local(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocalomi_assimilate(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, & - next_observation_pdaf, status_pdaf) + init_dim_l_pdaf, init_dim_obs_l_pdafomi, next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 8) THEN ! LEnKF has its own OMI interface routine diff --git a/tutorial/online_2D_parallelmodel/g2l_state_pdaf.F90 b/tutorial/online_2D_parallelmodel/g2l_state_pdaf.F90 deleted file mode 100644 index 177740d1a..000000000 --- a/tutorial/online_2D_parallelmodel/g2l_state_pdaf.F90 +++ /dev/null @@ -1,49 +0,0 @@ -!> Restrict a model state to a local analysis domain -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! before the analysis on a single local analysis -!! domain. It has to initialize elements of the -!! state vector for the local analysis domains from -!! the PE-local full state vector. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - INTEGER, INTENT(in) :: dim_l !< Local state dimension - REAL, INTENT(in) :: state_p(dim_p) !< PE-local full state vector - REAL, INTENT(out) :: state_l(dim_l) !< State vector on local analysis domain - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************* -! *** Initialize local state vector *** -! ************************************* - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_l(i) = state_p(id_lstate_in_pstate(i)) - END DO - -END SUBROUTINE g2l_state_pdaf diff --git a/tutorial/online_2D_parallelmodel/init_dim_l_pdaf.F90 b/tutorial/online_2D_parallelmodel/init_dim_l_pdaf.F90 index c9425efb5..70aea27f7 100644 --- a/tutorial/online_2D_parallelmodel/init_dim_l_pdaf.F90 +++ b/tutorial/online_2D_parallelmodel/init_dim_l_pdaf.F90 @@ -16,10 +16,12 @@ !! SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) + USE PDAFlocal, & ! Routine to provide local indices to PDAF + ONLY: PDAFlocal_set_indices USE mod_model, & ! Model variables ONLY: ny, nx_p USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l, id_lstate_in_pstate + ONLY: coords_l USE mod_parallel_pdaf, & ! assimilation parallelization variables ONLY: mype_filter @@ -33,6 +35,7 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! *** local variables *** INTEGER :: i ! Counters INTEGER :: off_p ! Process-local offset in global state vector + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector ! **************************************** @@ -62,10 +65,15 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array - IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! Here the local domain is a single grid point and variable given by DOMAIN_P id_lstate_in_pstate(1) = domain_p + ! Provide the index vector to PDAF + CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) + + ! Deallocate index array + DEALLOCATE(id_lstate_in_pstate) + END SUBROUTINE init_dim_l_pdaf diff --git a/tutorial/online_2D_parallelmodel/l2g_state_pdaf.F90 b/tutorial/online_2D_parallelmodel/l2g_state_pdaf.F90 deleted file mode 100644 index 1a27e44f2..000000000 --- a/tutorial/online_2D_parallelmodel/l2g_state_pdaf.F90 +++ /dev/null @@ -1,50 +0,0 @@ -!> Initialize full state from local analysis -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! after the analysis and ensemble transformation -!! on a single local analysis domain. It has to -!! initialize elements of the PE-local full state -!! vector from the provided analysis state vector -!! on the local analysis domain. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_l !< Local state dimension - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - REAL, INTENT(in) :: state_l(dim_l) !< State vector on local analysis domain - REAL, INTENT(inout) :: state_p(dim_p) !< PE-local full state vector - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************************** -! *** Initialize elements of global state vector *** -! ************************************************** - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_p(id_lstate_in_pstate(i)) = state_l(i) - END DO - -END SUBROUTINE l2g_state_pdaf diff --git a/tutorial/online_2D_parallelmodel/mod_assimilation.F90 b/tutorial/online_2D_parallelmodel/mod_assimilation.F90 index 62cc896c0..9200a923b 100644 --- a/tutorial/online_2D_parallelmodel/mod_assimilation.F90 +++ b/tutorial/online_2D_parallelmodel/mod_assimilation.F90 @@ -20,7 +20,6 @@ MODULE mod_assimilation IMPLICIT NONE SAVE - ! *** Variables specific for online tutorial example *** INTEGER :: ensgroup=1 !< Type of initial ensemble @@ -28,9 +27,9 @@ MODULE mod_assimilation ! *** Variables specific for model setup *** REAL :: coords_l(2) !< Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector - ! Variables to handle multiple fields in the state vector +! *** Variables to handle multiple fields in the state vector *** + INTEGER :: n_fields !< number of fields in state vector INTEGER, ALLOCATABLE :: off_fields(:) !< Offsets of fields in state vector INTEGER, ALLOCATABLE :: dim_fields(:) !< Dimension of fields in state vector @@ -45,7 +44,7 @@ MODULE mod_assimilation ! Type variable holding field IDs in state vector TYPE(field_ids) :: id -!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate) +!$OMP THREADPRIVATE(coords_l) ! ----------------------------------------------------------------- @@ -70,18 +69,12 @@ MODULE mod_assimilation !< * (1) progress info !< * (2) add timings !< * (3) debugging output - INTEGER :: dim_ens !< Size of ensemble for SEIK/LSEIK/EnKF/ETKF \n - !< Number of EOFs to be used for SEEK + INTEGER :: dim_ens !< Size of ensemble INTEGER :: filtertype !< Select filter algorithm: - !< * SEEK (0), SEIK (1), EnKF (2), LSEIK (3), ETKF (4) + !< * SEIK (1), EnKF (2), LSEIK (3), ETKF (4) !< LETKF (5), ESTKF (6), LESTKF (7), NETF (9), LNETF (10) !< LKNETF (11), PF (12), GENOBS (100), 3DVAR (200) INTEGER :: subtype !< Subtype of filter algorithm - !< * SEEK: - !< (0) evolve normalized modes - !< (1) evolve scaled modes with unit U - !< (2) fixed basis (V); variable U matrix - !< (3) fixed covar matrix (V,U kept static) !< * SEIK: !< (0) ensemble forecast; new formulation !< (1) ensemble forecast; old formulation @@ -155,9 +148,6 @@ MODULE mod_assimilation !< (4) regulated localization of R with single-point error variance REAL :: sradius !< Support radius for 5th order polynomial !< or radius for 1/e for exponential weighting -! ! SEEK - INTEGER :: int_rediag !< Interval to perform re-diagonalization in SEEK - REAL :: epsilon !< Epsilon for gradient approx. in SEEK forecast ! ! ENKF INTEGER :: rank_ana_enkf !< Rank to be considered for inversion of HPH in analysis of EnKF !< (0) for analysis w/o eigendecomposition diff --git a/tutorial/online_2D_parallelmodel_fullpar/Makefile b/tutorial/online_2D_parallelmodel_fullpar/Makefile index eb349d361..5a8e91cea 100644 --- a/tutorial/online_2D_parallelmodel_fullpar/Makefile +++ b/tutorial/online_2D_parallelmodel_fullpar/Makefile @@ -70,9 +70,7 @@ OBJ_USER_GEN = init_ens_pdaf.o \ # User-supplied routines for localized analysis (LESTKF/LSEIK/LETKF) OBJ_USER_LOCAL = init_n_domains_pdaf.o \ - init_dim_l_pdaf.o \ - g2l_state_pdaf.o \ - l2g_state_pdaf.o + init_dim_l_pdaf.o # Full list of user-supplied routines for online modes OBJ_PDAF_USER = $(OBJ_USER_PDAFOMI) $(OBJ_PDAF_INT) $(OBJ_USER_GEN) $(OBJ_USER_LOCAL) diff --git a/tutorial/online_2D_parallelmodel_fullpar/assimilate_pdaf.F90 b/tutorial/online_2D_parallelmodel_fullpar/assimilate_pdaf.F90 index 53ac9324c..ab3397b58 100644 --- a/tutorial/online_2D_parallelmodel_fullpar/assimilate_pdaf.F90 +++ b/tutorial/online_2D_parallelmodel_fullpar/assimilate_pdaf.F90 @@ -11,9 +11,11 @@ !! SUBROUTINE assimilate_pdaf() - USE pdaf_interfaces_module, & ! Interface definitions to PDAF core routines + USE PDAF_interfaces_module, & ! Interface definitions to PDAF core routines ONLY: PDAFomi_assimilate_local, PDAFomi_assimilate_global, & PDAFomi_assimilate_lenkf, PDAF_get_localfilter + USE PDAFlocal, & ! Interface definitions for PDAFlocal + ONLY: PDAFlocalomi_put_state USE mod_parallel_model, & ! Parallelization ONLY: mype_world, abort_parallel USE mod_assimilation, & ! Variables for assimilation @@ -40,9 +42,7 @@ SUBROUTINE assimilate_pdaf() prepoststep_pdaf ! User supplied pre/poststep routine ! Localization of state vector EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains - init_dim_l_pdaf, & ! Initialize state dimension for local analysis domain - g2l_state_pdaf, & ! Get state on local analysis domain from global state - l2g_state_pdaf ! Update global state from state on local analysis domain + init_dim_l_pdaf ! Initialize state dimension for local analysis domain ! Interface to PDAF-OMI for local and global filters EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain @@ -60,10 +60,9 @@ SUBROUTINE assimilate_pdaf() ! Call assimilate routine for global or local filter IF (localfilter == 1) THEN ! Call generic OMI interface routine for domain-localized filters - CALL PDAFomi_assimilate_local(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocalomi_assimilate(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, & - next_observation_pdaf, status_pdaf) + init_dim_l_pdaf, init_dim_obs_l_pdafomi, next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 8) THEN ! LEnKF has its own OMI interface routine diff --git a/tutorial/online_2D_parallelmodel_fullpar/g2l_state_pdaf.F90 b/tutorial/online_2D_parallelmodel_fullpar/g2l_state_pdaf.F90 deleted file mode 100644 index 177740d1a..000000000 --- a/tutorial/online_2D_parallelmodel_fullpar/g2l_state_pdaf.F90 +++ /dev/null @@ -1,49 +0,0 @@ -!> Restrict a model state to a local analysis domain -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! before the analysis on a single local analysis -!! domain. It has to initialize elements of the -!! state vector for the local analysis domains from -!! the PE-local full state vector. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - INTEGER, INTENT(in) :: dim_l !< Local state dimension - REAL, INTENT(in) :: state_p(dim_p) !< PE-local full state vector - REAL, INTENT(out) :: state_l(dim_l) !< State vector on local analysis domain - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************* -! *** Initialize local state vector *** -! ************************************* - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_l(i) = state_p(id_lstate_in_pstate(i)) - END DO - -END SUBROUTINE g2l_state_pdaf diff --git a/tutorial/online_2D_parallelmodel_fullpar/init_dim_l_pdaf.F90 b/tutorial/online_2D_parallelmodel_fullpar/init_dim_l_pdaf.F90 index c9425efb5..70aea27f7 100644 --- a/tutorial/online_2D_parallelmodel_fullpar/init_dim_l_pdaf.F90 +++ b/tutorial/online_2D_parallelmodel_fullpar/init_dim_l_pdaf.F90 @@ -16,10 +16,12 @@ !! SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) + USE PDAFlocal, & ! Routine to provide local indices to PDAF + ONLY: PDAFlocal_set_indices USE mod_model, & ! Model variables ONLY: ny, nx_p USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l, id_lstate_in_pstate + ONLY: coords_l USE mod_parallel_pdaf, & ! assimilation parallelization variables ONLY: mype_filter @@ -33,6 +35,7 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! *** local variables *** INTEGER :: i ! Counters INTEGER :: off_p ! Process-local offset in global state vector + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector ! **************************************** @@ -62,10 +65,15 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array - IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! Here the local domain is a single grid point and variable given by DOMAIN_P id_lstate_in_pstate(1) = domain_p + ! Provide the index vector to PDAF + CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) + + ! Deallocate index array + DEALLOCATE(id_lstate_in_pstate) + END SUBROUTINE init_dim_l_pdaf diff --git a/tutorial/online_2D_parallelmodel_fullpar/l2g_state_pdaf.F90 b/tutorial/online_2D_parallelmodel_fullpar/l2g_state_pdaf.F90 deleted file mode 100644 index 1a27e44f2..000000000 --- a/tutorial/online_2D_parallelmodel_fullpar/l2g_state_pdaf.F90 +++ /dev/null @@ -1,50 +0,0 @@ -!> Initialize full state from local analysis -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! after the analysis and ensemble transformation -!! on a single local analysis domain. It has to -!! initialize elements of the PE-local full state -!! vector from the provided analysis state vector -!! on the local analysis domain. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_l !< Local state dimension - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - REAL, INTENT(in) :: state_l(dim_l) !< State vector on local analysis domain - REAL, INTENT(inout) :: state_p(dim_p) !< PE-local full state vector - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************************** -! *** Initialize elements of global state vector *** -! ************************************************** - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_p(id_lstate_in_pstate(i)) = state_l(i) - END DO - -END SUBROUTINE l2g_state_pdaf diff --git a/tutorial/online_2D_parallelmodel_fullpar/mod_assimilation.F90 b/tutorial/online_2D_parallelmodel_fullpar/mod_assimilation.F90 index 62cc896c0..0e5d6cc05 100644 --- a/tutorial/online_2D_parallelmodel_fullpar/mod_assimilation.F90 +++ b/tutorial/online_2D_parallelmodel_fullpar/mod_assimilation.F90 @@ -28,9 +28,9 @@ MODULE mod_assimilation ! *** Variables specific for model setup *** REAL :: coords_l(2) !< Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector - ! Variables to handle multiple fields in the state vector +! *** Variables to handle multiple fields in the state vector *** + INTEGER :: n_fields !< number of fields in state vector INTEGER, ALLOCATABLE :: off_fields(:) !< Offsets of fields in state vector INTEGER, ALLOCATABLE :: dim_fields(:) !< Dimension of fields in state vector @@ -45,7 +45,7 @@ MODULE mod_assimilation ! Type variable holding field IDs in state vector TYPE(field_ids) :: id -!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate) +!$OMP THREADPRIVATE(coords_l) ! ----------------------------------------------------------------- @@ -70,18 +70,12 @@ MODULE mod_assimilation !< * (1) progress info !< * (2) add timings !< * (3) debugging output - INTEGER :: dim_ens !< Size of ensemble for SEIK/LSEIK/EnKF/ETKF \n - !< Number of EOFs to be used for SEEK + INTEGER :: dim_ens !< Size of ensemble INTEGER :: filtertype !< Select filter algorithm: - !< * SEEK (0), SEIK (1), EnKF (2), LSEIK (3), ETKF (4) + !< * SEIK (1), EnKF (2), LSEIK (3), ETKF (4) !< LETKF (5), ESTKF (6), LESTKF (7), NETF (9), LNETF (10) !< LKNETF (11), PF (12), GENOBS (100), 3DVAR (200) INTEGER :: subtype !< Subtype of filter algorithm - !< * SEEK: - !< (0) evolve normalized modes - !< (1) evolve scaled modes with unit U - !< (2) fixed basis (V); variable U matrix - !< (3) fixed covar matrix (V,U kept static) !< * SEIK: !< (0) ensemble forecast; new formulation !< (1) ensemble forecast; old formulation @@ -155,9 +149,6 @@ MODULE mod_assimilation !< (4) regulated localization of R with single-point error variance REAL :: sradius !< Support radius for 5th order polynomial !< or radius for 1/e for exponential weighting -! ! SEEK - INTEGER :: int_rediag !< Interval to perform re-diagonalization in SEEK - REAL :: epsilon !< Epsilon for gradient approx. in SEEK forecast ! ! ENKF INTEGER :: rank_ana_enkf !< Rank to be considered for inversion of HPH in analysis of EnKF !< (0) for analysis w/o eigendecomposition diff --git a/tutorial/online_2D_parallelmodel_fullpar_1fpe/Makefile b/tutorial/online_2D_parallelmodel_fullpar_1fpe/Makefile index eb349d361..5a8e91cea 100644 --- a/tutorial/online_2D_parallelmodel_fullpar_1fpe/Makefile +++ b/tutorial/online_2D_parallelmodel_fullpar_1fpe/Makefile @@ -70,9 +70,7 @@ OBJ_USER_GEN = init_ens_pdaf.o \ # User-supplied routines for localized analysis (LESTKF/LSEIK/LETKF) OBJ_USER_LOCAL = init_n_domains_pdaf.o \ - init_dim_l_pdaf.o \ - g2l_state_pdaf.o \ - l2g_state_pdaf.o + init_dim_l_pdaf.o # Full list of user-supplied routines for online modes OBJ_PDAF_USER = $(OBJ_USER_PDAFOMI) $(OBJ_PDAF_INT) $(OBJ_USER_GEN) $(OBJ_USER_LOCAL) diff --git a/tutorial/online_2D_parallelmodel_fullpar_1fpe/assimilate_pdaf.F90 b/tutorial/online_2D_parallelmodel_fullpar_1fpe/assimilate_pdaf.F90 index 53ac9324c..ab3397b58 100644 --- a/tutorial/online_2D_parallelmodel_fullpar_1fpe/assimilate_pdaf.F90 +++ b/tutorial/online_2D_parallelmodel_fullpar_1fpe/assimilate_pdaf.F90 @@ -11,9 +11,11 @@ !! SUBROUTINE assimilate_pdaf() - USE pdaf_interfaces_module, & ! Interface definitions to PDAF core routines + USE PDAF_interfaces_module, & ! Interface definitions to PDAF core routines ONLY: PDAFomi_assimilate_local, PDAFomi_assimilate_global, & PDAFomi_assimilate_lenkf, PDAF_get_localfilter + USE PDAFlocal, & ! Interface definitions for PDAFlocal + ONLY: PDAFlocalomi_put_state USE mod_parallel_model, & ! Parallelization ONLY: mype_world, abort_parallel USE mod_assimilation, & ! Variables for assimilation @@ -40,9 +42,7 @@ SUBROUTINE assimilate_pdaf() prepoststep_pdaf ! User supplied pre/poststep routine ! Localization of state vector EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains - init_dim_l_pdaf, & ! Initialize state dimension for local analysis domain - g2l_state_pdaf, & ! Get state on local analysis domain from global state - l2g_state_pdaf ! Update global state from state on local analysis domain + init_dim_l_pdaf ! Initialize state dimension for local analysis domain ! Interface to PDAF-OMI for local and global filters EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain @@ -60,10 +60,9 @@ SUBROUTINE assimilate_pdaf() ! Call assimilate routine for global or local filter IF (localfilter == 1) THEN ! Call generic OMI interface routine for domain-localized filters - CALL PDAFomi_assimilate_local(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocalomi_assimilate(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, & - next_observation_pdaf, status_pdaf) + init_dim_l_pdaf, init_dim_obs_l_pdafomi, next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 8) THEN ! LEnKF has its own OMI interface routine diff --git a/tutorial/online_2D_parallelmodel_fullpar_1fpe/g2l_state_pdaf.F90 b/tutorial/online_2D_parallelmodel_fullpar_1fpe/g2l_state_pdaf.F90 deleted file mode 100644 index 177740d1a..000000000 --- a/tutorial/online_2D_parallelmodel_fullpar_1fpe/g2l_state_pdaf.F90 +++ /dev/null @@ -1,49 +0,0 @@ -!> Restrict a model state to a local analysis domain -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! before the analysis on a single local analysis -!! domain. It has to initialize elements of the -!! state vector for the local analysis domains from -!! the PE-local full state vector. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - INTEGER, INTENT(in) :: dim_l !< Local state dimension - REAL, INTENT(in) :: state_p(dim_p) !< PE-local full state vector - REAL, INTENT(out) :: state_l(dim_l) !< State vector on local analysis domain - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************* -! *** Initialize local state vector *** -! ************************************* - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_l(i) = state_p(id_lstate_in_pstate(i)) - END DO - -END SUBROUTINE g2l_state_pdaf diff --git a/tutorial/online_2D_parallelmodel_fullpar_1fpe/init_dim_l_pdaf.F90 b/tutorial/online_2D_parallelmodel_fullpar_1fpe/init_dim_l_pdaf.F90 index c9425efb5..70aea27f7 100644 --- a/tutorial/online_2D_parallelmodel_fullpar_1fpe/init_dim_l_pdaf.F90 +++ b/tutorial/online_2D_parallelmodel_fullpar_1fpe/init_dim_l_pdaf.F90 @@ -16,10 +16,12 @@ !! SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) + USE PDAFlocal, & ! Routine to provide local indices to PDAF + ONLY: PDAFlocal_set_indices USE mod_model, & ! Model variables ONLY: ny, nx_p USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l, id_lstate_in_pstate + ONLY: coords_l USE mod_parallel_pdaf, & ! assimilation parallelization variables ONLY: mype_filter @@ -33,6 +35,7 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! *** local variables *** INTEGER :: i ! Counters INTEGER :: off_p ! Process-local offset in global state vector + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector ! **************************************** @@ -62,10 +65,15 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array - IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! Here the local domain is a single grid point and variable given by DOMAIN_P id_lstate_in_pstate(1) = domain_p + ! Provide the index vector to PDAF + CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) + + ! Deallocate index array + DEALLOCATE(id_lstate_in_pstate) + END SUBROUTINE init_dim_l_pdaf diff --git a/tutorial/online_2D_parallelmodel_fullpar_1fpe/l2g_state_pdaf.F90 b/tutorial/online_2D_parallelmodel_fullpar_1fpe/l2g_state_pdaf.F90 deleted file mode 100644 index 1a27e44f2..000000000 --- a/tutorial/online_2D_parallelmodel_fullpar_1fpe/l2g_state_pdaf.F90 +++ /dev/null @@ -1,50 +0,0 @@ -!> Initialize full state from local analysis -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! after the analysis and ensemble transformation -!! on a single local analysis domain. It has to -!! initialize elements of the PE-local full state -!! vector from the provided analysis state vector -!! on the local analysis domain. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_l !< Local state dimension - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - REAL, INTENT(in) :: state_l(dim_l) !< State vector on local analysis domain - REAL, INTENT(inout) :: state_p(dim_p) !< PE-local full state vector - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************************** -! *** Initialize elements of global state vector *** -! ************************************************** - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_p(id_lstate_in_pstate(i)) = state_l(i) - END DO - -END SUBROUTINE l2g_state_pdaf diff --git a/tutorial/online_2D_parallelmodel_fullpar_1fpe/mod_assimilation.F90 b/tutorial/online_2D_parallelmodel_fullpar_1fpe/mod_assimilation.F90 index 62cc896c0..0e5d6cc05 100644 --- a/tutorial/online_2D_parallelmodel_fullpar_1fpe/mod_assimilation.F90 +++ b/tutorial/online_2D_parallelmodel_fullpar_1fpe/mod_assimilation.F90 @@ -28,9 +28,9 @@ MODULE mod_assimilation ! *** Variables specific for model setup *** REAL :: coords_l(2) !< Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector - ! Variables to handle multiple fields in the state vector +! *** Variables to handle multiple fields in the state vector *** + INTEGER :: n_fields !< number of fields in state vector INTEGER, ALLOCATABLE :: off_fields(:) !< Offsets of fields in state vector INTEGER, ALLOCATABLE :: dim_fields(:) !< Dimension of fields in state vector @@ -45,7 +45,7 @@ MODULE mod_assimilation ! Type variable holding field IDs in state vector TYPE(field_ids) :: id -!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate) +!$OMP THREADPRIVATE(coords_l) ! ----------------------------------------------------------------- @@ -70,18 +70,12 @@ MODULE mod_assimilation !< * (1) progress info !< * (2) add timings !< * (3) debugging output - INTEGER :: dim_ens !< Size of ensemble for SEIK/LSEIK/EnKF/ETKF \n - !< Number of EOFs to be used for SEEK + INTEGER :: dim_ens !< Size of ensemble INTEGER :: filtertype !< Select filter algorithm: - !< * SEEK (0), SEIK (1), EnKF (2), LSEIK (3), ETKF (4) + !< * SEIK (1), EnKF (2), LSEIK (3), ETKF (4) !< LETKF (5), ESTKF (6), LESTKF (7), NETF (9), LNETF (10) !< LKNETF (11), PF (12), GENOBS (100), 3DVAR (200) INTEGER :: subtype !< Subtype of filter algorithm - !< * SEEK: - !< (0) evolve normalized modes - !< (1) evolve scaled modes with unit U - !< (2) fixed basis (V); variable U matrix - !< (3) fixed covar matrix (V,U kept static) !< * SEIK: !< (0) ensemble forecast; new formulation !< (1) ensemble forecast; old formulation @@ -155,9 +149,6 @@ MODULE mod_assimilation !< (4) regulated localization of R with single-point error variance REAL :: sradius !< Support radius for 5th order polynomial !< or radius for 1/e for exponential weighting -! ! SEEK - INTEGER :: int_rediag !< Interval to perform re-diagonalization in SEEK - REAL :: epsilon !< Epsilon for gradient approx. in SEEK forecast ! ! ENKF INTEGER :: rank_ana_enkf !< Rank to be considered for inversion of HPH in analysis of EnKF !< (0) for analysis w/o eigendecomposition diff --git a/tutorial/online_2D_serialmodel/Makefile b/tutorial/online_2D_serialmodel/Makefile index ad5db0889..71c75282d 100644 --- a/tutorial/online_2D_serialmodel/Makefile +++ b/tutorial/online_2D_serialmodel/Makefile @@ -67,11 +67,9 @@ OBJ_USER_GEN = init_ens_pdaf.o \ distribute_state_pdaf.o \ collect_state_pdaf.o -# User-supplied routines for state in localized analysis (LESTKF/LSEIK/LETKF) +# User-supplied routines for state in localized analysis (LESTKF/LSEIK/LETKF/LNETF/LKNETF) OBJ_USER_LOCAL = init_n_domains_pdaf.o \ - init_dim_l_pdaf.o #\ -# g2l_state_pdaf.o \ -# l2g_state_pdaf.o + init_dim_l_pdaf.o # Full list of user-supplied routines for online mode OBJ_PDAF_USER = $(OBJ_USER_PDAFOMI) $(OBJ_PDAF_INT) $(OBJ_USER_GEN) $(OBJ_USER_LOCAL) diff --git a/tutorial/online_2D_serialmodel/assimilate_pdaf.F90 b/tutorial/online_2D_serialmodel/assimilate_pdaf.F90 index 2fcbc3721..f6250c4bf 100644 --- a/tutorial/online_2D_serialmodel/assimilate_pdaf.F90 +++ b/tutorial/online_2D_serialmodel/assimilate_pdaf.F90 @@ -11,9 +11,11 @@ !! SUBROUTINE assimilate_pdaf() - USE pdaf_interfaces_module, & ! Interface definitions to PDAF core routines + USE PDAF_interfaces_module, & ! Interface definitions to PDAF core routines ONLY: PDAFomi_assimilate_local, PDAFomi_assimilate_global, & PDAFomi_assimilate_lenkf, PDAF_get_localfilter + USE PDAFlocal, & ! Interface definitions for PDAFlocal + ONLY: PDAFlocalomi_put_state USE mod_parallel_pdaf, & ! Parallelization variables ONLY: mype_world, abort_parallel USE mod_assimilation, & ! Variables for assimilation @@ -40,16 +42,13 @@ SUBROUTINE assimilate_pdaf() prepoststep_pdaf ! User supplied pre/poststep routine ! Localization of state vector EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains - init_dim_l_pdaf, & ! Initialize state dimension for local analysis domain - g2l_state_pdaf, & ! Get state on local analysis domain from global state - l2g_state_pdaf ! Update global state from state on local analysis domain + init_dim_l_pdaf ! Initialize state dimension for local analysis domain ! Interface to PDAF-OMI for local and global filters EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain init_dim_obs_l_pdafomi, & ! Get dimension of obs. vector for local analysis domain localize_covar_pdafomi ! Apply localization to covariance matrix in LEnKF - EXTERNAL :: PDAF_local_g2l_callback, & - PDAF_local_l2g_callback + ! ********************************* ! *** Call assimilation routine *** @@ -61,10 +60,9 @@ SUBROUTINE assimilate_pdaf() ! Call assimilate routine for global or local filter IF (localfilter == 1) THEN ! Call generic OMI interface routine for domain-localized filters - CALL PDAFomi_assimilate_local(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocalomi_assimilate(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdafomi, PDAF_local_g2l_callback, PDAF_local_l2g_callback, & - next_observation_pdaf, status_pdaf) + init_dim_l_pdaf, init_dim_obs_l_pdafomi, next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 8) THEN ! LEnKF has its own OMI interface routine diff --git a/tutorial/online_2D_serialmodel/init_dim_l_pdaf.F90 b/tutorial/online_2D_serialmodel/init_dim_l_pdaf.F90 index a806cd433..3d751a495 100644 --- a/tutorial/online_2D_serialmodel/init_dim_l_pdaf.F90 +++ b/tutorial/online_2D_serialmodel/init_dim_l_pdaf.F90 @@ -16,10 +16,12 @@ !! SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) + USE PDAFlocal, & ! Routine to provide local indices to PDAF + ONLY: PDAFlocal_set_indices USE mod_model, & ! Model variables ONLY: ny USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l, id_lstate_in_pstate + ONLY: coords_l IMPLICIT NONE @@ -28,6 +30,9 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) INTEGER, INTENT(in) :: domain_p !< Current local analysis domain INTEGER, INTENT(out) :: dim_l !< Local state dimension +! *** local variables *** + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector + ! **************************************** ! *** Initialize local state dimension *** @@ -51,12 +56,15 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array - IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! Here the local domain is a single grid point and variable given by DOMAIN_P id_lstate_in_pstate(1) = domain_p - CALL PDAF_local_set_indices(dim_l, id_lstate_in_pstate) + ! Provide the index vector to PDAF + CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) + + ! Deallocate index array + DEALLOCATE(id_lstate_in_pstate) END SUBROUTINE init_dim_l_pdaf diff --git a/tutorial/online_2D_serialmodel/mod_assimilation.F90 b/tutorial/online_2D_serialmodel/mod_assimilation.F90 index e49ed406b..0e5d6cc05 100644 --- a/tutorial/online_2D_serialmodel/mod_assimilation.F90 +++ b/tutorial/online_2D_serialmodel/mod_assimilation.F90 @@ -28,7 +28,6 @@ MODULE mod_assimilation ! *** Variables specific for model setup *** REAL :: coords_l(2) !< Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector ! *** Variables to handle multiple fields in the state vector *** @@ -46,7 +45,7 @@ MODULE mod_assimilation ! Type variable holding field IDs in state vector TYPE(field_ids) :: id -!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate) +!$OMP THREADPRIVATE(coords_l) ! ----------------------------------------------------------------- @@ -71,18 +70,12 @@ MODULE mod_assimilation !< * (1) progress info !< * (2) add timings !< * (3) debugging output - INTEGER :: dim_ens !< Size of ensemble for SEIK/LSEIK/EnKF/ETKF \n - !< Number of EOFs to be used for SEEK + INTEGER :: dim_ens !< Size of ensemble INTEGER :: filtertype !< Select filter algorithm: - !< * SEEK (0), SEIK (1), EnKF (2), LSEIK (3), ETKF (4) + !< * SEIK (1), EnKF (2), LSEIK (3), ETKF (4) !< LETKF (5), ESTKF (6), LESTKF (7), NETF (9), LNETF (10) !< LKNETF (11), PF (12), GENOBS (100), 3DVAR (200) INTEGER :: subtype !< Subtype of filter algorithm - !< * SEEK: - !< (0) evolve normalized modes - !< (1) evolve scaled modes with unit U - !< (2) fixed basis (V); variable U matrix - !< (3) fixed covar matrix (V,U kept static) !< * SEIK: !< (0) ensemble forecast; new formulation !< (1) ensemble forecast; old formulation @@ -156,9 +149,6 @@ MODULE mod_assimilation !< (4) regulated localization of R with single-point error variance REAL :: sradius !< Support radius for 5th order polynomial !< or radius for 1/e for exponential weighting -! ! SEEK - INTEGER :: int_rediag !< Interval to perform re-diagonalization in SEEK - REAL :: epsilon !< Epsilon for gradient approx. in SEEK forecast ! ! ENKF INTEGER :: rank_ana_enkf !< Rank to be considered for inversion of HPH in analysis of EnKF !< (0) for analysis w/o eigendecomposition diff --git a/tutorial/online_2D_serialmodel_2fields/Makefile b/tutorial/online_2D_serialmodel_2fields/Makefile index e34d87d76..091ae63ed 100644 --- a/tutorial/online_2D_serialmodel_2fields/Makefile +++ b/tutorial/online_2D_serialmodel_2fields/Makefile @@ -66,11 +66,9 @@ OBJ_USER_GEN = init_ens_pdaf.o \ distribute_state_pdaf.o \ collect_state_pdaf.o -# User-supplied routines for state in localized analysis (LESTKF/LSEIK/LETKF) +# User-supplied routines for state in localized analysis (LESTKF/LSEIK/LETKF/LNETF/LKNETF) OBJ_USER_LOCAL = init_n_domains_pdaf.o \ - init_dim_l_pdaf.o \ - g2l_state_pdaf.o \ - l2g_state_pdaf.o + init_dim_l_pdaf.o # Full list of user-supplied routines for online mode OBJ_PDAF_USER = $(OBJ_USER_PDAFOMI) $(OBJ_PDAF_INT) $(OBJ_USER_GEN) $(OBJ_USER_LOCAL) diff --git a/tutorial/online_2D_serialmodel_2fields/assimilate_pdaf.F90 b/tutorial/online_2D_serialmodel_2fields/assimilate_pdaf.F90 index 6c24fd4c3..f6250c4bf 100644 --- a/tutorial/online_2D_serialmodel_2fields/assimilate_pdaf.F90 +++ b/tutorial/online_2D_serialmodel_2fields/assimilate_pdaf.F90 @@ -11,9 +11,11 @@ !! SUBROUTINE assimilate_pdaf() - USE pdaf_interfaces_module, & ! Interface definitions to PDAF core routines + USE PDAF_interfaces_module, & ! Interface definitions to PDAF core routines ONLY: PDAFomi_assimilate_local, PDAFomi_assimilate_global, & PDAFomi_assimilate_lenkf, PDAF_get_localfilter + USE PDAFlocal, & ! Interface definitions for PDAFlocal + ONLY: PDAFlocalomi_put_state USE mod_parallel_pdaf, & ! Parallelization variables ONLY: mype_world, abort_parallel USE mod_assimilation, & ! Variables for assimilation @@ -40,9 +42,7 @@ SUBROUTINE assimilate_pdaf() prepoststep_pdaf ! User supplied pre/poststep routine ! Localization of state vector EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains - init_dim_l_pdaf, & ! Initialize state dimension for local analysis domain - g2l_state_pdaf, & ! Get state on local analysis domain from global state - l2g_state_pdaf ! Update global state from state on local analysis domain + init_dim_l_pdaf ! Initialize state dimension for local analysis domain ! Interface to PDAF-OMI for local and global filters EXTERNAL :: init_dim_obs_pdafomi, & ! Get dimension of full obs. vector for PE-local domain obs_op_pdafomi, & ! Obs. operator for full obs. vector for PE-local domain @@ -60,10 +60,9 @@ SUBROUTINE assimilate_pdaf() ! Call assimilate routine for global or local filter IF (localfilter == 1) THEN ! Call generic OMI interface routine for domain-localized filters - CALL PDAFomi_assimilate_local(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAFlocalomi_assimilate(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdafomi, obs_op_pdafomi, prepoststep_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdafomi, g2l_state_pdaf, l2g_state_pdaf, & - next_observation_pdaf, status_pdaf) + init_dim_l_pdaf, init_dim_obs_l_pdafomi, next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 8) THEN ! LEnKF has its own OMI interface routine diff --git a/tutorial/online_2D_serialmodel_2fields/g2l_state_pdaf.F90 b/tutorial/online_2D_serialmodel_2fields/g2l_state_pdaf.F90 deleted file mode 100644 index 177740d1a..000000000 --- a/tutorial/online_2D_serialmodel_2fields/g2l_state_pdaf.F90 +++ /dev/null @@ -1,49 +0,0 @@ -!> Restrict a model state to a local analysis domain -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! before the analysis on a single local analysis -!! domain. It has to initialize elements of the -!! state vector for the local analysis domains from -!! the PE-local full state vector. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - INTEGER, INTENT(in) :: dim_l !< Local state dimension - REAL, INTENT(in) :: state_p(dim_p) !< PE-local full state vector - REAL, INTENT(out) :: state_l(dim_l) !< State vector on local analysis domain - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************* -! *** Initialize local state vector *** -! ************************************* - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_l(i) = state_p(id_lstate_in_pstate(i)) - END DO - -END SUBROUTINE g2l_state_pdaf diff --git a/tutorial/online_2D_serialmodel_2fields/init_dim_l_pdaf.F90 b/tutorial/online_2D_serialmodel_2fields/init_dim_l_pdaf.F90 index aa4912e7b..53f7b8eb7 100644 --- a/tutorial/online_2D_serialmodel_2fields/init_dim_l_pdaf.F90 +++ b/tutorial/online_2D_serialmodel_2fields/init_dim_l_pdaf.F90 @@ -16,10 +16,12 @@ !! SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) + USE PDAFlocal, & ! Routine to provide local indices to PDAF + ONLY: PDAFlocal_set_indices USE mod_model, & ! Model variables ONLY: ny USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l, id_lstate_in_pstate, n_fields, off_fields + ONLY: coords_l, n_fields, off_fields IMPLICIT NONE @@ -30,6 +32,7 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! *** local variables *** INTEGER :: i ! Counter + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector ! **************************************** @@ -54,7 +57,6 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array - IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! Here the local domain is a single grid point @@ -63,4 +65,10 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) id_lstate_in_pstate(i) = domain_p + off_fields(i) END DO + ! Provide the index vector to PDAF + CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) + + ! Deallocate index array + DEALLOCATE(id_lstate_in_pstate) + END SUBROUTINE init_dim_l_pdaf diff --git a/tutorial/online_2D_serialmodel_2fields/l2g_state_pdaf.F90 b/tutorial/online_2D_serialmodel_2fields/l2g_state_pdaf.F90 deleted file mode 100644 index 1a27e44f2..000000000 --- a/tutorial/online_2D_serialmodel_2fields/l2g_state_pdaf.F90 +++ /dev/null @@ -1,50 +0,0 @@ -!> Initialize full state from local analysis -!! -!! User-supplied call-back routine for PDAF. -!! -!! Used in the filters: LSEIK/LETKF/LESTKF/LNETF -!! -!! The routine is called during the loop over all -!! local analysis domains in PDAF_X_update -!! after the analysis and ensemble transformation -!! on a single local analysis domain. It has to -!! initialize elements of the PE-local full state -!! vector from the provided analysis state vector -!! on the local analysis domain. -!! -!! Generic implementation using index vector -!! ID_LSTATE_IN_PSTATE. -!! -!! __Revision history:__ -!! * 2013-02 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! -SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) - - USE mod_assimilation, & - ONLY: id_lstate_in_pstate - - IMPLICIT NONE - -! *** Arguments *** - INTEGER, INTENT(in) :: step !< Current time step - INTEGER, INTENT(in) :: domain_p !< Current local analysis domain - INTEGER, INTENT(in) :: dim_l !< Local state dimension - INTEGER, INTENT(in) :: dim_p !< PE-local full state dimension - REAL, INTENT(in) :: state_l(dim_l) !< State vector on local analysis domain - REAL, INTENT(inout) :: state_p(dim_p) !< PE-local full state vector - -! *** local variables *** - INTEGER :: i ! Counter - - -! ************************************************** -! *** Initialize elements of global state vector *** -! ************************************************** - - ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF - DO i = 1, dim_l - state_p(id_lstate_in_pstate(i)) = state_l(i) - END DO - -END SUBROUTINE l2g_state_pdaf diff --git a/tutorial/online_2D_serialmodel_2fields/mod_assimilation.F90 b/tutorial/online_2D_serialmodel_2fields/mod_assimilation.F90 index 62cc896c0..0e5d6cc05 100644 --- a/tutorial/online_2D_serialmodel_2fields/mod_assimilation.F90 +++ b/tutorial/online_2D_serialmodel_2fields/mod_assimilation.F90 @@ -28,9 +28,9 @@ MODULE mod_assimilation ! *** Variables specific for model setup *** REAL :: coords_l(2) !< Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector - ! Variables to handle multiple fields in the state vector +! *** Variables to handle multiple fields in the state vector *** + INTEGER :: n_fields !< number of fields in state vector INTEGER, ALLOCATABLE :: off_fields(:) !< Offsets of fields in state vector INTEGER, ALLOCATABLE :: dim_fields(:) !< Dimension of fields in state vector @@ -45,7 +45,7 @@ MODULE mod_assimilation ! Type variable holding field IDs in state vector TYPE(field_ids) :: id -!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate) +!$OMP THREADPRIVATE(coords_l) ! ----------------------------------------------------------------- @@ -70,18 +70,12 @@ MODULE mod_assimilation !< * (1) progress info !< * (2) add timings !< * (3) debugging output - INTEGER :: dim_ens !< Size of ensemble for SEIK/LSEIK/EnKF/ETKF \n - !< Number of EOFs to be used for SEEK + INTEGER :: dim_ens !< Size of ensemble INTEGER :: filtertype !< Select filter algorithm: - !< * SEEK (0), SEIK (1), EnKF (2), LSEIK (3), ETKF (4) + !< * SEIK (1), EnKF (2), LSEIK (3), ETKF (4) !< LETKF (5), ESTKF (6), LESTKF (7), NETF (9), LNETF (10) !< LKNETF (11), PF (12), GENOBS (100), 3DVAR (200) INTEGER :: subtype !< Subtype of filter algorithm - !< * SEEK: - !< (0) evolve normalized modes - !< (1) evolve scaled modes with unit U - !< (2) fixed basis (V); variable U matrix - !< (3) fixed covar matrix (V,U kept static) !< * SEIK: !< (0) ensemble forecast; new formulation !< (1) ensemble forecast; old formulation @@ -155,9 +149,6 @@ MODULE mod_assimilation !< (4) regulated localization of R with single-point error variance REAL :: sradius !< Support radius for 5th order polynomial !< or radius for 1/e for exponential weighting -! ! SEEK - INTEGER :: int_rediag !< Interval to perform re-diagonalization in SEEK - REAL :: epsilon !< Epsilon for gradient approx. in SEEK forecast ! ! ENKF INTEGER :: rank_ana_enkf !< Rank to be considered for inversion of HPH in analysis of EnKF !< (0) for analysis w/o eigendecomposition From 45192f8a6e0b97caf85aa10ec97afe5812ef75b2 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Wed, 28 Aug 2024 15:03:12 +0200 Subject: [PATCH 60/83] Add SEEK-specific variables --- .../offline_2D_serial/init_pdaf_info.F90 | 29 ++----------------- .../offline_2D_serial/init_pdaf_parse.F90 | 8 ++--- 2 files changed, 4 insertions(+), 33 deletions(-) diff --git a/tutorial/classical/offline_2D_serial/init_pdaf_info.F90 b/tutorial/classical/offline_2D_serial/init_pdaf_info.F90 index a19decc2a..094a7e66b 100644 --- a/tutorial/classical/offline_2D_serial/init_pdaf_info.F90 +++ b/tutorial/classical/offline_2D_serial/init_pdaf_info.F90 @@ -21,7 +21,7 @@ SUBROUTINE init_pdaf_info() ! !USES: USE mod_assimilation, & ! Variables for assimilation ONLY: filtertype, subtype, dim_ens, delt_obs, model_error, & - model_err_amp, forget, rank_ana_enkf, int_rediag + model_err_amp, forget, rank_ana_enkf IMPLICIT NONE @@ -34,32 +34,7 @@ SUBROUTINE init_pdaf_info() ! *** Initial Screen output *** ! ***************************** - IF (filtertype == 0) THEN - WRITE (*, '(/21x, a)') 'Filter: SEEK' - IF (subtype == 2) THEN - WRITE (*, '(6x, a)') '-- fixed basis filter with update of matrix U' - WRITE (*, '(6x, a)') '-- no re-diagonalization of VUV^T' - ELSE IF (subtype == 3) THEN - WRITE (*, '(6x, a)') '-- fixed basis filter & no update of matrix U' - WRITE (*, '(6x, a)') '-- no re-diagonalization of VUV^T' - ELSE IF (subtype == 5) THEN - WRITE (*, '(6x, a)') '-- Offline mode' - END IF - WRITE (*, '(13x, a, i5)') 'number of EOFs:', dim_ens - IF (subtype /= 5) WRITE (*, '(6x, a, i5)') 'Assimilation interval:', delt_obs - WRITE (*, '(10x, a, f5.2)') 'forgetting factor:', forget - IF (subtype /= 5) THEN - IF ((int_rediag > 0) .AND. ((subtype /= 2) .OR. (subtype /= 3))) & - WRITE (*, '(10x, a, i4, a)') & - 'Re-diag each ', int_rediag, '-th analysis step' - ELSE - IF (int_rediag == 1) THEN - WRITE (*, '(10x, a)') 'Perform re-diagonalization' - ELSE - WRITE (*, '(10x, a)') 'No re-diagonalization' - END IF - END IF - ELSE IF (filtertype == 1) THEN + IF (filtertype == 1) THEN WRITE (*, '(21x, a)') 'Filter: SEIK' IF (subtype == 2) THEN WRITE (*, '(6x, a)') '-- fixed error-space basis' diff --git a/tutorial/classical/offline_2D_serial/init_pdaf_parse.F90 b/tutorial/classical/offline_2D_serial/init_pdaf_parse.F90 index 7f2183d36..51fb6a164 100644 --- a/tutorial/classical/offline_2D_serial/init_pdaf_parse.F90 +++ b/tutorial/classical/offline_2D_serial/init_pdaf_parse.F90 @@ -23,8 +23,8 @@ SUBROUTINE init_pdaf_parse() USE mod_assimilation, & ! Variables for assimilation ONLY: screen, filtertype, subtype, dim_ens, delt_obs, & rms_obs, model_error, model_err_amp, incremental, type_forget, & - forget, epsilon, rank_ana_enkf, locweight, cradius, & - sradius, int_rediag, filename, type_trans, dim_obs, & + forget, rank_ana_enkf, locweight, cradius, & + sradius, filename, type_trans, dim_obs, & type_sqrt IMPLICIT NONE @@ -71,10 +71,6 @@ SUBROUTINE init_pdaf_parse() ! Filter-specific settings handle = 'type_trans' ! Type of ensemble transformation in SEIK/ETKF/LSEIK/LETKF CALL parse(handle, type_trans) - handle = 'epsilon' ! Set EPSILON for SEEK - CALL parse(handle, epsilon) - handle = 'int_rediag' ! Time step interval for rediagonalization in SEEK - CALL parse(handle, int_rediag) handle = 'rank_ana_enkf' ! Set rank for pseudo inverse in EnKF CALL parse(handle, rank_ana_enkf) handle = 'type_forget' ! Set type of forgetting factor From d0621afdeba86f5d919d26df1485f977a26ab723 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Wed, 28 Aug 2024 16:08:35 +0200 Subject: [PATCH 61/83] Revise computation of gaspari-Cohn. For the outermost 10% it is ensures that the computed value is not negative --- src/PDAF_correlation_function.F90 | 22 +++++++++++++++------- src/PDAF_local_weight.F90 | 12 ++++++++++-- 2 files changed, 25 insertions(+), 9 deletions(-) diff --git a/src/PDAF_correlation_function.F90 b/src/PDAF_correlation_function.F90 index 2339e5930..c8973a611 100644 --- a/src/PDAF_correlation_function.F90 +++ b/src/PDAF_correlation_function.F90 @@ -90,13 +90,21 @@ SUBROUTINE PDAF_correlation_function(ctype, length, distance, value) + 0.5 * (distance / shalf)**4 & + 5.0 / 8.0 * (distance / shalf)**3 & - 5.0 / 3.0 * (distance / shalf)**2 + 1.0 - ELSEIF (distance > length / 2.0 .AND. distance < length) THEN - value = 1.0 / 12.0 * (distance / shalf)**5 & - - 0.5 * (distance / shalf)**4 & - + 5.0 / 8.0 * (distance / shalf)**3 & - + 5.0 / 3.0 * (distance / shalf)**2 & - - 5.0 * (distance / shalf) & - + 4.0 - 2.0 / 3.0 * shalf / distance + ELSEIF (distance > sradius / 2.0 .AND. distance < sradius * 0.9) THEN + weight = 1.0 / 12.0 * (distance / cfaci)**5 & + - 0.5 * (distance / cfaci)**4 & + + 5.0 / 8.0 * (distance / cfaci)**3 & + + 5.0 / 3.0 * (distance / cfaci)**2 & + - 5.0 * (distance / cfaci) & + + 4.0 - 2.0 / 3.0 * cfaci / distance + ELSEIF (distance >= sradius * 0.9 .AND. distance < sradius) THEN + ! Ensure that weight is non-negative + weight = MAX(1.0 / 12.0 * (distance / cfaci)**5 & + - 0.5 * (distance / cfaci)**4 & + + 5.0 / 8.0 * (distance / cfaci)**3 & + + 5.0 / 3.0 * (distance / cfaci)**2 & + - 5.0 * (distance / cfaci) & + + 4.0 - 2.0 / 3.0 * cfaci / distance, 0.0) ELSE value = 0.0 ENDIF diff --git a/src/PDAF_local_weight.F90 b/src/PDAF_local_weight.F90 index 54747515c..a7a5cb724 100644 --- a/src/PDAF_local_weight.F90 +++ b/src/PDAF_local_weight.F90 @@ -154,18 +154,26 @@ SUBROUTINE PDAF_local_weight(wtype, rtype, cradius, sradius, distance, & cradnull: IF (cradius > 0.0 .and. sradius > 0.0) THEN cutoff: IF (distance <= cradius) THEN - IF (distance <= sradius / 2) THEN + IF (distance <= sradius / 2.0) THEN weight = -0.25 * (distance / cfaci)**5 & + 0.5 * (distance / cfaci)**4 & + 5.0 / 8.0 * (distance / cfaci)**3 & - 5.0 / 3.0 * (distance / cfaci)**2 + 1.0 - ELSEIF (distance > sradius / 2 .AND. distance < sradius) THEN + ELSEIF (distance > sradius / 2.0 .AND. distance < sradius * 0.9) THEN weight = 1.0 / 12.0 * (distance / cfaci)**5 & - 0.5 * (distance / cfaci)**4 & + 5.0 / 8.0 * (distance / cfaci)**3 & + 5.0 / 3.0 * (distance / cfaci)**2 & - 5.0 * (distance / cfaci) & + 4.0 - 2.0 / 3.0 * cfaci / distance + ELSEIF (distance >= sradius * 0.9 .AND. distance < sradius) THEN + ! Ensure that weight is non-negative + weight = MAX(1.0 / 12.0 * (distance / cfaci)**5 & + - 0.5 * (distance / cfaci)**4 & + + 5.0 / 8.0 * (distance / cfaci)**3 & + + 5.0 / 3.0 * (distance / cfaci)**2 & + - 5.0 * (distance / cfaci) & + + 4.0 - 2.0 / 3.0 * cfaci / distance, 0.0) ELSE weight = 0.0 ENDIF From f53983556ffaba78abb43c7aa299926db70fac9f Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Wed, 28 Aug 2024 16:18:21 +0200 Subject: [PATCH 62/83] Correction --- src/PDAF_correlation_function.F90 | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/src/PDAF_correlation_function.F90 b/src/PDAF_correlation_function.F90 index c8973a611..34d0f3ea8 100644 --- a/src/PDAF_correlation_function.F90 +++ b/src/PDAF_correlation_function.F90 @@ -90,21 +90,20 @@ SUBROUTINE PDAF_correlation_function(ctype, length, distance, value) + 0.5 * (distance / shalf)**4 & + 5.0 / 8.0 * (distance / shalf)**3 & - 5.0 / 3.0 * (distance / shalf)**2 + 1.0 - ELSEIF (distance > sradius / 2.0 .AND. distance < sradius * 0.9) THEN - weight = 1.0 / 12.0 * (distance / cfaci)**5 & - - 0.5 * (distance / cfaci)**4 & - + 5.0 / 8.0 * (distance / cfaci)**3 & - + 5.0 / 3.0 * (distance / cfaci)**2 & - - 5.0 * (distance / cfaci) & - + 4.0 - 2.0 / 3.0 * cfaci / distance - ELSEIF (distance >= sradius * 0.9 .AND. distance < sradius) THEN - ! Ensure that weight is non-negative - weight = MAX(1.0 / 12.0 * (distance / cfaci)**5 & - - 0.5 * (distance / cfaci)**4 & - + 5.0 / 8.0 * (distance / cfaci)**3 & - + 5.0 / 3.0 * (distance / cfaci)**2 & - - 5.0 * (distance / cfaci) & - + 4.0 - 2.0 / 3.0 * cfaci / distance, 0.0) + ELSEIF (distance > length / 2.0 .AND. distance < length * 0.9) THEN + value = 1.0 / 12.0 * (distance / shalf)**5 & + - 0.5 * (distance / shalf)**4 & + + 5.0 / 8.0 * (distance / shalf)**3 & + + 5.0 / 3.0 * (distance / shalf)**2 & + - 5.0 * (distance / shalf) & + + 4.0 - 2.0 / 3.0 * shalf / distance + ELSEIF (distance >= length * 0.9 .AND. distance < length) THEN + value = 1.0 / 12.0 * (distance / shalf)**5 & + - 0.5 * (distance / shalf)**4 & + + 5.0 / 8.0 * (distance / shalf)**3 & + + 5.0 / 3.0 * (distance / shalf)**2 & + - 5.0 * (distance / shalf) & + + 4.0 - 2.0 / 3.0 * shalf / distance ELSE value = 0.0 ENDIF From 4814b3c6e9334de8179c4233f466eeec32727320 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Wed, 28 Aug 2024 16:19:12 +0200 Subject: [PATCH 63/83] Revise timer output for PDAFlocal: the times for g2l_state and l2g_state are only shown if PDAFlocal is not used --- src/PDAF_3dvar_memtime.F90 | 8 ++++++-- src/PDAF_lestkf_memtime.F90 | 9 ++++++--- src/PDAF_letkf_memtime.F90 | 9 ++++++--- src/PDAF_lknetf_memtime.F90 | 9 ++++++--- src/PDAF_lnetf_memtime.F90 | 9 ++++++--- src/PDAF_lseik_memtime.F90 | 9 ++++++--- src/PDAFlocal.F90 | 3 +-- src/PDAFlocal_g2l_cb.F90 | 5 ++++- 8 files changed, 41 insertions(+), 20 deletions(-) diff --git a/src/PDAF_3dvar_memtime.F90 b/src/PDAF_3dvar_memtime.F90 index 3d8917576..0db4f2e09 100644 --- a/src/PDAF_3dvar_memtime.F90 +++ b/src/PDAF_3dvar_memtime.F90 @@ -45,6 +45,8 @@ SUBROUTINE PDAF_3dvar_memtime(printtype) ONLY: filterpe, mype_world, COMM_pdaf USE PDAFomi, & ONLY: omi_was_used + USE PDAFlocal, & + ONLY: pdaflocal_was_used IMPLICIT NONE @@ -157,8 +159,10 @@ SUBROUTINE PDAF_3dvar_memtime(printtype) WRITE (*, '(a, 12x, a)') 'PDAF', 'Timers in LESTKF only' WRITE (*, '(a, 14x, a, 9x, F11.3, 1x, a)') 'PDAF', 'init_n_domains_pdaf:', pdaf_time_tot(42), 's' WRITE (*, '(a, 14x, a, 13x, F11.3, 1x, a)') 'PDAF', 'init_dim_l_pdaf:', pdaf_time_tot(45), 's' - WRITE (*, '(a, 14x, a, 14x, F11.3, 1x, a)') 'PDAF', 'g2l_state_pdaf:', pdaf_time_tot(15), 's' - WRITE (*, '(a, 14x, a, 14x, F11.3, 1x, a)') 'PDAF', 'l2g_state_pdaf:', pdaf_time_tot(16), 's' + IF (.NOT.pdaflocal_was_used) THEN + WRITE (*, '(a, 14x, a, 14x, F11.3, 1x, a)') 'PDAF', 'g2l_state_pdaf:', pdaf_time_tot(15), 's' + WRITE (*, '(a, 14x, a, 14x, F11.3, 1x, a)') 'PDAF', 'l2g_state_pdaf:', pdaf_time_tot(16), 's' + END IF END IF END IF diff --git a/src/PDAF_lestkf_memtime.F90 b/src/PDAF_lestkf_memtime.F90 index e87014047..7db57178d 100644 --- a/src/PDAF_lestkf_memtime.F90 +++ b/src/PDAF_lestkf_memtime.F90 @@ -45,6 +45,8 @@ SUBROUTINE PDAF_lestkf_memtime(printtype) ONLY: filterpe, mype_world, COMM_pdaf USE PDAFomi, & ONLY: omi_was_used + USE PDAFlocal, & + ONLY: pdaflocal_was_used IMPLICIT NONE @@ -138,9 +140,10 @@ SUBROUTINE PDAF_lestkf_memtime(printtype) time_omi, 's' WRITE (*, '(a, 12x, a, 11x, F11.3, 1x, a)') 'PDAF', 'init_n_domains_pdaf:', pdaf_time_tot(42), 's' WRITE (*, '(a, 12x, a, 15x, F11.3, 1x, a)') 'PDAF', 'init_dim_l_pdaf:', pdaf_time_tot(45), 's' - WRITE (*, '(a, 12x, a, 16x, F11.3, 1x, a)') 'PDAF', 'g2l_state_pdaf:', pdaf_time_tot(15), 's' - WRITE (*, '(a, 12x, a, 16x, F11.3, 1x, a)') 'PDAF', 'l2g_state_pdaf:', pdaf_time_tot(16), 's' - + IF (.NOT.pdaflocal_was_used) THEN + WRITE (*, '(a, 12x, a, 16x, F11.3, 1x, a)') 'PDAF', 'g2l_state_pdaf:', pdaf_time_tot(15), 's' + WRITE (*, '(a, 12x, a, 16x, F11.3, 1x, a)') 'PDAF', 'l2g_state_pdaf:', pdaf_time_tot(16), 's' + END IF WRITE (*, '(a, 12x, a)') 'PDAF', 'Time in OMI observation module routines ' WRITE (*, '(a, 14x, a, 8x, F11.3, 1x, a)') 'PDAF', 'init_dim_obs_pdafomi:', pdaf_time_tot(43), 's' WRITE (*, '(a, 14x, a, 14x, F11.3, 1x, a)') 'PDAF', 'obs_op_pdafomi:', pdaf_time_tot(44), 's' diff --git a/src/PDAF_letkf_memtime.F90 b/src/PDAF_letkf_memtime.F90 index 4449b285a..8814fb2ce 100644 --- a/src/PDAF_letkf_memtime.F90 +++ b/src/PDAF_letkf_memtime.F90 @@ -45,6 +45,8 @@ SUBROUTINE PDAF_letkf_memtime(printtype) ONLY: filterpe, mype_world, COMM_pdaf USE PDAFomi, & ONLY: omi_was_used + USE PDAFlocal, & + ONLY: pdaflocal_was_used IMPLICIT NONE @@ -138,9 +140,10 @@ SUBROUTINE PDAF_letkf_memtime(printtype) time_omi, 's' WRITE (*, '(a, 12x, a, 11x, F11.3, 1x, a)') 'PDAF', 'init_n_domains_pdaf:', pdaf_time_tot(42), 's' WRITE (*, '(a, 12x, a, 15x, F11.3, 1x, a)') 'PDAF', 'init_dim_l_pdaf:', pdaf_time_tot(45), 's' - WRITE (*, '(a, 12x, a, 16x, F11.3, 1x, a)') 'PDAF', 'g2l_state_pdaf:', pdaf_time_tot(15), 's' - WRITE (*, '(a, 12x, a, 16x, F11.3, 1x, a)') 'PDAF', 'l2g_state_pdaf:', pdaf_time_tot(16), 's' - + IF (.NOT.pdaflocal_was_used) THEN + WRITE (*, '(a, 12x, a, 16x, F11.3, 1x, a)') 'PDAF', 'g2l_state_pdaf:', pdaf_time_tot(15), 's' + WRITE (*, '(a, 12x, a, 16x, F11.3, 1x, a)') 'PDAF', 'l2g_state_pdaf:', pdaf_time_tot(16), 's' + END IF WRITE (*, '(a, 12x, a)') 'PDAF', 'Time in OMI observation module routines ' WRITE (*, '(a, 14x, a, 8x, F11.3, 1x, a)') 'PDAF', 'init_dim_obs_pdafomi:', pdaf_time_tot(43), 's' WRITE (*, '(a, 14x, a, 14x, F11.3, 1x, a)') 'PDAF', 'obs_op_pdafomi:', pdaf_time_tot(44), 's' diff --git a/src/PDAF_lknetf_memtime.F90 b/src/PDAF_lknetf_memtime.F90 index c2c096fd9..a0519414a 100644 --- a/src/PDAF_lknetf_memtime.F90 +++ b/src/PDAF_lknetf_memtime.F90 @@ -45,6 +45,8 @@ SUBROUTINE PDAF_lknetf_memtime(printtype) ONLY: filterpe, mype_world, COMM_pdaf USE PDAFomi, & ONLY: omi_was_used + USE PDAFlocal, & + ONLY: pdaflocal_was_used IMPLICIT NONE @@ -138,9 +140,10 @@ SUBROUTINE PDAF_lknetf_memtime(printtype) time_omi, 's' WRITE (*, '(a, 12x, a, 11x, F11.3, 1x, a)') 'PDAF', 'init_n_domains_pdaf:', pdaf_time_tot(42), 's' WRITE (*, '(a, 12x, a, 15x, F11.3, 1x, a)') 'PDAF', 'init_dim_l_pdaf:', pdaf_time_tot(45), 's' - WRITE (*, '(a, 12x, a, 16x, F11.3, 1x, a)') 'PDAF', 'g2l_state_pdaf:', pdaf_time_tot(15), 's' - WRITE (*, '(a, 12x, a, 16x, F11.3, 1x, a)') 'PDAF', 'l2g_state_pdaf:', pdaf_time_tot(16), 's' - + IF (.NOT.pdaflocal_was_used) THEN + WRITE (*, '(a, 12x, a, 16x, F11.3, 1x, a)') 'PDAF', 'g2l_state_pdaf:', pdaf_time_tot(15), 's' + WRITE (*, '(a, 12x, a, 16x, F11.3, 1x, a)') 'PDAF', 'l2g_state_pdaf:', pdaf_time_tot(16), 's' + END IF WRITE (*, '(a, 12x, a)') 'PDAF', 'Time in OMI observation module routines ' WRITE (*, '(a, 14x, a, 8x, F11.3, 1x, a)') 'PDAF', 'init_dim_obs_pdafomi:', pdaf_time_tot(43), 's' WRITE (*, '(a, 14x, a, 14x, F11.3, 1x, a)') 'PDAF', 'obs_op_pdafomi:', pdaf_time_tot(44), 's' diff --git a/src/PDAF_lnetf_memtime.F90 b/src/PDAF_lnetf_memtime.F90 index 3fe415c54..d2ecdf680 100644 --- a/src/PDAF_lnetf_memtime.F90 +++ b/src/PDAF_lnetf_memtime.F90 @@ -45,6 +45,8 @@ SUBROUTINE PDAF_lnetf_memtime(printtype) ONLY: filterpe, mype_world, COMM_pdaf USE PDAFomi, & ONLY: omi_was_used + USE PDAFlocal, & + ONLY: pdaflocal_was_used IMPLICIT NONE @@ -137,9 +139,10 @@ SUBROUTINE PDAF_lnetf_memtime(printtype) time_omi, 's' WRITE (*, '(a, 12x, a, 11x, F11.3, 1x, a)') 'PDAF', 'init_n_domains_pdaf:', pdaf_time_tot(42), 's' WRITE (*, '(a, 12x, a, 15x, F11.3, 1x, a)') 'PDAF', 'init_dim_l_pdaf:', pdaf_time_tot(45), 's' - WRITE (*, '(a, 12x, a, 16x, F11.3, 1x, a)') 'PDAF', 'g2l_state_pdaf:', pdaf_time_tot(15), 's' - WRITE (*, '(a, 12x, a, 16x, F11.3, 1x, a)') 'PDAF', 'l2g_state_pdaf:', pdaf_time_tot(16), 's' - + IF (.NOT.pdaflocal_was_used) THEN + WRITE (*, '(a, 12x, a, 16x, F11.3, 1x, a)') 'PDAF', 'g2l_state_pdaf:', pdaf_time_tot(15), 's' + WRITE (*, '(a, 12x, a, 16x, F11.3, 1x, a)') 'PDAF', 'l2g_state_pdaf:', pdaf_time_tot(16), 's' + END IF WRITE (*, '(a, 12x, a)') 'PDAF', 'Time in OMI observation module routines ' WRITE (*, '(a, 14x, a, 8x, F11.3, 1x, a)') 'PDAF', 'init_dim_obs_pdafomi:', pdaf_time_tot(43), 's' WRITE (*, '(a, 14x, a, 14x, F11.3, 1x, a)') 'PDAF', 'obs_op_pdafomi:', pdaf_time_tot(44), 's' diff --git a/src/PDAF_lseik_memtime.F90 b/src/PDAF_lseik_memtime.F90 index f15fac364..8b398b056 100644 --- a/src/PDAF_lseik_memtime.F90 +++ b/src/PDAF_lseik_memtime.F90 @@ -45,6 +45,8 @@ SUBROUTINE PDAF_lseik_memtime(printtype) ONLY: filterpe, mype_world, COMM_pdaf USE PDAFomi, & ONLY: omi_was_used + USE PDAFlocal, & + ONLY: pdaflocal_was_used IMPLICIT NONE @@ -137,9 +139,10 @@ SUBROUTINE PDAF_lseik_memtime(printtype) time_omi, 's' WRITE (*, '(a, 12x, a, 11x, F11.3, 1x, a)') 'PDAF', 'init_n_domains_pdaf:', pdaf_time_tot(42), 's' WRITE (*, '(a, 12x, a, 15x, F11.3, 1x, a)') 'PDAF', 'init_dim_l_pdaf:', pdaf_time_tot(45), 's' - WRITE (*, '(a, 12x, a, 16x, F11.3, 1x, a)') 'PDAF', 'g2l_state_pdaf:', pdaf_time_tot(15), 's' - WRITE (*, '(a, 12x, a, 16x, F11.3, 1x, a)') 'PDAF', 'l2g_state_pdaf:', pdaf_time_tot(16), 's' - + IF (.NOT.pdaflocal_was_used) THEN + WRITE (*, '(a, 12x, a, 16x, F11.3, 1x, a)') 'PDAF', 'g2l_state_pdaf:', pdaf_time_tot(15), 's' + WRITE (*, '(a, 12x, a, 16x, F11.3, 1x, a)') 'PDAF', 'l2g_state_pdaf:', pdaf_time_tot(16), 's' + END IF WRITE (*, '(a, 12x, a)') 'PDAF', 'Time in OMI observation module routines' WRITE (*, '(a, 14x, a, 8x, F11.3, 1x, a)') 'PDAF', 'init_dim_obs_pdafomi:', pdaf_time_tot(43), 's' WRITE (*, '(a, 14x, a, 14x, F11.3, 1x, a)') 'PDAF', 'obs_op_pdafomi:', pdaf_time_tot(44), 's' diff --git a/src/PDAFlocal.F90 b/src/PDAFlocal.F90 index 850e64c14..7e70fc7a1 100644 --- a/src/PDAFlocal.F90 +++ b/src/PDAFlocal.F90 @@ -35,8 +35,6 @@ !! MODULE PDAFlocal -! USE PDAF_mod_filter, & -! ONLY: debug USE PDAFlocal_interfaces ! Interface defintions for put_state and assimilate routines IMPLICIT NONE @@ -44,6 +42,7 @@ MODULE PDAFlocal INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) !< Indices of local state vector in PE-local global state vector REAL, ALLOCATABLE :: l2g_weights(:) !< Increment weights applied in l2g_state + LOGICAL :: PDAFlocal_was_used = .FALSE. !< Flag whether PDAFlocal was used (set in PDAFlocal_g2l_cb) !$OMP THREADPRIVATE(id_lstate_in_pstate, l2g_weights) diff --git a/src/PDAFlocal_g2l_cb.F90 b/src/PDAFlocal_g2l_cb.F90 index cdcb1bc4f..e4ce65464 100644 --- a/src/PDAFlocal_g2l_cb.F90 +++ b/src/PDAFlocal_g2l_cb.F90 @@ -35,7 +35,7 @@ SUBROUTINE PDAFlocal_g2l_cb(step, domain_p, dim_p, state_p, dim_l, state_l) ! ! !USES: USE PDAFlocal, & - ONLY: id_lstate_in_pstate + ONLY: id_lstate_in_pstate, PDAFlocal_was_used IMPLICIT NONE @@ -59,6 +59,9 @@ SUBROUTINE PDAFlocal_g2l_cb(step, domain_p, dim_p, state_p, dim_l, state_l) ! *** Initialize local state vector *** ! ************************************* + ! Set flag that PDAFlocal was used + PDAFlocal_was_used = .TRUE. + DO i = 1, dim_l state_l(i) = state_p(id_lstate_in_pstate(i)) END DO From 0503adc764685027339ab1a749b6cb5451efbcf2 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Thu, 29 Aug 2024 14:32:36 +0200 Subject: [PATCH 64/83] Correction --- src/PDAF_correlation_function.F90 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/PDAF_correlation_function.F90 b/src/PDAF_correlation_function.F90 index 34d0f3ea8..523bc40c5 100644 --- a/src/PDAF_correlation_function.F90 +++ b/src/PDAF_correlation_function.F90 @@ -98,12 +98,12 @@ SUBROUTINE PDAF_correlation_function(ctype, length, distance, value) - 5.0 * (distance / shalf) & + 4.0 - 2.0 / 3.0 * shalf / distance ELSEIF (distance >= length * 0.9 .AND. distance < length) THEN - value = 1.0 / 12.0 * (distance / shalf)**5 & + value = MAX(1.0 / 12.0 * (distance / shalf)**5 & - 0.5 * (distance / shalf)**4 & + 5.0 / 8.0 * (distance / shalf)**3 & + 5.0 / 3.0 * (distance / shalf)**2 & - 5.0 * (distance / shalf) & - + 4.0 - 2.0 / 3.0 * shalf / distance + + 4.0 - 2.0 / 3.0 * shalf / distance, 0.0) ELSE value = 0.0 ENDIF From 20652e2c87b606f84d5d2278dce86a2454fb4109 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Fri, 30 Aug 2024 13:11:22 +0200 Subject: [PATCH 65/83] Adding routine PDAFomi_set_dim_obs_l which performs initializations of OMI-internal variables in user-supplied variants of PDAFomi_init_dim_obs_l --- src/PDAFomi_obs_l.F90 | 79 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/src/PDAFomi_obs_l.F90 b/src/PDAFomi_obs_l.F90 index 62142b6fa..ca08276d6 100644 --- a/src/PDAFomi_obs_l.F90 +++ b/src/PDAFomi_obs_l.F90 @@ -4331,4 +4331,83 @@ SUBROUTINE PDAFomi_dealloc() END SUBROUTINE PDAFomi_dealloc + +!------------------------------------------------------------------------------- +!> Initialization for dim_obs_l +!! +!! This routine initializes information on local observation vectors. +!! It is used by a user-supplied implementations of PDAFomi_init_dim_obs_l. +!! +!! The routine is called by all filter processes. +!! +!! __Revision history:__ +!! * 2024-08 - Lars Nerger - Initial code +!! * Later revisions - see repository log +!! + SUBROUTINE PDAFomi_set_dim_obs_l(thisobs_l, thisobs, cnt_obs_l_all, cnt_obs_l) + + IMPLICIT NONE + +! *** Arguments *** + TYPE(obs_f), INTENT(inout) :: thisobs !< Data type with full observation + TYPE(obs_l), TARGET, INTENT(inout) :: thisobs_l !< Data type with local observation + INTEGER, INTENT(inout) :: cnt_obs_l_all !< Local dimension of observation vector over all obs. types + INTEGER, INTENT(inout) :: cnt_obs_l !< Local dimension of single observation type vector + + ! Store ID of first observation type that calls the routine + ! This is reset in PDAFomi_deallocate_obs + IF (firstobs == 0) THEN + firstobs = thisobs%obsid + END IF + + ! Reset offset of currrent observation in overall local obs. vector + IF (thisobs%obsid == firstobs) THEN + offset_obs_l = 0 + cnt_obs_l_all = 0 + END IF + + ! Store offset + thisobs_l%off_obs_l = offset_obs_l + + ! Initialize pointer array + IF (thisobs%obsid == firstobs) THEN + IF (ALLOCATED(obs_l_all)) DEALLOCATE(obs_l_all) + ALLOCATE(obs_l_all(n_obstypes)) + END IF + + ! Set pointer to current observation + obs_l_all(thisobs%obsid)%ptr => thisobs_l + + ! Store local observation dimension and increment offset + thisobs_l%dim_obs_l = cnt_obs_l + offset_obs_l = offset_obs_l + cnt_obs_l + cnt_obs_l_all = cnt_obs_l_all + cnt_obs_l + + ! Allocate arrays to store information on local observations + IF (ALLOCATED(thisobs_l%id_obs_l)) DEALLOCATE(thisobs_l%id_obs_l) + IF (ALLOCATED(thisobs_l%distance_l)) DEALLOCATE(thisobs_l%distance_l) + IF (ALLOCATED(thisobs_l%cradius_l)) DEALLOCATE(thisobs_l%cradius_l) + IF (ALLOCATED(thisobs_l%sradius_l)) DEALLOCATE(thisobs_l%sradius_l) + + haveobs: IF (cnt_obs_l>0) THEN + ALLOCATE(thisobs_l%id_obs_l(cnt_obs_l)) + ALLOCATE(thisobs_l%distance_l(cnt_obs_l)) + ALLOCATE(thisobs_l%cradius_l(cnt_obs_l)) + ALLOCATE(thisobs_l%sradius_l(cnt_obs_l)) + IF (thisobs_l%locweight_v>0) THEN + IF (ALLOCATED(thisobs_l%dist_l_v)) DEALLOCATE(thisobs_l%dist_l_v) + ALLOCATE(thisobs_l%dist_l_v(cnt_obs_l)) + END IF + + ELSE + ALLOCATE(thisobs_l%id_obs_l(1)) + ALLOCATE(thisobs_l%distance_l(1)) + ALLOCATE(thisobs_l%cradius_l(1)) + ALLOCATE(thisobs_l%sradius_l(1)) + IF (ALLOCATED(thisobs_l%dist_l_v)) DEALLOCATE(thisobs_l%dist_l_v) + ALLOCATE(thisobs_l%dist_l_v(1)) + END IF haveobs + + END SUBROUTINE PDAFomi_set_dim_obs_l + END MODULE PDAFomi_obs_l From 1d007671ab20b2b21ea29d07afeb8f5a61910797 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Sat, 31 Aug 2024 09:46:50 +0200 Subject: [PATCH 66/83] Add rule 'Depends' to Makefile to update Depends file --- Depends | 842 +++++++++++++++++++++++++++---------------------------- Makefile | 4 + 2 files changed, 425 insertions(+), 421 deletions(-) diff --git a/Depends b/Depends index eabea45b2..dba44ede6 100644 --- a/Depends +++ b/Depends @@ -1,421 +1,421 @@ -$(OBJDIR)/PDAF_3dvar_alloc.o: ./src/PDAF_3dvar_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_3dvar_analysis_cvt.o: ./src/PDAF_3dvar_analysis_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h -$(OBJDIR)/PDAF_3dvar_costf_cg_cvt.o: ./src/PDAF_3dvar_costf_cg_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h -$(OBJDIR)/PDAF_3dvar_costf_cvt.o: ./src/PDAF_3dvar_costf_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h -$(OBJDIR)/PDAF_3dvar_init.o: ./src/PDAF_3dvar_init.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_3dvar_memtime.o: ./src/PDAF_3dvar_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAF_3dvar_optim_cg.o: ./src/PDAF_3dvar_optim_cg.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h -$(OBJDIR)/PDAF_3dvar_optim_cgplus.o: ./src/PDAF_3dvar_optim_cgplus.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_3dvar_optim_lbfgs.o: ./src/PDAF_3dvar_optim_lbfgs.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_3dvar_options.o: ./src/PDAF_3dvar_options.F90 -$(OBJDIR)/PDAF_3dvar_update.o: ./src/PDAF_3dvar_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_add_increment.o: ./src/PDAF_add_increment.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_alloc_filters.o: ./src/PDAF_alloc_filters.F90 -$(OBJDIR)/PDAF_allreduce.o: ./src/PDAF_allreduce.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_analysis_utils.o: ./src/PDAF_analysis_utils.F90 $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_assimilate_3dvar.o: ./src/PDAF_assimilate_3dvar.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_assimilate_en3dvar_estkf.o: ./src/PDAF_assimilate_en3dvar_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_assimilate_en3dvar_lestkf.o: ./src/PDAF_assimilate_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_assimilate_enkf.o: ./src/PDAF_assimilate_enkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_assimilate_enkf_si.o: ./src/PDAF_assimilate_enkf_si.F90 -$(OBJDIR)/PDAF_assimilate_estkf.o: ./src/PDAF_assimilate_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_assimilate_estkf_si.o: ./src/PDAF_assimilate_estkf_si.F90 -$(OBJDIR)/PDAF_assimilate_etkf.o: ./src/PDAF_assimilate_etkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_assimilate_etkf_si.o: ./src/PDAF_assimilate_etkf_si.F90 -$(OBJDIR)/PDAF_assimilate_hyb3dvar_estkf.o: ./src/PDAF_assimilate_hyb3dvar_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_assimilate_hyb3dvar_lestkf.o: ./src/PDAF_assimilate_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_assimilate_lenkf.o: ./src/PDAF_assimilate_lenkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_assimilate_lenkf_si.o: ./src/PDAF_assimilate_lenkf_si.F90 -$(OBJDIR)/PDAF_assimilate_lestkf.o: ./src/PDAF_assimilate_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_assimilate_lestkf_si.o: ./src/PDAF_assimilate_lestkf_si.F90 -$(OBJDIR)/PDAF_assimilate_letkf.o: ./src/PDAF_assimilate_letkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_assimilate_letkf_si.o: ./src/PDAF_assimilate_letkf_si.F90 -$(OBJDIR)/PDAF_assimilate_lknetf.o: ./src/PDAF_assimilate_lknetf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_assimilate_lknetf_si.o: ./src/PDAF_assimilate_lknetf_si.F90 -$(OBJDIR)/PDAF_assimilate_lnetf.o: ./src/PDAF_assimilate_lnetf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_assimilate_lnetf_si.o: ./src/PDAF_assimilate_lnetf_si.F90 -$(OBJDIR)/PDAF_assimilate_lseik.o: ./src/PDAF_assimilate_lseik.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_assimilate_lseik_si.o: ./src/PDAF_assimilate_lseik_si.F90 -$(OBJDIR)/PDAF_assimilate_netf.o: ./src/PDAF_assimilate_netf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_assimilate_netf_si.o: ./src/PDAF_assimilate_netf_si.F90 -$(OBJDIR)/PDAF_assimilate_pf.o: ./src/PDAF_assimilate_pf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_assimilate_pf_si.o: ./src/PDAF_assimilate_pf_si.F90 -$(OBJDIR)/PDAF_assimilate_prepost.o: ./src/PDAF_assimilate_prepost.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_assimilate_prepost_si.o: ./src/PDAF_assimilate_prepost_si.F90 -$(OBJDIR)/PDAF_assimilate_seek.o: ./src/PDAF_assimilate_seek.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_assimilate_seek_si.o: ./src/PDAF_assimilate_seek_si.F90 -$(OBJDIR)/PDAF_assimilate_seik.o: ./src/PDAF_assimilate_seik.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_assimilate_seik_si.o: ./src/PDAF_assimilate_seik_si.F90 -$(OBJDIR)/PDAF_communicate_ens.o: ./src/PDAF_communicate_ens.F90 $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h -$(OBJDIR)/PDAF_correlation_function.o: ./src/PDAF_correlation_function.F90 -$(OBJDIR)/PDAF_deallocate.o: ./src/PDAF_deallocate.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_diag_crps.o: ./src/PDAF_diag_crps.F90 $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/SANGOMA_quicksort.o ./src/typedefs.h -$(OBJDIR)/PDAF_diag_effsample.o: ./src/PDAF_diag_effsample.F90 -$(OBJDIR)/PDAF_diag_ensstats.o: ./src/PDAF_diag_ensstats.F90 ./src/typedefs.h -$(OBJDIR)/PDAF_diag_histogram.o: ./src/PDAF_diag_histogram.F90 ./src/typedefs.h -$(OBJDIR)/PDAF_en3dvar_analysis_cvt.o: ./src/PDAF_en3dvar_analysis_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h -$(OBJDIR)/PDAF_en3dvar_costf_cg_cvt.o: ./src/PDAF_en3dvar_costf_cg_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h -$(OBJDIR)/PDAF_en3dvar_costf_cvt.o: ./src/PDAF_en3dvar_costf_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h -$(OBJDIR)/PDAF_en3dvar_optim_cg.o: ./src/PDAF_en3dvar_optim_cg.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h -$(OBJDIR)/PDAF_en3dvar_optim_cgplus.o: ./src/PDAF_en3dvar_optim_cgplus.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_en3dvar_optim_lbfgs.o: ./src/PDAF_en3dvar_optim_lbfgs.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_en3dvar_update_estkf.o: ./src/PDAF_en3dvar_update_estkf.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_en3dvar_update_lestkf.o: ./src/PDAF_en3dvar_update_lestkf.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAF_enkf_Tleft.o: ./src/PDAF_enkf_Tleft.F90 $(OBJDIR)/PDAF_memcount.o -$(OBJDIR)/PDAF_enkf_alloc.o: ./src/PDAF_enkf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_enkf_analysis_rlm.o: ./src/PDAF_enkf_analysis_rlm.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h -$(OBJDIR)/PDAF_enkf_analysis_rsm.o: ./src/PDAF_enkf_analysis_rsm.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h -$(OBJDIR)/PDAF_enkf_gather_resid.o: ./src/PDAF_enkf_gather_resid.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_enkf_init.o: ./src/PDAF_enkf_init.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_enkf_memtime.o: ./src/PDAF_enkf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAF_enkf_obs_ensemble.o: ./src/PDAF_enkf_obs_ensemble.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h -$(OBJDIR)/PDAF_enkf_omega.o: ./src/PDAF_enkf_omega.F90 ./src/typedefs.h -$(OBJDIR)/PDAF_enkf_options.o: ./src/PDAF_enkf_options.F90 -$(OBJDIR)/PDAF_enkf_update.o: ./src/PDAF_enkf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_eofcovar.o: ./src/PDAF_eofcovar.F90 $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h -$(OBJDIR)/PDAF_estkf_AOmega.o: ./src/PDAF_estkf_AOmega.F90 $(OBJDIR)/PDAF_memcount.o -$(OBJDIR)/PDAF_estkf_OmegaA.o: ./src/PDAF_estkf_OmegaA.F90 $(OBJDIR)/PDAF_memcount.o -$(OBJDIR)/PDAF_estkf_alloc.o: ./src/PDAF_estkf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_estkf_analysis.o: ./src/PDAF_estkf_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h -$(OBJDIR)/PDAF_estkf_analysis_fixed.o: ./src/PDAF_estkf_analysis_fixed.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h -$(OBJDIR)/PDAF_estkf_init.o: ./src/PDAF_estkf_init.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_estkf_memtime.o: ./src/PDAF_estkf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAF_estkf_options.o: ./src/PDAF_estkf_options.F90 -$(OBJDIR)/PDAF_estkf_update.o: ./src/PDAF_estkf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_etkf_Tleft.o: ./src/PDAF_etkf_Tleft.F90 $(OBJDIR)/PDAF_memcount.o -$(OBJDIR)/PDAF_etkf_Tright.o: ./src/PDAF_etkf_Tright.F90 $(OBJDIR)/PDAF_memcount.o -$(OBJDIR)/PDAF_etkf_alloc.o: ./src/PDAF_etkf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_etkf_analysis.o: ./src/PDAF_etkf_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h -$(OBJDIR)/PDAF_etkf_analysis_T.o: ./src/PDAF_etkf_analysis_T.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h -$(OBJDIR)/PDAF_etkf_analysis_fixed.o: ./src/PDAF_etkf_analysis_fixed.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h -$(OBJDIR)/PDAF_etkf_init.o: ./src/PDAF_etkf_init.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_etkf_memtime.o: ./src/PDAF_etkf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAF_etkf_options.o: ./src/PDAF_etkf_options.F90 -$(OBJDIR)/PDAF_etkf_update.o: ./src/PDAF_etkf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_force_analysis.o: ./src/PDAF_force_analysis.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_gather_dim_obs_f.o: ./src/PDAF_gather_dim_obs_f.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_gather_obs_f.o: ./src/PDAF_gather_obs_f.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_gather_obs_f2.o: ./src/PDAF_gather_obs_f2.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_gather_obs_f2_flex.o: ./src/PDAF_gather_obs_f2_flex.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_gather_obs_f_flex.o: ./src/PDAF_gather_obs_f_flex.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_gen_obs.o: ./src/PDAF_gen_obs.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_generate_obs.o: ./src/PDAF_generate_obs.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_generate_obs_si.o: ./src/PDAF_generate_obs_si.F90 -$(OBJDIR)/PDAF_generate_rndmat.o: ./src/PDAF_generate_rndmat.F90 ./src/typedefs.h -$(OBJDIR)/PDAF_genobs_alloc.o: ./src/PDAF_genobs_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_genobs_init.o: ./src/PDAF_genobs_init.F90 -$(OBJDIR)/PDAF_genobs_options.o: ./src/PDAF_genobs_options.F90 -$(OBJDIR)/PDAF_get_assim_flag.o: ./src/PDAF_get_assim_flag.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_get_ensstats.o: ./src/PDAF_get_ensstats.F90 $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h -$(OBJDIR)/PDAF_get_globalobs.o: ./src/PDAF_get_globalobs.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_get_localfilter.o: ./src/PDAF_get_localfilter.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_get_memberid.o: ./src/PDAF_get_memberid.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_get_obsmemberid.o: ./src/PDAF_get_obsmemberid.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_get_smootherens.o: ./src/PDAF_get_smootherens.F90 $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h -$(OBJDIR)/PDAF_get_state.o: ./src/PDAF_get_state.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_get_state_si.o: ./src/PDAF_get_state_si.F90 -$(OBJDIR)/PDAF_hyb3dvar_analysis_cvt.o: ./src/PDAF_hyb3dvar_analysis_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h -$(OBJDIR)/PDAF_hyb3dvar_costf_cg_cvt.o: ./src/PDAF_hyb3dvar_costf_cg_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h -$(OBJDIR)/PDAF_hyb3dvar_costf_cvt.o: ./src/PDAF_hyb3dvar_costf_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h -$(OBJDIR)/PDAF_hyb3dvar_optim_cg.o: ./src/PDAF_hyb3dvar_optim_cg.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h -$(OBJDIR)/PDAF_hyb3dvar_optim_cgplus.o: ./src/PDAF_hyb3dvar_optim_cgplus.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_hyb3dvar_optim_lbfgs.o: ./src/PDAF_hyb3dvar_optim_lbfgs.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_hyb3dvar_update_estkf.o: ./src/PDAF_hyb3dvar_update_estkf.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_hyb3dvar_update_lestkf.o: ./src/PDAF_hyb3dvar_update_lestkf.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAF_incremental.o: ./src/PDAF_incremental.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_incremental_si.o: ./src/PDAF_incremental_si.F90 -$(OBJDIR)/PDAF_inflate_ens.o: ./src/PDAF_inflate_ens.F90 $(OBJDIR)/PDAF_memcount.o -$(OBJDIR)/PDAF_inflate_weights.o: ./src/PDAF_inflate_weights.F90 -$(OBJDIR)/PDAF_init.o: ./src/PDAF_init.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_init_filters.o: ./src/PDAF_init_filters.F90 $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_init_si.o: ./src/PDAF_init_si.F90 -$(OBJDIR)/PDAF_interfaces_module.o: ./src/PDAF_interfaces_module.F90 $(OBJDIR)/PDAFlocal_interfaces.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_lenkf_alloc.o: ./src/PDAF_lenkf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_lenkf_analysis_rsm.o: ./src/PDAF_lenkf_analysis_rsm.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h -$(OBJDIR)/PDAF_lenkf_init.o: ./src/PDAF_lenkf_init.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_lenkf_memtime.o: ./src/PDAF_lenkf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAF_lenkf_options.o: ./src/PDAF_lenkf_options.F90 -$(OBJDIR)/PDAF_lenkf_update.o: ./src/PDAF_lenkf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_lestkf_alloc.o: ./src/PDAF_lestkf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_lestkf_analysis.o: ./src/PDAF_lestkf_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h -$(OBJDIR)/PDAF_lestkf_analysis_fixed.o: ./src/PDAF_lestkf_analysis_fixed.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h -$(OBJDIR)/PDAF_lestkf_init.o: ./src/PDAF_lestkf_init.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_lestkf_memtime.o: ./src/PDAF_lestkf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAF_lestkf_options.o: ./src/PDAF_lestkf_options.F90 -$(OBJDIR)/PDAF_lestkf_update.o: ./src/PDAF_lestkf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_analysis_utils.o -$(OBJDIR)/PDAF_letkf_alloc.o: ./src/PDAF_letkf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_letkf_analysis.o: ./src/PDAF_letkf_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h -$(OBJDIR)/PDAF_letkf_analysis_T.o: ./src/PDAF_letkf_analysis_T.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h -$(OBJDIR)/PDAF_letkf_analysis_fixed.o: ./src/PDAF_letkf_analysis_fixed.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h -$(OBJDIR)/PDAF_letkf_init.o: ./src/PDAF_letkf_init.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_letkf_memtime.o: ./src/PDAF_letkf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAF_letkf_options.o: ./src/PDAF_letkf_options.F90 -$(OBJDIR)/PDAF_letkf_update.o: ./src/PDAF_letkf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_analysis_utils.o -$(OBJDIR)/PDAF_lknetf_alloc.o: ./src/PDAF_lknetf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_lknetf_alpha_neff.o: ./src/PDAF_lknetf_alpha_neff.F90 -$(OBJDIR)/PDAF_lknetf_ana_letkfT.o: ./src/PDAF_lknetf_ana_letkfT.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h -$(OBJDIR)/PDAF_lknetf_ana_lnetf.o: ./src/PDAF_lknetf_ana_lnetf.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h -$(OBJDIR)/PDAF_lknetf_analysis_T.o: ./src/PDAF_lknetf_analysis_T.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h -$(OBJDIR)/PDAF_lknetf_compute_gamma.o: ./src/PDAF_lknetf_compute_gamma.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h -$(OBJDIR)/PDAF_lknetf_init.o: ./src/PDAF_lknetf_init.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_lknetf_memtime.o: ./src/PDAF_lknetf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAF_lknetf_options.o: ./src/PDAF_lknetf_options.F90 -$(OBJDIR)/PDAF_lknetf_reset_gamma.o: ./src/PDAF_lknetf_reset_gamma.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_lknetf_set_gamma.o: ./src/PDAF_lknetf_set_gamma.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h -$(OBJDIR)/PDAF_lknetf_step_update.o: ./src/PDAF_lknetf_step_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h -$(OBJDIR)/PDAF_lknetf_update.o: ./src/PDAF_lknetf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h -$(OBJDIR)/PDAF_lnetf_alloc.o: ./src/PDAF_lnetf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_lnetf_analysis.o: ./src/PDAF_lnetf_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h -$(OBJDIR)/PDAF_lnetf_init.o: ./src/PDAF_lnetf_init.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_lnetf_memtime.o: ./src/PDAF_lnetf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAF_lnetf_options.o: ./src/PDAF_lnetf_options.F90 -$(OBJDIR)/PDAF_lnetf_smootherT.o: ./src/PDAF_lnetf_smootherT.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_lnetf_update.o: ./src/PDAF_lnetf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h -$(OBJDIR)/PDAF_local_weight.o: ./src/PDAF_local_weight.F90 -$(OBJDIR)/PDAF_local_weights.o: ./src/PDAF_local_weights.F90 -$(OBJDIR)/PDAF_lseik_alloc.o: ./src/PDAF_lseik_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_lseik_analysis.o: ./src/PDAF_lseik_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h -$(OBJDIR)/PDAF_lseik_analysis_trans.o: ./src/PDAF_lseik_analysis_trans.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h -$(OBJDIR)/PDAF_lseik_init.o: ./src/PDAF_lseik_init.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_lseik_memtime.o: ./src/PDAF_lseik_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAF_lseik_options.o: ./src/PDAF_lseik_options.F90 -$(OBJDIR)/PDAF_lseik_resample.o: ./src/PDAF_lseik_resample.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_lseik_update.o: ./src/PDAF_lseik_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_analysis_utils.o -$(OBJDIR)/PDAF_memcount.o: ./src/PDAF_memcount.F90 ./src/typedefs.h -$(OBJDIR)/PDAF_mod_filter.o: ./src/PDAF_mod_filter.F90 -$(OBJDIR)/PDAF_mod_filtermpi.o: ./src/PDAF_mod_filtermpi.F90 -$(OBJDIR)/PDAF_mod_lnetf.o: ./src/PDAF_mod_lnetf.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_mvnormalize.o: ./src/PDAF_mvnormalize.F90 ./src/typedefs.h -$(OBJDIR)/PDAF_netf_alloc.o: ./src/PDAF_netf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_netf_analysis.o: ./src/PDAF_netf_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h -$(OBJDIR)/PDAF_netf_init.o: ./src/PDAF_netf_init.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_netf_memtime.o: ./src/PDAF_netf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAF_netf_options.o: ./src/PDAF_netf_options.F90 -$(OBJDIR)/PDAF_netf_smootherT.o: ./src/PDAF_netf_smootherT.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_netf_update.o: ./src/PDAF_netf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_options_filters.o: ./src/PDAF_options_filters.F90 $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_pf_add_noise.o: ./src/PDAF_pf_add_noise.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_pf_alloc.o: ./src/PDAF_pf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_pf_analysis.o: ./src/PDAF_pf_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h -$(OBJDIR)/PDAF_pf_init.o: ./src/PDAF_pf_init.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_pf_memtime.o: ./src/PDAF_pf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAF_pf_options.o: ./src/PDAF_pf_options.F90 -$(OBJDIR)/PDAF_pf_resampling.o: ./src/PDAF_pf_resampling.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_pf_update.o: ./src/PDAF_pf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_prepost.o: ./src/PDAF_prepost.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_prepost_si.o: ./src/PDAF_prepost_si.F90 -$(OBJDIR)/PDAF_print_info.o: ./src/PDAF_print_info.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_print_version.o: ./src/PDAF_print_version.F90 $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_put_state_3dvar.o: ./src/PDAF_put_state_3dvar.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_put_state_en3dvar_estkf.o: ./src/PDAF_put_state_en3dvar_estkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_put_state_en3dvar_lestkf.o: ./src/PDAF_put_state_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_put_state_enkf.o: ./src/PDAF_put_state_enkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_put_state_enkf_si.o: ./src/PDAF_put_state_enkf_si.F90 -$(OBJDIR)/PDAF_put_state_estkf.o: ./src/PDAF_put_state_estkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_put_state_estkf_si.o: ./src/PDAF_put_state_estkf_si.F90 -$(OBJDIR)/PDAF_put_state_etkf.o: ./src/PDAF_put_state_etkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_put_state_etkf_si.o: ./src/PDAF_put_state_etkf_si.F90 -$(OBJDIR)/PDAF_put_state_generate_obs.o: ./src/PDAF_put_state_generate_obs.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_put_state_generate_obs_si.o: ./src/PDAF_put_state_generate_obs_si.F90 -$(OBJDIR)/PDAF_put_state_hyb3dvar_estkf.o: ./src/PDAF_put_state_hyb3dvar_estkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_put_state_hyb3dvar_lestkf.o: ./src/PDAF_put_state_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_put_state_lenkf.o: ./src/PDAF_put_state_lenkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_put_state_lenkf_si.o: ./src/PDAF_put_state_lenkf_si.F90 -$(OBJDIR)/PDAF_put_state_lestkf.o: ./src/PDAF_put_state_lestkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_put_state_lestkf_si.o: ./src/PDAF_put_state_lestkf_si.F90 -$(OBJDIR)/PDAF_put_state_letkf.o: ./src/PDAF_put_state_letkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_put_state_letkf_si.o: ./src/PDAF_put_state_letkf_si.F90 -$(OBJDIR)/PDAF_put_state_lknetf.o: ./src/PDAF_put_state_lknetf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_put_state_lknetf_si.o: ./src/PDAF_put_state_lknetf_si.F90 -$(OBJDIR)/PDAF_put_state_lnetf.o: ./src/PDAF_put_state_lnetf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_put_state_lnetf_si.o: ./src/PDAF_put_state_lnetf_si.F90 -$(OBJDIR)/PDAF_put_state_lseik.o: ./src/PDAF_put_state_lseik.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_put_state_lseik_si.o: ./src/PDAF_put_state_lseik_si.F90 -$(OBJDIR)/PDAF_put_state_netf.o: ./src/PDAF_put_state_netf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_put_state_netf_si.o: ./src/PDAF_put_state_netf_si.F90 -$(OBJDIR)/PDAF_put_state_pf.o: ./src/PDAF_put_state_pf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_put_state_pf_si.o: ./src/PDAF_put_state_pf_si.F90 -$(OBJDIR)/PDAF_put_state_prepost.o: ./src/PDAF_put_state_prepost.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_put_state_prepost_si.o: ./src/PDAF_put_state_prepost_si.F90 -$(OBJDIR)/PDAF_put_state_seek.o: ./src/PDAF_put_state_seek.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_put_state_seek_si.o: ./src/PDAF_put_state_seek_si.F90 -$(OBJDIR)/PDAF_put_state_seik.o: ./src/PDAF_put_state_seik.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_put_state_seik_si.o: ./src/PDAF_put_state_seik_si.F90 -$(OBJDIR)/PDAF_reset_dim_p.o: ./src/PDAF_reset_dim_p.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_reset_forget.o: ./src/PDAF_reset_forget.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_sampleens.o: ./src/PDAF_sampleens.F90 $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h -$(OBJDIR)/PDAF_seek_alloc.o: ./src/PDAF_seek_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_seek_analysis.o: ./src/PDAF_seek_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_seek_init.o: ./src/PDAF_seek_init.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_seek_memtime.o: ./src/PDAF_seek_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_seek_options.o: ./src/PDAF_seek_options.F90 -$(OBJDIR)/PDAF_seek_rediag.o: ./src/PDAF_seek_rediag.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_seek_update.o: ./src/PDAF_seek_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_seik_TtimesA.o: ./src/PDAF_seik_TtimesA.F90 $(OBJDIR)/PDAF_memcount.o -$(OBJDIR)/PDAF_seik_alloc.o: ./src/PDAF_seik_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_seik_analysis.o: ./src/PDAF_seik_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h -$(OBJDIR)/PDAF_seik_analysis_newT.o: ./src/PDAF_seik_analysis_newT.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h -$(OBJDIR)/PDAF_seik_analysis_trans.o: ./src/PDAF_seik_analysis_trans.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h -$(OBJDIR)/PDAF_seik_init.o: ./src/PDAF_seik_init.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_seik_matrixT.o: ./src/PDAF_seik_matrixT.F90 $(OBJDIR)/PDAF_memcount.o -$(OBJDIR)/PDAF_seik_memtime.o: ./src/PDAF_seik_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAF_seik_omega.o: ./src/PDAF_seik_omega.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_seik_options.o: ./src/PDAF_seik_options.F90 -$(OBJDIR)/PDAF_seik_resample.o: ./src/PDAF_seik_resample.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_seik_resample_newT.o: ./src/PDAF_seik_resample_newT.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_seik_uinv.o: ./src/PDAF_seik_uinv.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_seik_update.o: ./src/PDAF_seik_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_set_comm_pdaf.o: ./src/PDAF_set_comm_pdaf.F90 $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_set_debug_flag.o: ./src/PDAF_set_debug_flag.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_set_ens_pointer.o: ./src/PDAF_set_ens_pointer.F90 $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h -$(OBJDIR)/PDAF_set_forget.o: ./src/PDAF_set_forget.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_set_forget_local.o: ./src/PDAF_set_forget_local.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAF_set_memberid.o: ./src/PDAF_set_memberid.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_set_offline_mode.o: ./src/PDAF_set_offline_mode.F90 $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAF_set_smootherens.o: ./src/PDAF_set_smootherens.F90 $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h -$(OBJDIR)/PDAF_smoother.o: ./src/PDAF_smoother.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_smoother_enkf.o: ./src/PDAF_smoother_enkf.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_smoother_lnetf.o: ./src/PDAF_smoother_lnetf.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_smoother_local.o: ./src/PDAF_smoother_local.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_smoother_netf.o: ./src/PDAF_smoother_netf.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_smoother_shift.o: ./src/PDAF_smoother_shift.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h -$(OBJDIR)/PDAF_timer.o: ./src/PDAF_timer.F90 -$(OBJDIR)/PDAF_timer_mpi.o: ./src/PDAF_timer_mpi.F90 -$(OBJDIR)/PDAFlocal.o: ./src/PDAFlocal.F90 $(OBJDIR)/PDAFlocal_interfaces.o -$(OBJDIR)/PDAFlocal_assimilate_en3dvar_lestkf.o: ./src/PDAFlocal_assimilate_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAFlocal_assimilate_hyb3dvar_lestkf.o: ./src/PDAFlocal_assimilate_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAFlocal_assimilate_lestkf.o: ./src/PDAFlocal_assimilate_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAFlocal_assimilate_lestkf_si.o: ./src/PDAFlocal_assimilate_lestkf_si.F90 -$(OBJDIR)/PDAFlocal_assimilate_letkf.o: ./src/PDAFlocal_assimilate_letkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAFlocal_assimilate_letkf_si.o: ./src/PDAFlocal_assimilate_letkf_si.F90 -$(OBJDIR)/PDAFlocal_assimilate_lknetf.o: ./src/PDAFlocal_assimilate_lknetf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAFlocal_assimilate_lknetf_si.o: ./src/PDAFlocal_assimilate_lknetf_si.F90 -$(OBJDIR)/PDAFlocal_assimilate_lnetf.o: ./src/PDAFlocal_assimilate_lnetf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAFlocal_assimilate_lnetf_si.o: ./src/PDAFlocal_assimilate_lnetf_si.F90 -$(OBJDIR)/PDAFlocal_assimilate_lseik.o: ./src/PDAFlocal_assimilate_lseik.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAFlocal_assimilate_lseik_si.o: ./src/PDAFlocal_assimilate_lseik_si.F90 -$(OBJDIR)/PDAFlocal_clear_increment_weights.o: ./src/PDAFlocal_clear_increment_weights.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFlocal.o -$(OBJDIR)/PDAFlocal_g2l_cb.o: ./src/PDAFlocal_g2l_cb.F90 $(OBJDIR)/PDAFlocal.o -$(OBJDIR)/PDAFlocal_interfaces.o: ./src/PDAFlocal_interfaces.F90 ./src/typedefs.h -$(OBJDIR)/PDAFlocal_l2g_cb.o: ./src/PDAFlocal_l2g_cb.F90 $(OBJDIR)/PDAFlocal.o -$(OBJDIR)/PDAFlocal_put_state_en3dvar_lestkf.o: ./src/PDAFlocal_put_state_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFlocal.o -$(OBJDIR)/PDAFlocal_put_state_hyb3dvar_lestkf.o: ./src/PDAFlocal_put_state_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFlocal.o -$(OBJDIR)/PDAFlocal_put_state_lestkf.o: ./src/PDAFlocal_put_state_lestkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFlocal.o -$(OBJDIR)/PDAFlocal_put_state_lestkf_si.o: ./src/PDAFlocal_put_state_lestkf_si.F90 -$(OBJDIR)/PDAFlocal_put_state_letkf.o: ./src/PDAFlocal_put_state_letkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFlocal.o -$(OBJDIR)/PDAFlocal_put_state_letkf_si.o: ./src/PDAFlocal_put_state_letkf_si.F90 -$(OBJDIR)/PDAFlocal_put_state_lknetf.o: ./src/PDAFlocal_put_state_lknetf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFlocal.o -$(OBJDIR)/PDAFlocal_put_state_lknetf_si.o: ./src/PDAFlocal_put_state_lknetf_si.F90 -$(OBJDIR)/PDAFlocal_put_state_lnetf.o: ./src/PDAFlocal_put_state_lnetf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFlocal.o -$(OBJDIR)/PDAFlocal_put_state_lnetf_si.o: ./src/PDAFlocal_put_state_lnetf_si.F90 -$(OBJDIR)/PDAFlocal_put_state_lseik.o: ./src/PDAFlocal_put_state_lseik.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFlocal.o -$(OBJDIR)/PDAFlocal_put_state_lseik_si.o: ./src/PDAFlocal_put_state_lseik_si.F90 -$(OBJDIR)/PDAFlocal_set_increment_weights.o: ./src/PDAFlocal_set_increment_weights.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFlocal.o -$(OBJDIR)/PDAFlocal_set_indices.o: ./src/PDAFlocal_set_indices.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFlocal.o -$(OBJDIR)/PDAFlocalomi_assimilate.o: ./src/PDAFlocalomi_assimilate.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFlocalomi_assimilate_en3dvar_lestkf.o: ./src/PDAFlocalomi_assimilate_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.o: ./src/PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFlocalomi_assimilate_hyb3dvar_lestkf.o: ./src/PDAFlocalomi_assimilate_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.o: ./src/PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFlocalomi_assimilate_lknetf_nondiagR.o: ./src/PDAFlocalomi_assimilate_lknetf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFlocalomi_assimilate_lknetf_nondiagR_si.o: ./src/PDAFlocalomi_assimilate_lknetf_nondiagR_si.F90 -$(OBJDIR)/PDAFlocalomi_assimilate_lnetf_nondiagR.o: ./src/PDAFlocalomi_assimilate_lnetf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFlocalomi_assimilate_lnetf_nondiagR_si.o: ./src/PDAFlocalomi_assimilate_lnetf_nondiagR_si.F90 -$(OBJDIR)/PDAFlocalomi_assimilate_nondiagR.o: ./src/PDAFlocalomi_assimilate_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFlocalomi_assimilate_nondiagR_si.o: ./src/PDAFlocalomi_assimilate_nondiagR_si.F90 -$(OBJDIR)/PDAFlocalomi_assimilate_si.o: ./src/PDAFlocalomi_assimilate_si.F90 -$(OBJDIR)/PDAFlocalomi_put_state.o: ./src/PDAFlocalomi_put_state.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFlocalomi_put_state_en3dvar_lestkf.o: ./src/PDAFlocalomi_put_state_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR.o: ./src/PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFlocalomi_put_state_hyb3dvar_lestkf.o: ./src/PDAFlocalomi_put_state_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR.o: ./src/PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFlocalomi_put_state_lknetf_nondiagR.o: ./src/PDAFlocalomi_put_state_lknetf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFlocalomi_put_state_lknetf_nondiagR_si.o: ./src/PDAFlocalomi_put_state_lknetf_nondiagR_si.F90 -$(OBJDIR)/PDAFlocalomi_put_state_lnetf_nondiagR.o: ./src/PDAFlocalomi_put_state_lnetf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFlocalomi_put_state_lnetf_nondiagR_si.o: ./src/PDAFlocalomi_put_state_lnetf_nondiagR_si.F90 -$(OBJDIR)/PDAFlocalomi_put_state_nondiagR.o: ./src/PDAFlocalomi_put_state_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFlocalomi_put_state_nondiagR_si.o: ./src/PDAFlocalomi_put_state_nondiagR_si.F90 -$(OBJDIR)/PDAFlocalomi_put_state_si.o: ./src/PDAFlocalomi_put_state_si.F90 -$(OBJDIR)/PDAFomi.o: ./src/PDAFomi.F90 $(OBJDIR)/PDAFomi_obs_f.o $(OBJDIR)/PDAFomi_obs_l.o $(OBJDIR)/PDAFomi_obs_op.o -$(OBJDIR)/PDAFomi_assimilate_3dvar.o: ./src/PDAFomi_assimilate_3dvar.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_assimilate_3dvar_nondiagR.o: ./src/PDAFomi_assimilate_3dvar_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_assimilate_en3dvar_estkf.o: ./src/PDAFomi_assimilate_en3dvar_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_assimilate_en3dvar_estkf_nondiagR.o: ./src/PDAFomi_assimilate_en3dvar_estkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_assimilate_en3dvar_lestkf.o: ./src/PDAFomi_assimilate_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_assimilate_en3dvar_lestkf_nondiagR.o: ./src/PDAFomi_assimilate_en3dvar_lestkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_assimilate_enkf_nondiagR.o: ./src/PDAFomi_assimilate_enkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_assimilate_enkf_nondiagR_si.o: ./src/PDAFomi_assimilate_enkf_nondiagR_si.F90 -$(OBJDIR)/PDAFomi_assimilate_global.o: ./src/PDAFomi_assimilate_global.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_assimilate_global_nondiagR.o: ./src/PDAFomi_assimilate_global_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_assimilate_global_nondiagR_si.o: ./src/PDAFomi_assimilate_global_nondiagR_si.F90 -$(OBJDIR)/PDAFomi_assimilate_global_si.o: ./src/PDAFomi_assimilate_global_si.F90 -$(OBJDIR)/PDAFomi_assimilate_hyb3dvar_estkf.o: ./src/PDAFomi_assimilate_hyb3dvar_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_assimilate_hyb3dvar_estkf_nondiagR.o: ./src/PDAFomi_assimilate_hyb3dvar_estkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_assimilate_hyb3dvar_lestkf.o: ./src/PDAFomi_assimilate_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR.o: ./src/PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_assimilate_lenkf.o: ./src/PDAFomi_assimilate_lenkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_assimilate_lenkf_nondiagR.o: ./src/PDAFomi_assimilate_lenkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_assimilate_lenkf_nondiagR_si.o: ./src/PDAFomi_assimilate_lenkf_nondiagR_si.F90 -$(OBJDIR)/PDAFomi_assimilate_lenkf_si.o: ./src/PDAFomi_assimilate_lenkf_si.F90 -$(OBJDIR)/PDAFomi_assimilate_lknetf_nondiagR.o: ./src/PDAFomi_assimilate_lknetf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_assimilate_lknetf_nondiagR_si.o: ./src/PDAFomi_assimilate_lknetf_nondiagR_si.F90 -$(OBJDIR)/PDAFomi_assimilate_lnetf_nondiagR.o: ./src/PDAFomi_assimilate_lnetf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_assimilate_lnetf_nondiagR_si.o: ./src/PDAFomi_assimilate_lnetf_nondiagR_si.F90 -$(OBJDIR)/PDAFomi_assimilate_local.o: ./src/PDAFomi_assimilate_local.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_assimilate_local_nondiagR.o: ./src/PDAFomi_assimilate_local_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_assimilate_local_nondiagR_si.o: ./src/PDAFomi_assimilate_local_nondiagR_si.F90 -$(OBJDIR)/PDAFomi_assimilate_local_si.o: ./src/PDAFomi_assimilate_local_si.F90 -$(OBJDIR)/PDAFomi_assimilate_nonlin_nondiagR.o: ./src/PDAFomi_assimilate_nonlin_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_assimilate_nonlin_nondiagR_si.o: ./src/PDAFomi_assimilate_nonlin_nondiagR_si.F90 -$(OBJDIR)/PDAFomi_callback.o: ./src/PDAFomi_callback.F90 $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o -$(OBJDIR)/PDAFomi_generate_obs.o: ./src/PDAFomi_generate_obs.F90 $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_obs_f.o: ./src/PDAFomi_obs_f.F90 $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h -$(OBJDIR)/PDAFomi_obs_l.o: ./src/PDAFomi_obs_l.F90 $(OBJDIR)/PDAFomi_obs_f.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAFomi_obs_op.o: ./src/PDAFomi_obs_op.F90 $(OBJDIR)/PDAFomi_obs_f.o -$(OBJDIR)/PDAFomi_put_state_3dvar.o: ./src/PDAFomi_put_state_3dvar.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_put_state_3dvar_nondiagR.o: ./src/PDAFomi_put_state_3dvar_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_put_state_en3dvar_estkf.o: ./src/PDAFomi_put_state_en3dvar_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_put_state_en3dvar_estkf_nondiagR.o: ./src/PDAFomi_put_state_en3dvar_estkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_put_state_en3dvar_lestkf.o: ./src/PDAFomi_put_state_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_put_state_en3dvar_lestkf_nondiagR.o: ./src/PDAFomi_put_state_en3dvar_lestkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_put_state_enkf_nondiagR.o: ./src/PDAFomi_put_state_enkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_put_state_enkf_nondiagR_si.o: ./src/PDAFomi_put_state_enkf_nondiagR_si.F90 -$(OBJDIR)/PDAFomi_put_state_generate_obs.o: ./src/PDAFomi_put_state_generate_obs.F90 $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_put_state_global.o: ./src/PDAFomi_put_state_global.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_put_state_global_nondiagR.o: ./src/PDAFomi_put_state_global_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_put_state_global_nondiagR_si.o: ./src/PDAFomi_put_state_global_nondiagR_si.F90 -$(OBJDIR)/PDAFomi_put_state_global_si.o: ./src/PDAFomi_put_state_global_si.F90 -$(OBJDIR)/PDAFomi_put_state_hyb3dvar_estkf.o: ./src/PDAFomi_put_state_hyb3dvar_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_put_state_hyb3dvar_estkf_nondiagR.o: ./src/PDAFomi_put_state_hyb3dvar_estkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_put_state_hyb3dvar_lestkf.o: ./src/PDAFomi_put_state_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.o: ./src/PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_put_state_lenkf.o: ./src/PDAFomi_put_state_lenkf.F90 $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_put_state_lenkf_nondiagR.o: ./src/PDAFomi_put_state_lenkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_put_state_lenkf_nondiagR_si.o: ./src/PDAFomi_put_state_lenkf_nondiagR_si.F90 -$(OBJDIR)/PDAFomi_put_state_lenkf_si.o: ./src/PDAFomi_put_state_lenkf_si.F90 -$(OBJDIR)/PDAFomi_put_state_lknetf_nondiagR.o: ./src/PDAFomi_put_state_lknetf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_put_state_lknetf_nondiagR_si.o: ./src/PDAFomi_put_state_lknetf_nondiagR_si.F90 -$(OBJDIR)/PDAFomi_put_state_lnetf_nondiagR.o: ./src/PDAFomi_put_state_lnetf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_put_state_lnetf_nondiagR_si.o: ./src/PDAFomi_put_state_lnetf_nondiagR_si.F90 -$(OBJDIR)/PDAFomi_put_state_local.o: ./src/PDAFomi_put_state_local.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_put_state_local_nondiagR.o: ./src/PDAFomi_put_state_local_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_put_state_local_nondiagR_si.o: ./src/PDAFomi_put_state_local_nondiagR_si.F90 -$(OBJDIR)/PDAFomi_put_state_local_si.o: ./src/PDAFomi_put_state_local_si.F90 -$(OBJDIR)/PDAFomi_put_state_nonlin_nondiagR.o: ./src/PDAFomi_put_state_nonlin_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o -$(OBJDIR)/PDAFomi_put_state_nonlin_nondiagR_si.o: ./src/PDAFomi_put_state_nonlin_nondiagR_si.F90 -$(OBJDIR)/SANGOMA_quicksort.o: ./external/SANGOMA/SANGOMA_quicksort.F90 -$(OBJDIR)/blas.o: ./external/CG+/blas.f -$(OBJDIR)/cgfam.o: ./external/CG+/cgfam.f -$(OBJDIR)/cgsearch.o: ./external/CG+/cgsearch.f -$(OBJDIR)/driver1.o: ./external/LBFGS/driver1.f -$(OBJDIR)/driver1.o: ./external/LBFGS/driver1.f90 -$(OBJDIR)/driver2.o: ./external/LBFGS/driver2.f -$(OBJDIR)/driver2.o: ./external/LBFGS/driver2.f90 -$(OBJDIR)/driver3.o: ./external/LBFGS/driver3.f -$(OBJDIR)/driver3.o: ./external/LBFGS/driver3.f90 -$(OBJDIR)/fcn.o: ./external/CG+/fcn.f -$(OBJDIR)/lbfgsb.o: ./external/LBFGS/lbfgsb.f -$(OBJDIR)/linpack.o: ./external/LBFGS/linpack.f -$(OBJDIR)/main.o: ./external/CG+/main.f -$(OBJDIR)/timer.o: ./external/CG+/timer.f -$(OBJDIR)/typedefs.h: ./src/typedefs.h +build/PDAF_3dvar_alloc.o: ./src/PDAF_3dvar_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_3dvar_analysis_cvt.o: ./src/PDAF_3dvar_analysis_cvt.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h +build/PDAF_3dvar_costf_cg_cvt.o: ./src/PDAF_3dvar_costf_cg_cvt.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h +build/PDAF_3dvar_costf_cvt.o: ./src/PDAF_3dvar_costf_cvt.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h +build/PDAF_3dvar_init.o: ./src/PDAF_3dvar_init.F90 build/PDAF_mod_filter.o +build/PDAF_3dvar_memtime.o: ./src/PDAF_3dvar_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o build/PDAFlocal.o +build/PDAF_3dvar_optim_cg.o: ./src/PDAF_3dvar_optim_cg.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h +build/PDAF_3dvar_optim_cgplus.o: ./src/PDAF_3dvar_optim_cgplus.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o +build/PDAF_3dvar_optim_lbfgs.o: ./src/PDAF_3dvar_optim_lbfgs.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o +build/PDAF_3dvar_options.o: ./src/PDAF_3dvar_options.F90 +build/PDAF_3dvar_update.o: ./src/PDAF_3dvar_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o +build/PDAF_add_increment.o: ./src/PDAF_add_increment.F90 build/PDAF_mod_filter.o +build/PDAF_alloc_filters.o: ./src/PDAF_alloc_filters.F90 +build/PDAF_allreduce.o: ./src/PDAF_allreduce.F90 build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_analysis_utils.o: ./src/PDAF_analysis_utils.F90 build/PDAF_mod_filtermpi.o build/PDAFomi.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o +build/PDAF_assimilate_3dvar.o: ./src/PDAF_assimilate_3dvar.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_assimilate_en3dvar_estkf.o: ./src/PDAF_assimilate_en3dvar_estkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_assimilate_en3dvar_lestkf.o: ./src/PDAF_assimilate_en3dvar_lestkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_assimilate_enkf.o: ./src/PDAF_assimilate_enkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_assimilate_enkf_si.o: ./src/PDAF_assimilate_enkf_si.F90 +build/PDAF_assimilate_estkf.o: ./src/PDAF_assimilate_estkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_assimilate_estkf_si.o: ./src/PDAF_assimilate_estkf_si.F90 +build/PDAF_assimilate_etkf.o: ./src/PDAF_assimilate_etkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_assimilate_etkf_si.o: ./src/PDAF_assimilate_etkf_si.F90 +build/PDAF_assimilate_hyb3dvar_estkf.o: ./src/PDAF_assimilate_hyb3dvar_estkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_assimilate_hyb3dvar_lestkf.o: ./src/PDAF_assimilate_hyb3dvar_lestkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_assimilate_lenkf.o: ./src/PDAF_assimilate_lenkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_assimilate_lenkf_si.o: ./src/PDAF_assimilate_lenkf_si.F90 +build/PDAF_assimilate_lestkf.o: ./src/PDAF_assimilate_lestkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_assimilate_lestkf_si.o: ./src/PDAF_assimilate_lestkf_si.F90 +build/PDAF_assimilate_letkf.o: ./src/PDAF_assimilate_letkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_assimilate_letkf_si.o: ./src/PDAF_assimilate_letkf_si.F90 +build/PDAF_assimilate_lknetf.o: ./src/PDAF_assimilate_lknetf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_assimilate_lknetf_si.o: ./src/PDAF_assimilate_lknetf_si.F90 +build/PDAF_assimilate_lnetf.o: ./src/PDAF_assimilate_lnetf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_assimilate_lnetf_si.o: ./src/PDAF_assimilate_lnetf_si.F90 +build/PDAF_assimilate_lseik.o: ./src/PDAF_assimilate_lseik.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_assimilate_lseik_si.o: ./src/PDAF_assimilate_lseik_si.F90 +build/PDAF_assimilate_netf.o: ./src/PDAF_assimilate_netf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_assimilate_netf_si.o: ./src/PDAF_assimilate_netf_si.F90 +build/PDAF_assimilate_pf.o: ./src/PDAF_assimilate_pf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_assimilate_pf_si.o: ./src/PDAF_assimilate_pf_si.F90 +build/PDAF_assimilate_prepost.o: ./src/PDAF_assimilate_prepost.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_assimilate_prepost_si.o: ./src/PDAF_assimilate_prepost_si.F90 +build/PDAF_assimilate_seek.o: ./src/PDAF_assimilate_seek.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_assimilate_seek_si.o: ./src/PDAF_assimilate_seek_si.F90 +build/PDAF_assimilate_seik.o: ./src/PDAF_assimilate_seik.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_assimilate_seik_si.o: ./src/PDAF_assimilate_seik_si.F90 +build/PDAF_communicate_ens.o: ./src/PDAF_communicate_ens.F90 build/PDAF_mod_filtermpi.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o ./src/typedefs.h +build/PDAF_correlation_function.o: ./src/PDAF_correlation_function.F90 +build/PDAF_deallocate.o: ./src/PDAF_deallocate.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_diag_crps.o: ./src/PDAF_diag_crps.F90 build/PDAF_mod_filtermpi.o build/SANGOMA_quicksort.o ./src/typedefs.h +build/PDAF_diag_effsample.o: ./src/PDAF_diag_effsample.F90 +build/PDAF_diag_ensstats.o: ./src/PDAF_diag_ensstats.F90 ./src/typedefs.h +build/PDAF_diag_histogram.o: ./src/PDAF_diag_histogram.F90 ./src/typedefs.h +build/PDAF_en3dvar_analysis_cvt.o: ./src/PDAF_en3dvar_analysis_cvt.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h +build/PDAF_en3dvar_costf_cg_cvt.o: ./src/PDAF_en3dvar_costf_cg_cvt.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h +build/PDAF_en3dvar_costf_cvt.o: ./src/PDAF_en3dvar_costf_cvt.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h +build/PDAF_en3dvar_optim_cg.o: ./src/PDAF_en3dvar_optim_cg.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h +build/PDAF_en3dvar_optim_cgplus.o: ./src/PDAF_en3dvar_optim_cgplus.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o +build/PDAF_en3dvar_optim_lbfgs.o: ./src/PDAF_en3dvar_optim_lbfgs.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o +build/PDAF_en3dvar_update_estkf.o: ./src/PDAF_en3dvar_update_estkf.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o +build/PDAF_en3dvar_update_lestkf.o: ./src/PDAF_en3dvar_update_lestkf.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAF_enkf_Tleft.o: ./src/PDAF_enkf_Tleft.F90 build/PDAF_memcount.o +build/PDAF_enkf_alloc.o: ./src/PDAF_enkf_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_enkf_analysis_rlm.o: ./src/PDAF_enkf_analysis_rlm.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o build/PDAF_analysis_utils.o ./src/typedefs.h +build/PDAF_enkf_analysis_rsm.o: ./src/PDAF_enkf_analysis_rsm.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o build/PDAF_analysis_utils.o ./src/typedefs.h +build/PDAF_enkf_gather_resid.o: ./src/PDAF_enkf_gather_resid.F90 build/PDAF_memcount.o build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_enkf_init.o: ./src/PDAF_enkf_init.F90 build/PDAF_mod_filter.o +build/PDAF_enkf_memtime.o: ./src/PDAF_enkf_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o +build/PDAF_enkf_obs_ensemble.o: ./src/PDAF_enkf_obs_ensemble.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h +build/PDAF_enkf_omega.o: ./src/PDAF_enkf_omega.F90 ./src/typedefs.h +build/PDAF_enkf_options.o: ./src/PDAF_enkf_options.F90 +build/PDAF_enkf_update.o: ./src/PDAF_enkf_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o +build/PDAF_eofcovar.o: ./src/PDAF_eofcovar.F90 build/PDAF_mod_filter.o ./src/typedefs.h +build/PDAF_estkf_AOmega.o: ./src/PDAF_estkf_AOmega.F90 build/PDAF_memcount.o +build/PDAF_estkf_OmegaA.o: ./src/PDAF_estkf_OmegaA.F90 build/PDAF_memcount.o +build/PDAF_estkf_alloc.o: ./src/PDAF_estkf_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_estkf_analysis.o: ./src/PDAF_estkf_analysis.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o ./src/typedefs.h +build/PDAF_estkf_analysis_fixed.o: ./src/PDAF_estkf_analysis_fixed.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o ./src/typedefs.h +build/PDAF_estkf_init.o: ./src/PDAF_estkf_init.F90 build/PDAF_mod_filter.o +build/PDAF_estkf_memtime.o: ./src/PDAF_estkf_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o +build/PDAF_estkf_options.o: ./src/PDAF_estkf_options.F90 +build/PDAF_estkf_update.o: ./src/PDAF_estkf_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o +build/PDAF_etkf_Tleft.o: ./src/PDAF_etkf_Tleft.F90 build/PDAF_memcount.o +build/PDAF_etkf_Tright.o: ./src/PDAF_etkf_Tright.F90 build/PDAF_memcount.o +build/PDAF_etkf_alloc.o: ./src/PDAF_etkf_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_etkf_analysis.o: ./src/PDAF_etkf_analysis.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h +build/PDAF_etkf_analysis_T.o: ./src/PDAF_etkf_analysis_T.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h +build/PDAF_etkf_analysis_fixed.o: ./src/PDAF_etkf_analysis_fixed.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h +build/PDAF_etkf_init.o: ./src/PDAF_etkf_init.F90 build/PDAF_mod_filter.o +build/PDAF_etkf_memtime.o: ./src/PDAF_etkf_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o +build/PDAF_etkf_options.o: ./src/PDAF_etkf_options.F90 +build/PDAF_etkf_update.o: ./src/PDAF_etkf_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o +build/PDAF_force_analysis.o: ./src/PDAF_force_analysis.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_gather_dim_obs_f.o: ./src/PDAF_gather_dim_obs_f.F90 build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_gather_obs_f.o: ./src/PDAF_gather_obs_f.F90 build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_gather_obs_f2.o: ./src/PDAF_gather_obs_f2.F90 build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_gather_obs_f2_flex.o: ./src/PDAF_gather_obs_f2_flex.F90 build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_gather_obs_f_flex.o: ./src/PDAF_gather_obs_f_flex.F90 build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_gen_obs.o: ./src/PDAF_gen_obs.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_generate_obs.o: ./src/PDAF_generate_obs.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_generate_obs_si.o: ./src/PDAF_generate_obs_si.F90 +build/PDAF_generate_rndmat.o: ./src/PDAF_generate_rndmat.F90 ./src/typedefs.h +build/PDAF_genobs_alloc.o: ./src/PDAF_genobs_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_genobs_init.o: ./src/PDAF_genobs_init.F90 +build/PDAF_genobs_options.o: ./src/PDAF_genobs_options.F90 +build/PDAF_get_assim_flag.o: ./src/PDAF_get_assim_flag.F90 build/PDAF_mod_filter.o +build/PDAF_get_ensstats.o: ./src/PDAF_get_ensstats.F90 build/PDAF_mod_filter.o ./src/typedefs.h +build/PDAF_get_globalobs.o: ./src/PDAF_get_globalobs.F90 build/PDAF_mod_filter.o +build/PDAF_get_localfilter.o: ./src/PDAF_get_localfilter.F90 build/PDAF_mod_filter.o +build/PDAF_get_memberid.o: ./src/PDAF_get_memberid.F90 build/PDAF_mod_filter.o +build/PDAF_get_obsmemberid.o: ./src/PDAF_get_obsmemberid.F90 build/PDAF_mod_filter.o +build/PDAF_get_smootherens.o: ./src/PDAF_get_smootherens.F90 build/PDAF_mod_filter.o ./src/typedefs.h +build/PDAF_get_state.o: ./src/PDAF_get_state.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_get_state_si.o: ./src/PDAF_get_state_si.F90 +build/PDAF_hyb3dvar_analysis_cvt.o: ./src/PDAF_hyb3dvar_analysis_cvt.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h +build/PDAF_hyb3dvar_costf_cg_cvt.o: ./src/PDAF_hyb3dvar_costf_cg_cvt.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h +build/PDAF_hyb3dvar_costf_cvt.o: ./src/PDAF_hyb3dvar_costf_cvt.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h +build/PDAF_hyb3dvar_optim_cg.o: ./src/PDAF_hyb3dvar_optim_cg.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h +build/PDAF_hyb3dvar_optim_cgplus.o: ./src/PDAF_hyb3dvar_optim_cgplus.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o +build/PDAF_hyb3dvar_optim_lbfgs.o: ./src/PDAF_hyb3dvar_optim_lbfgs.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o +build/PDAF_hyb3dvar_update_estkf.o: ./src/PDAF_hyb3dvar_update_estkf.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o +build/PDAF_hyb3dvar_update_lestkf.o: ./src/PDAF_hyb3dvar_update_lestkf.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAF_incremental.o: ./src/PDAF_incremental.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_incremental_si.o: ./src/PDAF_incremental_si.F90 +build/PDAF_inflate_ens.o: ./src/PDAF_inflate_ens.F90 build/PDAF_memcount.o +build/PDAF_inflate_weights.o: ./src/PDAF_inflate_weights.F90 +build/PDAF_init.o: ./src/PDAF_init.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_init_filters.o: ./src/PDAF_init_filters.F90 build/PDAF_mod_filtermpi.o +build/PDAF_init_si.o: ./src/PDAF_init_si.F90 +build/PDAF_interfaces_module.o: ./src/PDAF_interfaces_module.F90 build/PDAFlocal_interfaces.o build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_lenkf_alloc.o: ./src/PDAF_lenkf_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_lenkf_analysis_rsm.o: ./src/PDAF_lenkf_analysis_rsm.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o build/PDAF_analysis_utils.o ./src/typedefs.h +build/PDAF_lenkf_init.o: ./src/PDAF_lenkf_init.F90 build/PDAF_mod_filter.o +build/PDAF_lenkf_memtime.o: ./src/PDAF_lenkf_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o +build/PDAF_lenkf_options.o: ./src/PDAF_lenkf_options.F90 +build/PDAF_lenkf_update.o: ./src/PDAF_lenkf_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o +build/PDAF_lestkf_alloc.o: ./src/PDAF_lestkf_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_lestkf_analysis.o: ./src/PDAF_lestkf_analysis.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h +build/PDAF_lestkf_analysis_fixed.o: ./src/PDAF_lestkf_analysis_fixed.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h +build/PDAF_lestkf_init.o: ./src/PDAF_lestkf_init.F90 build/PDAF_mod_filter.o +build/PDAF_lestkf_memtime.o: ./src/PDAF_lestkf_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o build/PDAFlocal.o +build/PDAF_lestkf_options.o: ./src/PDAF_lestkf_options.F90 +build/PDAF_lestkf_update.o: ./src/PDAF_lestkf_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAF_analysis_utils.o +build/PDAF_letkf_alloc.o: ./src/PDAF_letkf_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_letkf_analysis.o: ./src/PDAF_letkf_analysis.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h +build/PDAF_letkf_analysis_T.o: ./src/PDAF_letkf_analysis_T.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h +build/PDAF_letkf_analysis_fixed.o: ./src/PDAF_letkf_analysis_fixed.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h +build/PDAF_letkf_init.o: ./src/PDAF_letkf_init.F90 build/PDAF_mod_filter.o +build/PDAF_letkf_memtime.o: ./src/PDAF_letkf_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o build/PDAFlocal.o +build/PDAF_letkf_options.o: ./src/PDAF_letkf_options.F90 +build/PDAF_letkf_update.o: ./src/PDAF_letkf_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAF_analysis_utils.o +build/PDAF_lknetf_alloc.o: ./src/PDAF_lknetf_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_lknetf_alpha_neff.o: ./src/PDAF_lknetf_alpha_neff.F90 +build/PDAF_lknetf_ana_letkfT.o: ./src/PDAF_lknetf_ana_letkfT.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h +build/PDAF_lknetf_ana_lnetf.o: ./src/PDAF_lknetf_ana_lnetf.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h +build/PDAF_lknetf_analysis_T.o: ./src/PDAF_lknetf_analysis_T.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h +build/PDAF_lknetf_compute_gamma.o: ./src/PDAF_lknetf_compute_gamma.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o ./src/typedefs.h +build/PDAF_lknetf_init.o: ./src/PDAF_lknetf_init.F90 build/PDAF_mod_filter.o +build/PDAF_lknetf_memtime.o: ./src/PDAF_lknetf_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o build/PDAFlocal.o +build/PDAF_lknetf_options.o: ./src/PDAF_lknetf_options.F90 +build/PDAF_lknetf_reset_gamma.o: ./src/PDAF_lknetf_reset_gamma.F90 build/PDAF_mod_filter.o +build/PDAF_lknetf_set_gamma.o: ./src/PDAF_lknetf_set_gamma.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h +build/PDAF_lknetf_step_update.o: ./src/PDAF_lknetf_step_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAFomi.o build/PDAF_mod_filtermpi.o build/PDAF_analysis_utils.o ./src/typedefs.h +build/PDAF_lknetf_update.o: ./src/PDAF_lknetf_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAFomi.o build/PDAF_mod_filtermpi.o build/PDAF_analysis_utils.o ./src/typedefs.h +build/PDAF_lnetf_alloc.o: ./src/PDAF_lnetf_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_lnetf_analysis.o: ./src/PDAF_lnetf_analysis.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h +build/PDAF_lnetf_init.o: ./src/PDAF_lnetf_init.F90 build/PDAF_mod_filter.o +build/PDAF_lnetf_memtime.o: ./src/PDAF_lnetf_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o build/PDAFlocal.o +build/PDAF_lnetf_options.o: ./src/PDAF_lnetf_options.F90 +build/PDAF_lnetf_smootherT.o: ./src/PDAF_lnetf_smootherT.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_lnetf_update.o: ./src/PDAF_lnetf_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAF_analysis_utils.o ./src/typedefs.h +build/PDAF_local_weight.o: ./src/PDAF_local_weight.F90 +build/PDAF_local_weights.o: ./src/PDAF_local_weights.F90 +build/PDAF_lseik_alloc.o: ./src/PDAF_lseik_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_lseik_analysis.o: ./src/PDAF_lseik_analysis.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h +build/PDAF_lseik_analysis_trans.o: ./src/PDAF_lseik_analysis_trans.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o ./src/typedefs.h +build/PDAF_lseik_init.o: ./src/PDAF_lseik_init.F90 build/PDAF_mod_filter.o +build/PDAF_lseik_memtime.o: ./src/PDAF_lseik_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o build/PDAFlocal.o +build/PDAF_lseik_options.o: ./src/PDAF_lseik_options.F90 +build/PDAF_lseik_resample.o: ./src/PDAF_lseik_resample.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_lseik_update.o: ./src/PDAF_lseik_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAF_analysis_utils.o +build/PDAF_memcount.o: ./src/PDAF_memcount.F90 ./src/typedefs.h +build/PDAF_mod_filter.o: ./src/PDAF_mod_filter.F90 +build/PDAF_mod_filtermpi.o: ./src/PDAF_mod_filtermpi.F90 +build/PDAF_mod_lnetf.o: ./src/PDAF_mod_lnetf.F90 build/PDAF_mod_filter.o +build/PDAF_mvnormalize.o: ./src/PDAF_mvnormalize.F90 ./src/typedefs.h +build/PDAF_netf_alloc.o: ./src/PDAF_netf_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_netf_analysis.o: ./src/PDAF_netf_analysis.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o build/PDAF_analysis_utils.o ./src/typedefs.h +build/PDAF_netf_init.o: ./src/PDAF_netf_init.F90 build/PDAF_mod_filter.o +build/PDAF_netf_memtime.o: ./src/PDAF_netf_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o +build/PDAF_netf_options.o: ./src/PDAF_netf_options.F90 +build/PDAF_netf_smootherT.o: ./src/PDAF_netf_smootherT.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_netf_update.o: ./src/PDAF_netf_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_options_filters.o: ./src/PDAF_options_filters.F90 build/PDAF_mod_filtermpi.o +build/PDAF_pf_add_noise.o: ./src/PDAF_pf_add_noise.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_pf_alloc.o: ./src/PDAF_pf_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_pf_analysis.o: ./src/PDAF_pf_analysis.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o build/PDAF_analysis_utils.o ./src/typedefs.h +build/PDAF_pf_init.o: ./src/PDAF_pf_init.F90 build/PDAF_mod_filter.o +build/PDAF_pf_memtime.o: ./src/PDAF_pf_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o +build/PDAF_pf_options.o: ./src/PDAF_pf_options.F90 +build/PDAF_pf_resampling.o: ./src/PDAF_pf_resampling.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_pf_update.o: ./src/PDAF_pf_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o +build/PDAF_prepost.o: ./src/PDAF_prepost.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_prepost_si.o: ./src/PDAF_prepost_si.F90 +build/PDAF_print_info.o: ./src/PDAF_print_info.F90 build/PDAF_mod_filter.o +build/PDAF_print_version.o: ./src/PDAF_print_version.F90 build/PDAF_mod_filtermpi.o +build/PDAF_put_state_3dvar.o: ./src/PDAF_put_state_3dvar.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_put_state_en3dvar_estkf.o: ./src/PDAF_put_state_en3dvar_estkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_put_state_en3dvar_lestkf.o: ./src/PDAF_put_state_en3dvar_lestkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_put_state_enkf.o: ./src/PDAF_put_state_enkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_put_state_enkf_si.o: ./src/PDAF_put_state_enkf_si.F90 +build/PDAF_put_state_estkf.o: ./src/PDAF_put_state_estkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_put_state_estkf_si.o: ./src/PDAF_put_state_estkf_si.F90 +build/PDAF_put_state_etkf.o: ./src/PDAF_put_state_etkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_put_state_etkf_si.o: ./src/PDAF_put_state_etkf_si.F90 +build/PDAF_put_state_generate_obs.o: ./src/PDAF_put_state_generate_obs.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_put_state_generate_obs_si.o: ./src/PDAF_put_state_generate_obs_si.F90 +build/PDAF_put_state_hyb3dvar_estkf.o: ./src/PDAF_put_state_hyb3dvar_estkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_put_state_hyb3dvar_lestkf.o: ./src/PDAF_put_state_hyb3dvar_lestkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_put_state_lenkf.o: ./src/PDAF_put_state_lenkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_put_state_lenkf_si.o: ./src/PDAF_put_state_lenkf_si.F90 +build/PDAF_put_state_lestkf.o: ./src/PDAF_put_state_lestkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_put_state_lestkf_si.o: ./src/PDAF_put_state_lestkf_si.F90 +build/PDAF_put_state_letkf.o: ./src/PDAF_put_state_letkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_put_state_letkf_si.o: ./src/PDAF_put_state_letkf_si.F90 +build/PDAF_put_state_lknetf.o: ./src/PDAF_put_state_lknetf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_put_state_lknetf_si.o: ./src/PDAF_put_state_lknetf_si.F90 +build/PDAF_put_state_lnetf.o: ./src/PDAF_put_state_lnetf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_put_state_lnetf_si.o: ./src/PDAF_put_state_lnetf_si.F90 +build/PDAF_put_state_lseik.o: ./src/PDAF_put_state_lseik.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_put_state_lseik_si.o: ./src/PDAF_put_state_lseik_si.F90 +build/PDAF_put_state_netf.o: ./src/PDAF_put_state_netf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_put_state_netf_si.o: ./src/PDAF_put_state_netf_si.F90 +build/PDAF_put_state_pf.o: ./src/PDAF_put_state_pf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_put_state_pf_si.o: ./src/PDAF_put_state_pf_si.F90 +build/PDAF_put_state_prepost.o: ./src/PDAF_put_state_prepost.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_put_state_prepost_si.o: ./src/PDAF_put_state_prepost_si.F90 +build/PDAF_put_state_seek.o: ./src/PDAF_put_state_seek.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_put_state_seek_si.o: ./src/PDAF_put_state_seek_si.F90 +build/PDAF_put_state_seik.o: ./src/PDAF_put_state_seik.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_put_state_seik_si.o: ./src/PDAF_put_state_seik_si.F90 +build/PDAF_reset_dim_p.o: ./src/PDAF_reset_dim_p.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_reset_forget.o: ./src/PDAF_reset_forget.F90 build/PDAF_mod_filter.o +build/PDAF_sampleens.o: ./src/PDAF_sampleens.F90 build/PDAF_mod_filter.o ./src/typedefs.h +build/PDAF_seek_alloc.o: ./src/PDAF_seek_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_seek_analysis.o: ./src/PDAF_seek_analysis.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_seek_init.o: ./src/PDAF_seek_init.F90 build/PDAF_mod_filter.o +build/PDAF_seek_memtime.o: ./src/PDAF_seek_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_seek_options.o: ./src/PDAF_seek_options.F90 +build/PDAF_seek_rediag.o: ./src/PDAF_seek_rediag.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_seek_update.o: ./src/PDAF_seek_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o +build/PDAF_seik_TtimesA.o: ./src/PDAF_seik_TtimesA.F90 build/PDAF_memcount.o +build/PDAF_seik_alloc.o: ./src/PDAF_seik_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_seik_analysis.o: ./src/PDAF_seik_analysis.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o ./src/typedefs.h +build/PDAF_seik_analysis_newT.o: ./src/PDAF_seik_analysis_newT.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o ./src/typedefs.h +build/PDAF_seik_analysis_trans.o: ./src/PDAF_seik_analysis_trans.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o ./src/typedefs.h +build/PDAF_seik_init.o: ./src/PDAF_seik_init.F90 build/PDAF_mod_filter.o +build/PDAF_seik_matrixT.o: ./src/PDAF_seik_matrixT.F90 build/PDAF_memcount.o +build/PDAF_seik_memtime.o: ./src/PDAF_seik_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o +build/PDAF_seik_omega.o: ./src/PDAF_seik_omega.F90 build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_seik_options.o: ./src/PDAF_seik_options.F90 +build/PDAF_seik_resample.o: ./src/PDAF_seik_resample.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_seik_resample_newT.o: ./src/PDAF_seik_resample_newT.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_seik_uinv.o: ./src/PDAF_seik_uinv.F90 build/PDAF_mod_filter.o +build/PDAF_seik_update.o: ./src/PDAF_seik_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o +build/PDAF_set_comm_pdaf.o: ./src/PDAF_set_comm_pdaf.F90 build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o +build/PDAF_set_debug_flag.o: ./src/PDAF_set_debug_flag.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAF_set_ens_pointer.o: ./src/PDAF_set_ens_pointer.F90 build/PDAF_mod_filter.o ./src/typedefs.h +build/PDAF_set_forget.o: ./src/PDAF_set_forget.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_set_forget_local.o: ./src/PDAF_set_forget_local.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filtermpi.o +build/PDAF_set_memberid.o: ./src/PDAF_set_memberid.F90 build/PDAF_mod_filter.o +build/PDAF_set_offline_mode.o: ./src/PDAF_set_offline_mode.F90 build/PDAF_mod_filter.o +build/PDAF_set_smootherens.o: ./src/PDAF_set_smootherens.F90 build/PDAF_mod_filter.o ./src/typedefs.h +build/PDAF_smoother.o: ./src/PDAF_smoother.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_smoother_enkf.o: ./src/PDAF_smoother_enkf.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_smoother_lnetf.o: ./src/PDAF_smoother_lnetf.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_smoother_local.o: ./src/PDAF_smoother_local.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_smoother_netf.o: ./src/PDAF_smoother_netf.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_smoother_shift.o: ./src/PDAF_smoother_shift.F90 build/PDAF_mod_filtermpi.o ./src/typedefs.h +build/PDAF_timer.o: ./src/PDAF_timer.F90 +build/PDAF_timer_mpi.o: ./src/PDAF_timer_mpi.F90 +build/PDAFlocal.o: ./src/PDAFlocal.F90 build/PDAFlocal_interfaces.o +build/PDAFlocal_assimilate_en3dvar_lestkf.o: ./src/PDAFlocal_assimilate_en3dvar_lestkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAFlocal_assimilate_hyb3dvar_lestkf.o: ./src/PDAFlocal_assimilate_hyb3dvar_lestkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAFlocal_assimilate_lestkf.o: ./src/PDAFlocal_assimilate_lestkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAFlocal_assimilate_lestkf_si.o: ./src/PDAFlocal_assimilate_lestkf_si.F90 +build/PDAFlocal_assimilate_letkf.o: ./src/PDAFlocal_assimilate_letkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAFlocal_assimilate_letkf_si.o: ./src/PDAFlocal_assimilate_letkf_si.F90 +build/PDAFlocal_assimilate_lknetf.o: ./src/PDAFlocal_assimilate_lknetf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAFlocal_assimilate_lknetf_si.o: ./src/PDAFlocal_assimilate_lknetf_si.F90 +build/PDAFlocal_assimilate_lnetf.o: ./src/PDAFlocal_assimilate_lnetf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAFlocal_assimilate_lnetf_si.o: ./src/PDAFlocal_assimilate_lnetf_si.F90 +build/PDAFlocal_assimilate_lseik.o: ./src/PDAFlocal_assimilate_lseik.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAFlocal_assimilate_lseik_si.o: ./src/PDAFlocal_assimilate_lseik_si.F90 +build/PDAFlocal_clear_increment_weights.o: ./src/PDAFlocal_clear_increment_weights.F90 build/PDAF_mod_filter.o build/PDAFlocal.o +build/PDAFlocal_g2l_cb.o: ./src/PDAFlocal_g2l_cb.F90 build/PDAFlocal.o +build/PDAFlocal_interfaces.o: ./src/PDAFlocal_interfaces.F90 ./src/typedefs.h +build/PDAFlocal_l2g_cb.o: ./src/PDAFlocal_l2g_cb.F90 build/PDAFlocal.o +build/PDAFlocal_put_state_en3dvar_lestkf.o: ./src/PDAFlocal_put_state_en3dvar_lestkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFlocal.o +build/PDAFlocal_put_state_hyb3dvar_lestkf.o: ./src/PDAFlocal_put_state_hyb3dvar_lestkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFlocal.o +build/PDAFlocal_put_state_lestkf.o: ./src/PDAFlocal_put_state_lestkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFlocal.o +build/PDAFlocal_put_state_lestkf_si.o: ./src/PDAFlocal_put_state_lestkf_si.F90 +build/PDAFlocal_put_state_letkf.o: ./src/PDAFlocal_put_state_letkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFlocal.o +build/PDAFlocal_put_state_letkf_si.o: ./src/PDAFlocal_put_state_letkf_si.F90 +build/PDAFlocal_put_state_lknetf.o: ./src/PDAFlocal_put_state_lknetf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFlocal.o +build/PDAFlocal_put_state_lknetf_si.o: ./src/PDAFlocal_put_state_lknetf_si.F90 +build/PDAFlocal_put_state_lnetf.o: ./src/PDAFlocal_put_state_lnetf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFlocal.o +build/PDAFlocal_put_state_lnetf_si.o: ./src/PDAFlocal_put_state_lnetf_si.F90 +build/PDAFlocal_put_state_lseik.o: ./src/PDAFlocal_put_state_lseik.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFlocal.o +build/PDAFlocal_put_state_lseik_si.o: ./src/PDAFlocal_put_state_lseik_si.F90 +build/PDAFlocal_set_increment_weights.o: ./src/PDAFlocal_set_increment_weights.F90 build/PDAF_mod_filter.o build/PDAFlocal.o +build/PDAFlocal_set_indices.o: ./src/PDAFlocal_set_indices.F90 build/PDAF_mod_filter.o build/PDAFlocal.o +build/PDAFlocalomi_assimilate.o: ./src/PDAFlocalomi_assimilate.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFlocalomi_assimilate_en3dvar_lestkf.o: ./src/PDAFlocalomi_assimilate_en3dvar_lestkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.o: ./src/PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFlocalomi_assimilate_hyb3dvar_lestkf.o: ./src/PDAFlocalomi_assimilate_hyb3dvar_lestkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.o: ./src/PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFlocalomi_assimilate_lknetf_nondiagR.o: ./src/PDAFlocalomi_assimilate_lknetf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFlocalomi_assimilate_lknetf_nondiagR_si.o: ./src/PDAFlocalomi_assimilate_lknetf_nondiagR_si.F90 +build/PDAFlocalomi_assimilate_lnetf_nondiagR.o: ./src/PDAFlocalomi_assimilate_lnetf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFlocalomi_assimilate_lnetf_nondiagR_si.o: ./src/PDAFlocalomi_assimilate_lnetf_nondiagR_si.F90 +build/PDAFlocalomi_assimilate_nondiagR.o: ./src/PDAFlocalomi_assimilate_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFlocalomi_assimilate_nondiagR_si.o: ./src/PDAFlocalomi_assimilate_nondiagR_si.F90 +build/PDAFlocalomi_assimilate_si.o: ./src/PDAFlocalomi_assimilate_si.F90 +build/PDAFlocalomi_put_state.o: ./src/PDAFlocalomi_put_state.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFlocalomi_put_state_en3dvar_lestkf.o: ./src/PDAFlocalomi_put_state_en3dvar_lestkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR.o: ./src/PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFlocalomi_put_state_hyb3dvar_lestkf.o: ./src/PDAFlocalomi_put_state_hyb3dvar_lestkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR.o: ./src/PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFlocalomi_put_state_lknetf_nondiagR.o: ./src/PDAFlocalomi_put_state_lknetf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFlocalomi_put_state_lknetf_nondiagR_si.o: ./src/PDAFlocalomi_put_state_lknetf_nondiagR_si.F90 +build/PDAFlocalomi_put_state_lnetf_nondiagR.o: ./src/PDAFlocalomi_put_state_lnetf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFlocalomi_put_state_lnetf_nondiagR_si.o: ./src/PDAFlocalomi_put_state_lnetf_nondiagR_si.F90 +build/PDAFlocalomi_put_state_nondiagR.o: ./src/PDAFlocalomi_put_state_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFlocalomi_put_state_nondiagR_si.o: ./src/PDAFlocalomi_put_state_nondiagR_si.F90 +build/PDAFlocalomi_put_state_si.o: ./src/PDAFlocalomi_put_state_si.F90 +build/PDAFomi.o: ./src/PDAFomi.F90 build/PDAFomi_obs_f.o build/PDAFomi_obs_l.o build/PDAFomi_obs_op.o +build/PDAFomi_assimilate_3dvar.o: ./src/PDAFomi_assimilate_3dvar.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_assimilate_3dvar_nondiagR.o: ./src/PDAFomi_assimilate_3dvar_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_assimilate_en3dvar_estkf.o: ./src/PDAFomi_assimilate_en3dvar_estkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_assimilate_en3dvar_estkf_nondiagR.o: ./src/PDAFomi_assimilate_en3dvar_estkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_assimilate_en3dvar_lestkf.o: ./src/PDAFomi_assimilate_en3dvar_lestkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_assimilate_en3dvar_lestkf_nondiagR.o: ./src/PDAFomi_assimilate_en3dvar_lestkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_assimilate_enkf_nondiagR.o: ./src/PDAFomi_assimilate_enkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_assimilate_enkf_nondiagR_si.o: ./src/PDAFomi_assimilate_enkf_nondiagR_si.F90 +build/PDAFomi_assimilate_global.o: ./src/PDAFomi_assimilate_global.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_assimilate_global_nondiagR.o: ./src/PDAFomi_assimilate_global_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_assimilate_global_nondiagR_si.o: ./src/PDAFomi_assimilate_global_nondiagR_si.F90 +build/PDAFomi_assimilate_global_si.o: ./src/PDAFomi_assimilate_global_si.F90 +build/PDAFomi_assimilate_hyb3dvar_estkf.o: ./src/PDAFomi_assimilate_hyb3dvar_estkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_assimilate_hyb3dvar_estkf_nondiagR.o: ./src/PDAFomi_assimilate_hyb3dvar_estkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_assimilate_hyb3dvar_lestkf.o: ./src/PDAFomi_assimilate_hyb3dvar_lestkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR.o: ./src/PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_assimilate_lenkf.o: ./src/PDAFomi_assimilate_lenkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_assimilate_lenkf_nondiagR.o: ./src/PDAFomi_assimilate_lenkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_assimilate_lenkf_nondiagR_si.o: ./src/PDAFomi_assimilate_lenkf_nondiagR_si.F90 +build/PDAFomi_assimilate_lenkf_si.o: ./src/PDAFomi_assimilate_lenkf_si.F90 +build/PDAFomi_assimilate_lknetf_nondiagR.o: ./src/PDAFomi_assimilate_lknetf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_assimilate_lknetf_nondiagR_si.o: ./src/PDAFomi_assimilate_lknetf_nondiagR_si.F90 +build/PDAFomi_assimilate_lnetf_nondiagR.o: ./src/PDAFomi_assimilate_lnetf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_assimilate_lnetf_nondiagR_si.o: ./src/PDAFomi_assimilate_lnetf_nondiagR_si.F90 +build/PDAFomi_assimilate_local.o: ./src/PDAFomi_assimilate_local.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_assimilate_local_nondiagR.o: ./src/PDAFomi_assimilate_local_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_assimilate_local_nondiagR_si.o: ./src/PDAFomi_assimilate_local_nondiagR_si.F90 +build/PDAFomi_assimilate_local_si.o: ./src/PDAFomi_assimilate_local_si.F90 +build/PDAFomi_assimilate_nonlin_nondiagR.o: ./src/PDAFomi_assimilate_nonlin_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_assimilate_nonlin_nondiagR_si.o: ./src/PDAFomi_assimilate_nonlin_nondiagR_si.F90 +build/PDAFomi_callback.o: ./src/PDAFomi_callback.F90 build/PDAFomi.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o +build/PDAFomi_generate_obs.o: ./src/PDAFomi_generate_obs.F90 build/PDAFomi.o +build/PDAFomi_obs_f.o: ./src/PDAFomi_obs_f.F90 build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h +build/PDAFomi_obs_l.o: ./src/PDAFomi_obs_l.F90 build/PDAFomi_obs_f.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o +build/PDAFomi_obs_op.o: ./src/PDAFomi_obs_op.F90 build/PDAFomi_obs_f.o +build/PDAFomi_put_state_3dvar.o: ./src/PDAFomi_put_state_3dvar.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_put_state_3dvar_nondiagR.o: ./src/PDAFomi_put_state_3dvar_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_put_state_en3dvar_estkf.o: ./src/PDAFomi_put_state_en3dvar_estkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_put_state_en3dvar_estkf_nondiagR.o: ./src/PDAFomi_put_state_en3dvar_estkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_put_state_en3dvar_lestkf.o: ./src/PDAFomi_put_state_en3dvar_lestkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_put_state_en3dvar_lestkf_nondiagR.o: ./src/PDAFomi_put_state_en3dvar_lestkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_put_state_enkf_nondiagR.o: ./src/PDAFomi_put_state_enkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_put_state_enkf_nondiagR_si.o: ./src/PDAFomi_put_state_enkf_nondiagR_si.F90 +build/PDAFomi_put_state_generate_obs.o: ./src/PDAFomi_put_state_generate_obs.F90 build/PDAFomi.o +build/PDAFomi_put_state_global.o: ./src/PDAFomi_put_state_global.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_put_state_global_nondiagR.o: ./src/PDAFomi_put_state_global_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_put_state_global_nondiagR_si.o: ./src/PDAFomi_put_state_global_nondiagR_si.F90 +build/PDAFomi_put_state_global_si.o: ./src/PDAFomi_put_state_global_si.F90 +build/PDAFomi_put_state_hyb3dvar_estkf.o: ./src/PDAFomi_put_state_hyb3dvar_estkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_put_state_hyb3dvar_estkf_nondiagR.o: ./src/PDAFomi_put_state_hyb3dvar_estkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_put_state_hyb3dvar_lestkf.o: ./src/PDAFomi_put_state_hyb3dvar_lestkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.o: ./src/PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_put_state_lenkf.o: ./src/PDAFomi_put_state_lenkf.F90 build/PDAFomi.o +build/PDAFomi_put_state_lenkf_nondiagR.o: ./src/PDAFomi_put_state_lenkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_put_state_lenkf_nondiagR_si.o: ./src/PDAFomi_put_state_lenkf_nondiagR_si.F90 +build/PDAFomi_put_state_lenkf_si.o: ./src/PDAFomi_put_state_lenkf_si.F90 +build/PDAFomi_put_state_lknetf_nondiagR.o: ./src/PDAFomi_put_state_lknetf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_put_state_lknetf_nondiagR_si.o: ./src/PDAFomi_put_state_lknetf_nondiagR_si.F90 +build/PDAFomi_put_state_lnetf_nondiagR.o: ./src/PDAFomi_put_state_lnetf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_put_state_lnetf_nondiagR_si.o: ./src/PDAFomi_put_state_lnetf_nondiagR_si.F90 +build/PDAFomi_put_state_local.o: ./src/PDAFomi_put_state_local.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_put_state_local_nondiagR.o: ./src/PDAFomi_put_state_local_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_put_state_local_nondiagR_si.o: ./src/PDAFomi_put_state_local_nondiagR_si.F90 +build/PDAFomi_put_state_local_si.o: ./src/PDAFomi_put_state_local_si.F90 +build/PDAFomi_put_state_nonlin_nondiagR.o: ./src/PDAFomi_put_state_nonlin_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o +build/PDAFomi_put_state_nonlin_nondiagR_si.o: ./src/PDAFomi_put_state_nonlin_nondiagR_si.F90 +build/SANGOMA_quicksort.o: ./external/SANGOMA/SANGOMA_quicksort.F90 +build/blas.o: ./external/CG+/blas.f +build/cgfam.o: ./external/CG+/cgfam.f +build/cgsearch.o: ./external/CG+/cgsearch.f +build/driver1.o: ./external/LBFGS/driver1.f +build/driver1.o: ./external/LBFGS/driver1.f90 +build/driver2.o: ./external/LBFGS/driver2.f +build/driver2.o: ./external/LBFGS/driver2.f90 +build/driver3.o: ./external/LBFGS/driver3.f +build/driver3.o: ./external/LBFGS/driver3.f90 +build/fcn.o: ./external/CG+/fcn.f +build/lbfgsb.o: ./external/LBFGS/lbfgsb.f +build/linpack.o: ./external/LBFGS/linpack.f +build/main.o: ./external/CG+/main.f +build/timer.o: ./external/CG+/timer.f +build/typedefs.h: ./src/typedefs.h diff --git a/Makefile b/Makefile index 4ed9c5113..5f61e472e 100644 --- a/Makefile +++ b/Makefile @@ -551,6 +551,10 @@ directories: $(MISSINGDIRS) $(MISSINGDIRS): mkdir -p $@ +.PHONY: Depends +Depends: + ./external/mkdepends/mkdepends ./src ./external/* '$(OBJDIR)' + ####################################################### .PHONY: clean clean : From e529028ed32352d3a107258aa8096d99c3886c1e Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Sat, 31 Aug 2024 10:19:06 +0200 Subject: [PATCH 67/83] Reverting MAkefile - the Depends target doesn't seem to work correctly. --- Makefile | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Makefile b/Makefile index 5f61e472e..4ed9c5113 100644 --- a/Makefile +++ b/Makefile @@ -551,10 +551,6 @@ directories: $(MISSINGDIRS) $(MISSINGDIRS): mkdir -p $@ -.PHONY: Depends -Depends: - ./external/mkdepends/mkdepends ./src ./external/* '$(OBJDIR)' - ####################################################### .PHONY: clean clean : From db7729317b6728baf74e1d1648df6669f805ace0 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Sun, 1 Sep 2024 19:22:39 +0200 Subject: [PATCH 68/83] Commit performance-optimized observation search module PDAFomi_dim_obs_l.F90. This replaces the previsou PDAFomi_init_dim_obs_l, which is still present as PDAFomi_init_dim_obs_l_old. The optimization yields better performance - for isotropic between 6-10x. --- Depends | 844 ++++++++++---------- Makefile | 5 +- src/Makefile | 1 + src/PDAFomi.F90 | 1 + src/PDAFomi_dim_obs_l.F90 | 1547 +++++++++++++++++++++++++++++++++++++ src/PDAFomi_obs_l.F90 | 111 +-- 6 files changed, 1989 insertions(+), 520 deletions(-) create mode 100644 src/PDAFomi_dim_obs_l.F90 diff --git a/Depends b/Depends index dba44ede6..9b7f93fb2 100644 --- a/Depends +++ b/Depends @@ -1,421 +1,423 @@ -build/PDAF_3dvar_alloc.o: ./src/PDAF_3dvar_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_3dvar_analysis_cvt.o: ./src/PDAF_3dvar_analysis_cvt.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h -build/PDAF_3dvar_costf_cg_cvt.o: ./src/PDAF_3dvar_costf_cg_cvt.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h -build/PDAF_3dvar_costf_cvt.o: ./src/PDAF_3dvar_costf_cvt.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h -build/PDAF_3dvar_init.o: ./src/PDAF_3dvar_init.F90 build/PDAF_mod_filter.o -build/PDAF_3dvar_memtime.o: ./src/PDAF_3dvar_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o build/PDAFlocal.o -build/PDAF_3dvar_optim_cg.o: ./src/PDAF_3dvar_optim_cg.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h -build/PDAF_3dvar_optim_cgplus.o: ./src/PDAF_3dvar_optim_cgplus.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o -build/PDAF_3dvar_optim_lbfgs.o: ./src/PDAF_3dvar_optim_lbfgs.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o -build/PDAF_3dvar_options.o: ./src/PDAF_3dvar_options.F90 -build/PDAF_3dvar_update.o: ./src/PDAF_3dvar_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o -build/PDAF_add_increment.o: ./src/PDAF_add_increment.F90 build/PDAF_mod_filter.o -build/PDAF_alloc_filters.o: ./src/PDAF_alloc_filters.F90 -build/PDAF_allreduce.o: ./src/PDAF_allreduce.F90 build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_analysis_utils.o: ./src/PDAF_analysis_utils.F90 build/PDAF_mod_filtermpi.o build/PDAFomi.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o -build/PDAF_assimilate_3dvar.o: ./src/PDAF_assimilate_3dvar.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_assimilate_en3dvar_estkf.o: ./src/PDAF_assimilate_en3dvar_estkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_assimilate_en3dvar_lestkf.o: ./src/PDAF_assimilate_en3dvar_lestkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_assimilate_enkf.o: ./src/PDAF_assimilate_enkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_assimilate_enkf_si.o: ./src/PDAF_assimilate_enkf_si.F90 -build/PDAF_assimilate_estkf.o: ./src/PDAF_assimilate_estkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_assimilate_estkf_si.o: ./src/PDAF_assimilate_estkf_si.F90 -build/PDAF_assimilate_etkf.o: ./src/PDAF_assimilate_etkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_assimilate_etkf_si.o: ./src/PDAF_assimilate_etkf_si.F90 -build/PDAF_assimilate_hyb3dvar_estkf.o: ./src/PDAF_assimilate_hyb3dvar_estkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_assimilate_hyb3dvar_lestkf.o: ./src/PDAF_assimilate_hyb3dvar_lestkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_assimilate_lenkf.o: ./src/PDAF_assimilate_lenkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_assimilate_lenkf_si.o: ./src/PDAF_assimilate_lenkf_si.F90 -build/PDAF_assimilate_lestkf.o: ./src/PDAF_assimilate_lestkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_assimilate_lestkf_si.o: ./src/PDAF_assimilate_lestkf_si.F90 -build/PDAF_assimilate_letkf.o: ./src/PDAF_assimilate_letkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_assimilate_letkf_si.o: ./src/PDAF_assimilate_letkf_si.F90 -build/PDAF_assimilate_lknetf.o: ./src/PDAF_assimilate_lknetf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_assimilate_lknetf_si.o: ./src/PDAF_assimilate_lknetf_si.F90 -build/PDAF_assimilate_lnetf.o: ./src/PDAF_assimilate_lnetf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_assimilate_lnetf_si.o: ./src/PDAF_assimilate_lnetf_si.F90 -build/PDAF_assimilate_lseik.o: ./src/PDAF_assimilate_lseik.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_assimilate_lseik_si.o: ./src/PDAF_assimilate_lseik_si.F90 -build/PDAF_assimilate_netf.o: ./src/PDAF_assimilate_netf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_assimilate_netf_si.o: ./src/PDAF_assimilate_netf_si.F90 -build/PDAF_assimilate_pf.o: ./src/PDAF_assimilate_pf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_assimilate_pf_si.o: ./src/PDAF_assimilate_pf_si.F90 -build/PDAF_assimilate_prepost.o: ./src/PDAF_assimilate_prepost.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_assimilate_prepost_si.o: ./src/PDAF_assimilate_prepost_si.F90 -build/PDAF_assimilate_seek.o: ./src/PDAF_assimilate_seek.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_assimilate_seek_si.o: ./src/PDAF_assimilate_seek_si.F90 -build/PDAF_assimilate_seik.o: ./src/PDAF_assimilate_seik.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_assimilate_seik_si.o: ./src/PDAF_assimilate_seik_si.F90 -build/PDAF_communicate_ens.o: ./src/PDAF_communicate_ens.F90 build/PDAF_mod_filtermpi.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o ./src/typedefs.h -build/PDAF_correlation_function.o: ./src/PDAF_correlation_function.F90 -build/PDAF_deallocate.o: ./src/PDAF_deallocate.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_diag_crps.o: ./src/PDAF_diag_crps.F90 build/PDAF_mod_filtermpi.o build/SANGOMA_quicksort.o ./src/typedefs.h -build/PDAF_diag_effsample.o: ./src/PDAF_diag_effsample.F90 -build/PDAF_diag_ensstats.o: ./src/PDAF_diag_ensstats.F90 ./src/typedefs.h -build/PDAF_diag_histogram.o: ./src/PDAF_diag_histogram.F90 ./src/typedefs.h -build/PDAF_en3dvar_analysis_cvt.o: ./src/PDAF_en3dvar_analysis_cvt.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h -build/PDAF_en3dvar_costf_cg_cvt.o: ./src/PDAF_en3dvar_costf_cg_cvt.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h -build/PDAF_en3dvar_costf_cvt.o: ./src/PDAF_en3dvar_costf_cvt.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h -build/PDAF_en3dvar_optim_cg.o: ./src/PDAF_en3dvar_optim_cg.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h -build/PDAF_en3dvar_optim_cgplus.o: ./src/PDAF_en3dvar_optim_cgplus.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o -build/PDAF_en3dvar_optim_lbfgs.o: ./src/PDAF_en3dvar_optim_lbfgs.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o -build/PDAF_en3dvar_update_estkf.o: ./src/PDAF_en3dvar_update_estkf.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o -build/PDAF_en3dvar_update_lestkf.o: ./src/PDAF_en3dvar_update_lestkf.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAF_enkf_Tleft.o: ./src/PDAF_enkf_Tleft.F90 build/PDAF_memcount.o -build/PDAF_enkf_alloc.o: ./src/PDAF_enkf_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_enkf_analysis_rlm.o: ./src/PDAF_enkf_analysis_rlm.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o build/PDAF_analysis_utils.o ./src/typedefs.h -build/PDAF_enkf_analysis_rsm.o: ./src/PDAF_enkf_analysis_rsm.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o build/PDAF_analysis_utils.o ./src/typedefs.h -build/PDAF_enkf_gather_resid.o: ./src/PDAF_enkf_gather_resid.F90 build/PDAF_memcount.o build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_enkf_init.o: ./src/PDAF_enkf_init.F90 build/PDAF_mod_filter.o -build/PDAF_enkf_memtime.o: ./src/PDAF_enkf_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o -build/PDAF_enkf_obs_ensemble.o: ./src/PDAF_enkf_obs_ensemble.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h -build/PDAF_enkf_omega.o: ./src/PDAF_enkf_omega.F90 ./src/typedefs.h -build/PDAF_enkf_options.o: ./src/PDAF_enkf_options.F90 -build/PDAF_enkf_update.o: ./src/PDAF_enkf_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o -build/PDAF_eofcovar.o: ./src/PDAF_eofcovar.F90 build/PDAF_mod_filter.o ./src/typedefs.h -build/PDAF_estkf_AOmega.o: ./src/PDAF_estkf_AOmega.F90 build/PDAF_memcount.o -build/PDAF_estkf_OmegaA.o: ./src/PDAF_estkf_OmegaA.F90 build/PDAF_memcount.o -build/PDAF_estkf_alloc.o: ./src/PDAF_estkf_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_estkf_analysis.o: ./src/PDAF_estkf_analysis.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o ./src/typedefs.h -build/PDAF_estkf_analysis_fixed.o: ./src/PDAF_estkf_analysis_fixed.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o ./src/typedefs.h -build/PDAF_estkf_init.o: ./src/PDAF_estkf_init.F90 build/PDAF_mod_filter.o -build/PDAF_estkf_memtime.o: ./src/PDAF_estkf_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o -build/PDAF_estkf_options.o: ./src/PDAF_estkf_options.F90 -build/PDAF_estkf_update.o: ./src/PDAF_estkf_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o -build/PDAF_etkf_Tleft.o: ./src/PDAF_etkf_Tleft.F90 build/PDAF_memcount.o -build/PDAF_etkf_Tright.o: ./src/PDAF_etkf_Tright.F90 build/PDAF_memcount.o -build/PDAF_etkf_alloc.o: ./src/PDAF_etkf_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_etkf_analysis.o: ./src/PDAF_etkf_analysis.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h -build/PDAF_etkf_analysis_T.o: ./src/PDAF_etkf_analysis_T.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h -build/PDAF_etkf_analysis_fixed.o: ./src/PDAF_etkf_analysis_fixed.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h -build/PDAF_etkf_init.o: ./src/PDAF_etkf_init.F90 build/PDAF_mod_filter.o -build/PDAF_etkf_memtime.o: ./src/PDAF_etkf_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o -build/PDAF_etkf_options.o: ./src/PDAF_etkf_options.F90 -build/PDAF_etkf_update.o: ./src/PDAF_etkf_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o -build/PDAF_force_analysis.o: ./src/PDAF_force_analysis.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_gather_dim_obs_f.o: ./src/PDAF_gather_dim_obs_f.F90 build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_gather_obs_f.o: ./src/PDAF_gather_obs_f.F90 build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_gather_obs_f2.o: ./src/PDAF_gather_obs_f2.F90 build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_gather_obs_f2_flex.o: ./src/PDAF_gather_obs_f2_flex.F90 build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_gather_obs_f_flex.o: ./src/PDAF_gather_obs_f_flex.F90 build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_gen_obs.o: ./src/PDAF_gen_obs.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_generate_obs.o: ./src/PDAF_generate_obs.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_generate_obs_si.o: ./src/PDAF_generate_obs_si.F90 -build/PDAF_generate_rndmat.o: ./src/PDAF_generate_rndmat.F90 ./src/typedefs.h -build/PDAF_genobs_alloc.o: ./src/PDAF_genobs_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_genobs_init.o: ./src/PDAF_genobs_init.F90 -build/PDAF_genobs_options.o: ./src/PDAF_genobs_options.F90 -build/PDAF_get_assim_flag.o: ./src/PDAF_get_assim_flag.F90 build/PDAF_mod_filter.o -build/PDAF_get_ensstats.o: ./src/PDAF_get_ensstats.F90 build/PDAF_mod_filter.o ./src/typedefs.h -build/PDAF_get_globalobs.o: ./src/PDAF_get_globalobs.F90 build/PDAF_mod_filter.o -build/PDAF_get_localfilter.o: ./src/PDAF_get_localfilter.F90 build/PDAF_mod_filter.o -build/PDAF_get_memberid.o: ./src/PDAF_get_memberid.F90 build/PDAF_mod_filter.o -build/PDAF_get_obsmemberid.o: ./src/PDAF_get_obsmemberid.F90 build/PDAF_mod_filter.o -build/PDAF_get_smootherens.o: ./src/PDAF_get_smootherens.F90 build/PDAF_mod_filter.o ./src/typedefs.h -build/PDAF_get_state.o: ./src/PDAF_get_state.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_get_state_si.o: ./src/PDAF_get_state_si.F90 -build/PDAF_hyb3dvar_analysis_cvt.o: ./src/PDAF_hyb3dvar_analysis_cvt.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h -build/PDAF_hyb3dvar_costf_cg_cvt.o: ./src/PDAF_hyb3dvar_costf_cg_cvt.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h -build/PDAF_hyb3dvar_costf_cvt.o: ./src/PDAF_hyb3dvar_costf_cvt.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h -build/PDAF_hyb3dvar_optim_cg.o: ./src/PDAF_hyb3dvar_optim_cg.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h -build/PDAF_hyb3dvar_optim_cgplus.o: ./src/PDAF_hyb3dvar_optim_cgplus.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o -build/PDAF_hyb3dvar_optim_lbfgs.o: ./src/PDAF_hyb3dvar_optim_lbfgs.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o -build/PDAF_hyb3dvar_update_estkf.o: ./src/PDAF_hyb3dvar_update_estkf.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o -build/PDAF_hyb3dvar_update_lestkf.o: ./src/PDAF_hyb3dvar_update_lestkf.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAF_incremental.o: ./src/PDAF_incremental.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_incremental_si.o: ./src/PDAF_incremental_si.F90 -build/PDAF_inflate_ens.o: ./src/PDAF_inflate_ens.F90 build/PDAF_memcount.o -build/PDAF_inflate_weights.o: ./src/PDAF_inflate_weights.F90 -build/PDAF_init.o: ./src/PDAF_init.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_init_filters.o: ./src/PDAF_init_filters.F90 build/PDAF_mod_filtermpi.o -build/PDAF_init_si.o: ./src/PDAF_init_si.F90 -build/PDAF_interfaces_module.o: ./src/PDAF_interfaces_module.F90 build/PDAFlocal_interfaces.o build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_lenkf_alloc.o: ./src/PDAF_lenkf_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_lenkf_analysis_rsm.o: ./src/PDAF_lenkf_analysis_rsm.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o build/PDAF_analysis_utils.o ./src/typedefs.h -build/PDAF_lenkf_init.o: ./src/PDAF_lenkf_init.F90 build/PDAF_mod_filter.o -build/PDAF_lenkf_memtime.o: ./src/PDAF_lenkf_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o -build/PDAF_lenkf_options.o: ./src/PDAF_lenkf_options.F90 -build/PDAF_lenkf_update.o: ./src/PDAF_lenkf_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o -build/PDAF_lestkf_alloc.o: ./src/PDAF_lestkf_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_lestkf_analysis.o: ./src/PDAF_lestkf_analysis.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h -build/PDAF_lestkf_analysis_fixed.o: ./src/PDAF_lestkf_analysis_fixed.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h -build/PDAF_lestkf_init.o: ./src/PDAF_lestkf_init.F90 build/PDAF_mod_filter.o -build/PDAF_lestkf_memtime.o: ./src/PDAF_lestkf_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o build/PDAFlocal.o -build/PDAF_lestkf_options.o: ./src/PDAF_lestkf_options.F90 -build/PDAF_lestkf_update.o: ./src/PDAF_lestkf_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAF_analysis_utils.o -build/PDAF_letkf_alloc.o: ./src/PDAF_letkf_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_letkf_analysis.o: ./src/PDAF_letkf_analysis.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h -build/PDAF_letkf_analysis_T.o: ./src/PDAF_letkf_analysis_T.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h -build/PDAF_letkf_analysis_fixed.o: ./src/PDAF_letkf_analysis_fixed.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h -build/PDAF_letkf_init.o: ./src/PDAF_letkf_init.F90 build/PDAF_mod_filter.o -build/PDAF_letkf_memtime.o: ./src/PDAF_letkf_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o build/PDAFlocal.o -build/PDAF_letkf_options.o: ./src/PDAF_letkf_options.F90 -build/PDAF_letkf_update.o: ./src/PDAF_letkf_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAF_analysis_utils.o -build/PDAF_lknetf_alloc.o: ./src/PDAF_lknetf_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_lknetf_alpha_neff.o: ./src/PDAF_lknetf_alpha_neff.F90 -build/PDAF_lknetf_ana_letkfT.o: ./src/PDAF_lknetf_ana_letkfT.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h -build/PDAF_lknetf_ana_lnetf.o: ./src/PDAF_lknetf_ana_lnetf.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h -build/PDAF_lknetf_analysis_T.o: ./src/PDAF_lknetf_analysis_T.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h -build/PDAF_lknetf_compute_gamma.o: ./src/PDAF_lknetf_compute_gamma.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o ./src/typedefs.h -build/PDAF_lknetf_init.o: ./src/PDAF_lknetf_init.F90 build/PDAF_mod_filter.o -build/PDAF_lknetf_memtime.o: ./src/PDAF_lknetf_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o build/PDAFlocal.o -build/PDAF_lknetf_options.o: ./src/PDAF_lknetf_options.F90 -build/PDAF_lknetf_reset_gamma.o: ./src/PDAF_lknetf_reset_gamma.F90 build/PDAF_mod_filter.o -build/PDAF_lknetf_set_gamma.o: ./src/PDAF_lknetf_set_gamma.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h -build/PDAF_lknetf_step_update.o: ./src/PDAF_lknetf_step_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAFomi.o build/PDAF_mod_filtermpi.o build/PDAF_analysis_utils.o ./src/typedefs.h -build/PDAF_lknetf_update.o: ./src/PDAF_lknetf_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAFomi.o build/PDAF_mod_filtermpi.o build/PDAF_analysis_utils.o ./src/typedefs.h -build/PDAF_lnetf_alloc.o: ./src/PDAF_lnetf_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_lnetf_analysis.o: ./src/PDAF_lnetf_analysis.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h -build/PDAF_lnetf_init.o: ./src/PDAF_lnetf_init.F90 build/PDAF_mod_filter.o -build/PDAF_lnetf_memtime.o: ./src/PDAF_lnetf_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o build/PDAFlocal.o -build/PDAF_lnetf_options.o: ./src/PDAF_lnetf_options.F90 -build/PDAF_lnetf_smootherT.o: ./src/PDAF_lnetf_smootherT.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_lnetf_update.o: ./src/PDAF_lnetf_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAF_analysis_utils.o ./src/typedefs.h -build/PDAF_local_weight.o: ./src/PDAF_local_weight.F90 -build/PDAF_local_weights.o: ./src/PDAF_local_weights.F90 -build/PDAF_lseik_alloc.o: ./src/PDAF_lseik_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_lseik_analysis.o: ./src/PDAF_lseik_analysis.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAFomi.o ./src/typedefs.h -build/PDAF_lseik_analysis_trans.o: ./src/PDAF_lseik_analysis_trans.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o ./src/typedefs.h -build/PDAF_lseik_init.o: ./src/PDAF_lseik_init.F90 build/PDAF_mod_filter.o -build/PDAF_lseik_memtime.o: ./src/PDAF_lseik_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o build/PDAFlocal.o -build/PDAF_lseik_options.o: ./src/PDAF_lseik_options.F90 -build/PDAF_lseik_resample.o: ./src/PDAF_lseik_resample.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_lseik_update.o: ./src/PDAF_lseik_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAF_analysis_utils.o -build/PDAF_memcount.o: ./src/PDAF_memcount.F90 ./src/typedefs.h -build/PDAF_mod_filter.o: ./src/PDAF_mod_filter.F90 -build/PDAF_mod_filtermpi.o: ./src/PDAF_mod_filtermpi.F90 -build/PDAF_mod_lnetf.o: ./src/PDAF_mod_lnetf.F90 build/PDAF_mod_filter.o -build/PDAF_mvnormalize.o: ./src/PDAF_mvnormalize.F90 ./src/typedefs.h -build/PDAF_netf_alloc.o: ./src/PDAF_netf_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_netf_analysis.o: ./src/PDAF_netf_analysis.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o build/PDAF_analysis_utils.o ./src/typedefs.h -build/PDAF_netf_init.o: ./src/PDAF_netf_init.F90 build/PDAF_mod_filter.o -build/PDAF_netf_memtime.o: ./src/PDAF_netf_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o -build/PDAF_netf_options.o: ./src/PDAF_netf_options.F90 -build/PDAF_netf_smootherT.o: ./src/PDAF_netf_smootherT.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_netf_update.o: ./src/PDAF_netf_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_options_filters.o: ./src/PDAF_options_filters.F90 build/PDAF_mod_filtermpi.o -build/PDAF_pf_add_noise.o: ./src/PDAF_pf_add_noise.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_pf_alloc.o: ./src/PDAF_pf_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_pf_analysis.o: ./src/PDAF_pf_analysis.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o build/PDAFomi.o build/PDAF_analysis_utils.o ./src/typedefs.h -build/PDAF_pf_init.o: ./src/PDAF_pf_init.F90 build/PDAF_mod_filter.o -build/PDAF_pf_memtime.o: ./src/PDAF_pf_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o -build/PDAF_pf_options.o: ./src/PDAF_pf_options.F90 -build/PDAF_pf_resampling.o: ./src/PDAF_pf_resampling.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_pf_update.o: ./src/PDAF_pf_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o -build/PDAF_prepost.o: ./src/PDAF_prepost.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_prepost_si.o: ./src/PDAF_prepost_si.F90 -build/PDAF_print_info.o: ./src/PDAF_print_info.F90 build/PDAF_mod_filter.o -build/PDAF_print_version.o: ./src/PDAF_print_version.F90 build/PDAF_mod_filtermpi.o -build/PDAF_put_state_3dvar.o: ./src/PDAF_put_state_3dvar.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_put_state_en3dvar_estkf.o: ./src/PDAF_put_state_en3dvar_estkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_put_state_en3dvar_lestkf.o: ./src/PDAF_put_state_en3dvar_lestkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_put_state_enkf.o: ./src/PDAF_put_state_enkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_put_state_enkf_si.o: ./src/PDAF_put_state_enkf_si.F90 -build/PDAF_put_state_estkf.o: ./src/PDAF_put_state_estkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_put_state_estkf_si.o: ./src/PDAF_put_state_estkf_si.F90 -build/PDAF_put_state_etkf.o: ./src/PDAF_put_state_etkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_put_state_etkf_si.o: ./src/PDAF_put_state_etkf_si.F90 -build/PDAF_put_state_generate_obs.o: ./src/PDAF_put_state_generate_obs.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_put_state_generate_obs_si.o: ./src/PDAF_put_state_generate_obs_si.F90 -build/PDAF_put_state_hyb3dvar_estkf.o: ./src/PDAF_put_state_hyb3dvar_estkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_put_state_hyb3dvar_lestkf.o: ./src/PDAF_put_state_hyb3dvar_lestkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_put_state_lenkf.o: ./src/PDAF_put_state_lenkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_put_state_lenkf_si.o: ./src/PDAF_put_state_lenkf_si.F90 -build/PDAF_put_state_lestkf.o: ./src/PDAF_put_state_lestkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_put_state_lestkf_si.o: ./src/PDAF_put_state_lestkf_si.F90 -build/PDAF_put_state_letkf.o: ./src/PDAF_put_state_letkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_put_state_letkf_si.o: ./src/PDAF_put_state_letkf_si.F90 -build/PDAF_put_state_lknetf.o: ./src/PDAF_put_state_lknetf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_put_state_lknetf_si.o: ./src/PDAF_put_state_lknetf_si.F90 -build/PDAF_put_state_lnetf.o: ./src/PDAF_put_state_lnetf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_put_state_lnetf_si.o: ./src/PDAF_put_state_lnetf_si.F90 -build/PDAF_put_state_lseik.o: ./src/PDAF_put_state_lseik.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_put_state_lseik_si.o: ./src/PDAF_put_state_lseik_si.F90 -build/PDAF_put_state_netf.o: ./src/PDAF_put_state_netf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_put_state_netf_si.o: ./src/PDAF_put_state_netf_si.F90 -build/PDAF_put_state_pf.o: ./src/PDAF_put_state_pf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_put_state_pf_si.o: ./src/PDAF_put_state_pf_si.F90 -build/PDAF_put_state_prepost.o: ./src/PDAF_put_state_prepost.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_put_state_prepost_si.o: ./src/PDAF_put_state_prepost_si.F90 -build/PDAF_put_state_seek.o: ./src/PDAF_put_state_seek.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_put_state_seek_si.o: ./src/PDAF_put_state_seek_si.F90 -build/PDAF_put_state_seik.o: ./src/PDAF_put_state_seik.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_put_state_seik_si.o: ./src/PDAF_put_state_seik_si.F90 -build/PDAF_reset_dim_p.o: ./src/PDAF_reset_dim_p.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_reset_forget.o: ./src/PDAF_reset_forget.F90 build/PDAF_mod_filter.o -build/PDAF_sampleens.o: ./src/PDAF_sampleens.F90 build/PDAF_mod_filter.o ./src/typedefs.h -build/PDAF_seek_alloc.o: ./src/PDAF_seek_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_seek_analysis.o: ./src/PDAF_seek_analysis.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_seek_init.o: ./src/PDAF_seek_init.F90 build/PDAF_mod_filter.o -build/PDAF_seek_memtime.o: ./src/PDAF_seek_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_seek_options.o: ./src/PDAF_seek_options.F90 -build/PDAF_seek_rediag.o: ./src/PDAF_seek_rediag.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_seek_update.o: ./src/PDAF_seek_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o -build/PDAF_seik_TtimesA.o: ./src/PDAF_seik_TtimesA.F90 build/PDAF_memcount.o -build/PDAF_seik_alloc.o: ./src/PDAF_seik_alloc.F90 build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_seik_analysis.o: ./src/PDAF_seik_analysis.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o ./src/typedefs.h -build/PDAF_seik_analysis_newT.o: ./src/PDAF_seik_analysis_newT.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o ./src/typedefs.h -build/PDAF_seik_analysis_trans.o: ./src/PDAF_seik_analysis_trans.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o ./src/typedefs.h -build/PDAF_seik_init.o: ./src/PDAF_seik_init.F90 build/PDAF_mod_filter.o -build/PDAF_seik_matrixT.o: ./src/PDAF_seik_matrixT.F90 build/PDAF_memcount.o -build/PDAF_seik_memtime.o: ./src/PDAF_seik_memtime.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFomi.o -build/PDAF_seik_omega.o: ./src/PDAF_seik_omega.F90 build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_seik_options.o: ./src/PDAF_seik_options.F90 -build/PDAF_seik_resample.o: ./src/PDAF_seik_resample.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_seik_resample_newT.o: ./src/PDAF_seik_resample_newT.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_seik_uinv.o: ./src/PDAF_seik_uinv.F90 build/PDAF_mod_filter.o -build/PDAF_seik_update.o: ./src/PDAF_seik_update.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o -build/PDAF_set_comm_pdaf.o: ./src/PDAF_set_comm_pdaf.F90 build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o -build/PDAF_set_debug_flag.o: ./src/PDAF_set_debug_flag.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAF_set_ens_pointer.o: ./src/PDAF_set_ens_pointer.F90 build/PDAF_mod_filter.o ./src/typedefs.h -build/PDAF_set_forget.o: ./src/PDAF_set_forget.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_set_forget_local.o: ./src/PDAF_set_forget_local.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filtermpi.o -build/PDAF_set_memberid.o: ./src/PDAF_set_memberid.F90 build/PDAF_mod_filter.o -build/PDAF_set_offline_mode.o: ./src/PDAF_set_offline_mode.F90 build/PDAF_mod_filter.o -build/PDAF_set_smootherens.o: ./src/PDAF_set_smootherens.F90 build/PDAF_mod_filter.o ./src/typedefs.h -build/PDAF_smoother.o: ./src/PDAF_smoother.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_smoother_enkf.o: ./src/PDAF_smoother_enkf.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_smoother_lnetf.o: ./src/PDAF_smoother_lnetf.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_smoother_local.o: ./src/PDAF_smoother_local.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_smoother_netf.o: ./src/PDAF_smoother_netf.F90 build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_smoother_shift.o: ./src/PDAF_smoother_shift.F90 build/PDAF_mod_filtermpi.o ./src/typedefs.h -build/PDAF_timer.o: ./src/PDAF_timer.F90 -build/PDAF_timer_mpi.o: ./src/PDAF_timer_mpi.F90 -build/PDAFlocal.o: ./src/PDAFlocal.F90 build/PDAFlocal_interfaces.o -build/PDAFlocal_assimilate_en3dvar_lestkf.o: ./src/PDAFlocal_assimilate_en3dvar_lestkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAFlocal_assimilate_hyb3dvar_lestkf.o: ./src/PDAFlocal_assimilate_hyb3dvar_lestkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAFlocal_assimilate_lestkf.o: ./src/PDAFlocal_assimilate_lestkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAFlocal_assimilate_lestkf_si.o: ./src/PDAFlocal_assimilate_lestkf_si.F90 -build/PDAFlocal_assimilate_letkf.o: ./src/PDAFlocal_assimilate_letkf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAFlocal_assimilate_letkf_si.o: ./src/PDAFlocal_assimilate_letkf_si.F90 -build/PDAFlocal_assimilate_lknetf.o: ./src/PDAFlocal_assimilate_lknetf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAFlocal_assimilate_lknetf_si.o: ./src/PDAFlocal_assimilate_lknetf_si.F90 -build/PDAFlocal_assimilate_lnetf.o: ./src/PDAFlocal_assimilate_lnetf.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAFlocal_assimilate_lnetf_si.o: ./src/PDAFlocal_assimilate_lnetf_si.F90 -build/PDAFlocal_assimilate_lseik.o: ./src/PDAFlocal_assimilate_lseik.F90 build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAFlocal_assimilate_lseik_si.o: ./src/PDAFlocal_assimilate_lseik_si.F90 -build/PDAFlocal_clear_increment_weights.o: ./src/PDAFlocal_clear_increment_weights.F90 build/PDAF_mod_filter.o build/PDAFlocal.o -build/PDAFlocal_g2l_cb.o: ./src/PDAFlocal_g2l_cb.F90 build/PDAFlocal.o -build/PDAFlocal_interfaces.o: ./src/PDAFlocal_interfaces.F90 ./src/typedefs.h -build/PDAFlocal_l2g_cb.o: ./src/PDAFlocal_l2g_cb.F90 build/PDAFlocal.o -build/PDAFlocal_put_state_en3dvar_lestkf.o: ./src/PDAFlocal_put_state_en3dvar_lestkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFlocal.o -build/PDAFlocal_put_state_hyb3dvar_lestkf.o: ./src/PDAFlocal_put_state_hyb3dvar_lestkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFlocal.o -build/PDAFlocal_put_state_lestkf.o: ./src/PDAFlocal_put_state_lestkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFlocal.o -build/PDAFlocal_put_state_lestkf_si.o: ./src/PDAFlocal_put_state_lestkf_si.F90 -build/PDAFlocal_put_state_letkf.o: ./src/PDAFlocal_put_state_letkf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFlocal.o -build/PDAFlocal_put_state_letkf_si.o: ./src/PDAFlocal_put_state_letkf_si.F90 -build/PDAFlocal_put_state_lknetf.o: ./src/PDAFlocal_put_state_lknetf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFlocal.o -build/PDAFlocal_put_state_lknetf_si.o: ./src/PDAFlocal_put_state_lknetf_si.F90 -build/PDAFlocal_put_state_lnetf.o: ./src/PDAFlocal_put_state_lnetf.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_memcount.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFlocal.o -build/PDAFlocal_put_state_lnetf_si.o: ./src/PDAFlocal_put_state_lnetf_si.F90 -build/PDAFlocal_put_state_lseik.o: ./src/PDAFlocal_put_state_lseik.F90 build/PDAF_communicate_ens.o build/PDAF_timer.o build/PDAF_timer_mpi.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o build/PDAFlocal.o -build/PDAFlocal_put_state_lseik_si.o: ./src/PDAFlocal_put_state_lseik_si.F90 -build/PDAFlocal_set_increment_weights.o: ./src/PDAFlocal_set_increment_weights.F90 build/PDAF_mod_filter.o build/PDAFlocal.o -build/PDAFlocal_set_indices.o: ./src/PDAFlocal_set_indices.F90 build/PDAF_mod_filter.o build/PDAFlocal.o -build/PDAFlocalomi_assimilate.o: ./src/PDAFlocalomi_assimilate.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFlocalomi_assimilate_en3dvar_lestkf.o: ./src/PDAFlocalomi_assimilate_en3dvar_lestkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.o: ./src/PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFlocalomi_assimilate_hyb3dvar_lestkf.o: ./src/PDAFlocalomi_assimilate_hyb3dvar_lestkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.o: ./src/PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFlocalomi_assimilate_lknetf_nondiagR.o: ./src/PDAFlocalomi_assimilate_lknetf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFlocalomi_assimilate_lknetf_nondiagR_si.o: ./src/PDAFlocalomi_assimilate_lknetf_nondiagR_si.F90 -build/PDAFlocalomi_assimilate_lnetf_nondiagR.o: ./src/PDAFlocalomi_assimilate_lnetf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFlocalomi_assimilate_lnetf_nondiagR_si.o: ./src/PDAFlocalomi_assimilate_lnetf_nondiagR_si.F90 -build/PDAFlocalomi_assimilate_nondiagR.o: ./src/PDAFlocalomi_assimilate_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFlocalomi_assimilate_nondiagR_si.o: ./src/PDAFlocalomi_assimilate_nondiagR_si.F90 -build/PDAFlocalomi_assimilate_si.o: ./src/PDAFlocalomi_assimilate_si.F90 -build/PDAFlocalomi_put_state.o: ./src/PDAFlocalomi_put_state.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFlocalomi_put_state_en3dvar_lestkf.o: ./src/PDAFlocalomi_put_state_en3dvar_lestkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR.o: ./src/PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFlocalomi_put_state_hyb3dvar_lestkf.o: ./src/PDAFlocalomi_put_state_hyb3dvar_lestkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR.o: ./src/PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFlocalomi_put_state_lknetf_nondiagR.o: ./src/PDAFlocalomi_put_state_lknetf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFlocalomi_put_state_lknetf_nondiagR_si.o: ./src/PDAFlocalomi_put_state_lknetf_nondiagR_si.F90 -build/PDAFlocalomi_put_state_lnetf_nondiagR.o: ./src/PDAFlocalomi_put_state_lnetf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFlocalomi_put_state_lnetf_nondiagR_si.o: ./src/PDAFlocalomi_put_state_lnetf_nondiagR_si.F90 -build/PDAFlocalomi_put_state_nondiagR.o: ./src/PDAFlocalomi_put_state_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFlocalomi_put_state_nondiagR_si.o: ./src/PDAFlocalomi_put_state_nondiagR_si.F90 -build/PDAFlocalomi_put_state_si.o: ./src/PDAFlocalomi_put_state_si.F90 -build/PDAFomi.o: ./src/PDAFomi.F90 build/PDAFomi_obs_f.o build/PDAFomi_obs_l.o build/PDAFomi_obs_op.o -build/PDAFomi_assimilate_3dvar.o: ./src/PDAFomi_assimilate_3dvar.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_assimilate_3dvar_nondiagR.o: ./src/PDAFomi_assimilate_3dvar_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_assimilate_en3dvar_estkf.o: ./src/PDAFomi_assimilate_en3dvar_estkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_assimilate_en3dvar_estkf_nondiagR.o: ./src/PDAFomi_assimilate_en3dvar_estkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_assimilate_en3dvar_lestkf.o: ./src/PDAFomi_assimilate_en3dvar_lestkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_assimilate_en3dvar_lestkf_nondiagR.o: ./src/PDAFomi_assimilate_en3dvar_lestkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_assimilate_enkf_nondiagR.o: ./src/PDAFomi_assimilate_enkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_assimilate_enkf_nondiagR_si.o: ./src/PDAFomi_assimilate_enkf_nondiagR_si.F90 -build/PDAFomi_assimilate_global.o: ./src/PDAFomi_assimilate_global.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_assimilate_global_nondiagR.o: ./src/PDAFomi_assimilate_global_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_assimilate_global_nondiagR_si.o: ./src/PDAFomi_assimilate_global_nondiagR_si.F90 -build/PDAFomi_assimilate_global_si.o: ./src/PDAFomi_assimilate_global_si.F90 -build/PDAFomi_assimilate_hyb3dvar_estkf.o: ./src/PDAFomi_assimilate_hyb3dvar_estkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_assimilate_hyb3dvar_estkf_nondiagR.o: ./src/PDAFomi_assimilate_hyb3dvar_estkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_assimilate_hyb3dvar_lestkf.o: ./src/PDAFomi_assimilate_hyb3dvar_lestkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR.o: ./src/PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_assimilate_lenkf.o: ./src/PDAFomi_assimilate_lenkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_assimilate_lenkf_nondiagR.o: ./src/PDAFomi_assimilate_lenkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_assimilate_lenkf_nondiagR_si.o: ./src/PDAFomi_assimilate_lenkf_nondiagR_si.F90 -build/PDAFomi_assimilate_lenkf_si.o: ./src/PDAFomi_assimilate_lenkf_si.F90 -build/PDAFomi_assimilate_lknetf_nondiagR.o: ./src/PDAFomi_assimilate_lknetf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_assimilate_lknetf_nondiagR_si.o: ./src/PDAFomi_assimilate_lknetf_nondiagR_si.F90 -build/PDAFomi_assimilate_lnetf_nondiagR.o: ./src/PDAFomi_assimilate_lnetf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_assimilate_lnetf_nondiagR_si.o: ./src/PDAFomi_assimilate_lnetf_nondiagR_si.F90 -build/PDAFomi_assimilate_local.o: ./src/PDAFomi_assimilate_local.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_assimilate_local_nondiagR.o: ./src/PDAFomi_assimilate_local_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_assimilate_local_nondiagR_si.o: ./src/PDAFomi_assimilate_local_nondiagR_si.F90 -build/PDAFomi_assimilate_local_si.o: ./src/PDAFomi_assimilate_local_si.F90 -build/PDAFomi_assimilate_nonlin_nondiagR.o: ./src/PDAFomi_assimilate_nonlin_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_assimilate_nonlin_nondiagR_si.o: ./src/PDAFomi_assimilate_nonlin_nondiagR_si.F90 -build/PDAFomi_callback.o: ./src/PDAFomi_callback.F90 build/PDAFomi.o build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o -build/PDAFomi_generate_obs.o: ./src/PDAFomi_generate_obs.F90 build/PDAFomi.o -build/PDAFomi_obs_f.o: ./src/PDAFomi_obs_f.F90 build/PDAF_mod_filtermpi.o build/PDAF_mod_filter.o ./src/typedefs.h -build/PDAFomi_obs_l.o: ./src/PDAFomi_obs_l.F90 build/PDAFomi_obs_f.o build/PDAF_mod_filter.o build/PDAF_mod_filtermpi.o -build/PDAFomi_obs_op.o: ./src/PDAFomi_obs_op.F90 build/PDAFomi_obs_f.o -build/PDAFomi_put_state_3dvar.o: ./src/PDAFomi_put_state_3dvar.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_put_state_3dvar_nondiagR.o: ./src/PDAFomi_put_state_3dvar_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_put_state_en3dvar_estkf.o: ./src/PDAFomi_put_state_en3dvar_estkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_put_state_en3dvar_estkf_nondiagR.o: ./src/PDAFomi_put_state_en3dvar_estkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_put_state_en3dvar_lestkf.o: ./src/PDAFomi_put_state_en3dvar_lestkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_put_state_en3dvar_lestkf_nondiagR.o: ./src/PDAFomi_put_state_en3dvar_lestkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_put_state_enkf_nondiagR.o: ./src/PDAFomi_put_state_enkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_put_state_enkf_nondiagR_si.o: ./src/PDAFomi_put_state_enkf_nondiagR_si.F90 -build/PDAFomi_put_state_generate_obs.o: ./src/PDAFomi_put_state_generate_obs.F90 build/PDAFomi.o -build/PDAFomi_put_state_global.o: ./src/PDAFomi_put_state_global.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_put_state_global_nondiagR.o: ./src/PDAFomi_put_state_global_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_put_state_global_nondiagR_si.o: ./src/PDAFomi_put_state_global_nondiagR_si.F90 -build/PDAFomi_put_state_global_si.o: ./src/PDAFomi_put_state_global_si.F90 -build/PDAFomi_put_state_hyb3dvar_estkf.o: ./src/PDAFomi_put_state_hyb3dvar_estkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_put_state_hyb3dvar_estkf_nondiagR.o: ./src/PDAFomi_put_state_hyb3dvar_estkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_put_state_hyb3dvar_lestkf.o: ./src/PDAFomi_put_state_hyb3dvar_lestkf.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.o: ./src/PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_put_state_lenkf.o: ./src/PDAFomi_put_state_lenkf.F90 build/PDAFomi.o -build/PDAFomi_put_state_lenkf_nondiagR.o: ./src/PDAFomi_put_state_lenkf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_put_state_lenkf_nondiagR_si.o: ./src/PDAFomi_put_state_lenkf_nondiagR_si.F90 -build/PDAFomi_put_state_lenkf_si.o: ./src/PDAFomi_put_state_lenkf_si.F90 -build/PDAFomi_put_state_lknetf_nondiagR.o: ./src/PDAFomi_put_state_lknetf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_put_state_lknetf_nondiagR_si.o: ./src/PDAFomi_put_state_lknetf_nondiagR_si.F90 -build/PDAFomi_put_state_lnetf_nondiagR.o: ./src/PDAFomi_put_state_lnetf_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_put_state_lnetf_nondiagR_si.o: ./src/PDAFomi_put_state_lnetf_nondiagR_si.F90 -build/PDAFomi_put_state_local.o: ./src/PDAFomi_put_state_local.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_put_state_local_nondiagR.o: ./src/PDAFomi_put_state_local_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_put_state_local_nondiagR_si.o: ./src/PDAFomi_put_state_local_nondiagR_si.F90 -build/PDAFomi_put_state_local_si.o: ./src/PDAFomi_put_state_local_si.F90 -build/PDAFomi_put_state_nonlin_nondiagR.o: ./src/PDAFomi_put_state_nonlin_nondiagR.F90 build/PDAF_mod_filter.o build/PDAFomi.o -build/PDAFomi_put_state_nonlin_nondiagR_si.o: ./src/PDAFomi_put_state_nonlin_nondiagR_si.F90 -build/SANGOMA_quicksort.o: ./external/SANGOMA/SANGOMA_quicksort.F90 -build/blas.o: ./external/CG+/blas.f -build/cgfam.o: ./external/CG+/cgfam.f -build/cgsearch.o: ./external/CG+/cgsearch.f -build/driver1.o: ./external/LBFGS/driver1.f -build/driver1.o: ./external/LBFGS/driver1.f90 -build/driver2.o: ./external/LBFGS/driver2.f -build/driver2.o: ./external/LBFGS/driver2.f90 -build/driver3.o: ./external/LBFGS/driver3.f -build/driver3.o: ./external/LBFGS/driver3.f90 -build/fcn.o: ./external/CG+/fcn.f -build/lbfgsb.o: ./external/LBFGS/lbfgsb.f -build/linpack.o: ./external/LBFGS/linpack.f -build/main.o: ./external/CG+/main.f -build/timer.o: ./external/CG+/timer.f -build/typedefs.h: ./src/typedefs.h +$(OBJDIR)/PDAF_3dvar_alloc.o: ./src/PDAF_3dvar_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_3dvar_analysis_cvt.o: ./src/PDAF_3dvar_analysis_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_3dvar_costf_cg_cvt.o: ./src/PDAF_3dvar_costf_cg_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_3dvar_costf_cvt.o: ./src/PDAF_3dvar_costf_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_3dvar_init.o: ./src/PDAF_3dvar_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_3dvar_memtime.o: ./src/PDAF_3dvar_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAF_3dvar_optim_cg.o: ./src/PDAF_3dvar_optim_cg.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_3dvar_optim_cgplus.o: ./src/PDAF_3dvar_optim_cgplus.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_3dvar_optim_lbfgs.o: ./src/PDAF_3dvar_optim_lbfgs.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_3dvar_options.o: ./src/PDAF_3dvar_options.F90 +$(OBJDIR)/PDAF_3dvar_update.o: ./src/PDAF_3dvar_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_add_increment.o: ./src/PDAF_add_increment.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_alloc_filters.o: ./src/PDAF_alloc_filters.F90 +$(OBJDIR)/PDAF_allreduce.o: ./src/PDAF_allreduce.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_analysis_utils.o: ./src/PDAF_analysis_utils.F90 $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_assimilate_3dvar.o: ./src/PDAF_assimilate_3dvar.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_en3dvar_estkf.o: ./src/PDAF_assimilate_en3dvar_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_en3dvar_lestkf.o: ./src/PDAF_assimilate_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_enkf.o: ./src/PDAF_assimilate_enkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_enkf_si.o: ./src/PDAF_assimilate_enkf_si.F90 +$(OBJDIR)/PDAF_assimilate_estkf.o: ./src/PDAF_assimilate_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_estkf_si.o: ./src/PDAF_assimilate_estkf_si.F90 +$(OBJDIR)/PDAF_assimilate_etkf.o: ./src/PDAF_assimilate_etkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_etkf_si.o: ./src/PDAF_assimilate_etkf_si.F90 +$(OBJDIR)/PDAF_assimilate_hyb3dvar_estkf.o: ./src/PDAF_assimilate_hyb3dvar_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_hyb3dvar_lestkf.o: ./src/PDAF_assimilate_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_lenkf.o: ./src/PDAF_assimilate_lenkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_lenkf_si.o: ./src/PDAF_assimilate_lenkf_si.F90 +$(OBJDIR)/PDAF_assimilate_lestkf.o: ./src/PDAF_assimilate_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_lestkf_si.o: ./src/PDAF_assimilate_lestkf_si.F90 +$(OBJDIR)/PDAF_assimilate_letkf.o: ./src/PDAF_assimilate_letkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_letkf_si.o: ./src/PDAF_assimilate_letkf_si.F90 +$(OBJDIR)/PDAF_assimilate_lknetf.o: ./src/PDAF_assimilate_lknetf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_lknetf_si.o: ./src/PDAF_assimilate_lknetf_si.F90 +$(OBJDIR)/PDAF_assimilate_lnetf.o: ./src/PDAF_assimilate_lnetf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_lnetf_si.o: ./src/PDAF_assimilate_lnetf_si.F90 +$(OBJDIR)/PDAF_assimilate_lseik.o: ./src/PDAF_assimilate_lseik.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_lseik_si.o: ./src/PDAF_assimilate_lseik_si.F90 +$(OBJDIR)/PDAF_assimilate_netf.o: ./src/PDAF_assimilate_netf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_netf_si.o: ./src/PDAF_assimilate_netf_si.F90 +$(OBJDIR)/PDAF_assimilate_pf.o: ./src/PDAF_assimilate_pf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_pf_si.o: ./src/PDAF_assimilate_pf_si.F90 +$(OBJDIR)/PDAF_assimilate_prepost.o: ./src/PDAF_assimilate_prepost.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_prepost_si.o: ./src/PDAF_assimilate_prepost_si.F90 +$(OBJDIR)/PDAF_assimilate_seek.o: ./src/PDAF_assimilate_seek.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_seek_si.o: ./src/PDAF_assimilate_seek_si.F90 +$(OBJDIR)/PDAF_assimilate_seik.o: ./src/PDAF_assimilate_seik.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_assimilate_seik_si.o: ./src/PDAF_assimilate_seik_si.F90 +$(OBJDIR)/PDAF_communicate_ens.o: ./src/PDAF_communicate_ens.F90 $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_correlation_function.o: ./src/PDAF_correlation_function.F90 +$(OBJDIR)/PDAF_deallocate.o: ./src/PDAF_deallocate.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_diag_crps.o: ./src/PDAF_diag_crps.F90 $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/SANGOMA_quicksort.o ./src/typedefs.h +$(OBJDIR)/PDAF_diag_effsample.o: ./src/PDAF_diag_effsample.F90 +$(OBJDIR)/PDAF_diag_ensstats.o: ./src/PDAF_diag_ensstats.F90 ./src/typedefs.h +$(OBJDIR)/PDAF_diag_histogram.o: ./src/PDAF_diag_histogram.F90 ./src/typedefs.h +$(OBJDIR)/PDAF_en3dvar_analysis_cvt.o: ./src/PDAF_en3dvar_analysis_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_en3dvar_costf_cg_cvt.o: ./src/PDAF_en3dvar_costf_cg_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_en3dvar_costf_cvt.o: ./src/PDAF_en3dvar_costf_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_en3dvar_optim_cg.o: ./src/PDAF_en3dvar_optim_cg.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_en3dvar_optim_cgplus.o: ./src/PDAF_en3dvar_optim_cgplus.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_en3dvar_optim_lbfgs.o: ./src/PDAF_en3dvar_optim_lbfgs.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_en3dvar_update_estkf.o: ./src/PDAF_en3dvar_update_estkf.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_en3dvar_update_lestkf.o: ./src/PDAF_en3dvar_update_lestkf.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAF_enkf_Tleft.o: ./src/PDAF_enkf_Tleft.F90 $(OBJDIR)/PDAF_memcount.o +$(OBJDIR)/PDAF_enkf_alloc.o: ./src/PDAF_enkf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_enkf_analysis_rlm.o: ./src/PDAF_enkf_analysis_rlm.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h +$(OBJDIR)/PDAF_enkf_analysis_rsm.o: ./src/PDAF_enkf_analysis_rsm.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h +$(OBJDIR)/PDAF_enkf_gather_resid.o: ./src/PDAF_enkf_gather_resid.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_enkf_init.o: ./src/PDAF_enkf_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_enkf_memtime.o: ./src/PDAF_enkf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAF_enkf_obs_ensemble.o: ./src/PDAF_enkf_obs_ensemble.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_enkf_omega.o: ./src/PDAF_enkf_omega.F90 ./src/typedefs.h +$(OBJDIR)/PDAF_enkf_options.o: ./src/PDAF_enkf_options.F90 +$(OBJDIR)/PDAF_enkf_update.o: ./src/PDAF_enkf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_eofcovar.o: ./src/PDAF_eofcovar.F90 $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_estkf_AOmega.o: ./src/PDAF_estkf_AOmega.F90 $(OBJDIR)/PDAF_memcount.o +$(OBJDIR)/PDAF_estkf_OmegaA.o: ./src/PDAF_estkf_OmegaA.F90 $(OBJDIR)/PDAF_memcount.o +$(OBJDIR)/PDAF_estkf_alloc.o: ./src/PDAF_estkf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_estkf_analysis.o: ./src/PDAF_estkf_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_estkf_analysis_fixed.o: ./src/PDAF_estkf_analysis_fixed.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_estkf_init.o: ./src/PDAF_estkf_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_estkf_memtime.o: ./src/PDAF_estkf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAF_estkf_options.o: ./src/PDAF_estkf_options.F90 +$(OBJDIR)/PDAF_estkf_update.o: ./src/PDAF_estkf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_etkf_Tleft.o: ./src/PDAF_etkf_Tleft.F90 $(OBJDIR)/PDAF_memcount.o +$(OBJDIR)/PDAF_etkf_Tright.o: ./src/PDAF_etkf_Tright.F90 $(OBJDIR)/PDAF_memcount.o +$(OBJDIR)/PDAF_etkf_alloc.o: ./src/PDAF_etkf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_etkf_analysis.o: ./src/PDAF_etkf_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_etkf_analysis_T.o: ./src/PDAF_etkf_analysis_T.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_etkf_analysis_fixed.o: ./src/PDAF_etkf_analysis_fixed.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_etkf_init.o: ./src/PDAF_etkf_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_etkf_memtime.o: ./src/PDAF_etkf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAF_etkf_options.o: ./src/PDAF_etkf_options.F90 +$(OBJDIR)/PDAF_etkf_update.o: ./src/PDAF_etkf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_force_analysis.o: ./src/PDAF_force_analysis.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_gather_dim_obs_f.o: ./src/PDAF_gather_dim_obs_f.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_gather_obs_f.o: ./src/PDAF_gather_obs_f.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_gather_obs_f2.o: ./src/PDAF_gather_obs_f2.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_gather_obs_f2_flex.o: ./src/PDAF_gather_obs_f2_flex.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_gather_obs_f_flex.o: ./src/PDAF_gather_obs_f_flex.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_gen_obs.o: ./src/PDAF_gen_obs.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_generate_obs.o: ./src/PDAF_generate_obs.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_generate_obs_si.o: ./src/PDAF_generate_obs_si.F90 +$(OBJDIR)/PDAF_generate_rndmat.o: ./src/PDAF_generate_rndmat.F90 ./src/typedefs.h +$(OBJDIR)/PDAF_genobs_alloc.o: ./src/PDAF_genobs_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_genobs_init.o: ./src/PDAF_genobs_init.F90 +$(OBJDIR)/PDAF_genobs_options.o: ./src/PDAF_genobs_options.F90 +$(OBJDIR)/PDAF_get_assim_flag.o: ./src/PDAF_get_assim_flag.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_get_ensstats.o: ./src/PDAF_get_ensstats.F90 $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_get_globalobs.o: ./src/PDAF_get_globalobs.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_get_localfilter.o: ./src/PDAF_get_localfilter.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_get_memberid.o: ./src/PDAF_get_memberid.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_get_obsmemberid.o: ./src/PDAF_get_obsmemberid.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_get_smootherens.o: ./src/PDAF_get_smootherens.F90 $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_get_state.o: ./src/PDAF_get_state.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_get_state_si.o: ./src/PDAF_get_state_si.F90 +$(OBJDIR)/PDAF_hyb3dvar_analysis_cvt.o: ./src/PDAF_hyb3dvar_analysis_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_hyb3dvar_costf_cg_cvt.o: ./src/PDAF_hyb3dvar_costf_cg_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_hyb3dvar_costf_cvt.o: ./src/PDAF_hyb3dvar_costf_cvt.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_hyb3dvar_optim_cg.o: ./src/PDAF_hyb3dvar_optim_cg.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_hyb3dvar_optim_cgplus.o: ./src/PDAF_hyb3dvar_optim_cgplus.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_hyb3dvar_optim_lbfgs.o: ./src/PDAF_hyb3dvar_optim_lbfgs.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_hyb3dvar_update_estkf.o: ./src/PDAF_hyb3dvar_update_estkf.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_hyb3dvar_update_lestkf.o: ./src/PDAF_hyb3dvar_update_lestkf.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAF_incremental.o: ./src/PDAF_incremental.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_incremental_si.o: ./src/PDAF_incremental_si.F90 +$(OBJDIR)/PDAF_inflate_ens.o: ./src/PDAF_inflate_ens.F90 $(OBJDIR)/PDAF_memcount.o +$(OBJDIR)/PDAF_inflate_weights.o: ./src/PDAF_inflate_weights.F90 +$(OBJDIR)/PDAF_init.o: ./src/PDAF_init.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_init_filters.o: ./src/PDAF_init_filters.F90 $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_init_si.o: ./src/PDAF_init_si.F90 +$(OBJDIR)/PDAF_interfaces_module.o: ./src/PDAF_interfaces_module.F90 $(OBJDIR)/PDAFlocal_interfaces.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_lenkf_alloc.o: ./src/PDAF_lenkf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_lenkf_analysis_rsm.o: ./src/PDAF_lenkf_analysis_rsm.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h +$(OBJDIR)/PDAF_lenkf_init.o: ./src/PDAF_lenkf_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_lenkf_memtime.o: ./src/PDAF_lenkf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAF_lenkf_options.o: ./src/PDAF_lenkf_options.F90 +$(OBJDIR)/PDAF_lenkf_update.o: ./src/PDAF_lenkf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_lestkf_alloc.o: ./src/PDAF_lestkf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_lestkf_analysis.o: ./src/PDAF_lestkf_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_lestkf_analysis_fixed.o: ./src/PDAF_lestkf_analysis_fixed.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_lestkf_init.o: ./src/PDAF_lestkf_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_lestkf_memtime.o: ./src/PDAF_lestkf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAF_lestkf_options.o: ./src/PDAF_lestkf_options.F90 +$(OBJDIR)/PDAF_lestkf_update.o: ./src/PDAF_lestkf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_analysis_utils.o +$(OBJDIR)/PDAF_letkf_alloc.o: ./src/PDAF_letkf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_letkf_analysis.o: ./src/PDAF_letkf_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_letkf_analysis_T.o: ./src/PDAF_letkf_analysis_T.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_letkf_analysis_fixed.o: ./src/PDAF_letkf_analysis_fixed.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_letkf_init.o: ./src/PDAF_letkf_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_letkf_memtime.o: ./src/PDAF_letkf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAF_letkf_options.o: ./src/PDAF_letkf_options.F90 +$(OBJDIR)/PDAF_letkf_update.o: ./src/PDAF_letkf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_analysis_utils.o +$(OBJDIR)/PDAF_lknetf_alloc.o: ./src/PDAF_lknetf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_lknetf_alpha_neff.o: ./src/PDAF_lknetf_alpha_neff.F90 +$(OBJDIR)/PDAF_lknetf_ana_letkfT.o: ./src/PDAF_lknetf_ana_letkfT.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_lknetf_ana_lnetf.o: ./src/PDAF_lknetf_ana_lnetf.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_lknetf_analysis_T.o: ./src/PDAF_lknetf_analysis_T.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_lknetf_compute_gamma.o: ./src/PDAF_lknetf_compute_gamma.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_lknetf_init.o: ./src/PDAF_lknetf_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_lknetf_memtime.o: ./src/PDAF_lknetf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAF_lknetf_options.o: ./src/PDAF_lknetf_options.F90 +$(OBJDIR)/PDAF_lknetf_reset_gamma.o: ./src/PDAF_lknetf_reset_gamma.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_lknetf_set_gamma.o: ./src/PDAF_lknetf_set_gamma.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_lknetf_step_update.o: ./src/PDAF_lknetf_step_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h +$(OBJDIR)/PDAF_lknetf_update.o: ./src/PDAF_lknetf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h +$(OBJDIR)/PDAF_lnetf_alloc.o: ./src/PDAF_lnetf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_lnetf_analysis.o: ./src/PDAF_lnetf_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_lnetf_init.o: ./src/PDAF_lnetf_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_lnetf_memtime.o: ./src/PDAF_lnetf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAF_lnetf_options.o: ./src/PDAF_lnetf_options.F90 +$(OBJDIR)/PDAF_lnetf_smootherT.o: ./src/PDAF_lnetf_smootherT.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_lnetf_update.o: ./src/PDAF_lnetf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h +$(OBJDIR)/PDAF_local_weight.o: ./src/PDAF_local_weight.F90 +$(OBJDIR)/PDAF_local_weights.o: ./src/PDAF_local_weights.F90 +$(OBJDIR)/PDAF_lseik_alloc.o: ./src/PDAF_lseik_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_lseik_analysis.o: ./src/PDAF_lseik_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_lseik_analysis_trans.o: ./src/PDAF_lseik_analysis_trans.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_lseik_init.o: ./src/PDAF_lseik_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_lseik_memtime.o: ./src/PDAF_lseik_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAF_lseik_options.o: ./src/PDAF_lseik_options.F90 +$(OBJDIR)/PDAF_lseik_resample.o: ./src/PDAF_lseik_resample.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_lseik_update.o: ./src/PDAF_lseik_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_analysis_utils.o +$(OBJDIR)/PDAF_memcount.o: ./src/PDAF_memcount.F90 ./src/typedefs.h +$(OBJDIR)/PDAF_mod_filter.o: ./src/PDAF_mod_filter.F90 +$(OBJDIR)/PDAF_mod_filtermpi.o: ./src/PDAF_mod_filtermpi.F90 +$(OBJDIR)/PDAF_mod_lnetf.o: ./src/PDAF_mod_lnetf.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_mvnormalize.o: ./src/PDAF_mvnormalize.F90 ./src/typedefs.h +$(OBJDIR)/PDAF_netf_alloc.o: ./src/PDAF_netf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_netf_analysis.o: ./src/PDAF_netf_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h +$(OBJDIR)/PDAF_netf_init.o: ./src/PDAF_netf_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_netf_memtime.o: ./src/PDAF_netf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAF_netf_options.o: ./src/PDAF_netf_options.F90 +$(OBJDIR)/PDAF_netf_smootherT.o: ./src/PDAF_netf_smootherT.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_netf_update.o: ./src/PDAF_netf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_options_filters.o: ./src/PDAF_options_filters.F90 $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_pf_add_noise.o: ./src/PDAF_pf_add_noise.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_pf_alloc.o: ./src/PDAF_pf_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_pf_analysis.o: ./src/PDAF_pf_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_analysis_utils.o ./src/typedefs.h +$(OBJDIR)/PDAF_pf_init.o: ./src/PDAF_pf_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_pf_memtime.o: ./src/PDAF_pf_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAF_pf_options.o: ./src/PDAF_pf_options.F90 +$(OBJDIR)/PDAF_pf_resampling.o: ./src/PDAF_pf_resampling.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_pf_update.o: ./src/PDAF_pf_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_prepost.o: ./src/PDAF_prepost.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_prepost_si.o: ./src/PDAF_prepost_si.F90 +$(OBJDIR)/PDAF_print_info.o: ./src/PDAF_print_info.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_print_version.o: ./src/PDAF_print_version.F90 $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_3dvar.o: ./src/PDAF_put_state_3dvar.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_en3dvar_estkf.o: ./src/PDAF_put_state_en3dvar_estkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_en3dvar_lestkf.o: ./src/PDAF_put_state_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_enkf.o: ./src/PDAF_put_state_enkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_enkf_si.o: ./src/PDAF_put_state_enkf_si.F90 +$(OBJDIR)/PDAF_put_state_estkf.o: ./src/PDAF_put_state_estkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_estkf_si.o: ./src/PDAF_put_state_estkf_si.F90 +$(OBJDIR)/PDAF_put_state_etkf.o: ./src/PDAF_put_state_etkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_etkf_si.o: ./src/PDAF_put_state_etkf_si.F90 +$(OBJDIR)/PDAF_put_state_generate_obs.o: ./src/PDAF_put_state_generate_obs.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_generate_obs_si.o: ./src/PDAF_put_state_generate_obs_si.F90 +$(OBJDIR)/PDAF_put_state_hyb3dvar_estkf.o: ./src/PDAF_put_state_hyb3dvar_estkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_hyb3dvar_lestkf.o: ./src/PDAF_put_state_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_lenkf.o: ./src/PDAF_put_state_lenkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_lenkf_si.o: ./src/PDAF_put_state_lenkf_si.F90 +$(OBJDIR)/PDAF_put_state_lestkf.o: ./src/PDAF_put_state_lestkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_lestkf_si.o: ./src/PDAF_put_state_lestkf_si.F90 +$(OBJDIR)/PDAF_put_state_letkf.o: ./src/PDAF_put_state_letkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_letkf_si.o: ./src/PDAF_put_state_letkf_si.F90 +$(OBJDIR)/PDAF_put_state_lknetf.o: ./src/PDAF_put_state_lknetf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_lknetf_si.o: ./src/PDAF_put_state_lknetf_si.F90 +$(OBJDIR)/PDAF_put_state_lnetf.o: ./src/PDAF_put_state_lnetf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_lnetf_si.o: ./src/PDAF_put_state_lnetf_si.F90 +$(OBJDIR)/PDAF_put_state_lseik.o: ./src/PDAF_put_state_lseik.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_lseik_si.o: ./src/PDAF_put_state_lseik_si.F90 +$(OBJDIR)/PDAF_put_state_netf.o: ./src/PDAF_put_state_netf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_netf_si.o: ./src/PDAF_put_state_netf_si.F90 +$(OBJDIR)/PDAF_put_state_pf.o: ./src/PDAF_put_state_pf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_pf_si.o: ./src/PDAF_put_state_pf_si.F90 +$(OBJDIR)/PDAF_put_state_prepost.o: ./src/PDAF_put_state_prepost.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_prepost_si.o: ./src/PDAF_put_state_prepost_si.F90 +$(OBJDIR)/PDAF_put_state_seek.o: ./src/PDAF_put_state_seek.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_put_state_seek_si.o: ./src/PDAF_put_state_seek_si.F90 +$(OBJDIR)/PDAF_put_state_seik.o: ./src/PDAF_put_state_seik.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_put_state_seik_si.o: ./src/PDAF_put_state_seik_si.F90 +$(OBJDIR)/PDAF_reset_dim_p.o: ./src/PDAF_reset_dim_p.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_reset_forget.o: ./src/PDAF_reset_forget.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_sampleens.o: ./src/PDAF_sampleens.F90 $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_seek_alloc.o: ./src/PDAF_seek_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_seek_analysis.o: ./src/PDAF_seek_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_seek_init.o: ./src/PDAF_seek_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_seek_memtime.o: ./src/PDAF_seek_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_seek_options.o: ./src/PDAF_seek_options.F90 +$(OBJDIR)/PDAF_seek_rediag.o: ./src/PDAF_seek_rediag.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_seek_update.o: ./src/PDAF_seek_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_seik_TtimesA.o: ./src/PDAF_seik_TtimesA.F90 $(OBJDIR)/PDAF_memcount.o +$(OBJDIR)/PDAF_seik_alloc.o: ./src/PDAF_seik_alloc.F90 $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_seik_analysis.o: ./src/PDAF_seik_analysis.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_seik_analysis_newT.o: ./src/PDAF_seik_analysis_newT.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_seik_analysis_trans.o: ./src/PDAF_seik_analysis_trans.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o ./src/typedefs.h +$(OBJDIR)/PDAF_seik_init.o: ./src/PDAF_seik_init.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_seik_matrixT.o: ./src/PDAF_seik_matrixT.F90 $(OBJDIR)/PDAF_memcount.o +$(OBJDIR)/PDAF_seik_memtime.o: ./src/PDAF_seik_memtime.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAF_seik_omega.o: ./src/PDAF_seik_omega.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_seik_options.o: ./src/PDAF_seik_options.F90 +$(OBJDIR)/PDAF_seik_resample.o: ./src/PDAF_seik_resample.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_seik_resample_newT.o: ./src/PDAF_seik_resample_newT.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_seik_uinv.o: ./src/PDAF_seik_uinv.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_seik_update.o: ./src/PDAF_seik_update.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_set_comm_pdaf.o: ./src/PDAF_set_comm_pdaf.F90 $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_set_debug_flag.o: ./src/PDAF_set_debug_flag.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_set_ens_pointer.o: ./src/PDAF_set_ens_pointer.F90 $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_set_forget.o: ./src/PDAF_set_forget.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_set_forget_local.o: ./src/PDAF_set_forget_local.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAF_set_memberid.o: ./src/PDAF_set_memberid.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_set_offline_mode.o: ./src/PDAF_set_offline_mode.F90 $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAF_set_smootherens.o: ./src/PDAF_set_smootherens.F90 $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAF_smoother.o: ./src/PDAF_smoother.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_smoother_enkf.o: ./src/PDAF_smoother_enkf.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_smoother_lnetf.o: ./src/PDAF_smoother_lnetf.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_smoother_local.o: ./src/PDAF_smoother_local.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_smoother_netf.o: ./src/PDAF_smoother_netf.F90 $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_smoother_shift.o: ./src/PDAF_smoother_shift.F90 $(OBJDIR)/PDAF_mod_filtermpi.o ./src/typedefs.h +$(OBJDIR)/PDAF_timer.o: ./src/PDAF_timer.F90 +$(OBJDIR)/PDAF_timer_mpi.o: ./src/PDAF_timer_mpi.F90 +$(OBJDIR)/PDAFlocal.o: ./src/PDAFlocal.F90 $(OBJDIR)/PDAFlocal_interfaces.o +$(OBJDIR)/PDAFlocal_assimilate_en3dvar_lestkf.o: ./src/PDAFlocal_assimilate_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAFlocal_assimilate_hyb3dvar_lestkf.o: ./src/PDAFlocal_assimilate_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAFlocal_assimilate_lestkf.o: ./src/PDAFlocal_assimilate_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAFlocal_assimilate_lestkf_si.o: ./src/PDAFlocal_assimilate_lestkf_si.F90 +$(OBJDIR)/PDAFlocal_assimilate_letkf.o: ./src/PDAFlocal_assimilate_letkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAFlocal_assimilate_letkf_si.o: ./src/PDAFlocal_assimilate_letkf_si.F90 +$(OBJDIR)/PDAFlocal_assimilate_lknetf.o: ./src/PDAFlocal_assimilate_lknetf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAFlocal_assimilate_lknetf_si.o: ./src/PDAFlocal_assimilate_lknetf_si.F90 +$(OBJDIR)/PDAFlocal_assimilate_lnetf.o: ./src/PDAFlocal_assimilate_lnetf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAFlocal_assimilate_lnetf_si.o: ./src/PDAFlocal_assimilate_lnetf_si.F90 +$(OBJDIR)/PDAFlocal_assimilate_lseik.o: ./src/PDAFlocal_assimilate_lseik.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAFlocal_assimilate_lseik_si.o: ./src/PDAFlocal_assimilate_lseik_si.F90 +$(OBJDIR)/PDAFlocal_clear_increment_weights.o: ./src/PDAFlocal_clear_increment_weights.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocal_g2l_cb.o: ./src/PDAFlocal_g2l_cb.F90 $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocal_interfaces.o: ./src/PDAFlocal_interfaces.F90 ./src/typedefs.h +$(OBJDIR)/PDAFlocal_l2g_cb.o: ./src/PDAFlocal_l2g_cb.F90 $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocal_put_state_en3dvar_lestkf.o: ./src/PDAFlocal_put_state_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocal_put_state_hyb3dvar_lestkf.o: ./src/PDAFlocal_put_state_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocal_put_state_lestkf.o: ./src/PDAFlocal_put_state_lestkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocal_put_state_lestkf_si.o: ./src/PDAFlocal_put_state_lestkf_si.F90 +$(OBJDIR)/PDAFlocal_put_state_letkf.o: ./src/PDAFlocal_put_state_letkf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocal_put_state_letkf_si.o: ./src/PDAFlocal_put_state_letkf_si.F90 +$(OBJDIR)/PDAFlocal_put_state_lknetf.o: ./src/PDAFlocal_put_state_lknetf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocal_put_state_lknetf_si.o: ./src/PDAFlocal_put_state_lknetf_si.F90 +$(OBJDIR)/PDAFlocal_put_state_lnetf.o: ./src/PDAFlocal_put_state_lnetf.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_memcount.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocal_put_state_lnetf_si.o: ./src/PDAFlocal_put_state_lnetf_si.F90 +$(OBJDIR)/PDAFlocal_put_state_lseik.o: ./src/PDAFlocal_put_state_lseik.F90 $(OBJDIR)/PDAF_communicate_ens.o $(OBJDIR)/PDAF_timer.o $(OBJDIR)/PDAF_timer_mpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocal_put_state_lseik_si.o: ./src/PDAFlocal_put_state_lseik_si.F90 +$(OBJDIR)/PDAFlocal_set_increment_weights.o: ./src/PDAFlocal_set_increment_weights.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocal_set_indices.o: ./src/PDAFlocal_set_indices.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFlocal.o +$(OBJDIR)/PDAFlocalomi_assimilate.o: ./src/PDAFlocalomi_assimilate.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_assimilate_en3dvar_lestkf.o: ./src/PDAFlocalomi_assimilate_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.o: ./src/PDAFlocalomi_assimilate_en3dvar_lestkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_assimilate_hyb3dvar_lestkf.o: ./src/PDAFlocalomi_assimilate_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.o: ./src/PDAFlocalomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_assimilate_lknetf_nondiagR.o: ./src/PDAFlocalomi_assimilate_lknetf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_assimilate_lknetf_nondiagR_si.o: ./src/PDAFlocalomi_assimilate_lknetf_nondiagR_si.F90 +$(OBJDIR)/PDAFlocalomi_assimilate_lnetf_nondiagR.o: ./src/PDAFlocalomi_assimilate_lnetf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_assimilate_lnetf_nondiagR_si.o: ./src/PDAFlocalomi_assimilate_lnetf_nondiagR_si.F90 +$(OBJDIR)/PDAFlocalomi_assimilate_nondiagR.o: ./src/PDAFlocalomi_assimilate_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_assimilate_nondiagR_si.o: ./src/PDAFlocalomi_assimilate_nondiagR_si.F90 +$(OBJDIR)/PDAFlocalomi_assimilate_si.o: ./src/PDAFlocalomi_assimilate_si.F90 +$(OBJDIR)/PDAFlocalomi_put_state.o: ./src/PDAFlocalomi_put_state.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_put_state_en3dvar_lestkf.o: ./src/PDAFlocalomi_put_state_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR.o: ./src/PDAFlocalomi_put_state_en3dvar_lestkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_put_state_hyb3dvar_lestkf.o: ./src/PDAFlocalomi_put_state_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR.o: ./src/PDAFlocalomi_put_state_hyb3dvar_lestkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_put_state_lknetf_nondiagR.o: ./src/PDAFlocalomi_put_state_lknetf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_put_state_lknetf_nondiagR_si.o: ./src/PDAFlocalomi_put_state_lknetf_nondiagR_si.F90 +$(OBJDIR)/PDAFlocalomi_put_state_lnetf_nondiagR.o: ./src/PDAFlocalomi_put_state_lnetf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_put_state_lnetf_nondiagR_si.o: ./src/PDAFlocalomi_put_state_lnetf_nondiagR_si.F90 +$(OBJDIR)/PDAFlocalomi_put_state_nondiagR.o: ./src/PDAFlocalomi_put_state_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFlocalomi_put_state_nondiagR_si.o: ./src/PDAFlocalomi_put_state_nondiagR_si.F90 +$(OBJDIR)/PDAFlocalomi_put_state_si.o: ./src/PDAFlocalomi_put_state_si.F90 +$(OBJDIR)/PDAFomi.o: ./src/PDAFomi.F90 $(OBJDIR)/PDAFomi_obs_f.o $(OBJDIR)/PDAFomi_obs_l.o $(OBJDIR)/PDAFomi_dim_obs_l.o $(OBJDIR)/PDAFomi_obs_op.o +$(OBJDIR)/PDAFomi_assimilate_3dvar.o: ./src/PDAFomi_assimilate_3dvar.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_3dvar_nondiagR.o: ./src/PDAFomi_assimilate_3dvar_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_en3dvar_estkf.o: ./src/PDAFomi_assimilate_en3dvar_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_en3dvar_estkf_nondiagR.o: ./src/PDAFomi_assimilate_en3dvar_estkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_en3dvar_lestkf.o: ./src/PDAFomi_assimilate_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_en3dvar_lestkf_nondiagR.o: ./src/PDAFomi_assimilate_en3dvar_lestkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_enkf_nondiagR.o: ./src/PDAFomi_assimilate_enkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_enkf_nondiagR_si.o: ./src/PDAFomi_assimilate_enkf_nondiagR_si.F90 +$(OBJDIR)/PDAFomi_assimilate_global.o: ./src/PDAFomi_assimilate_global.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_global_nondiagR.o: ./src/PDAFomi_assimilate_global_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_global_nondiagR_si.o: ./src/PDAFomi_assimilate_global_nondiagR_si.F90 +$(OBJDIR)/PDAFomi_assimilate_global_si.o: ./src/PDAFomi_assimilate_global_si.F90 +$(OBJDIR)/PDAFomi_assimilate_hyb3dvar_estkf.o: ./src/PDAFomi_assimilate_hyb3dvar_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_hyb3dvar_estkf_nondiagR.o: ./src/PDAFomi_assimilate_hyb3dvar_estkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_hyb3dvar_lestkf.o: ./src/PDAFomi_assimilate_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR.o: ./src/PDAFomi_assimilate_hyb3dvar_lestkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_lenkf.o: ./src/PDAFomi_assimilate_lenkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_lenkf_nondiagR.o: ./src/PDAFomi_assimilate_lenkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_lenkf_nondiagR_si.o: ./src/PDAFomi_assimilate_lenkf_nondiagR_si.F90 +$(OBJDIR)/PDAFomi_assimilate_lenkf_si.o: ./src/PDAFomi_assimilate_lenkf_si.F90 +$(OBJDIR)/PDAFomi_assimilate_lknetf_nondiagR.o: ./src/PDAFomi_assimilate_lknetf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_lknetf_nondiagR_si.o: ./src/PDAFomi_assimilate_lknetf_nondiagR_si.F90 +$(OBJDIR)/PDAFomi_assimilate_lnetf_nondiagR.o: ./src/PDAFomi_assimilate_lnetf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_lnetf_nondiagR_si.o: ./src/PDAFomi_assimilate_lnetf_nondiagR_si.F90 +$(OBJDIR)/PDAFomi_assimilate_local.o: ./src/PDAFomi_assimilate_local.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_local_nondiagR.o: ./src/PDAFomi_assimilate_local_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_local_nondiagR_si.o: ./src/PDAFomi_assimilate_local_nondiagR_si.F90 +$(OBJDIR)/PDAFomi_assimilate_local_si.o: ./src/PDAFomi_assimilate_local_si.F90 +$(OBJDIR)/PDAFomi_assimilate_nonlin_nondiagR.o: ./src/PDAFomi_assimilate_nonlin_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_assimilate_nonlin_nondiagR_si.o: ./src/PDAFomi_assimilate_nonlin_nondiagR_si.F90 +$(OBJDIR)/PDAFomi_callback.o: ./src/PDAFomi_callback.F90 $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o +$(OBJDIR)/PDAFomi_dim_obs_l.o: ./src/PDAFomi_dim_obs_l.F90 $(OBJDIR)/PDAFomi_obs_f.o $(OBJDIR)/PDAFomi_obs_l.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAFomi_dim_obs_l_old.o: ./src/PDAFomi_dim_obs_l_old.F90 $(OBJDIR)/PDAFomi_obs_f.o $(OBJDIR)/PDAFomi_obs_l.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAFomi_generate_obs.o: ./src/PDAFomi_generate_obs.F90 $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_obs_f.o: ./src/PDAFomi_obs_f.F90 $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h +$(OBJDIR)/PDAFomi_obs_l.o: ./src/PDAFomi_obs_l.F90 $(OBJDIR)/PDAFomi_obs_f.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o +$(OBJDIR)/PDAFomi_obs_op.o: ./src/PDAFomi_obs_op.F90 $(OBJDIR)/PDAFomi_obs_f.o +$(OBJDIR)/PDAFomi_put_state_3dvar.o: ./src/PDAFomi_put_state_3dvar.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_3dvar_nondiagR.o: ./src/PDAFomi_put_state_3dvar_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_en3dvar_estkf.o: ./src/PDAFomi_put_state_en3dvar_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_en3dvar_estkf_nondiagR.o: ./src/PDAFomi_put_state_en3dvar_estkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_en3dvar_lestkf.o: ./src/PDAFomi_put_state_en3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_en3dvar_lestkf_nondiagR.o: ./src/PDAFomi_put_state_en3dvar_lestkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_enkf_nondiagR.o: ./src/PDAFomi_put_state_enkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_enkf_nondiagR_si.o: ./src/PDAFomi_put_state_enkf_nondiagR_si.F90 +$(OBJDIR)/PDAFomi_put_state_generate_obs.o: ./src/PDAFomi_put_state_generate_obs.F90 $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_global.o: ./src/PDAFomi_put_state_global.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_global_nondiagR.o: ./src/PDAFomi_put_state_global_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_global_nondiagR_si.o: ./src/PDAFomi_put_state_global_nondiagR_si.F90 +$(OBJDIR)/PDAFomi_put_state_global_si.o: ./src/PDAFomi_put_state_global_si.F90 +$(OBJDIR)/PDAFomi_put_state_hyb3dvar_estkf.o: ./src/PDAFomi_put_state_hyb3dvar_estkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_hyb3dvar_estkf_nondiagR.o: ./src/PDAFomi_put_state_hyb3dvar_estkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_hyb3dvar_lestkf.o: ./src/PDAFomi_put_state_hyb3dvar_lestkf.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.o: ./src/PDAFomi_put_state_hyb3dvar_lestkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_lenkf.o: ./src/PDAFomi_put_state_lenkf.F90 $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_lenkf_nondiagR.o: ./src/PDAFomi_put_state_lenkf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_lenkf_nondiagR_si.o: ./src/PDAFomi_put_state_lenkf_nondiagR_si.F90 +$(OBJDIR)/PDAFomi_put_state_lenkf_si.o: ./src/PDAFomi_put_state_lenkf_si.F90 +$(OBJDIR)/PDAFomi_put_state_lknetf_nondiagR.o: ./src/PDAFomi_put_state_lknetf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_lknetf_nondiagR_si.o: ./src/PDAFomi_put_state_lknetf_nondiagR_si.F90 +$(OBJDIR)/PDAFomi_put_state_lnetf_nondiagR.o: ./src/PDAFomi_put_state_lnetf_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_lnetf_nondiagR_si.o: ./src/PDAFomi_put_state_lnetf_nondiagR_si.F90 +$(OBJDIR)/PDAFomi_put_state_local.o: ./src/PDAFomi_put_state_local.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_local_nondiagR.o: ./src/PDAFomi_put_state_local_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_local_nondiagR_si.o: ./src/PDAFomi_put_state_local_nondiagR_si.F90 +$(OBJDIR)/PDAFomi_put_state_local_si.o: ./src/PDAFomi_put_state_local_si.F90 +$(OBJDIR)/PDAFomi_put_state_nonlin_nondiagR.o: ./src/PDAFomi_put_state_nonlin_nondiagR.F90 $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi.o +$(OBJDIR)/PDAFomi_put_state_nonlin_nondiagR_si.o: ./src/PDAFomi_put_state_nonlin_nondiagR_si.F90 +$(OBJDIR)/SANGOMA_quicksort.o: ./external/SANGOMA/SANGOMA_quicksort.F90 +$(OBJDIR)/blas.o: ./external/CG+/blas.f +$(OBJDIR)/cgfam.o: ./external/CG+/cgfam.f +$(OBJDIR)/cgsearch.o: ./external/CG+/cgsearch.f +$(OBJDIR)/driver1.o: ./external/LBFGS/driver1.f +$(OBJDIR)/driver1.o: ./external/LBFGS/driver1.f90 +$(OBJDIR)/driver2.o: ./external/LBFGS/driver2.f +$(OBJDIR)/driver2.o: ./external/LBFGS/driver2.f90 +$(OBJDIR)/driver3.o: ./external/LBFGS/driver3.f +$(OBJDIR)/driver3.o: ./external/LBFGS/driver3.f90 +$(OBJDIR)/fcn.o: ./external/CG+/fcn.f +$(OBJDIR)/lbfgsb.o: ./external/LBFGS/lbfgsb.f +$(OBJDIR)/linpack.o: ./external/LBFGS/linpack.f +$(OBJDIR)/main.o: ./external/CG+/main.f +$(OBJDIR)/timer.o: ./external/CG+/timer.f +$(OBJDIR)/typedefs.h: ./src/typedefs.h diff --git a/Makefile b/Makefile index 5f61e472e..06ed26693 100644 --- a/Makefile +++ b/Makefile @@ -479,6 +479,7 @@ SRC_3DVAR = PDAF_put_state_3dvar.F90 \ # Routines for PDAF-OMI SRC_PDAFOMI = PDAFomi_obs_f.F90 \ PDAFomi_obs_l.F90 \ + PDAFomi_dim_obs_l.F90 \ PDAFomi_obs_op.F90 \ PDAFomi.F90 \ PDAFomi_callback.F90 @@ -551,10 +552,6 @@ directories: $(MISSINGDIRS) $(MISSINGDIRS): mkdir -p $@ -.PHONY: Depends -Depends: - ./external/mkdepends/mkdepends ./src ./external/* '$(OBJDIR)' - ####################################################### .PHONY: clean clean : diff --git a/src/Makefile b/src/Makefile index 513c8d721..db0edd5b0 100644 --- a/src/Makefile +++ b/src/Makefile @@ -466,6 +466,7 @@ OBJ_3DVAR = PDAF_put_state_3dvar.o \ # Routines for PDAF-OMI OBJ_PDAFOMI = PDAFomi_obs_f.o \ PDAFomi_obs_l.o \ + PDAFomi_dim_obs_l \ PDAFomi_obs_op.o \ PDAFomi.o \ PDAFomi_callback.o diff --git a/src/PDAFomi.F90 b/src/PDAFomi.F90 index 3525001df..f1c92bebf 100644 --- a/src/PDAFomi.F90 +++ b/src/PDAFomi.F90 @@ -31,6 +31,7 @@ MODULE PDAFomi USE PDAFomi_obs_f USE PDAFomi_obs_l + USE PDAFomi_dim_obs_l USE PDAFomi_obs_op END MODULE PDAFomi diff --git a/src/PDAFomi_dim_obs_l.F90 b/src/PDAFomi_dim_obs_l.F90 new file mode 100644 index 000000000..3c5e16241 --- /dev/null +++ b/src/PDAFomi_dim_obs_l.F90 @@ -0,0 +1,1547 @@ +! Copyright (c) 2004-2024 Lars Nerger +! +! This file is part of PDAF. +! +! PDAF is free software: you can redistribute it and/or modify +! it under the terms of the GNU Lesser General Public License +! as published by the Free Software Foundation, either version +! 3 of the License, or (at your option) any later version. +! +! PDAF is distributed in the hope that it will be useful, +! but WITHOUT ANY WARRANTY; without even the implied warranty of +! MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +! GNU Lesser General Public License for more details. +! +! You should have received a copy of the GNU Lesser General Public +! License along with PDAF. If not, see . +! +!$Id: PDAFomi_obs_l.F90 1147 2023-03-12 16:14:34Z lnerger $ + +!> PDAF-OMI routines for determining local observations +!! +!! This module contains generic routines for several observation-related +!! operations for local filters. The routines are +!! +!! * PDAFomi_init_dim_obs_l \n +!! Initialize dimension of local obs. vetor and arrays for +!! local observations +!! * PDAFomi_init_dim_obs_l_iso \n +!! Initialize dimension of local obs. vetor and arrays for +!! local observations for isotropic localization +!! * PDAFomi_init_dim_obs_l_noniso \n +!! Initialize dimension of local obs. vetor and arrays for +!! local observations for nonisotropic localization +!! * PDAFomi_init_dim_obs_l_noniso_locweights \n +!! Initialize dimension of local obs. vetor and arrays for +!! local observations for nonisotropic localization +!! and different locweight for horizontal and vertical +!! * PDAFomi_check_dist2_loop \n +!! Compute and check distance for isotropic localization +!! * PDAFomi_check_dist2_noniso_loop \n +!! Compute and check distance for non-isotropic localization +!! * PDAFomi_set_dim_obs_l \ +!! Register local observation with OMI +!! +!! __Revision history:__ +!! * 2019-06 - Lars Nerger - Initial code +!! * Later revisions - see repository log +!! +MODULE PDAFomi_dim_obs_l + + USE PDAFomi_obs_f, ONLY: obs_f, r_earth, pi, debug, n_obstypes, error + USE PDAFomi_obs_l, ONLY: obs_l, obs_l_all, firstobs, offset_obs_l + USE PDAF_mod_filtermpi, ONLY: mype, npes_filter + + IMPLICIT NONE + SAVE + + INTERFACE PDAFomi_init_dim_obs_l + MODULE PROCEDURE PDAFomi_init_dim_obs_l_iso + MODULE PROCEDURE PDAFomi_init_dim_obs_l_noniso + MODULE PROCEDURE PDAFomi_init_dim_obs_l_noniso_locweights + END INTERFACE + +CONTAINS + +!------------------------------------------------------------------------------- +!> Set dimension of local obs. vector and local obs. arrays +!! +!! This routine sets the number of local observations for the +!! current observation type for the local analysis domain +!! with coordinates COORD_l and localization cut-off radius CRADIUS. +!! Further the routine initializes arrays for the index of a +!! local observation in the full observation vector and its +!! corresponding distance. +!! The operations are performed by calling the routine +!! PDAFomi_check_dist2_loop once for counting and a second time +!! for initializing the arrays. +!! +!! __Revision history:__ +!! * 2019-06 - Lars Nerger - Initial code from restructuring observation routines +!! * Later revisions - see repository log +!! + SUBROUTINE PDAFomi_init_dim_obs_l_iso(thisobs_l, thisobs, coords_l, locweight, cradius, & + sradius, cnt_obs_l_all) + + IMPLICIT NONE + +! *** Arguments *** + TYPE(obs_f), INTENT(inout) :: thisobs !< Data type with full observation + TYPE(obs_l), TARGET, INTENT(inout) :: thisobs_l !< Data type with local observation + REAL, INTENT(in) :: coords_l(:) !< Coordinates of current analysis domain + INTEGER, INTENT(in) :: locweight !< Type of localization function + REAL, INTENT(in) :: cradius !< Localization cut-off radius + REAL, INTENT(in) :: sradius !< Support radius of localization function + INTEGER, INTENT(inout) :: cnt_obs_l_all !< Local dimension of current observation vector + +! *** Local variables *** + REAL :: maxcoords_l, mincoords_l ! Min/Max domain coordinates to check geographic coords + REAL :: maxocoords_l, minocoords_l ! Min/Max observation coordinates to check geographic coords + INTEGER :: cnt_obs ! Counter for valid local observations + + + doassim: IF (thisobs%doassim == 1) THEN + +! *********************************************** +! *** Check offset in full observation vector *** +! *********************************************** + + IF (debug>0) & + WRITE (*,*) '++ OMI-debug: ', debug, 'PDAFomi_init_dim_obs_l -- START' + + IF (thisobs%ncoord/=3 .AND. thisobs%disttype>=10) THEN + WRITE (*,*) '+++++ ERROR PDAF-OMI: factorized 2+1D localization can only be used for thisobs%ncoord=3' + error = 14 + END IF + + +! ************************************** +! *** Store localization information *** +! ************************************** + + thisobs_l%locweight = locweight + + ! Allocate vectors for localization radii and store their values + ! For isotropic localization the size of the arrays is just 1 + IF (ALLOCATED(thisobs_l%cradius)) DEALLOCATE(thisobs_l%cradius) + ALLOCATE(thisobs_l%cradius(1)) + IF (ALLOCATED(thisobs_l%sradius)) DEALLOCATE(thisobs_l%sradius) + ALLOCATE(thisobs_l%sradius(1)) + + thisobs_l%nradii = 1 + thisobs_l%cradius(1) = cradius + thisobs_l%sradius(1) = sradius + + +! ************************************** +! *** Count valid local observations *** +! ************************************** + + IF (debug>0) THEN + WRITE (*,*) '++ OMI-debug: ', debug, & + ' PDAFomi_init_dim_obs_l -- count local observations' + IF (thisobs%obsid == firstobs) THEN + WRITE (*,*) '++ OMI-debug init_dim_obs_l:', debug, ' Re-init dim_obs_l=0' + END IF + WRITE (*,*) '++ OMI-debug init_dim_obs_l:', debug, ' coords_l', coords_l + + ! For geographic coordinates check whether their range is reasonable + IF (thisobs%disttype==2 .OR. thisobs%disttype==3 .OR. thisobs%disttype==12 .OR. thisobs%disttype==13) THEN + maxcoords_l = MAXVAL(coords_l) + mincoords_l = MINVAL(coords_l) + maxocoords_l = MAXVAL(thisobs%ocoord_f(1:2, :)) + minocoords_l = MINVAL(thisobs%ocoord_f(1:2, :)) + + IF (maxcoords_l>2.0*pi .OR. mincoords_l<-pi .OR. maxocoords_l>2.0*pi .OR. minocoords_l<-pi) THEN + WRITE (*,*) '++ OMI-debug init_dim_obs_l:', debug, & + ' WARNING: The unit for geographic coordinates is radian, thus range (0,2*pi) or (-pi,pi)!' + END IF + END IF + WRITE (*,*) '++ OMI-debug init_dim_obs_l:', debug, & + ' Note: Please ensure that coords_l and observation coordinates have the same unit' + + WRITE (*,*) '++ OMI-debug init_dim_obs_l: ', debug, ' thisobs%ncoord', thisobs%ncoord + WRITE (*,*) '++ OMI-debug init_dim_obs_l: ', debug, ' thisobs_l%cradius', thisobs_l%cradius + WRITE (*,*) '++ OMI-debug init_dim_obs_l: ', debug, ' Check for observations within radius' + END IF + + cnt_obs = 0 + CALL PDAFomi_check_dist2_loop(thisobs_l, thisobs, coords_l, cnt_obs, 1) + + +! ************************************************ +! *** Initialize local observation for PDAFomi *** +! ************************************************ + + CALL PDAFomi_set_dim_obs_l(thisobs_l, thisobs, cnt_obs_l_all, cnt_obs) + + +! ************************************************************ +! *** Initialize internal local arrays for local distances *** +! *** and indices of local obs. in full obs. vector *** +! ************************************************************ + + IF (debug>0) & + WRITE (*,*) '++ OMI-debug: ', debug, & + ' PDAFomi_init_dim_obs_l -- initialize local observation arrays' + + ! Count local observations and initialize index and distance arrays + IF (thisobs_l%dim_obs_l>0) THEN + cnt_obs = 0 + CALL PDAFomi_check_dist2_loop(thisobs_l, thisobs, coords_l, cnt_obs, 2) + END IF + + ! Print debug information + IF (debug>0) THEN + WRITE (*,*) '++ OMI-debug init_dim_obs_l:', debug, ' thisobs_l%dim_obs_l', thisobs_l%dim_obs_l + IF (thisobs_l%dim_obs_l>0) THEN + WRITE (*,*) '++ OMI-debug init_dim_obs_l:', debug, ' thisobs_l%id_obs_l', thisobs_l%id_obs_l + WRITE (*,*) '++ OMI-debug init_dim_obs_l:', debug, ' thisobs_l%distance_l', thisobs_l%distance_l + END IF + WRITE (*,*) '++ OMI-debug: ', debug, 'PDAFomi_init_dim_obs_l -- END' + END IF + + END IF doassim + + END SUBROUTINE PDAFomi_init_dim_obs_l_iso + + +!------------------------------------------------------------------------------- +!> Check distance in case of isotropic localization +!! +!! This routine computes the distance between the location of +!! a local analysis domains and all full observations and checks +!! whether the observations lies within the localization radius. +!! The computation can be for Cartesian grids with and without +!! periodicity and for geographic coordinates. For Cartesian +!! grids, the coordinates can be in any unit, while geographic +!! coordinates must be provided in radians and the resulting +!! distance will be in meters. Finally, the routine checks +!! whether the distance is not larger than the cut-off radius. +!! +!! Choices for distance computation - disttype: +!! 0: Cartesian distance in ncoord dimensions +!! 1: Cartesian distance in ncoord dimensions with periodicity +!! (Needs specification of domsize(ncoord)) +!! 2: Aproximate geographic distance with horizontal coordinates in radians (-pi/+pi) +!! 3: Geographic distance computation using haversine formula +!! 10-13: Variants of distance types 0-3, but particularly for 3 dimensions in which +!! a 2+1 dimensional localization is applied (distance weighting only in the horizontal) +!! +!! __Revision history:__ +!! * 2024-04 - Lars Nerger - Initial code based on PDAFomi_comp_dist2 +!! * Later revisions - see repository log +!! + SUBROUTINE PDAFomi_check_dist2_loop(thisobs_l, thisobs, coordsA, cnt_obs, mode) + + IMPLICIT NONE + +! *** Arguments *** + TYPE(obs_l), INTENT(inout) :: thisobs_l !< Data type with local observation + TYPE(obs_f), INTENT(in) :: thisobs !< Data type with full observation + REAL, INTENT(in) :: coordsA(:) !< Coordinates of current analysis domain (ncoord) + INTEGER, INTENT(inout) :: cnt_obs !< Count number of local observations + INTEGER, INTENT(in) :: mode !< 1: count local observations + !< 2: initialize local arrays + +! *** Local variables *** + INTEGER :: i, k ! Counters + INTEGER :: verbose ! verbosity flag + INTEGER :: domsize ! Flag whether domainsize is set + LOGICAL :: distflag ! Flag whether distance in a coordinate direction is within cradius + REAL :: slon, slat ! sine of distance in longitude or latitude + REAL :: distance2 ! square distance + REAL :: cradius2 ! squared localization cut-off radius + REAL :: dists(thisobs%ncoord) ! Distance vector between analysis point and observation + REAL :: coordsB(thisobs%ncoord) ! Array for coordinates of a single observation + + +! ********************** +! *** Initialization *** +! ********************** + + scancount: DO i = 1, thisobs%dim_obs_f + + ! Initialize distance flag + distflag = .TRUE. + + verbose = i + + coordsB = thisobs%ocoord_f(1:thisobs%ncoord, i) + + +! ************************ +! *** Compute distance *** +! ************************ + + IF (.NOT.ALLOCATED(thisobs%domainsize)) THEN + domsize = 0 + ELSE + domsize = 1 + END IF + + norm: IF ((thisobs%disttype==0 .OR. thisobs%disttype==10) .OR. & + ((thisobs%disttype==1 .OR. thisobs%disttype==11) .AND. domsize==0)) THEN + + ! *** Compute Cartesian distance *** + + IF (debug>0 .AND. verbose==0) THEN + WRITE (*,*) '++ OMI-debug check_dist2: ', debug, ' compute Cartesian distance' + END IF + + IF (thisobs%ncoord>=3) THEN + dists(3) = ABS(coordsA(3) - coordsB(3)) + IF (dists(3)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + dists(2) = ABS(coordsA(2) - coordsB(2)) + IF (dists(2)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + dists(1) = ABS(coordsA(1) - coordsB(1)) + IF (dists(1)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + ! full squared distance + distance2 = 0.0 + IF (thisobs%disttype<10) THEN + ! full 3D localization + DO k = 1, thisobs%ncoord + distance2 = distance2 + dists(k)*dists(k) + END DO + ELSE + ! factorized 2+1D localization + DO k = 1, thisobs%ncoord-1 + distance2 = distance2 + dists(k)*dists(k) + END DO + END IF + END IF + END IF + END IF + ELSEIF (thisobs%ncoord==2) THEN + dists(2) = ABS(coordsA(2) - coordsB(2)) + IF (dists(2)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + dists(1) = ABS(coordsA(1) - coordsB(1)) + IF (dists(1)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + ! full squared distance + distance2 = 0.0 + DO k = 1, thisobs%ncoord + distance2 = distance2 + dists(k)*dists(k) + END DO + END IF + END IF + ELSEIF (thisobs%ncoord==1) THEN + dists(1) = ABS(coordsA(1) - coordsB(1)) + IF (dists(1)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + ! full squared distance + distance2 = 0.0 + DO k = 1, thisobs%ncoord + distance2 = distance2 + dists(k)*dists(k) + END DO + END IF + END IF + + ELSEIF ((thisobs%disttype==1 .OR. thisobs%disttype==11) .AND. domsize==1) THEN norm + + ! *** Compute periodic Cartesian distance *** + + IF (debug>0 .AND. verbose==0) THEN + WRITE (*,*) '++ OMI-debug check_dist2: ', debug, ' compute periodic Cartesian distance' + END IF + + IF (thisobs%ncoord>=3) THEN + IF (thisobs%domainsize(3)<=0.0) THEN + dists(3) = ABS(coordsA(3) - coordsB(3)) + ELSE + dists(3) = MIN(ABS(coordsA(3) - coordsB(3)), & + ABS(ABS(coordsA(3) - coordsB(3))-thisobs%domainsize(3))) + END IF + IF (dists(3)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + IF (thisobs%domainsize(2)<=0.0) THEN + dists(2) = ABS(coordsA(2) - coordsB(2)) + ELSE + dists(2) = MIN(ABS(coordsA(2) - coordsB(2)), & + ABS(ABS(coordsA(2) - coordsB(2))-thisobs%domainsize(2))) + END IF + IF (dists(2)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + IF (thisobs%domainsize(1)<=0.0) THEN + dists(1) = ABS(coordsA(1) - coordsB(1)) + ELSE + dists(1) = MIN(ABS(coordsA(1) - coordsB(1)), & + ABS(ABS(coordsA(1) - coordsB(1))-thisobs%domainsize(1))) + END IF + IF (dists(1)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + ! full squared distance + distance2 = 0.0 + IF (thisobs%disttype<10) THEN + ! full 3D localization + DO k = 1, thisobs%ncoord + distance2 = distance2 + dists(k)*dists(k) + END DO + ELSE + ! factorized 2+1D localization + DO k = 1, thisobs%ncoord-1 + distance2 = distance2 + dists(k)*dists(k) + END DO + END IF + END IF + END IF + END IF + ELSEIF (thisobs%ncoord==2) THEN + IF (thisobs%domainsize(2)<=0.0) THEN + dists(2) = ABS(coordsA(2) - coordsB(2)) + ELSE + dists(2) = MIN(ABS(coordsA(2) - coordsB(2)), & + ABS(ABS(coordsA(2) - coordsB(2))-thisobs%domainsize(2))) + END IF + IF (dists(2)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + IF (thisobs%domainsize(1)<=0.0) THEN + dists(1) = ABS(coordsA(1) - coordsB(1)) + ELSE + dists(1) = MIN(ABS(coordsA(1) - coordsB(1)), & + ABS(ABS(coordsA(1) - coordsB(1))-thisobs%domainsize(1))) + END IF + IF (dists(1)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + ! full squared distance + distance2 = 0.0 + DO k = 1, thisobs%ncoord + distance2 = distance2 + dists(k)*dists(k) + END DO + END IF + END IF + ELSEIF (thisobs%ncoord==1) THEN + IF (thisobs%domainsize(1)<=0.0) THEN + dists(1) = ABS(coordsA(1) - coordsB(1)) + ELSE + dists(1) = MIN(ABS(coordsA(1) - coordsB(1)), & + ABS(ABS(coordsA(1) - coordsB(1))-thisobs%domainsize(1))) + END IF + IF (dists(1)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + ! full squared distance + distance2 = 0.0 + DO k = 1, thisobs%ncoord + distance2 = distance2 + dists(k)*dists(k) + END DO + END IF + END IF + + ELSEIF (thisobs%disttype==2 .OR. thisobs%disttype==12) THEN norm + + ! *** Compute distance from geographic coordinates *** + + IF (debug>0 .AND. verbose==0) THEN + WRITE (*,*) '++ OMI-debug check_dist2: ', debug, ' compute geographic distance' + END IF + + IF (thisobs%ncoord==3) THEN + dists(3) = ABS(coordsA(3) - coordsB(3)) + IF (dists(3)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + dists(2) = r_earth * ABS(coordsA(2) - coordsB(2)) + IF (dists(2)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + dists(1) = r_earth * MIN( ABS(coordsA(1) - coordsB(1))* COS(coordsA(2)), & + ABS(ABS(coordsA(1) - coordsB(1)) - 2.0*pi) * COS(coordsA(2))) + IF (dists(1)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + ! full squared distance + distance2 = 0.0 + IF (thisobs%disttype<10) THEN + ! full 3D localization + DO k = 1, thisobs%ncoord + distance2 = distance2 + dists(k)*dists(k) + END DO + ELSE + ! factorized 2+1D localization + DO k = 1, thisobs%ncoord-1 + distance2 = distance2 + dists(k)*dists(k) + END DO + END IF + END IF + END IF + END IF + ELSE + dists(2) = r_earth * ABS(coordsA(2) - coordsB(2)) + IF (dists(2)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + dists(1) = r_earth * MIN( ABS(coordsA(1) - coordsB(1))* COS(coordsA(2)), & + ABS(ABS(coordsA(1) - coordsB(1)) - 2.0*pi) * COS(coordsA(2))) + IF (dists(1)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + ! full squared distance + distance2 = 0.0 + DO k = 1, thisobs%ncoord + distance2 = distance2 + dists(k)*dists(k) + END DO + END IF + END IF + END IF + + ELSEIF (thisobs%disttype==3 .OR. thisobs%disttype==13) THEN norm + + ! *** Compute distance from geographic coordinates with haversine formula *** + + IF (debug>0 .AND. verbose==0) THEN + WRITE (*,*) '++ OMI-debug check_dist2: ', debug, & + ' compute geographic distance using haversine function' + END IF + + IF (thisobs%ncoord==3) THEN + dists(3) = ABS(coordsA(3) - coordsB(3)) + IF (dists(3)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + dists(2) = r_earth * ABS(coordsA(2) - coordsB(2)) + IF (dists(2)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + ! Haversine formula + slon = SIN((coordsA(1) - coordsB(1))/2) + slat = SIN((coordsA(2) - coordsB(2))/2) + + dists(2) = SQRT(slat*slat + COS(coordsA(2))*COS(coordsB(2))*slon*slon) + IF (dists(2)<=1.0) THEN + dists(2) = 2.0 * r_earth* ASIN(dists(2)) + ELSE + dists(2) = r_earth* pi + END IF + IF (dists(2)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + ! full squared distance + distance2 = 0.0 + IF (thisobs%disttype<10) THEN + ! full 3D localization + DO k = 2, thisobs%ncoord + distance2 = distance2 + dists(k)*dists(k) + END DO + ELSE + ! factorized 2+1D localization + DO k = 2, thisobs%ncoord-1 + distance2 = distance2 + dists(k)*dists(k) + END DO + END IF + END IF + END IF + END IF + ELSE + dists(2) = r_earth * ABS(coordsA(2) - coordsB(2)) + IF (dists(2)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + ! Haversine formula + slon = SIN((coordsA(1) - coordsB(1))/2) + slat = SIN((coordsA(2) - coordsB(2))/2) + + dists(2) = SQRT(slat*slat + COS(coordsA(2))*COS(coordsB(2))*slon*slon) + IF (dists(2)<=1.0) THEN + dists(2) = 2.0 * r_earth* ASIN(dists(2)) + ELSE + dists(2) = r_earth* pi + END IF + IF (dists(2)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + ! full squared distance + distance2 = 0.0 + DO k = 1, thisobs%ncoord + distance2 = distance2 + dists(k)*dists(k) + END DO + END IF + END IF + END IF + + END IF norm + + IF (distflag) THEN + cradius2 = thisobs_l%cradius(1)*thisobs_l%cradius(1) + + IF (distance2 <= cradius2) THEN + + ! Increment counter + cnt_obs = cnt_obs + 1 + + IF (debug>0) THEN + WRITE (*,*) '++ OMI-debug cnt_dim_obs_l: ', debug, & + ' valid observation with coordinates', thisobs%ocoord_f(1:thisobs%ncoord, i) + END IF + + IF (mode == 2) THEN + ! For internal storage (use in prodRinvA_l) + thisobs_l%id_obs_l(cnt_obs) = i ! node index + thisobs_l%distance_l(cnt_obs) = SQRT(distance2) ! distance + thisobs_l%cradius_l(cnt_obs) = thisobs_l%cradius(1) ! isotropic cut-off radius + thisobs_l%sradius_l(cnt_obs) = thisobs_l%sradius(1) ! isotropic support radius + END IF + + END IF + END IF + END DO scancount + + END SUBROUTINE PDAFomi_check_dist2_loop + + +!------------------------------------------------------------------------------- +!> Initialization for dim_obs_l +!! +!! This routine initializes information on local observation vectors. +!! It is used by a user-supplied implementations of PDAFomi_init_dim_obs_l. +!! +!! The routine is called by all filter processes. +!! +!! __Revision history:__ +!! * 2024-08 - Lars Nerger - Initial code +!! * Later revisions - see repository log +!! + SUBROUTINE PDAFomi_set_dim_obs_l(thisobs_l, thisobs, cnt_obs_l_all, cnt_obs_l) + + IMPLICIT NONE + +! *** Arguments *** + TYPE(obs_f), INTENT(inout) :: thisobs !< Data type with full observation + TYPE(obs_l), TARGET, INTENT(inout) :: thisobs_l !< Data type with local observation + INTEGER, INTENT(inout) :: cnt_obs_l_all !< Local dimension of observation vector over all obs. types + INTEGER, INTENT(inout) :: cnt_obs_l !< Local dimension of single observation type vector + + ! Store ID of first observation type that calls the routine + ! This is reset in PDAFomi_deallocate_obs + IF (firstobs == 0) THEN + firstobs = thisobs%obsid + END IF + + ! Reset offset of currrent observation in overall local obs. vector + IF (thisobs%obsid == firstobs) THEN + offset_obs_l = 0 + cnt_obs_l_all = 0 + END IF + + ! Store offset + thisobs_l%off_obs_l = offset_obs_l + + ! Initialize pointer array + IF (thisobs%obsid == firstobs) THEN + IF (ALLOCATED(obs_l_all)) DEALLOCATE(obs_l_all) + ALLOCATE(obs_l_all(n_obstypes)) + END IF + + ! Set pointer to current observation + obs_l_all(thisobs%obsid)%ptr => thisobs_l + + ! Store local observation dimension and increment offset + thisobs_l%dim_obs_l = cnt_obs_l + offset_obs_l = offset_obs_l + cnt_obs_l + cnt_obs_l_all = cnt_obs_l_all + cnt_obs_l + + ! Allocate arrays to store information on local observations + IF (ALLOCATED(thisobs_l%id_obs_l)) DEALLOCATE(thisobs_l%id_obs_l) + IF (ALLOCATED(thisobs_l%distance_l)) DEALLOCATE(thisobs_l%distance_l) + IF (ALLOCATED(thisobs_l%cradius_l)) DEALLOCATE(thisobs_l%cradius_l) + IF (ALLOCATED(thisobs_l%sradius_l)) DEALLOCATE(thisobs_l%sradius_l) + + haveobs: IF (cnt_obs_l>0) THEN + ALLOCATE(thisobs_l%id_obs_l(cnt_obs_l)) + ALLOCATE(thisobs_l%distance_l(cnt_obs_l)) + ALLOCATE(thisobs_l%cradius_l(cnt_obs_l)) + ALLOCATE(thisobs_l%sradius_l(cnt_obs_l)) + IF (thisobs_l%locweight_v>0) THEN + IF (ALLOCATED(thisobs_l%dist_l_v)) DEALLOCATE(thisobs_l%dist_l_v) + ALLOCATE(thisobs_l%dist_l_v(cnt_obs_l)) + END IF + + ELSE + ALLOCATE(thisobs_l%id_obs_l(1)) + ALLOCATE(thisobs_l%distance_l(1)) + ALLOCATE(thisobs_l%cradius_l(1)) + ALLOCATE(thisobs_l%sradius_l(1)) + IF (ALLOCATED(thisobs_l%dist_l_v)) DEALLOCATE(thisobs_l%dist_l_v) + ALLOCATE(thisobs_l%dist_l_v(1)) + END IF haveobs + + END SUBROUTINE PDAFomi_set_dim_obs_l + + + + +!------------------------------------------------------------------------------- +!> Set dimension of local obs. vector and local obs. arrays (non-isotropic) +!! +!! This routine sets the number of local observations for the +!! current observation type for the local analysis domain +!! with coordinates COORD_l and a vector of localization cut-off +!! radii CRADIUS. +!! Further the routine initializes arrays for the index of a +!! local observation in the full observation vector and its +!! corresponding distance. +!! The operation are performed by calling the routines +!! cnt_dim_obs_l and init_obsarrays_l. +!! +!! __Revision history:__ +!! * 2024-02 - Lars Nerger - Initial code from restructuring observation routines +!! * Later revisions - see repository log +!! + SUBROUTINE PDAFomi_init_dim_obs_l_noniso(thisobs_l, thisobs, coords_l, locweight, cradius, & + sradius, cnt_obs_l_all) + + IMPLICIT NONE + +! *** Arguments *** + TYPE(obs_f), INTENT(inout) :: thisobs !< Data type with full observation + TYPE(obs_l), TARGET, INTENT(inout) :: thisobs_l !< Data type with local observation + REAL, INTENT(in) :: coords_l(:) !< Coordinates of current analysis domain + INTEGER, INTENT(in) :: locweight !< Type of localization function + REAL, INTENT(in) :: cradius(:) !< Vector of localization cut-off radii + REAL, INTENT(in) :: sradius(:) !< Vector of support radii of localization function + INTEGER, INTENT(inout) :: cnt_obs_l_all !< Local dimension of current observation vector + +! *** Local variables *** + REAL :: maxcoords_l, mincoords_l ! Min/Max domain coordinates to check geographic coords + REAL :: maxocoords_l, minocoords_l ! Min/Max observation coordinates to check geographic coords + INTEGER :: cnt_obs ! Counter for valid local observations + + + doassim: IF (thisobs%doassim == 1) THEN + +! *********************************************** +! *** Check offset in full observation vector *** +! *********************************************** + + IF (debug>0) & + WRITE (*,*) '++ OMI-debug: ', debug, 'PDAFomi_init_dim_obs_l_noniso -- START' + + ! Check consistency of dimensions + IF (SIZE(cradius) /= thisobs%ncoord) THEN + WRITE (*,*) '+++++ ERROR PDAF-OMI: non-isotropic localization: Size of CRADIUS /= thisobs%ncoord' + error = 12 + END IF + IF (SIZE(sradius) /= thisobs%ncoord) THEN + WRITE (*,*) '+++++ ERROR PDAF-OMI: non-isotropic localization: Size of SRADIUS /= thisobs%ncoord' + error = 13 + END IF + IF (thisobs%ncoord/=3 .AND. thisobs%disttype>=10) THEN + WRITE (*,*) '+++++ ERROR PDAF-OMI: factorized 2+1D localization can only be used for thisobs%ncoord=3' + error = 14 + END IF + + +! ************************************** +! *** Store localization information *** +! ************************************** + + thisobs_l%locweight = locweight + + ! Allocate vectors for localization radii and store their values + IF (ALLOCATED(thisobs_l%cradius)) DEALLOCATE(thisobs_l%cradius) + ALLOCATE(thisobs_l%cradius(thisobs%ncoord)) + IF (ALLOCATED(thisobs_l%sradius)) DEALLOCATE(thisobs_l%sradius) + ALLOCATE(thisobs_l%sradius(thisobs%ncoord)) + + thisobs_l%nradii = thisobs%ncoord + thisobs_l%cradius(:) = cradius(:) + thisobs_l%sradius(:) = sradius(:) + + +! ************************************** +! *** Count valid local observations *** +! ************************************** + + IF (debug>0) THEN + WRITE (*,*) '++ OMI-debug: ', debug, & + ' PDAFomi_init_dim_obs_l_noniso -- count local observations' + IF (thisobs%obsid == firstobs) THEN + WRITE (*,*) '++ OMI-debug init_dim_obs_l_noniso:', debug, ' Re-init dim_obs_l=0' + END IF + WRITE (*,*) '++ OMI-debug init_dim_obs_l_noniso:', debug, ' coords_l', coords_l + + ! For geographic coordinates check whether their range is reasonable + IF (thisobs%disttype==2 .OR. thisobs%disttype==3 .OR. thisobs%disttype==12 .OR. thisobs%disttype==13) THEN + maxcoords_l = MAXVAL(coords_l) + mincoords_l = MINVAL(coords_l) + maxocoords_l = MAXVAL(thisobs%ocoord_f(1:2, :)) + minocoords_l = MINVAL(thisobs%ocoord_f(1:2, :)) + + IF (maxcoords_l>2.0*pi .OR. mincoords_l<-pi .OR. maxocoords_l>2.0*pi .OR. minocoords_l<-pi) THEN + WRITE (*,*) '++ OMI-debug init_dim_obs_l_noniso:', debug, & + ' WARNING: The unit for geographic coordinates is radian, thus range (0,2*pi) or (-pi,pi)!' + END IF + END IF + WRITE (*,*) '++ OMI-debug init_dim_obs_l_noniso:', debug, & + ' Note: Please ensure that coords_l and observation coordinates have the same unit' + + WRITE (*,*) '++ OMI-debug init_dim_obs_l_noniso: ', debug, ' thisobs%ncoord', thisobs%ncoord + WRITE (*,*) '++ OMI-debug init_dim_obs_l_noniso: ', debug, ' thisobs_l%cradius', thisobs_l%cradius + WRITE (*,*) '++ OMI-debug init_dim_obs_l_noniso: ', debug, ' Check for observations within radius' + END IF + + cnt_obs = 0 + IF (thisobs_l%nradii==1) THEN + ! 1D but with radius specified as array + CALL PDAFomi_check_dist2_loop(thisobs_l, thisobs, coords_l, cnt_obs, 1) + ELSEIF (thisobs_l%nradii==2 .OR. thisobs_l%nradii==3) THEN + ! Nonisotropic in 2 or 3 dimensions + CALL PDAFomi_check_dist2_noniso_loop(thisobs_l, thisobs, coords_l, cnt_obs, 1) + ELSE + WRITE (*,*) '+++++ ERROR PDAF-OMI: nonisotropic localization is only possible in 1, 2 or 3 dimensions' + error = 10 + END IF + + +! ************************************************ +! *** Initialize local observation for PDAFomi *** +! ************************************************ + + CALL PDAFomi_set_dim_obs_l(thisobs_l, thisobs, cnt_obs_l_all, cnt_obs) + + +! ************************************************************ +! *** Initialize internal local arrays for local distances *** +! *** and indices of local obs. in full obs. vector *** +! ************************************************************ + + IF (debug>0) & + WRITE (*,*) '++ OMI-debug: ', debug, & + ' PDAFomi_init_dim_obs_l_noniso -- initialize local observation arrays' + + ! Count local observations and initialize index and distance arrays + IF (thisobs_l%dim_obs_l>0) THEN + + cnt_obs = 0 + IF (thisobs_l%nradii==1) THEN + ! 1D but with radius specified as array + CALL PDAFomi_check_dist2_loop(thisobs_l, thisobs, coords_l, cnt_obs, 2) + ELSEIF (thisobs_l%nradii==2 .OR. thisobs_l%nradii==3) THEN + ! Nonisotropic in 2 or 3 dimensions + CALL PDAFomi_check_dist2_noniso_loop(thisobs_l, thisobs, coords_l, cnt_obs, 2) + ELSE + WRITE (*,*) '+++++ ERROR PDAF-OMI: nonisotropic localization is only possible in 1, 2 or 3 dimensions' + error = 11 + END IF + END IF + + ! Print debug information + IF (debug>0) THEN + WRITE (*,*) '++ OMI-debug init_dim_obs_l_noniso:', debug, ' thisobs_l%dim_obs_l', thisobs_l%dim_obs_l + IF (thisobs_l%dim_obs_l>0) THEN + WRITE (*,*) '++ OMI-debug init_dim_obs_l_noniso:', debug, ' thisobs_l%id_obs_l', thisobs_l%id_obs_l + WRITE (*,*) '++ OMI-debug init_dim_obs_l_noniso:', debug, ' thisobs_l%distance_l', thisobs_l%distance_l + END IF + WRITE (*,*) '++ OMI-debug: ', debug, 'PDAFomi_init_dim_obs_l_noniso -- END' + END IF + + END IF doassim + + END SUBROUTINE PDAFomi_init_dim_obs_l_noniso + + + + +!------------------------------------------------------------------------------- +!> Set dimension of local obs. vector and local obs. arrays +!! +!! This routine is a variant of PDAFomi_init_dim_obs_l_noniso with +!! support for a vector of localization weights. This is used +!! to specify different localization functions for the vertical and +!! horizontal directions. The routine only stores the value of +!! locweights(2) for the vertical and calls PDAFomi_init_dim_obs_l_iso. +!! +!! __Revision history:__ +!! * 2024-04 - Lars Nerger - Initial code +!! * Later revisions - see repository log +!! + SUBROUTINE PDAFomi_init_dim_obs_l_noniso_locweights(thisobs_l, thisobs, coords_l, locweights, cradius, & + sradius, cnt_obs_l) + + IMPLICIT NONE + +! *** Arguments *** + TYPE(obs_f), INTENT(inout) :: thisobs !< Data type with full observation + TYPE(obs_l), TARGET, INTENT(inout) :: thisobs_l !< Data type with local observation + REAL, INTENT(in) :: coords_l(:) !< Coordinates of current analysis domain + INTEGER, INTENT(in) :: locweights(:) !< Types of localization function + REAL, INTENT(in) :: cradius(:) !< Vector of localization cut-off radii + REAL, INTENT(in) :: sradius(:) !< Vector of support radii of localization function + INTEGER, INTENT(inout) :: cnt_obs_l !< Local dimension of current observation vector + + +! *** Store vertical locweight and call standard routine + + IF (debug>0) THEN + WRITE (*,*) '++ OMI-debug: ', debug, 'PDAFomi_init_dim_obs_l_noniso_locweights -- START' + WRITE (*,*) '++ OMI-debug init_dim_obs_l_noniso_locweights:', debug, ' locweights', locweights + END IF + + ! Check consistency of dimensions + IF (SIZE(locweights) /= 2) THEN + WRITE (*,*) '+++++ ERROR PDAF-OMI: Input for locweight in horizontal and vertical directions needs size 2' + error = 15 + END IF + IF (thisobs%ncoord /= 3) THEN + WRITE (*,*) '+++++ WARNING PDAF-OMI: separate locweight for vertical is only utilized if thisobs%ncoord=3' + END IF + + IF (thisobs%ncoord == 3) THEN + ! locweight for the vertical is treated separately + thisobs_l%locweight_v = locweights(2) + END IF + + ! Call to usual routine that handles a single locweight setting + CALL PDAFomi_init_dim_obs_l_noniso(thisobs_l, thisobs, coords_l, locweights(1), cradius, & + sradius, cnt_obs_l) + + IF (debug>0) & + WRITE (*,*) '++ OMI-debug: ', debug, 'PDAFomi_init_dim_obs_l_noniso_locweights -- END' + + END SUBROUTINE PDAFomi_init_dim_obs_l_noniso_locweights + + +!------------------------------------------------------------------------------- +!> Check distance in case of nonisotropic localization +!! +!! This routine computes the distance between the observation and a +!! model grid point and the cut-off radius of an ellipse (in 2D) +!! or ellipsoid (in 3D) in the direction of the distance. Finally, +!! the routine checks whether the distance is not larger than the +!! cut-off radius. +!! +!! Choices for distance computation - disttype: +!! 0: Cartesian distance in ncoord dimensions +!! 1: Cartesian distance in ncoord dimensions with periodicity +!! (Needs specification of domsize(ncoord)) +!! 2: Aproximate geographic distance with horizontal coordinates in radians (-pi/+pi) +!! 3: Geographic distance computation using haversine formula +!! 10-13: Variants of distance types 0-3, but particularly for 3 dimensions in which +!! a 2+1 dimensional localization is applied (distance weighting only in the horizontal) +!! +!! __Revision history:__ +!! * 2024-02 - Lars Nerger - Initial code +!! * Later revisions - see repository log +!! + SUBROUTINE PDAFomi_check_dist2_noniso_loop(thisobs_l, thisobs, coordsA, cnt_obs, mode) + + IMPLICIT NONE + +! *** Arguments *** + TYPE(obs_f), INTENT(in) :: thisobs !< Data type with full observation + TYPE(obs_l), INTENT(inout) :: thisobs_l !< Data type with local observation + REAL, INTENT(in) :: coordsA(:) !< Coordinates of current analysis domain (ncoord) + INTEGER, INTENT(inout) :: cnt_obs !< Count number of local observations + INTEGER, INTENT(in) :: mode !< 1: count local observations + !< 2: initialize local arrays + +! *** Local variables *** + INTEGER :: i, k ! Counters + INTEGER :: verbose ! verbosity flag + INTEGER :: domsize ! Flag whether domainsize is set + LOGICAL :: distflag ! Flag whether distance in a coordinate direction is within cradius + REAL :: slon, slat ! sine of distance in longitude or latitude + REAL :: distance2 ! square distance + REAL :: cradius2 ! cut-off radius on ellipse or ellipsoid + REAL :: phi, theta ! Angles in ellipse or ellipsoid + REAL :: dist_xy ! Distance in xy-plan in 3D case + REAL :: dists(thisobs%ncoord) ! Distance vector between analysis point and observation + REAL :: coordsB(thisobs%ncoord) ! Array for coordinates of a single observation + REAL :: cradius ! Directional cut-off radius + REAL :: sradius ! Directional support radius + LOGICAL :: checkdist ! Flag whether distance is within cut-off radius + + +! ********************** +! *** Initialization *** +! ********************** + + scancount: DO i = 1, thisobs%dim_obs_f + + ! Initialize distance flag + checkdist = .FALSE. ! Whether an observation lies within the local box + distflag = .TRUE. ! Whether an observation lies within the local radius (ellipse, ellipsoid) + + ! Verbosity flag + verbose = i + + ! Observation coordinates + coordsB = thisobs%ocoord_f(1:thisobs%ncoord, i) + + +! ************************ +! *** Compute distance *** +! ************************ + + IF (.NOT.ALLOCATED(thisobs%domainsize)) THEN + domsize = 0 + ELSE + domsize = 1 + END IF + + ! Debug output + IF (debug>0 .AND. verbose==0) THEN + WRITE (*,*) '++ OMI-debug check_dist2_noniso: ', debug, ' use non-isotropic localization' + END IF + + norm: IF ((thisobs%disttype==0 .OR. thisobs%disttype==10) .OR. & + ((thisobs%disttype==1 .OR. thisobs%disttype==11) .AND. domsize==0)) THEN + + ! *** Compute Cartesian distance *** + + IF (debug>0 .AND. verbose==0) THEN + WRITE (*,*) '++ OMI-debug check_dist2_noniso: ', debug, ' compute Cartesian distance' + END IF + + IF (thisobs%ncoord==3) THEN + dists(3) = ABS(coordsA(3) - coordsB(3)) + IF (dists(3)>thisobs_l%cradius(3)) THEN + distflag = .FALSE. + ELSE + dists(2) = ABS(coordsA(2) - coordsB(2)) + IF (dists(2)>thisobs_l%cradius(2)) THEN + distflag = .FALSE. + ELSE + dists(1) = ABS(coordsA(1) - coordsB(1)) + IF (dists(1)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + ! full squared distance + distance2 = 0.0 + IF (thisobs%disttype<10) THEN + ! full 3D localization + DO k = 1, thisobs%ncoord + distance2 = distance2 + dists(k)*dists(k) + END DO + ELSE + ! factorized 2+1D localization + DO k = 1, thisobs%ncoord-1 + distance2 = distance2 + dists(k)*dists(k) + END DO + END IF + END IF + END IF + END IF + ELSEIF (thisobs%ncoord==2) THEN + dists(2) = ABS(coordsA(2) - coordsB(2)) + IF (dists(2)>thisobs_l%cradius(2)) THEN + distflag = .FALSE. + ELSE + dists(1) = ABS(coordsA(1) - coordsB(1)) + IF (dists(1)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + ! full squared distance + distance2 = 0.0 + DO k = 1, thisobs%ncoord + distance2 = distance2 + dists(k)*dists(k) + END DO + END IF + END IF + ELSEIF (thisobs%ncoord==1) THEN + dists(1) = ABS(coordsA(1) - coordsB(1)) + IF (dists(1)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + ! full squared distance + distance2 = 0.0 + DO k = 1, thisobs%ncoord + distance2 = distance2 + dists(k)*dists(k) + END DO + END IF + END IF + + ELSEIF ((thisobs%disttype==1 .OR. thisobs%disttype==11) .AND. domsize==1) THEN norm + + ! *** Compute periodic Cartesian distance *** + + IF (debug>0 .AND. verbose==0) THEN + WRITE (*,*) '++ OMI-debug check_dist2_noniso: ', debug, ' compute periodic Cartesian distance' + END IF + + IF (thisobs%ncoord==3) THEN + IF (thisobs%domainsize(3)<=0.0) THEN + dists(3) = ABS(coordsA(3) - coordsB(3)) + ELSE + dists(3) = MIN(ABS(coordsA(3) - coordsB(3)), & + ABS(ABS(coordsA(3) - coordsB(3))-thisobs%domainsize(3))) + END IF + IF (dists(3)>thisobs_l%cradius(3)) THEN + distflag = .FALSE. + ELSE + IF (thisobs%domainsize(2)<=0.0) THEN + dists(2) = ABS(coordsA(2) - coordsB(2)) + ELSE + dists(2) = MIN(ABS(coordsA(2) - coordsB(2)), & + ABS(ABS(coordsA(2) - coordsB(2))-thisobs%domainsize(2))) + END IF + IF (dists(2)>thisobs_l%cradius(2)) THEN + distflag = .FALSE. + ELSE + IF (thisobs%domainsize(1)<=0.0) THEN + dists(1) = ABS(coordsA(1) - coordsB(1)) + ELSE + dists(1) = MIN(ABS(coordsA(1) - coordsB(1)), & + ABS(ABS(coordsA(1) - coordsB(1))-thisobs%domainsize(1))) + END IF + IF (dists(1)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + ! full squared distance + distance2 = 0.0 + IF (thisobs%disttype<10) THEN + ! full 3D localization + DO k = 1, thisobs%ncoord + distance2 = distance2 + dists(k)*dists(k) + END DO + ELSE + ! factorized 2+1D localization + DO k = 1, thisobs%ncoord-1 + distance2 = distance2 + dists(k)*dists(k) + END DO + END IF + END IF + END IF + END IF + ELSEIF (thisobs%ncoord==2) THEN + IF (thisobs%domainsize(2)<=0.0) THEN + dists(2) = ABS(coordsA(2) - coordsB(2)) + ELSE + dists(2) = MIN(ABS(coordsA(2) - coordsB(2)), & + ABS(ABS(coordsA(2) - coordsB(2))-thisobs%domainsize(2))) + END IF + IF (dists(2)>thisobs_l%cradius(2)) THEN + distflag = .FALSE. + ELSE + IF (thisobs%domainsize(1)<=0.0) THEN + dists(1) = ABS(coordsA(1) - coordsB(1)) + ELSE + dists(1) = MIN(ABS(coordsA(1) - coordsB(1)), & + ABS(ABS(coordsA(1) - coordsB(1))-thisobs%domainsize(1))) + END IF + IF (dists(1)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + ! full squared distance + distance2 = 0.0 + DO k = 1, thisobs%ncoord + distance2 = distance2 + dists(k)*dists(k) + END DO + END IF + END IF + ELSEIF (thisobs%ncoord==1) THEN + IF (thisobs%domainsize(1)<=0.0) THEN + dists(1) = ABS(coordsA(1) - coordsB(1)) + ELSE + dists(1) = MIN(ABS(coordsA(1) - coordsB(1)), & + ABS(ABS(coordsA(1) - coordsB(1))-thisobs%domainsize(1))) + END IF + IF (dists(1)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + ! full squared distance + distance2 = 0.0 + DO k = 1, thisobs%ncoord + distance2 = distance2 + dists(k)*dists(k) + END DO + END IF + END IF + + ELSEIF (thisobs%disttype==2 .OR. thisobs%disttype==12) THEN norm + + ! *** Compute distance from geographic coordinates *** + + IF (debug>0 .AND. verbose==0) THEN + WRITE (*,*) '++ OMI-debug check_dist2_noniso: ', debug, ' compute geographic distance' + END IF + + IF (thisobs%ncoord==3) THEN + dists(3) = ABS(coordsA(3) - coordsB(3)) + IF (dists(3)>thisobs_l%cradius(3)) THEN + distflag = .FALSE. + ELSE + dists(2) = r_earth * ABS(coordsA(2) - coordsB(2)) + IF (dists(2)>thisobs_l%cradius(2)) THEN + distflag = .FALSE. + ELSE + dists(1) = r_earth * MIN( ABS(coordsA(1) - coordsB(1))* COS(coordsA(2)), & + ABS(ABS(coordsA(1) - coordsB(1)) - 2.0*pi) * COS(coordsA(2))) + IF (dists(1)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + ! full squared distance + distance2 = 0.0 + IF (thisobs%disttype<10) THEN + ! full 3D localization + DO k = 1, thisobs%ncoord + distance2 = distance2 + dists(k)*dists(k) + END DO + ELSE + ! factorized 2+1D localization + DO k = 1, thisobs%ncoord-1 + distance2 = distance2 + dists(k)*dists(k) + END DO + END IF + END IF + END IF + END IF + ELSE + dists(2) = r_earth * ABS(coordsA(2) - coordsB(2)) + IF (dists(2)>thisobs_l%cradius(2)) THEN + distflag = .FALSE. + ELSE + dists(1) = r_earth * MIN( ABS(coordsA(1) - coordsB(1))* COS(coordsA(2)), & + ABS(ABS(coordsA(1) - coordsB(1)) - 2.0*pi) * COS(coordsA(2))) + IF (dists(1)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + ! full squared distance + distance2 = 0.0 + DO k = 1, thisobs%ncoord + distance2 = distance2 + dists(k)*dists(k) + END DO + END IF + END IF + END IF + + ELSEIF (thisobs%disttype==3 .OR. thisobs%disttype==13) THEN norm + + ! *** Compute distance from geographic coordinates with haversine formula *** + + IF (debug>0 .AND. verbose==0) THEN + WRITE (*,*) '++ OMI-debug check_dist2_noniso: ', debug, & + ' compute geographic distance using haversine function' + END IF + + IF (thisobs%ncoord==3) THEN + dists(3) = ABS(coordsA(3) - coordsB(3)) + IF (dists(3)>thisobs_l%cradius(3)) THEN + distflag = .FALSE. + ELSE + dists(2) = r_earth * ABS(coordsA(2) - coordsB(2)) + IF (dists(2)>thisobs_l%cradius(2)) THEN + distflag = .FALSE. + ELSE + dists(1) = r_earth * MIN( ABS(coordsA(1) - coordsB(1))* COS(coordsA(2)), & + ABS(ABS(coordsA(1) - coordsB(1)) - 2.0*pi) * COS(coordsA(2))) + + ! Haversine formula + slon = SIN((coordsA(1) - coordsB(1))/2) + slat = SIN((coordsA(2) - coordsB(2))/2) + + dists(2) = SQRT(slat*slat + COS(coordsA(2))*COS(coordsB(2))*slon*slon) + IF (dists(2)<=1.0) THEN + dists(2) = 2.0 * r_earth* ASIN(dists(2)) + ELSE + dists(2) = r_earth* pi + END IF + IF (dists(2)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + ! full squared distance + distance2 = 0.0 + IF (thisobs%disttype<10) THEN + ! full 3D localization + DO k = 2, thisobs%ncoord + distance2 = distance2 + dists(k)*dists(k) + END DO + ELSE + ! factorized 2+1D localization + DO k = 2, thisobs%ncoord-1 + distance2 = distance2 + dists(k)*dists(k) + END DO + END IF + END IF + END IF + END IF + ELSE + dists(2) = r_earth * ABS(coordsA(2) - coordsB(2)) + IF (dists(2)>thisobs_l%cradius(2)) THEN + distflag = .FALSE. + ELSE + dists(1) = r_earth * MIN( ABS(coordsA(1) - coordsB(1))* COS(coordsA(2)), & + ABS(ABS(coordsA(1) - coordsB(1)) - 2.0*pi) * COS(coordsA(2))) + + ! Haversine formula + slon = SIN((coordsA(1) - coordsB(1))/2) + slat = SIN((coordsA(2) - coordsB(2))/2) + + dists(2) = SQRT(slat*slat + COS(coordsA(2))*COS(coordsB(2))*slon*slon) + IF (dists(2)<=1.0) THEN + dists(2) = 2.0 * r_earth* ASIN(dists(2)) + ELSE + dists(2) = r_earth* pi + END IF + IF (dists(2)>thisobs_l%cradius(1)) THEN + distflag = .FALSE. + ELSE + ! full squared distance + distance2 = 0.0 + DO k = 1, thisobs%ncoord + distance2 = distance2 + dists(k)*dists(k) + END DO + END IF + END IF + END IF + + END IF norm + + +! *************************************************************************** +! *** Compute directional cut-off and support radii and set distance flag *** +! *************************************************************************** + + dflag: IF (distflag) THEN + nrad: IF (thisobs_l%nradii == 2 .OR. (thisobs_l%nradii == 3 .AND. thisobs%disttype >= 10)) THEN + + IF ((thisobs_l%cradius(1) == thisobs_l%cradius(2)) .OR. & + (thisobs_l%sradius(1) == thisobs_l%sradius(2))) THEN + ! 2D isotropic case + + cradius2 = thisobs_l%cradius(1) * thisobs_l%cradius(1) + + IF (distance2 <= cradius2) THEN + ! Set flag for valid observation + checkdist = .TRUE. + cnt_obs = cnt_obs + 1 + + cradius = thisobs_l%cradius(1) + sradius = thisobs_l%sradius(1) + + IF (debug>0) THEN + WRITE (*,*) '++ OMI-debug check_dist2_noniso: ', debug, & + ' 2D isotropic with separately specified, but equal, radii' + WRITE (*,*) '++ OMI-debug check_dist2_noniso: ', debug, ' theta, cradius, sradius', & + theta*180/pi, cradius, sradius + END IF + END IF + ELSE + + ! *** 2D anisotropic case: Use polar radius of ellipse in 2 dimensions *** + + ! Compute angle + IF (dists(1) /= 0.0) THEN + theta = ATAN(dists(2) / dists(1)) + ELSE + theta = pi / 2.0 + END IF + + ! Compute radius in direction of theta + IF (thisobs_l%cradius(1)>0.0 .OR. thisobs_l%cradius(2)>0.0) THEN + cradius = thisobs_l%cradius(1) * thisobs_l%cradius(2) / & + SQRT( (thisobs_l%cradius(2)*COS(theta))**2 & + + (thisobs_l%cradius(1)*SIN(theta))**2 ) + ELSE + cradius = 0.0 + END IF + + cradius2 = cradius * cradius + + IF (distance2 <= cradius2) THEN + ! Set flag for valid observation + checkdist = .TRUE. + cnt_obs = cnt_obs + 1 + + ! Compute support radius in direction of theta + IF (thisobs_l%sradius(1)>0.0 .OR. thisobs_l%sradius(2)>0.0) THEN + sradius = thisobs_l%sradius(1) * thisobs_l%sradius(2) / & + SQRT( (thisobs_l%sradius(2)*COS(theta))**2 & + + (thisobs_l%sradius(1)*SIN(theta))**2 ) + ELSE + sradius = 0.0 + END IF + + IF (debug>0) THEN + WRITE (*,*) '++ OMI-debug check_dist2_noniso: ', debug, & + ' 2D nonisotropic localization' + WRITE (*,*) '++ OMI-debug check_dist2_noniso: ', debug, ' theta, cradius, sradius', & + theta*180/pi, cradius, sradius + END IF + END IF + + END IF + + ELSE IF (thisobs_l%nradii == 3 .AND. thisobs%disttype < 10) THEN nrad + + ! To save computing time, we here distinguish whether + ! - the horizontal radii are equal and only direction 3 has a different radius + ! - whether all radii are equal (isotropic but specified with separate radii) + ! - the anisotropy is in all 3 dimensions (all radii different) + + aniso: IF ((thisobs_l%cradius(1) == thisobs_l%cradius(2)) .AND. & + (thisobs_l%cradius(1) /= thisobs_l%cradius(3)) .AND. & + (thisobs_l%sradius(1) == thisobs_l%sradius(2))) THEN + + ! *** Isotropic in horizontal direction, distinct radius in the third direction (vertical) *** + + dist_xy = SQRT(dists(1)*dists(1) + dists(2)*dists(2)) + + ! 2D anisotropy: Polar radius of ellipse in 2 dimensions + + ! Compute angle + IF (dist_xy /= 0.0) THEN + theta = ATAN(dists(3) / dist_xy) + ELSE + theta = pi / 2.0 + END IF + + ! Compute radius in direction of theta + IF (thisobs_l%cradius(1)>0.0 .OR. thisobs_l%cradius(3)>0.0) THEN + cradius = thisobs_l%cradius(1) * thisobs_l%cradius(3) / & + SQRT( (thisobs_l%cradius(3)*COS(theta))**2 & + + (thisobs_l%cradius(1)*SIN(theta))**2 ) + ELSE + cradius = 0.0 + END IF + + cradius2 = cradius * cradius + + IF (distance2 <= cradius2) THEN + ! Set flag for valid observation + checkdist = .TRUE. + cnt_obs = cnt_obs + 1 + + ! Compute support radius in direction of theta + IF (thisobs_l%sradius(1)>0.0 .OR. thisobs_l%sradius(3)>0.0) THEN + sradius = thisobs_l%sradius(1) * thisobs_l%sradius(3) / & + SQRT( (thisobs_l%sradius(3)*COS(theta))**2 & + + (thisobs_l%sradius(1)*SIN(theta))**2 ) + ELSE + sradius = 0.0 + END IF + + IF (debug>0) THEN + WRITE (*,*) '++ OMI-debug check_dist2_noniso: ', debug, & + ' 3D: isotropic in directions 1 and 2, nonisotropic in direction 3' + WRITE (*,*) '++ OMI-debug check_dist2_noniso: ', debug, ' theta, cradius, sradius', & + theta*180/pi, cradius, sradius + END IF + END IF + + ELSEIF ((thisobs_l%cradius(1) == thisobs_l%cradius(2)) .AND. & + (thisobs_l%cradius(1) == thisobs_l%cradius(3)) .AND. & + (thisobs_l%sradius(1) == thisobs_l%sradius(2)) .AND. & + (thisobs_l%sradius(2) == thisobs_l%sradius(3))) THEN aniso + + ! *** 3D isotropic case (all radii equal) *** + + cradius = thisobs_l%cradius(1) + cradius2 = thisobs_l%cradius(1) * thisobs_l%cradius(1) + sradius = thisobs_l%sradius(1) + + IF (distance2 <= cradius2) THEN + ! Set flag for valid observation + checkdist = .TRUE. + cnt_obs = cnt_obs + 1 + END IF + + IF (debug>0) THEN + WRITE (*,*) '++ OMI-debug check_dist2_noniso: ', debug, & + ' 3D isotropic case specified with vector of radii' + WRITE (*,*) '++ OMI-debug check_dist2_noniso: ', debug, ' theta, cradius, sradius', & + theta*180/pi, cradius, sradius + END IF + ELSE aniso + + ! *** general 3D anisotropic case *** + + ! Polar radius of ellipsoid in 3 dimensions + + ! Compute angle in x-y direction + IF (dists(1) /= 0.0) THEN + theta = ATAN(dists(2) / dists(1)) + ELSE + theta = pi / 2.0 + END IF + + ! Distance in xy-plane + dist_xy = SQRT(dists(1)**2 + dists(2)**2) + + ! Compute angle of xy-plane to z direction + IF (dist_xy /= 0.0) THEN + phi = ATAN(dists(3) / dist_xy) + ELSE + phi = 0.0 + END IF + + ! Compute radius in direction of theta + IF (thisobs_l%cradius(1)>0.0 .OR. thisobs_l%cradius(2)>0.0 .OR. thisobs_l%cradius(3)>0.0) THEN + cradius = thisobs_l%cradius(1) * thisobs_l%cradius(2) * thisobs_l%cradius(3) / & + SQRT( (thisobs_l%cradius(2)*thisobs_l%cradius(3)*COS(phi)*COS(theta))**2 & + + (thisobs_l%cradius(1)*thisobs_l%cradius(3)*COS(phi)*SIN(theta))**2 & + + (thisobs_l%cradius(1)*thisobs_l%cradius(2)*SIN(phi))**2 ) + ELSE + cradius = 0.0 + END IF + + cradius2 = cradius * cradius + + IF (distance2 <= cradius2) THEN + ! Set flag for valid observation + checkdist = .TRUE. + cnt_obs = cnt_obs + 1 + + ! Compute support radius in direction of theta + IF (thisobs_l%sradius(1)>0.0 .OR. thisobs_l%sradius(2)>0.0 .OR. thisobs_l%sradius(3)>0.0) THEN + sradius = thisobs_l%sradius(1) * thisobs_l%sradius(2) * thisobs_l%sradius(3) / & + SQRT( (thisobs_l%sradius(2)*thisobs_l%sradius(3)*COS(phi)*COS(theta))**2 & + + (thisobs_l%sradius(1)*thisobs_l%sradius(3)*COS(phi)*SIN(theta))**2 & + + (thisobs_l%sradius(1)*thisobs_l%sradius(2)*SIN(phi))**2 ) + ELSE + sradius = 0.0 + END IF + + IF (debug>0) THEN + WRITE (*,*) '++ OMI-debug check_dist2_noniso: ', debug, & + ' 3D nonisotropic localization' + WRITE (*,*) '++ OMI-debug check_dist2_noniso: ', debug, ' theta, phi, distance, cradius, sradius', & + theta*180/pi, phi*180/pi, SQRT(distance2), cradius, sradius + END IF + END IF + + END IF aniso + ELSEIF (thisobs_l%nradii == 1) THEN nrad + cradius = thisobs_l%cradius(1) + cradius2 = thisobs_l%cradius(1) * thisobs_l%cradius(1) + sradius = thisobs_l%sradius(1) + + IF (distance2 <= cradius2) THEN + ! Set flag for valid observation + checkdist = .TRUE. + cnt_obs = cnt_obs + 1 + END IF + + END IF nrad + + IF (mode==2 .AND. checkdist) THEN + ! For internal storage (use in prodRinvA_l and likelihood_l) + thisobs_l%id_obs_l(cnt_obs) = i ! node index + thisobs_l%distance_l(cnt_obs) = SQRT(distance2) ! distance + thisobs_l%cradius_l(cnt_obs) = cradius ! directional cut-off radius + thisobs_l%sradius_l(cnt_obs) = sradius ! directional support radius + IF (thisobs_l%locweight_v>0 .AND. thisobs_l%nradii==3) THEN + thisobs_l%dist_l_v(cnt_obs) = dists(3) ! distance in vertical direction + END if + END IF + END IF dflag + + END DO scancount + + END SUBROUTINE PDAFomi_check_dist2_noniso_loop + +END MODULE PDAFomi_dim_obs_l diff --git a/src/PDAFomi_obs_l.F90 b/src/PDAFomi_obs_l.F90 index ca08276d6..4e6705b16 100644 --- a/src/PDAFomi_obs_l.F90 +++ b/src/PDAFomi_obs_l.F90 @@ -24,17 +24,17 @@ !! !! * PDAFomi_set_debug_flag \n !! Set or unset the debugging flag for PDAFomi routines -!! * PDAFomi_init_dim_obs_l \n +!! * PDAFomi_init_dim_obs_l_old \n !! Initialize dimension of local obs. vetor and arrays for !! local observations -!! * PDAFomi_cnt_dim_obs_l \n +!! * PDAFomi_cnt_dim_obs_l_old \n !! Set dimension of local obs. vector with isotropic localization -!! * PDAFomi_cnt_dim_obs_l_noniso \n +!! * PDAFomi_cnt_dim_obs_l_noniso_old \n !! Set dimension of local obs. vector with nonisotropic localization -!! * PDAFomi_init_obsarrays_l \n +!! * PDAFomi_init_obsarrays_l_old \n !! Initialize arrays for the index of a local observation in !! the full observation vector and its corresponding distance. -!! * PDAFomi_init_obsarrays_l_noniso \n +!! * PDAFomi_init_obsarrays_l_noniso_old \n !! Initialize arrays for the index of a local observation in !! the full observation vector and its corresponding distance !! with onoisotrppic localization. @@ -123,10 +123,10 @@ MODULE PDAFomi_obs_l !$OMP THREADPRIVATE(obs_l_all, firstobs, offset_obs_l) - INTERFACE PDAFomi_init_dim_obs_l - MODULE PROCEDURE PDAFomi_init_dim_obs_l_iso - MODULE PROCEDURE PDAFomi_init_dim_obs_l_noniso - MODULE PROCEDURE PDAFomi_init_dim_obs_l_noniso_locweights + INTERFACE PDAFomi_init_dim_obs_l_old + MODULE PROCEDURE PDAFomi_init_dim_obs_l_iso_old + MODULE PROCEDURE PDAFomi_init_dim_obs_l_noniso_old + MODULE PROCEDURE PDAFomi_init_dim_obs_l_noniso_locweights_old END INTERFACE INTERFACE PDAFomi_localize_covar @@ -192,7 +192,7 @@ END SUBROUTINE PDAFomi_set_debug_flag !! * 2019-06 - Lars Nerger - Initial code from restructuring observation routines !! * Later revisions - see repository log !! - SUBROUTINE PDAFomi_init_dim_obs_l_iso(thisobs_l, thisobs, coords_l, locweight, cradius, & + SUBROUTINE PDAFomi_init_dim_obs_l_iso_old(thisobs_l, thisobs, coords_l, locweight, cradius, & sradius, cnt_obs_l) IMPLICIT NONE @@ -334,7 +334,7 @@ SUBROUTINE PDAFomi_init_dim_obs_l_iso(thisobs_l, thisobs, coords_l, locweight, c END IF doassim - END SUBROUTINE PDAFomi_init_dim_obs_l_iso + END SUBROUTINE PDAFomi_init_dim_obs_l_iso_old @@ -356,7 +356,7 @@ END SUBROUTINE PDAFomi_init_dim_obs_l_iso !! * 2024-02 - Lars Nerger - Initial code from restructuring observation routines !! * Later revisions - see repository log !! - SUBROUTINE PDAFomi_init_dim_obs_l_noniso(thisobs_l, thisobs, coords_l, locweight, cradius, & + SUBROUTINE PDAFomi_init_dim_obs_l_noniso_old(thisobs_l, thisobs, coords_l, locweight, cradius, & sradius, cnt_obs_l) IMPLICIT NONE @@ -507,7 +507,7 @@ SUBROUTINE PDAFomi_init_dim_obs_l_noniso(thisobs_l, thisobs, coords_l, locweight END IF doassim - END SUBROUTINE PDAFomi_init_dim_obs_l_noniso + END SUBROUTINE PDAFomi_init_dim_obs_l_noniso_old @@ -525,7 +525,7 @@ END SUBROUTINE PDAFomi_init_dim_obs_l_noniso !! * 2024-04 - Lars Nerger - Initial code !! * Later revisions - see repository log !! - SUBROUTINE PDAFomi_init_dim_obs_l_noniso_locweights(thisobs_l, thisobs, coords_l, locweights, cradius, & + SUBROUTINE PDAFomi_init_dim_obs_l_noniso_locweights_old(thisobs_l, thisobs, coords_l, locweights, cradius, & sradius, cnt_obs_l) IMPLICIT NONE @@ -562,13 +562,13 @@ SUBROUTINE PDAFomi_init_dim_obs_l_noniso_locweights(thisobs_l, thisobs, coords_l END IF ! Call to usual routine that handles a single locweight setting - CALL PDAFomi_init_dim_obs_l_noniso(thisobs_l, thisobs, coords_l, locweights(1), cradius, & + CALL PDAFomi_init_dim_obs_l_noniso_old(thisobs_l, thisobs, coords_l, locweights(1), cradius, & sradius, cnt_obs_l) IF (debug>0) & WRITE (*,*) '++ OMI-debug: ', debug, 'PDAFomi_init_dim_obs_l_noniso_locweights -- END' - END SUBROUTINE PDAFomi_init_dim_obs_l_noniso_locweights + END SUBROUTINE PDAFomi_init_dim_obs_l_noniso_locweights_old @@ -4331,83 +4331,4 @@ SUBROUTINE PDAFomi_dealloc() END SUBROUTINE PDAFomi_dealloc - -!------------------------------------------------------------------------------- -!> Initialization for dim_obs_l -!! -!! This routine initializes information on local observation vectors. -!! It is used by a user-supplied implementations of PDAFomi_init_dim_obs_l. -!! -!! The routine is called by all filter processes. -!! -!! __Revision history:__ -!! * 2024-08 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! - SUBROUTINE PDAFomi_set_dim_obs_l(thisobs_l, thisobs, cnt_obs_l_all, cnt_obs_l) - - IMPLICIT NONE - -! *** Arguments *** - TYPE(obs_f), INTENT(inout) :: thisobs !< Data type with full observation - TYPE(obs_l), TARGET, INTENT(inout) :: thisobs_l !< Data type with local observation - INTEGER, INTENT(inout) :: cnt_obs_l_all !< Local dimension of observation vector over all obs. types - INTEGER, INTENT(inout) :: cnt_obs_l !< Local dimension of single observation type vector - - ! Store ID of first observation type that calls the routine - ! This is reset in PDAFomi_deallocate_obs - IF (firstobs == 0) THEN - firstobs = thisobs%obsid - END IF - - ! Reset offset of currrent observation in overall local obs. vector - IF (thisobs%obsid == firstobs) THEN - offset_obs_l = 0 - cnt_obs_l_all = 0 - END IF - - ! Store offset - thisobs_l%off_obs_l = offset_obs_l - - ! Initialize pointer array - IF (thisobs%obsid == firstobs) THEN - IF (ALLOCATED(obs_l_all)) DEALLOCATE(obs_l_all) - ALLOCATE(obs_l_all(n_obstypes)) - END IF - - ! Set pointer to current observation - obs_l_all(thisobs%obsid)%ptr => thisobs_l - - ! Store local observation dimension and increment offset - thisobs_l%dim_obs_l = cnt_obs_l - offset_obs_l = offset_obs_l + cnt_obs_l - cnt_obs_l_all = cnt_obs_l_all + cnt_obs_l - - ! Allocate arrays to store information on local observations - IF (ALLOCATED(thisobs_l%id_obs_l)) DEALLOCATE(thisobs_l%id_obs_l) - IF (ALLOCATED(thisobs_l%distance_l)) DEALLOCATE(thisobs_l%distance_l) - IF (ALLOCATED(thisobs_l%cradius_l)) DEALLOCATE(thisobs_l%cradius_l) - IF (ALLOCATED(thisobs_l%sradius_l)) DEALLOCATE(thisobs_l%sradius_l) - - haveobs: IF (cnt_obs_l>0) THEN - ALLOCATE(thisobs_l%id_obs_l(cnt_obs_l)) - ALLOCATE(thisobs_l%distance_l(cnt_obs_l)) - ALLOCATE(thisobs_l%cradius_l(cnt_obs_l)) - ALLOCATE(thisobs_l%sradius_l(cnt_obs_l)) - IF (thisobs_l%locweight_v>0) THEN - IF (ALLOCATED(thisobs_l%dist_l_v)) DEALLOCATE(thisobs_l%dist_l_v) - ALLOCATE(thisobs_l%dist_l_v(cnt_obs_l)) - END IF - - ELSE - ALLOCATE(thisobs_l%id_obs_l(1)) - ALLOCATE(thisobs_l%distance_l(1)) - ALLOCATE(thisobs_l%cradius_l(1)) - ALLOCATE(thisobs_l%sradius_l(1)) - IF (ALLOCATED(thisobs_l%dist_l_v)) DEALLOCATE(thisobs_l%dist_l_v) - ALLOCATE(thisobs_l%dist_l_v(1)) - END IF haveobs - - END SUBROUTINE PDAFomi_set_dim_obs_l - END MODULE PDAFomi_obs_l From 5548911186710221437ff6d04c1a5df0daf66417 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Mon, 2 Sep 2024 10:34:18 +0200 Subject: [PATCH 69/83] Correction in objects' list --- src/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Makefile b/src/Makefile index db0edd5b0..76d481a52 100644 --- a/src/Makefile +++ b/src/Makefile @@ -466,7 +466,7 @@ OBJ_3DVAR = PDAF_put_state_3dvar.o \ # Routines for PDAF-OMI OBJ_PDAFOMI = PDAFomi_obs_f.o \ PDAFomi_obs_l.o \ - PDAFomi_dim_obs_l \ + PDAFomi_dim_obs_l.o \ PDAFomi_obs_op.o \ PDAFomi.o \ PDAFomi_callback.o From 97924d7e603e7da1aac22c49fecb176450537858 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Tue, 3 Sep 2024 10:08:00 +0200 Subject: [PATCH 70/83] Update version number to 2.3 --- src/PDAF_print_version.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PDAF_print_version.F90 b/src/PDAF_print_version.F90 index 08e2655b9..2b587f4d9 100644 --- a/src/PDAF_print_version.F90 +++ b/src/PDAF_print_version.F90 @@ -56,7 +56,7 @@ SUBROUTINE PDAF_print_version() WRITE(*, '(a)') 'PDAF +++ PDAF +++' WRITE(*, '(a)') 'PDAF +++ Parallel Data Assimilation Framework +++' WRITE(*, '(a)') 'PDAF +++ +++' - WRITE(*, '(a)') 'PDAF +++ Version 2.2.1 +++' + WRITE(*, '(a)') 'PDAF +++ Version 2.3 +++' WRITE(*, '(a)') 'PDAF +++ +++' WRITE(*, '(a)') 'PDAF +++ Please cite +++' WRITE(*, '(a)') 'PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++' From 6b50e5230c13a676acc3f11159071a49ae9c2abd Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Tue, 3 Sep 2024 10:09:09 +0200 Subject: [PATCH 71/83] Update --- Depends | 1 - 1 file changed, 1 deletion(-) diff --git a/Depends b/Depends index 9b7f93fb2..76e1c4484 100644 --- a/Depends +++ b/Depends @@ -369,7 +369,6 @@ $(OBJDIR)/PDAFomi_assimilate_nonlin_nondiagR.o: ./src/PDAFomi_assimilate_nonlin_ $(OBJDIR)/PDAFomi_assimilate_nonlin_nondiagR_si.o: ./src/PDAFomi_assimilate_nonlin_nondiagR_si.F90 $(OBJDIR)/PDAFomi_callback.o: ./src/PDAFomi_callback.F90 $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAFomi_dim_obs_l.o: ./src/PDAFomi_dim_obs_l.F90 $(OBJDIR)/PDAFomi_obs_f.o $(OBJDIR)/PDAFomi_obs_l.o $(OBJDIR)/PDAF_mod_filtermpi.o -$(OBJDIR)/PDAFomi_dim_obs_l_old.o: ./src/PDAFomi_dim_obs_l_old.F90 $(OBJDIR)/PDAFomi_obs_f.o $(OBJDIR)/PDAFomi_obs_l.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAFomi_generate_obs.o: ./src/PDAFomi_generate_obs.F90 $(OBJDIR)/PDAFomi.o $(OBJDIR)/PDAFomi_obs_f.o: ./src/PDAFomi_obs_f.F90 $(OBJDIR)/PDAF_mod_filtermpi.o $(OBJDIR)/PDAF_mod_filter.o ./src/typedefs.h $(OBJDIR)/PDAFomi_obs_l.o: ./src/PDAFomi_obs_l.F90 $(OBJDIR)/PDAFomi_obs_f.o $(OBJDIR)/PDAF_mod_filter.o $(OBJDIR)/PDAF_mod_filtermpi.o From ce84445a3a9168e68296b080ee931c2a5913331d Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Thu, 5 Sep 2024 18:23:38 +0200 Subject: [PATCH 72/83] Add more helper routines for user-supplied observation search routine. Now all allocations can be done in OMI-provided routines. Also storing the local index, distance and radii can be done in an OMI-provided routine. However, using this routine slowsdown the executation, in particular on the NEC. --- src/PDAFomi_dim_obs_l.F90 | 331 +++++++++++++++++++++++++++++--------- 1 file changed, 252 insertions(+), 79 deletions(-) diff --git a/src/PDAFomi_dim_obs_l.F90 b/src/PDAFomi_dim_obs_l.F90 index 3c5e16241..525aa4cac 100644 --- a/src/PDAFomi_dim_obs_l.F90 +++ b/src/PDAFomi_dim_obs_l.F90 @@ -604,85 +604,6 @@ SUBROUTINE PDAFomi_check_dist2_loop(thisobs_l, thisobs, coordsA, cnt_obs, mode) END SUBROUTINE PDAFomi_check_dist2_loop -!------------------------------------------------------------------------------- -!> Initialization for dim_obs_l -!! -!! This routine initializes information on local observation vectors. -!! It is used by a user-supplied implementations of PDAFomi_init_dim_obs_l. -!! -!! The routine is called by all filter processes. -!! -!! __Revision history:__ -!! * 2024-08 - Lars Nerger - Initial code -!! * Later revisions - see repository log -!! - SUBROUTINE PDAFomi_set_dim_obs_l(thisobs_l, thisobs, cnt_obs_l_all, cnt_obs_l) - - IMPLICIT NONE - -! *** Arguments *** - TYPE(obs_f), INTENT(inout) :: thisobs !< Data type with full observation - TYPE(obs_l), TARGET, INTENT(inout) :: thisobs_l !< Data type with local observation - INTEGER, INTENT(inout) :: cnt_obs_l_all !< Local dimension of observation vector over all obs. types - INTEGER, INTENT(inout) :: cnt_obs_l !< Local dimension of single observation type vector - - ! Store ID of first observation type that calls the routine - ! This is reset in PDAFomi_deallocate_obs - IF (firstobs == 0) THEN - firstobs = thisobs%obsid - END IF - - ! Reset offset of currrent observation in overall local obs. vector - IF (thisobs%obsid == firstobs) THEN - offset_obs_l = 0 - cnt_obs_l_all = 0 - END IF - - ! Store offset - thisobs_l%off_obs_l = offset_obs_l - - ! Initialize pointer array - IF (thisobs%obsid == firstobs) THEN - IF (ALLOCATED(obs_l_all)) DEALLOCATE(obs_l_all) - ALLOCATE(obs_l_all(n_obstypes)) - END IF - - ! Set pointer to current observation - obs_l_all(thisobs%obsid)%ptr => thisobs_l - - ! Store local observation dimension and increment offset - thisobs_l%dim_obs_l = cnt_obs_l - offset_obs_l = offset_obs_l + cnt_obs_l - cnt_obs_l_all = cnt_obs_l_all + cnt_obs_l - - ! Allocate arrays to store information on local observations - IF (ALLOCATED(thisobs_l%id_obs_l)) DEALLOCATE(thisobs_l%id_obs_l) - IF (ALLOCATED(thisobs_l%distance_l)) DEALLOCATE(thisobs_l%distance_l) - IF (ALLOCATED(thisobs_l%cradius_l)) DEALLOCATE(thisobs_l%cradius_l) - IF (ALLOCATED(thisobs_l%sradius_l)) DEALLOCATE(thisobs_l%sradius_l) - - haveobs: IF (cnt_obs_l>0) THEN - ALLOCATE(thisobs_l%id_obs_l(cnt_obs_l)) - ALLOCATE(thisobs_l%distance_l(cnt_obs_l)) - ALLOCATE(thisobs_l%cradius_l(cnt_obs_l)) - ALLOCATE(thisobs_l%sradius_l(cnt_obs_l)) - IF (thisobs_l%locweight_v>0) THEN - IF (ALLOCATED(thisobs_l%dist_l_v)) DEALLOCATE(thisobs_l%dist_l_v) - ALLOCATE(thisobs_l%dist_l_v(cnt_obs_l)) - END IF - - ELSE - ALLOCATE(thisobs_l%id_obs_l(1)) - ALLOCATE(thisobs_l%distance_l(1)) - ALLOCATE(thisobs_l%cradius_l(1)) - ALLOCATE(thisobs_l%sradius_l(1)) - IF (ALLOCATED(thisobs_l%dist_l_v)) DEALLOCATE(thisobs_l%dist_l_v) - ALLOCATE(thisobs_l%dist_l_v(1)) - END IF haveobs - - END SUBROUTINE PDAFomi_set_dim_obs_l - - !------------------------------------------------------------------------------- @@ -1544,4 +1465,256 @@ SUBROUTINE PDAFomi_check_dist2_noniso_loop(thisobs_l, thisobs, coordsA, cnt_obs, END SUBROUTINE PDAFomi_check_dist2_noniso_loop + + +!------------------------------------------------------------------------------- +!> Set localization parameters for isotropic localization +!! +!! This routine stores localization information (locweight, cradius, sradius) +!! in OMI and allocates local arrays for cradius and sradius. This variant +!! is for isotropic localization. The routine is used by user-supplied +!! implementations of PDAFomi_init_dim_obs_l. +!! +!! The routine is called by all filter processes. +!! +!! __Revision history:__ +!! * 2024-09 - Lars Nerger - Initial code +!! * Later revisions - see repository log +!! + SUBROUTINE PDAFomi_set_localization(thisobs_l, cradius, sradius, locweight) + + IMPLICIT NONE + +! *** Arguments *** + TYPE(obs_l), INTENT(inout) :: thisobs_l !< Data type with local observation + REAL, INTENT(in) :: cradius !< Localization cut-off radius + REAL, INTENT(in) :: sradius !< Support radius of localization function + INTEGER, INTENT(in) :: locweight !< Type of localization function + + +! *** Allocate vectors for localization radii *** + + IF (ALLOCATED(thisobs_l%cradius)) DEALLOCATE(thisobs_l%cradius) + ALLOCATE(thisobs_l%cradius(1)) + IF (ALLOCATED(thisobs_l%sradius)) DEALLOCATE(thisobs_l%sradius) + ALLOCATE(thisobs_l%sradius(1)) + + thisobs_l%locweight = locweight + thisobs_l%nradii = 1 + thisobs_l%cradius(:) = cradius + thisobs_l%sradius(:) = sradius + + END SUBROUTINE PDAFomi_set_localization + + + +!------------------------------------------------------------------------------- +!> Set localization parameters for non-isotropic localization +!! +!! This routine stores localization information (locweight, cradius, sradius) +!! in OMI and allocates local arrays for cradius and sradius. This variant +!! is for non-isotropic localization. The routine is used by user-supplied +!! implementations of PDAFomi_init_dim_obs_l. +!! +!! The routine is called by all filter processes. +!! +!! __Revision history:__ +!! * 2024-09 - Lars Nerger - Initial code +!! * Later revisions - see repository log +!! + SUBROUTINE PDAFomi_set_localization_noniso(thisobs_l, nradii, cradius, sradius, locweight, locweight_v) + + IMPLICIT NONE + +! *** Arguments *** + TYPE(obs_l), INTENT(inout) :: thisobs_l !< Data type with local observation + INTEGER, INTENT(in) :: nradii !< Number of radii to consider for localization + REAL, INTENT(in) :: cradius(nradii) !< Localization cut-off radius + REAL, INTENT(in) :: sradius(nradii) !< Support radius of localization function + INTEGER, INTENT(in) :: locweight !< Type of localization function + INTEGER, INTENT(in) :: locweight_v !< Type of localization function in vertical direction (only for nradii=3) + + + +! *** Allocate vectors for localization radii *** + + IF (ALLOCATED(thisobs_l%cradius)) DEALLOCATE(thisobs_l%cradius) + ALLOCATE(thisobs_l%cradius(nradii)) + IF (ALLOCATED(thisobs_l%sradius)) DEALLOCATE(thisobs_l%sradius) + ALLOCATE(thisobs_l%sradius(nradii)) + + thisobs_l%locweight = locweight + thisobs_l%nradii = nradii + thisobs_l%cradius(1:nradii) = cradius(1:nradii) + thisobs_l%sradius(1:nradii) = sradius(1:nradii) + IF (nradii==3) thisobs_l%locweight_v = locweight_v + + END SUBROUTINE PDAFomi_set_localization_noniso + + +!------------------------------------------------------------------------------- +!> Initialization for dim_obs_l +!! +!! This routine initializes information on local observation vectors. +!! It is used by a user-supplied implementations of PDAFomi_init_dim_obs_l. +!! +!! The routine is called by all filter processes. +!! +!! __Revision history:__ +!! * 2024-08 - Lars Nerger - Initial code +!! * Later revisions - see repository log +!! + SUBROUTINE PDAFomi_set_dim_obs_l(thisobs_l, thisobs, cnt_obs_l_all, cnt_obs_l) + + IMPLICIT NONE + +! *** Arguments *** + TYPE(obs_f), INTENT(inout) :: thisobs !< Data type with full observation + TYPE(obs_l), TARGET, INTENT(inout) :: thisobs_l !< Data type with local observation + INTEGER, INTENT(inout) :: cnt_obs_l_all !< Local dimension of observation vector over all obs. types + INTEGER, INTENT(inout) :: cnt_obs_l !< Local dimension of single observation type vector + + + ! Store ID of first observation type that calls the routine + ! This is reset in PDAFomi_deallocate_obs + IF (firstobs == 0) THEN + firstobs = thisobs%obsid + END IF + + ! Reset offset of currrent observation in overall local obs. vector + IF (thisobs%obsid == firstobs) THEN + offset_obs_l = 0 + cnt_obs_l_all = 0 + END IF + + ! Store offset + thisobs_l%off_obs_l = offset_obs_l + + ! Initialize pointer array + IF (thisobs%obsid == firstobs) THEN + IF (ALLOCATED(obs_l_all)) DEALLOCATE(obs_l_all) + ALLOCATE(obs_l_all(n_obstypes)) + END IF + + ! Set pointer to current observation + obs_l_all(thisobs%obsid)%ptr => thisobs_l + + ! Store local observation dimension and increment offset + thisobs_l%dim_obs_l = cnt_obs_l + offset_obs_l = offset_obs_l + cnt_obs_l + cnt_obs_l_all = cnt_obs_l_all + cnt_obs_l + + ! Allocate arrays to store information on local observations + IF (ALLOCATED(thisobs_l%id_obs_l)) DEALLOCATE(thisobs_l%id_obs_l) + IF (ALLOCATED(thisobs_l%distance_l)) DEALLOCATE(thisobs_l%distance_l) + IF (ALLOCATED(thisobs_l%cradius_l)) DEALLOCATE(thisobs_l%cradius_l) + IF (ALLOCATED(thisobs_l%sradius_l)) DEALLOCATE(thisobs_l%sradius_l) + + haveobs: IF (cnt_obs_l>0) THEN + ALLOCATE(thisobs_l%id_obs_l(cnt_obs_l)) + ALLOCATE(thisobs_l%distance_l(cnt_obs_l)) + ALLOCATE(thisobs_l%cradius_l(cnt_obs_l)) + ALLOCATE(thisobs_l%sradius_l(cnt_obs_l)) + IF (thisobs_l%locweight_v>0) THEN + IF (ALLOCATED(thisobs_l%dist_l_v)) DEALLOCATE(thisobs_l%dist_l_v) + ALLOCATE(thisobs_l%dist_l_v(cnt_obs_l)) + END IF + + ELSE + ALLOCATE(thisobs_l%id_obs_l(1)) + ALLOCATE(thisobs_l%distance_l(1)) + ALLOCATE(thisobs_l%cradius_l(1)) + ALLOCATE(thisobs_l%sradius_l(1)) + IF (ALLOCATED(thisobs_l%dist_l_v)) DEALLOCATE(thisobs_l%dist_l_v) + ALLOCATE(thisobs_l%dist_l_v(1)) + END IF haveobs + + END SUBROUTINE PDAFomi_set_dim_obs_l + + + +!------------------------------------------------------------------------------- +!> Store local index, distance and radii +!! +!! This routine stores the mapping index between the global and local +!! observation vectors, the distance and the cradius and sradius +!! for a single observations in OMI. This variant is for non-factorized +!! localization. The routine is used by user-supplied implementations +!! of PDAFomi_init_dim_obs_l. +!! +!! The routine is called by all filter processes. +!! +!! __Revision history:__ +!! * 2024-09 - Lars Nerger - Initial code +!! * Later revisions - see repository log +!! + SUBROUTINE PDAFomi_store_obs_l_index(thisobs_l, idx, id_obs_l, distance, & + cradius_l, sradius_l) + + IMPLICIT NONE + +! *** Arguments *** + TYPE(obs_l), INTENT(inout) :: thisobs_l !< Data type with local observation + INTEGER, INTENT(in) :: idx !< Element of local observation array to be filled + INTEGER, INTENT(in) :: id_obs_l !< Index of local observation in full observation array + REAL, INTENT(in) :: distance !< Distance between local analysis domain and observation + REAL, INTENT(in) :: cradius_l !< cut-off radius for this local observation + REAL, INTENT(in) :: sradius_l !< support radius for this local observation + + +! *** Store values *** + + thisobs_l%id_obs_l(idx) = id_obs_l ! element of local obs. vector in full obs. vector + thisobs_l%distance_l(idx) = distance ! distance + thisobs_l%cradius_l(idx) = cradius_l ! cut-off radius + thisobs_l%sradius_l(idx) = sradius_l ! support radius + + + END SUBROUTINE PDAFomi_store_obs_l_index + + + +!------------------------------------------------------------------------------- +!> Store local index, dsitance and radii for factorized localization +!! +!! This routine stores the mapping index between the global and local +!! observation vectors, the distance and the cradius and sradius +!! for a single observations in OMI. This variant is for 2+1D factorized +!! localization. The routine is used by user-supplied implementations +!! of PDAFomi_init_dim_obs_l. +!! +!! The routine is called by all filter processes. +!! +!! __Revision history:__ +!! * 2024-09 - Lars Nerger - Initial code +!! * Later revisions - see repository log +!! + SUBROUTINE PDAFomi_store_obs_l_index_vdist(thisobs_l, idx, id_obs_l, distance, & + cradius_l, sradius_l, vdist) + + IMPLICIT NONE + +! *** Arguments *** + TYPE(obs_l), INTENT(inout) :: thisobs_l !< Data type with local observation + INTEGER, INTENT(in) :: idx !< Element of local observation array to be filled + INTEGER, INTENT(in) :: id_obs_l !< Index of local observation in full observation array + REAL, INTENT(in) :: distance !< Distance between local analysis domain and observation + REAL, INTENT(in) :: cradius_l !< cut-off radius for this local observation + REAL, INTENT(in) :: sradius_l !< support radius for this local observation + REAL, INTENT(in) :: vdist !< support radius in vertical direction for 2+1D factorized + + +! *** Store values *** + + thisobs_l%id_obs_l(idx) = id_obs_l ! element of local obs. vector in full obs. vector + thisobs_l%distance_l(idx) = distance ! distance + thisobs_l%cradius_l(idx) = cradius_l ! cut-off radius + thisobs_l%sradius_l(idx) = sradius_l ! support radius + IF (thisobs_l%locweight_v>0 .AND. thisobs_l%nradii==3) THEN + thisobs_l%dist_l_v(idx) = vdist ! distance in vertical direction + END if + + + END SUBROUTINE PDAFomi_store_obs_l_index_vdist + END MODULE PDAFomi_dim_obs_l From 248a92df3f7f4acc7dbcf2a00ecdf9f79cc0e2db Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Sat, 7 Sep 2024 17:13:53 +0200 Subject: [PATCH 73/83] revert classical tutorial cases to not using PDAFlocal, so that we keep an example of using g2l_state_pdaf and l2g_state_pdaf --- .../3dvar/offline_2D_serial/parser_mpi.F90 | 2 +- .../online_2D_parallelmodel/parser_mpi.F90 | 2 +- .../online_2D_serialmodel/parser_mpi.F90 | 2 +- .../classical/offline_2D_parallel/Makefile | 4 +- .../assimilation_pdaf_offline.F90 | 14 ++- .../offline_2D_parallel/finalize_pdaf.F90 | 2 +- .../offline_2D_parallel/g2l_state_pdaf.F90 | 60 ++++++++++ .../offline_2D_parallel/init_dim_l_pdaf.F90 | 20 +--- .../offline_2D_parallel/l2g_state_pdaf.F90 | 61 ++++++++++ .../offline_2D_parallel/mod_assimilation.F90 | 14 +-- .../offline_2D_parallel/parser_mpi.F90 | 111 +++++++++--------- tutorial/classical/offline_2D_serial/Makefile | 4 +- .../assimilation_pdaf_offline.F90 | 14 ++- .../offline_2D_serial/g2l_state_pdaf.F90 | 60 ++++++++++ .../offline_2D_serial/init_dim_l_pdaf.F90 | 14 +-- .../offline_2D_serial/l2g_state_pdaf.F90 | 61 ++++++++++ .../offline_2D_serial/mod_assimilation.F90 | 27 +++-- .../offline_2D_serial/parser_mpi.F90 | 111 +++++++++--------- .../online_2D_parallelmodel/Makefile | 4 +- .../assimilate_pdaf.F90 | 8 +- .../g2l_state_pdaf.F90 | 60 ++++++++++ .../init_dim_l_pdaf.F90 | 20 +--- .../l2g_state_pdaf.F90 | 61 ++++++++++ .../mod_assimilation.F90 | 18 ++- .../online_2D_parallelmodel/parser_mpi.F90 | 111 +++++++++--------- .../online_2D_parallelmodel_fullpar/Makefile | 4 +- .../assimilate_pdaf.F90 | 8 +- .../g2l_state_pdaf.F90 | 60 ++++++++++ .../init_dim_l_pdaf.F90 | 20 +--- .../l2g_state_pdaf.F90 | 61 ++++++++++ .../mod_assimilation.F90 | 18 ++- .../parser_mpi.F90 | 111 +++++++++--------- .../Makefile | 4 +- .../assimilate_pdaf.F90 | 8 +- .../g2l_state_pdaf.F90 | 60 ++++++++++ .../init_dim_l_pdaf.F90 | 20 +--- .../l2g_state_pdaf.F90 | 61 ++++++++++ .../mod_assimilation.F90 | 18 ++- .../parser_mpi.F90 | 111 +++++++++--------- .../classical/online_2D_serialmodel/Makefile | 4 +- .../online_2D_serialmodel/assimilate_pdaf.F90 | 10 +- .../online_2D_serialmodel/g2l_state_pdaf.F90 | 62 ++++++++++ .../online_2D_serialmodel/init_dim_l_pdaf.F90 | 14 +-- .../online_2D_serialmodel/l2g_state_pdaf.F90 | 64 ++++++++++ .../mod_assimilation.F90 | 17 ++- .../online_2D_serialmodel/parser_mpi.F90 | 111 +++++++++--------- tutorial/offline_2D_parallel/parser_mpi.F90 | 2 +- tutorial/offline_2D_serial/parser_mpi.F90 | 2 +- .../online_2D_parallelmodel/parser_mpi.F90 | 2 +- .../parser_mpi.F90 | 2 +- .../parser_mpi.F90 | 2 +- tutorial/online_2D_serialmodel/parser_mpi.F90 | 2 +- .../parser_mpi.F90 | 2 +- 53 files changed, 1206 insertions(+), 519 deletions(-) create mode 100644 tutorial/classical/offline_2D_parallel/g2l_state_pdaf.F90 create mode 100644 tutorial/classical/offline_2D_parallel/l2g_state_pdaf.F90 create mode 100644 tutorial/classical/offline_2D_serial/g2l_state_pdaf.F90 create mode 100644 tutorial/classical/offline_2D_serial/l2g_state_pdaf.F90 create mode 100644 tutorial/classical/online_2D_parallelmodel/g2l_state_pdaf.F90 create mode 100644 tutorial/classical/online_2D_parallelmodel/l2g_state_pdaf.F90 create mode 100644 tutorial/classical/online_2D_parallelmodel_fullpar/g2l_state_pdaf.F90 create mode 100644 tutorial/classical/online_2D_parallelmodel_fullpar/l2g_state_pdaf.F90 create mode 100644 tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/g2l_state_pdaf.F90 create mode 100644 tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/l2g_state_pdaf.F90 create mode 100644 tutorial/classical/online_2D_serialmodel/g2l_state_pdaf.F90 create mode 100644 tutorial/classical/online_2D_serialmodel/l2g_state_pdaf.F90 diff --git a/tutorial/3dvar/offline_2D_serial/parser_mpi.F90 b/tutorial/3dvar/offline_2D_serial/parser_mpi.F90 index 0b814ab44..40258b6ac 100644 --- a/tutorial/3dvar/offline_2D_serial/parser_mpi.F90 +++ b/tutorial/3dvar/offline_2D_serial/parser_mpi.F90 @@ -47,7 +47,7 @@ !! to be specified as 'T' or 'F'. !! !! __Revision history:__ -!! * 2019-06 - Stephan Frickenhaus, Lars Nerger - Initial code +!! * 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code !! * Later revisions - see repository log !! MODULE parser diff --git a/tutorial/3dvar/online_2D_parallelmodel/parser_mpi.F90 b/tutorial/3dvar/online_2D_parallelmodel/parser_mpi.F90 index efa8b5e74..6ddcbb65d 100644 --- a/tutorial/3dvar/online_2D_parallelmodel/parser_mpi.F90 +++ b/tutorial/3dvar/online_2D_parallelmodel/parser_mpi.F90 @@ -47,7 +47,7 @@ !! to be specified as 'T' or 'F'. !! !! __Revision history:__ -!! * 2019-06 - Stephan Frickenhaus, Lars Nerger - Initial code +!! * 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code !! * Later revisions - see repository log !! MODULE parser diff --git a/tutorial/3dvar/online_2D_serialmodel/parser_mpi.F90 b/tutorial/3dvar/online_2D_serialmodel/parser_mpi.F90 index 0b814ab44..40258b6ac 100644 --- a/tutorial/3dvar/online_2D_serialmodel/parser_mpi.F90 +++ b/tutorial/3dvar/online_2D_serialmodel/parser_mpi.F90 @@ -47,7 +47,7 @@ !! to be specified as 'T' or 'F'. !! !! __Revision history:__ -!! * 2019-06 - Stephan Frickenhaus, Lars Nerger - Initial code +!! * 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code !! * Later revisions - see repository log !! MODULE parser diff --git a/tutorial/classical/offline_2D_parallel/Makefile b/tutorial/classical/offline_2D_parallel/Makefile index a92f1123a..9a10210c5 100644 --- a/tutorial/classical/offline_2D_parallel/Makefile +++ b/tutorial/classical/offline_2D_parallel/Makefile @@ -71,6 +71,8 @@ OBJ_USER_ENKF = add_obs_error_pdaf.o \ # User-supplied routines for localized analysis (LSEIK) OBJ_USER_LOCAL = init_n_domains_pdaf.o \ init_dim_l_pdaf.o \ + g2l_state_pdaf.o \ + l2g_state_pdaf.o \ prodrinva_l_pdaf.o \ init_obs_l_pdaf.o \ init_dim_obs_l_pdaf.o \ @@ -102,7 +104,7 @@ libpdaf-d.a: ###################################################### .F90.o : - $(FC) $(OPT) $(CPP_DEFS) -I$(BASEDIR)/include $(MPI_INC) -c $*.F90 + $(FC) $(OPT) $(CPP_DEFS) $(MPI_INC) -c $*.F90 # For older compilers one might need to separate the # preprocessing from the compilation as defined below: diff --git a/tutorial/classical/offline_2D_parallel/assimilation_pdaf_offline.F90 b/tutorial/classical/offline_2D_parallel/assimilation_pdaf_offline.F90 index 6de7873a4..8db0c8baa 100644 --- a/tutorial/classical/offline_2D_parallel/assimilation_pdaf_offline.F90 +++ b/tutorial/classical/offline_2D_parallel/assimilation_pdaf_offline.F90 @@ -53,6 +53,8 @@ SUBROUTINE assimilation_pdaf_offline() EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains init_dim_l_pdaf, & ! Initialize state dimension for local ana. domain init_dim_obs_l_pdaf,& ! Initialize dim. of obs. vector for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from global state + l2g_state_pdaf, & ! Init global state from state on local analysis domain g2l_obs_pdaf, & ! Restrict a global obs. vector to local analysis domain init_obs_l_pdaf, & ! Provide vector of measurements for local ana. domain prodRinvA_l_pdaf, & ! Provide product R^-1 A for some matrix A (for LSEIK) @@ -96,31 +98,31 @@ SUBROUTINE assimilation_pdaf_offline() init_obs_pdaf, prepoststep_ens_offline, add_obs_error_pdaf, init_obscovar_pdaf, & status) ELSE IF (filtertype == 3) THEN - CALL PDAFlocal_put_state_lseik( & + CALL PDAF_put_state_lseik( & collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_offline, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, & + init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, status) ELSE IF (filtertype == 4) THEN CALL PDAF_put_state_etkf(collect_state_pdaf, init_dim_obs_pdaf, obs_op_pdaf, & init_obs_pdaf, prepoststep_ens_offline, prodRinvA_pdaf, init_obsvar_pdaf, status) ELSE IF (filtertype == 5) THEN - CALL PDAFlocal_put_state_letkf( & + CALL PDAF_put_state_letkf( & collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_offline, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, & + init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, status) ELSE IF (filtertype == 6) THEN CALL PDAF_put_state_estkf(collect_state_pdaf, init_dim_obs_pdaf, obs_op_pdaf, & init_obs_pdaf, prepoststep_ens_offline, prodRinvA_pdaf, init_obsvar_pdaf, status) ELSE IF (filtertype == 7) THEN - CALL PDAFlocal_put_state_lestkf( & + CALL PDAF_put_state_lestkf( & collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_offline, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, & + init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, status) END IF diff --git a/tutorial/classical/offline_2D_parallel/finalize_pdaf.F90 b/tutorial/classical/offline_2D_parallel/finalize_pdaf.F90 index 026673622..9c4cd494d 100644 --- a/tutorial/classical/offline_2D_parallel/finalize_pdaf.F90 +++ b/tutorial/classical/offline_2D_parallel/finalize_pdaf.F90 @@ -24,7 +24,7 @@ SUBROUTINE finalize_pdaf() !EOP ! *** Show allocated memory for PDAF *** - IF (mype_world==0) CALL PDAF_print_info(10) + CALL PDAF_print_info(11) ! *** Print PDAF timings onto screen *** IF (mype_world==0) CALL PDAF_print_info(3) diff --git a/tutorial/classical/offline_2D_parallel/g2l_state_pdaf.F90 b/tutorial/classical/offline_2D_parallel/g2l_state_pdaf.F90 new file mode 100644 index 000000000..de3486955 --- /dev/null +++ b/tutorial/classical/offline_2D_parallel/g2l_state_pdaf.F90 @@ -0,0 +1,60 @@ +!$Id: g2l_state_pdaf.F90 1369 2013-04-24 16:38:17Z lnerger $ +!BOP +! +! !ROUTINE: g2l_state_pdaf --- Restrict a model state to a local analysis domain +! +! !INTERFACE: +SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) + +! !DESCRIPTION: +! User-supplied routine for PDAF. +! Used in the filters: LSEIK/LETKF/LESTKF +! +! The routine is called during the loop over all +! local analysis domains in PDAF\_lseik\_update +! before the analysis on a single local analysis +! domain. It has to project the full PE-local +! model state onto the current local analysis +! domain. +! +! Generic implementation using index vector +! ID_LSTATE_IN_PSTATE. +! +! !REVISION HISTORY: +! 2013-02 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE mod_assimilation, & + ONLY: id_lstate_in_pstate + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(in) :: step ! Current time step + INTEGER, INTENT(in) :: domain_p ! Current local analysis domain + INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension + INTEGER, INTENT(in) :: dim_l ! Local state dimension + REAL, INTENT(in) :: state_p(dim_p) ! PE-local full state vector + REAL, INTENT(out) :: state_l(dim_l) ! State vector on local analysis domain + +! !CALLING SEQUENCE: +! Called by: PDAF_lseik_update (as U_g2l_state) +! Called by: PDAF_letkf_update (as U_g2l_state) +! Called by: PDAF_lestkf_update (as U_g2l_state) +!EOP + +! *** local variables *** + INTEGER :: i ! Counter + + +! ************************************* +! *** Initialize local state vector *** +! ************************************* + + ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF + DO i = 1, dim_l + state_l(i) = state_p(id_lstate_in_pstate(i)) + END DO + +END SUBROUTINE g2l_state_pdaf diff --git a/tutorial/classical/offline_2D_parallel/init_dim_l_pdaf.F90 b/tutorial/classical/offline_2D_parallel/init_dim_l_pdaf.F90 index 4ea2086e2..9a6777cd2 100644 --- a/tutorial/classical/offline_2D_parallel/init_dim_l_pdaf.F90 +++ b/tutorial/classical/offline_2D_parallel/init_dim_l_pdaf.F90 @@ -23,10 +23,8 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! Later revisions - see svn log ! ! !USES: - USE PDAFlocal, & ! Routine to provide local indices to PDAF - ONLY: PDAFlocal_set_indices USE mod_assimilation, & ! Variables for assimilation - ONLY: ny, local_dims, coords_l + ONLY: ny, local_dims, coords_l, id_lstate_in_pstate USE mod_parallel, & ! assimilation parallelization variables ONLY: mype_filter @@ -37,17 +35,16 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) INTEGER, INTENT(in) :: domain_p ! Current local analysis domain INTEGER, INTENT(out) :: dim_l ! Local state dimension -! !LOCAL VARIABLES: - INTEGER :: i ! Counters - INTEGER :: off_p ! Process-local offset in global state vector - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector - ! !CALLING SEQUENCE: ! Called by: PDAF_lseik_update (as U_init_dim_l) ! Called by: PDAF_lestkf_update (as U_init_dim_l) ! Called by: PDAF_letkf_update (as U_init_dim_l) !EOP +! *** local variables *** + INTEGER :: i ! Counters + INTEGER :: off_p ! Process-local offset in global state vector + ! **************************************** ! *** Initialize local state dimension *** @@ -77,15 +74,10 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array + IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! Here the local domain is a single grid point and variable given by DOMAIN_P id_lstate_in_pstate(1) = domain_p - ! Provide the index vector to PDAF - CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) - - ! Deallocate index array - DEALLOCATE(id_lstate_in_pstate) - END SUBROUTINE init_dim_l_pdaf diff --git a/tutorial/classical/offline_2D_parallel/l2g_state_pdaf.F90 b/tutorial/classical/offline_2D_parallel/l2g_state_pdaf.F90 new file mode 100644 index 000000000..aa4b03b45 --- /dev/null +++ b/tutorial/classical/offline_2D_parallel/l2g_state_pdaf.F90 @@ -0,0 +1,61 @@ +!$Id: l2g_state_pdaf.F90 1369 2013-04-24 16:38:17Z lnerger $ +!BOP +! +! !ROUTINE: l2g_state_pdaf --- Initialize full state from local analysis +! +! !INTERFACE: +SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) + +! !DESCRIPTION: +! User-supplied routine for PDAF. +! Used in the filters: LSEIK/LETKF/LESTKF +! +! The routine is called during the loop over all +! local analysis domains in PDAF\_X\_update +! after the analysis and ensemble transformation +! on a single local analysis domain. It has to +! initialize elements of the PE-local full state +! vector from the provided analysis state vector +! on the local analysis domain. +! +! Generic implementation using index vector +! ID_LSTATE_IN_PSTATE. +! +! !REVISION HISTORY: +! 2013-02 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE mod_assimilation, & + ONLY: id_lstate_in_pstate + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(in) :: step ! Current time step + INTEGER, INTENT(in) :: domain_p ! Current local analysis domain + INTEGER, INTENT(in) :: dim_l ! Local state dimension + INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension + REAL, INTENT(in) :: state_l(dim_l) ! State vector on local analysis domain + REAL, INTENT(inout) :: state_p(dim_p) ! PE-local full state vector + +! !CALLING SEQUENCE: +! Called by: PDAF_lseik_update (as U_l2g_state) +! Called by: PDAF_lestkf_update (as U_l2g_state) +! Called by: PDAF_letkf_update (as U_l2g_state) +!EOP + +! *** local variables *** + INTEGER :: i ! Counter + + +! ************************************************** +! *** Initialize elements of global state vector *** +! ************************************************** + + ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF + DO i = 1, dim_l + state_p(id_lstate_in_pstate(i)) = state_l(i) + END DO + +END SUBROUTINE l2g_state_pdaf diff --git a/tutorial/classical/offline_2D_parallel/mod_assimilation.F90 b/tutorial/classical/offline_2D_parallel/mod_assimilation.F90 index 0d39d3076..efd48b2ed 100644 --- a/tutorial/classical/offline_2D_parallel/mod_assimilation.F90 +++ b/tutorial/classical/offline_2D_parallel/mod_assimilation.F90 @@ -41,12 +41,6 @@ MODULE mod_assimilation REAL, ALLOCATABLE :: obs_f(:) ! Vector holding full vector of observations REAL, ALLOCATABLE :: coords_obs_f(:,:) ! Array for full observation coordinates - REAL :: coords_l(2) ! Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector - REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations - -!$OMP THREADPRIVATE(coords_l, id_lobs_in_fobs, distance_l) - ! *** Below are the generic variables used for configuring PDAF *** ! *** Their values are set in init_PDAF_offline *** @@ -152,7 +146,7 @@ MODULE mod_assimilation ! (2) use 5th-order polynomial ! (3) regulated localization of R with mean error variance ! (4) regulated localization of R with single-point error variance - REAL :: sradius ! Support radius for 5th order polynomial + REAL :: sradius ! Support radius for 5th order polynomial ! or radius for 1/e for exponential weighting ! ! SEIK-subtype4/LSEIK-subtype4/ESTKF/LESTKF INTEGER :: type_sqrt ! Type of the transform matrix square-root @@ -169,5 +163,11 @@ MODULE mod_assimilation ! of P has also to be specified in PDAF_filter_init. ! Only for upward-compatibility of PDAF! REAL :: time ! model time + REAL :: coords_l(2) ! Coordinates of local analysis domain + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector + INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector + REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations + +!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate, id_lobs_in_fobs, distance_l) END MODULE mod_assimilation diff --git a/tutorial/classical/offline_2D_parallel/parser_mpi.F90 b/tutorial/classical/offline_2D_parallel/parser_mpi.F90 index a0f3619d6..603ab46c0 100644 --- a/tutorial/classical/offline_2D_parallel/parser_mpi.F90 +++ b/tutorial/classical/offline_2D_parallel/parser_mpi.F90 @@ -1,64 +1,61 @@ -!$Id: parser_mpi.F90 1581 2015-06-07 08:18:34Z lnerger $ -!BOP -! -! !MODULE: +!> Command line parser +!! +!! This module provides routine to parse command line +!! arguments of different types. This version is for +!! use with MPI parallelization. +!! +!! By default, this routine uses the intrinsics +!! 'get_command_count' and 'get_command_argument' +!! that are defined by the Fortran 2003 standard. +!! If a compiler does not support these functions, you +!! can use '-DF77' as a definition for the preprocessor. +!! In this case the Fortran77 standard 'iargc()' and +!! 'getarg()' are used. +!! +!! The module provides a generic subroutine to parse +!! variables of type INTEGER, REAL, or CHARACTER +!! (with length up to 100) from the command line. +!! +!! Usage: +!! SUBROUTINE PARSE(char(len=32) handle, variable) +!! The string 'handle' determines the name of +!! the parsed variable. +!! Example: handle='iters' parses a variable +!! specified on the command line by +!! '-iters value' +!! +!! Usage: +!! CALL PARSE(handle, int_variable) +!! Parses a variable of type integer +!! whose name is given by the string +!! handle. +!! +!! CALL PARSE(handle, real_variable) +!! Parses a variable of type real +!! whose name is given by the string +!! handle. +!! +!! CALL PARSE(handle, character_variable) +!! Parses a string variable of maxmimal +!! length of 100 characters whose name is +!! given by the string handle. +!! +!! CALL PARSE(handle, logical_variable) +!! Parses a variable of type logical +!! whose name is given by the string +!! handle. In the command line it has +!! to be specified as 'T' or 'F'. +!! +!! __Revision history:__ +!! * 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code +!! * Later revisions - see repository log +!! MODULE parser -! !DESCRIPTION: -! This module provides routine to parse command line -! arguments of different types. This version is for -! use with MPI parallelization. -! By default, this routine uses the intrinsics -! 'get\_command\_count' and 'get\_command\_argument' -! that are define by the Fortran 2003 standard. -! If a compiler does not support these functions, you -! can use '-DF77' as a definition for the preprocessor. -! In this case the Fortran77 standard 'iargc()' and -! 'getarg()' are used. -! -! The module provides a generic subroutine to parse -! variables of type INTEGER, REAL, or CHARACTER -! (with length up to 100) from the command line. -! -! Usage: \begin{verbatim} -! SUBROUTINE PARSE(char(len=32) handle, variable) -! The string 'handle' determines the name of -! the parsed variable. -! Example: handle='iters' parses a variable -! specified on the command line by -! '-iters value' -! -! Usage: -! CALL PARSE(handle, int_variable) -! Parses a variable of type integer -! whose name is given by the string -! handle. -! -! CALL PARSE(handle, real_variable) -! Parses a variable of type real -! whose name is given by the string -! handle. -! -! CALL PARSE(handle, character_variable) -! Parses a string variable of maxmimal -! length of 100 characters whose name is -! given by the string handle. -! -! CALL PARSE(handle, logical_variable) -! Parses a variable of type logical -! whose name is given by the string -! handle. In the command line it has -! to be specified as 'T' or 'F'. -! \end{verbatim} -! -! !REVISION HISTORY: -! 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE mpi + use mpi USE mod_parallel, & ONLY: abort_parallel + IMPLICIT NONE SAVE diff --git a/tutorial/classical/offline_2D_serial/Makefile b/tutorial/classical/offline_2D_serial/Makefile index c5386914c..9e2c5ffe2 100644 --- a/tutorial/classical/offline_2D_serial/Makefile +++ b/tutorial/classical/offline_2D_serial/Makefile @@ -71,6 +71,8 @@ OBJ_USER_ENKF = add_obs_error_pdaf.o \ # User-supplied routines for localized analysis (LSEIK) OBJ_USER_LOCAL = init_n_domains_pdaf.o \ init_dim_l_pdaf.o \ + g2l_state_pdaf.o \ + l2g_state_pdaf.o \ prodrinva_l_pdaf.o \ init_obs_l_pdaf.o \ init_dim_obs_l_pdaf.o \ @@ -102,7 +104,7 @@ libpdaf-d.a: ###################################################### .F90.o : - $(FC) $(OPT) $(CPP_DEFS) -I$(BASEDIR)/include $(MPI_INC) -c $*.F90 + $(FC) $(OPT) $(CPP_DEFS) $(MPI_INC) -c $*.F90 # For older compilers one might need to separate the # preprocessing from the compilation as defined below: diff --git a/tutorial/classical/offline_2D_serial/assimilation_pdaf_offline.F90 b/tutorial/classical/offline_2D_serial/assimilation_pdaf_offline.F90 index 67c5aaeca..8bc18fb93 100644 --- a/tutorial/classical/offline_2D_serial/assimilation_pdaf_offline.F90 +++ b/tutorial/classical/offline_2D_serial/assimilation_pdaf_offline.F90 @@ -53,6 +53,8 @@ SUBROUTINE assimilation_pdaf_offline() EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains init_dim_l_pdaf, & ! Initialize state dimension for local ana. domain init_dim_obs_l_pdaf,& ! Initialize dim. of obs. vector for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from global state + l2g_state_pdaf, & ! Init global state from state on local analysis domain g2l_obs_pdaf, & ! Restrict a global obs. vector to local analysis domain init_obs_l_pdaf, & ! Provide vector of measurements for local ana. domain prodRinvA_l_pdaf, & ! Provide product R^-1 A for some matrix A (for LSEIK) @@ -96,31 +98,31 @@ SUBROUTINE assimilation_pdaf_offline() init_obs_pdaf, prepoststep_ens_offline, add_obs_error_pdaf, init_obscovar_pdaf, & status) ELSE IF (filtertype == 3) THEN - CALL PDAFlocal_put_state_lseik( & + CALL PDAF_put_state_lseik( & collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_offline, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, & + init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, status) ELSE IF (filtertype == 4) THEN CALL PDAF_put_state_etkf(collect_state_pdaf, init_dim_obs_pdaf, obs_op_pdaf, & init_obs_pdaf, prepoststep_ens_offline, prodRinvA_pdaf, init_obsvar_pdaf, status) ELSE IF (filtertype == 5) THEN - CALL PDAFlocal_put_state_letkf( & + CALL PDAF_put_state_letkf( & collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_offline, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, & + init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, status) ELSE IF (filtertype == 6) THEN CALL PDAF_put_state_estkf(collect_state_pdaf, init_dim_obs_pdaf, obs_op_pdaf, & init_obs_pdaf, prepoststep_ens_offline, prodRinvA_pdaf, init_obsvar_pdaf, status) ELSE IF (filtertype == 7) THEN - CALL PDAFlocal_put_state_lestkf( & + CALL PDAF_put_state_lestkf( & collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_offline, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, & + init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, status) END IF diff --git a/tutorial/classical/offline_2D_serial/g2l_state_pdaf.F90 b/tutorial/classical/offline_2D_serial/g2l_state_pdaf.F90 new file mode 100644 index 000000000..de3486955 --- /dev/null +++ b/tutorial/classical/offline_2D_serial/g2l_state_pdaf.F90 @@ -0,0 +1,60 @@ +!$Id: g2l_state_pdaf.F90 1369 2013-04-24 16:38:17Z lnerger $ +!BOP +! +! !ROUTINE: g2l_state_pdaf --- Restrict a model state to a local analysis domain +! +! !INTERFACE: +SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) + +! !DESCRIPTION: +! User-supplied routine for PDAF. +! Used in the filters: LSEIK/LETKF/LESTKF +! +! The routine is called during the loop over all +! local analysis domains in PDAF\_lseik\_update +! before the analysis on a single local analysis +! domain. It has to project the full PE-local +! model state onto the current local analysis +! domain. +! +! Generic implementation using index vector +! ID_LSTATE_IN_PSTATE. +! +! !REVISION HISTORY: +! 2013-02 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE mod_assimilation, & + ONLY: id_lstate_in_pstate + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(in) :: step ! Current time step + INTEGER, INTENT(in) :: domain_p ! Current local analysis domain + INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension + INTEGER, INTENT(in) :: dim_l ! Local state dimension + REAL, INTENT(in) :: state_p(dim_p) ! PE-local full state vector + REAL, INTENT(out) :: state_l(dim_l) ! State vector on local analysis domain + +! !CALLING SEQUENCE: +! Called by: PDAF_lseik_update (as U_g2l_state) +! Called by: PDAF_letkf_update (as U_g2l_state) +! Called by: PDAF_lestkf_update (as U_g2l_state) +!EOP + +! *** local variables *** + INTEGER :: i ! Counter + + +! ************************************* +! *** Initialize local state vector *** +! ************************************* + + ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF + DO i = 1, dim_l + state_l(i) = state_p(id_lstate_in_pstate(i)) + END DO + +END SUBROUTINE g2l_state_pdaf diff --git a/tutorial/classical/offline_2D_serial/init_dim_l_pdaf.F90 b/tutorial/classical/offline_2D_serial/init_dim_l_pdaf.F90 index c3e2f744a..a34eb9cb1 100644 --- a/tutorial/classical/offline_2D_serial/init_dim_l_pdaf.F90 +++ b/tutorial/classical/offline_2D_serial/init_dim_l_pdaf.F90 @@ -23,10 +23,8 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! Later revisions - see svn log ! ! !USES: - USE PDAFlocal, & ! Routine to provide local indices to PDAF - ONLY: PDAFlocal_set_indices USE mod_assimilation, & ! Variables for assimilation - ONLY: ny, coords_l + ONLY: ny, coords_l, id_lstate_in_pstate IMPLICIT NONE @@ -35,9 +33,6 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) INTEGER, INTENT(in) :: domain_p ! Current local analysis domain INTEGER, INTENT(out) :: dim_l ! Local state dimension -! !LOCAL VARIABLES: - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector - ! !CALLING SEQUENCE: ! Called by: PDAF_lseik_update (as U_init_dim_l) ! Called by: PDAF_lestkf_update (as U_init_dim_l) @@ -67,15 +62,10 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array + IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! Here the local domain is a single grid point and variable given by DOMAIN_P id_lstate_in_pstate(1) = domain_p - ! Provide the index vector to PDAF - CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) - - ! Deallocate index array - DEALLOCATE(id_lstate_in_pstate) - END SUBROUTINE init_dim_l_pdaf diff --git a/tutorial/classical/offline_2D_serial/l2g_state_pdaf.F90 b/tutorial/classical/offline_2D_serial/l2g_state_pdaf.F90 new file mode 100644 index 000000000..aa4b03b45 --- /dev/null +++ b/tutorial/classical/offline_2D_serial/l2g_state_pdaf.F90 @@ -0,0 +1,61 @@ +!$Id: l2g_state_pdaf.F90 1369 2013-04-24 16:38:17Z lnerger $ +!BOP +! +! !ROUTINE: l2g_state_pdaf --- Initialize full state from local analysis +! +! !INTERFACE: +SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) + +! !DESCRIPTION: +! User-supplied routine for PDAF. +! Used in the filters: LSEIK/LETKF/LESTKF +! +! The routine is called during the loop over all +! local analysis domains in PDAF\_X\_update +! after the analysis and ensemble transformation +! on a single local analysis domain. It has to +! initialize elements of the PE-local full state +! vector from the provided analysis state vector +! on the local analysis domain. +! +! Generic implementation using index vector +! ID_LSTATE_IN_PSTATE. +! +! !REVISION HISTORY: +! 2013-02 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE mod_assimilation, & + ONLY: id_lstate_in_pstate + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(in) :: step ! Current time step + INTEGER, INTENT(in) :: domain_p ! Current local analysis domain + INTEGER, INTENT(in) :: dim_l ! Local state dimension + INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension + REAL, INTENT(in) :: state_l(dim_l) ! State vector on local analysis domain + REAL, INTENT(inout) :: state_p(dim_p) ! PE-local full state vector + +! !CALLING SEQUENCE: +! Called by: PDAF_lseik_update (as U_l2g_state) +! Called by: PDAF_lestkf_update (as U_l2g_state) +! Called by: PDAF_letkf_update (as U_l2g_state) +!EOP + +! *** local variables *** + INTEGER :: i ! Counter + + +! ************************************************** +! *** Initialize elements of global state vector *** +! ************************************************** + + ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF + DO i = 1, dim_l + state_p(id_lstate_in_pstate(i)) = state_l(i) + END DO + +END SUBROUTINE l2g_state_pdaf diff --git a/tutorial/classical/offline_2D_serial/mod_assimilation.F90 b/tutorial/classical/offline_2D_serial/mod_assimilation.F90 index 13fc3f751..28657383a 100644 --- a/tutorial/classical/offline_2D_serial/mod_assimilation.F90 +++ b/tutorial/classical/offline_2D_serial/mod_assimilation.F90 @@ -41,12 +41,6 @@ MODULE mod_assimilation REAL, ALLOCATABLE :: obs_f(:) ! Vector holding full vector of observations REAL, ALLOCATABLE :: coords_obs_f(:,:) ! Array for full observation coordinates - REAL :: coords_l(2) ! Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector - REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations - -!$OMP THREADPRIVATE(coords_l, id_lobs_in_fobs, distance_l) - ! *** Below are the generic variables used for configuring PDAF *** ! *** Their values are set in init_PDAF_offline *** @@ -65,11 +59,17 @@ MODULE mod_assimilation INTEGER :: screen ! Control verbosity of PDAF ! (0) no outputs, (1) progess info, (2) add timings ! (3) debugging output - INTEGER :: dim_ens ! Size of ensemble + INTEGER :: dim_ens ! Size of ensemble for SEIK/LSEIK/EnKF/ETKF + ! Number of EOFs to be used for SEEK INTEGER :: filtertype ! Select filter algorithm: - ! SEIK (1), EnKF (2), LSEIK (3), ETKF (4) + ! SEEK (0), SEIK (1), EnKF (2), LSEIK (3), ETKF (4) ! LETKF (5), ESTKF (6), LESTKF (7), NETF (9), LNETF (10) INTEGER :: subtype ! Subtype of filter algorithm + ! SEEK: + ! (0) evolve normalized modes + ! (1) evolve scaled modes with unit U + ! (2) fixed basis (V); variable U matrix + ! (3) fixed covar matrix (V,U kept static) ! SEIK: ! (0) ensemble forecast; new formulation ! (1) ensemble forecast; old formulation @@ -114,8 +114,11 @@ MODULE mod_assimilation INTEGER :: type_forget ! Type of forgetting factor REAL :: forget ! Forgetting factor for filter analysis INTEGER :: dim_bias ! dimension of bias vector +! ! SEEK + INTEGER :: int_rediag ! Interval to perform re-diagonalization in SEEK + REAL :: epsilon ! Epsilon for gradient approx. in SEEK forecast ! ! ENKF - INTEGER :: rank_ana_enkf ! Rank to be considered for inversion of HPH + INTEGER :: rank_ana_enkf ! Rank to be considered for inversion of HPH ! ! SEIK/ETKF/ESTKF/LSEIK/LETKF/LESTKF INTEGER :: type_trans ! Type of ensemble transformation ! SEIK/LSEIK: @@ -160,5 +163,11 @@ MODULE mod_assimilation ! of P has also to be specified in PDAF_filter_init. ! Only for upward-compatibility of PDAF! REAL :: time ! model time + REAL :: coords_l(2) ! Coordinates of local analysis domain + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector + INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector + REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations + +!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate, id_lobs_in_fobs, distance_l) END MODULE mod_assimilation diff --git a/tutorial/classical/offline_2D_serial/parser_mpi.F90 b/tutorial/classical/offline_2D_serial/parser_mpi.F90 index a0f3619d6..603ab46c0 100644 --- a/tutorial/classical/offline_2D_serial/parser_mpi.F90 +++ b/tutorial/classical/offline_2D_serial/parser_mpi.F90 @@ -1,64 +1,61 @@ -!$Id: parser_mpi.F90 1581 2015-06-07 08:18:34Z lnerger $ -!BOP -! -! !MODULE: +!> Command line parser +!! +!! This module provides routine to parse command line +!! arguments of different types. This version is for +!! use with MPI parallelization. +!! +!! By default, this routine uses the intrinsics +!! 'get_command_count' and 'get_command_argument' +!! that are defined by the Fortran 2003 standard. +!! If a compiler does not support these functions, you +!! can use '-DF77' as a definition for the preprocessor. +!! In this case the Fortran77 standard 'iargc()' and +!! 'getarg()' are used. +!! +!! The module provides a generic subroutine to parse +!! variables of type INTEGER, REAL, or CHARACTER +!! (with length up to 100) from the command line. +!! +!! Usage: +!! SUBROUTINE PARSE(char(len=32) handle, variable) +!! The string 'handle' determines the name of +!! the parsed variable. +!! Example: handle='iters' parses a variable +!! specified on the command line by +!! '-iters value' +!! +!! Usage: +!! CALL PARSE(handle, int_variable) +!! Parses a variable of type integer +!! whose name is given by the string +!! handle. +!! +!! CALL PARSE(handle, real_variable) +!! Parses a variable of type real +!! whose name is given by the string +!! handle. +!! +!! CALL PARSE(handle, character_variable) +!! Parses a string variable of maxmimal +!! length of 100 characters whose name is +!! given by the string handle. +!! +!! CALL PARSE(handle, logical_variable) +!! Parses a variable of type logical +!! whose name is given by the string +!! handle. In the command line it has +!! to be specified as 'T' or 'F'. +!! +!! __Revision history:__ +!! * 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code +!! * Later revisions - see repository log +!! MODULE parser -! !DESCRIPTION: -! This module provides routine to parse command line -! arguments of different types. This version is for -! use with MPI parallelization. -! By default, this routine uses the intrinsics -! 'get\_command\_count' and 'get\_command\_argument' -! that are define by the Fortran 2003 standard. -! If a compiler does not support these functions, you -! can use '-DF77' as a definition for the preprocessor. -! In this case the Fortran77 standard 'iargc()' and -! 'getarg()' are used. -! -! The module provides a generic subroutine to parse -! variables of type INTEGER, REAL, or CHARACTER -! (with length up to 100) from the command line. -! -! Usage: \begin{verbatim} -! SUBROUTINE PARSE(char(len=32) handle, variable) -! The string 'handle' determines the name of -! the parsed variable. -! Example: handle='iters' parses a variable -! specified on the command line by -! '-iters value' -! -! Usage: -! CALL PARSE(handle, int_variable) -! Parses a variable of type integer -! whose name is given by the string -! handle. -! -! CALL PARSE(handle, real_variable) -! Parses a variable of type real -! whose name is given by the string -! handle. -! -! CALL PARSE(handle, character_variable) -! Parses a string variable of maxmimal -! length of 100 characters whose name is -! given by the string handle. -! -! CALL PARSE(handle, logical_variable) -! Parses a variable of type logical -! whose name is given by the string -! handle. In the command line it has -! to be specified as 'T' or 'F'. -! \end{verbatim} -! -! !REVISION HISTORY: -! 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE mpi + use mpi USE mod_parallel, & ONLY: abort_parallel + IMPLICIT NONE SAVE diff --git a/tutorial/classical/online_2D_parallelmodel/Makefile b/tutorial/classical/online_2D_parallelmodel/Makefile index ef83200c2..ef360aea0 100644 --- a/tutorial/classical/online_2D_parallelmodel/Makefile +++ b/tutorial/classical/online_2D_parallelmodel/Makefile @@ -76,6 +76,8 @@ OBJ_USER_ENKF = add_obs_error_pdaf.o \ # User-supplied routines for localized analysis (LESTKF/LSEIK/LETKF) OBJ_USER_LOCAL = init_n_domains_pdaf.o \ init_dim_l_pdaf.o \ + g2l_state_pdaf.o \ + l2g_state_pdaf.o \ prodrinva_l_pdaf.o \ init_obs_l_pdaf.o \ init_dim_obs_l_pdaf.o \ @@ -125,7 +127,7 @@ libpdaf-d.a: ###################################################### .F90.o : - $(FC) $(OPT) $(CPP_DEFS) -I$(BASEDIR)/include $(MPI_INC) -c $*.F90 + $(FC) $(OPT) $(CPP_DEFS) -c $*.F90 # For older compilers one might need to separate the # preprocessing from the compilation as defined below: diff --git a/tutorial/classical/online_2D_parallelmodel/assimilate_pdaf.F90 b/tutorial/classical/online_2D_parallelmodel/assimilate_pdaf.F90 index 4c5ddf6ed..8d0c17ce4 100644 --- a/tutorial/classical/online_2D_parallelmodel/assimilate_pdaf.F90 +++ b/tutorial/classical/online_2D_parallelmodel/assimilate_pdaf.F90 @@ -46,6 +46,8 @@ SUBROUTINE assimilate_pdaf() EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains init_dim_l_pdaf, & ! Initialize state dimension for local ana. domain init_dim_obs_l_pdaf,& ! Initialize dim. of obs. vector for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from global state + l2g_state_pdaf, & ! Init global state from state on local analysis domain g2l_obs_pdaf, & ! Restrict a global obs. vector to local analysis domain init_obs_l_pdaf, & ! Provide vector of measurements for local ana. domain prodRinvA_l_pdaf, & ! Provide product R^-1 A for some local matrix A @@ -64,11 +66,11 @@ SUBROUTINE assimilate_pdaf() init_dim_obs_pdaf, obs_op_pdaf, init_obs_pdaf, prepoststep_ens_pdaf, & prodRinvA_pdaf, init_obsvar_pdaf, next_observation_pdaf, status_pdaf) ELSEIF (filtertype == 7) THEN - CALL PDAFlocal_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAF_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, init_obs_f_pdaf, init_obs_l_pdaf, & prepoststep_ens_pdaf, prodRinvA_l_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_obs_pdaf, init_obsvar_pdaf, & - init_obsvar_l_pdaf, next_observation_pdaf, status_pdaf) + init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, next_observation_pdaf, status_pdaf) END IF ! Check for errors during execution of PDAF diff --git a/tutorial/classical/online_2D_parallelmodel/g2l_state_pdaf.F90 b/tutorial/classical/online_2D_parallelmodel/g2l_state_pdaf.F90 new file mode 100644 index 000000000..8e9415dc4 --- /dev/null +++ b/tutorial/classical/online_2D_parallelmodel/g2l_state_pdaf.F90 @@ -0,0 +1,60 @@ +!$Id: g2l_state_pdaf.F90 1565 2015-02-28 17:04:41Z lnerger $ +!BOP +! +! !ROUTINE: g2l_state_pdaf --- Restrict a model state to a local analysis domain +! +! !INTERFACE: +SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) + +! !DESCRIPTION: +! User-supplied routine for PDAF. +! Used in the filters: LSEIK/LETKF/LESTKF +! +! The routine is called during the loop over all +! local analysis domains in PDAF\_lseik\_update +! before the analysis on a single local analysis +! domain. It has to project the full PE-local +! model state onto the current local analysis +! domain. +! +! Generic implementation using index vector +! ID_LSTATE_IN_PSTATE. +! +! !REVISION HISTORY: +! 2013-02 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE mod_assimilation, & + ONLY: id_lstate_in_pstate + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(in) :: step ! Current time step + INTEGER, INTENT(in) :: domain_p ! Current local analysis domain + INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension + INTEGER, INTENT(in) :: dim_l ! Local state dimension + REAL, INTENT(in) :: state_p(dim_p) ! PE-local full state vector + REAL, INTENT(out) :: state_l(dim_l) ! State vector on local analysis domain + +! !CALLING SEQUENCE: +! Called by: PDAF_lseik_update (as U_g2l_state) +! Called by: PDAF_letkf_update (as U_g2l_state) +! Called by: PDAF_lestkf_update (as U_g2l_state) +!EOP + +! *** local variables *** + INTEGER :: i ! Counter + + +! ************************************* +! *** Initialize local state vector *** +! ************************************* + + ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF + DO i = 1, dim_l + state_l(i) = state_p(id_lstate_in_pstate(i)) + END DO + +END SUBROUTINE g2l_state_pdaf diff --git a/tutorial/classical/online_2D_parallelmodel/init_dim_l_pdaf.F90 b/tutorial/classical/online_2D_parallelmodel/init_dim_l_pdaf.F90 index 44ebf8235..dcf3f3401 100644 --- a/tutorial/classical/online_2D_parallelmodel/init_dim_l_pdaf.F90 +++ b/tutorial/classical/online_2D_parallelmodel/init_dim_l_pdaf.F90 @@ -23,12 +23,10 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! Later revisions - see svn log ! ! !USES: - USE PDAFlocal, & ! Routine to provide local indices to PDAF - ONLY: PDAFlocal_set_indices USE mod_model, & ! Model variables ONLY: ny, nx_p USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l + ONLY: coords_l, id_lstate_in_pstate USE mod_parallel_pdaf, & ! assimilation parallelization variables ONLY: mype_filter @@ -39,17 +37,16 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) INTEGER, INTENT(in) :: domain_p ! Current local analysis domain INTEGER, INTENT(out) :: dim_l ! Local state dimension -! !LOCAL VARIABLES: - INTEGER :: i ! Counters - INTEGER :: off_p ! Process-local offset in global state vector - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector - ! !CALLING SEQUENCE: ! Called by: PDAF_lseik_update (as U_init_dim_l) ! Called by: PDAF_lestkf_update (as U_init_dim_l) ! Called by: PDAF_letkf_update (as U_init_dim_l) !EOP +! *** local variables *** + INTEGER :: i ! Counters + INTEGER :: off_p ! Process-local offset in global state vector + ! **************************************** ! *** Initialize local state dimension *** @@ -78,15 +75,10 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array + IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! Here the local domain is a single grid point and variable given by DOMAIN_P id_lstate_in_pstate(1) = domain_p - ! Provide the index vector to PDAF - CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) - - ! Deallocate index array - DEALLOCATE(id_lstate_in_pstate) - END SUBROUTINE init_dim_l_pdaf diff --git a/tutorial/classical/online_2D_parallelmodel/l2g_state_pdaf.F90 b/tutorial/classical/online_2D_parallelmodel/l2g_state_pdaf.F90 new file mode 100644 index 000000000..143f2a36b --- /dev/null +++ b/tutorial/classical/online_2D_parallelmodel/l2g_state_pdaf.F90 @@ -0,0 +1,61 @@ +!$Id: l2g_state_pdaf.F90 1565 2015-02-28 17:04:41Z lnerger $ +!BOP +! +! !ROUTINE: l2g_state_pdaf --- Initialize full state from local analysis +! +! !INTERFACE: +SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) + +! !DESCRIPTION: +! User-supplied routine for PDAF. +! Used in the filters: LSEIK/LETKF/LESTKF +! +! The routine is called during the loop over all +! local analysis domains in PDAF\_X\_update +! after the analysis and ensemble transformation +! on a single local analysis domain. It has to +! initialize elements of the PE-local full state +! vector from the provided analysis state vector +! on the local analysis domain. +! +!! Generic implementation using index vector +!! ID_LSTATE_IN_PSTATE. +! +! !REVISION HISTORY: +! 2013-02 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE mod_assimilation, & + ONLY: id_lstate_in_pstate + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(in) :: step ! Current time step + INTEGER, INTENT(in) :: domain_p ! Current local analysis domain + INTEGER, INTENT(in) :: dim_l ! Local state dimension + INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension + REAL, INTENT(in) :: state_l(dim_l) ! State vector on local analysis domain + REAL, INTENT(inout) :: state_p(dim_p) ! PE-local full state vector + +! !CALLING SEQUENCE: +! Called by: PDAF_lseik_update (as U_l2g_state) +! Called by: PDAF_lestkf_update (as U_l2g_state) +! Called by: PDAF_letkf_update (as U_l2g_state) +!EOP + +! *** local variables *** + INTEGER :: i ! Counter + + +! ************************************************** +! *** Initialize elements of global state vector *** +! ************************************************** + + ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF + DO i = 1, dim_l + state_p(id_lstate_in_pstate(i)) = state_l(i) + END DO + +END SUBROUTINE l2g_state_pdaf diff --git a/tutorial/classical/online_2D_parallelmodel/mod_assimilation.F90 b/tutorial/classical/online_2D_parallelmodel/mod_assimilation.F90 index 2dd076d10..da59084b3 100644 --- a/tutorial/classical/online_2D_parallelmodel/mod_assimilation.F90 +++ b/tutorial/classical/online_2D_parallelmodel/mod_assimilation.F90 @@ -25,7 +25,7 @@ MODULE mod_assimilation SAVE !EOP -! *** Variables specific for online tutorial example *** +! *** Model- and data specific variables *** INTEGER :: dim_state ! Global model state dimension INTEGER :: dim_state_p ! Model state dimension for PE-local domain @@ -36,14 +36,6 @@ MODULE mod_assimilation REAL, ALLOCATABLE :: obs_f(:) ! Vector holding full vector of observations REAL, ALLOCATABLE :: coords_obs_f(:,:) ! Array for full observation coordinates - INTEGER :: ensgroup ! Type of initial ensemble - - REAL :: coords_l(2) ! Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector - REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations - -!$OMP THREADPRIVATE(coords_l, id_lobs_in_fobs, distance_l) - ! *** Below are the generic variables used for configuring PDAF *** ! *** Their values are set in init_PDAF *** @@ -149,7 +141,7 @@ MODULE mod_assimilation ! (2) use 5th-order polynomial ! (3) regulated localization of R with mean error variance ! (4) regulated localization of R with single-point error variance - REAL :: sradius ! Support radius for 5th order polynomial + REAL :: sradius ! Support radius for 5th order polynomial ! or radius for 1/e for exponential weighting ! ! SEIK-subtype4/LSEIK-subtype4/ESTKF/LESTKF INTEGER :: type_sqrt ! Type of the transform matrix square-root @@ -166,5 +158,11 @@ MODULE mod_assimilation ! of P has also to be specified in PDAF_filter_init. ! Only for upward-compatibility of PDAF! REAL :: time ! model time + REAL :: coords_l(2) ! Coordinates of local analysis domain + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector + INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector + REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations + +!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate, id_lobs_in_fobs, distance_l) END MODULE mod_assimilation diff --git a/tutorial/classical/online_2D_parallelmodel/parser_mpi.F90 b/tutorial/classical/online_2D_parallelmodel/parser_mpi.F90 index 6c40684e3..6ddcbb65d 100644 --- a/tutorial/classical/online_2D_parallelmodel/parser_mpi.F90 +++ b/tutorial/classical/online_2D_parallelmodel/parser_mpi.F90 @@ -1,64 +1,61 @@ -!$Id: parser_mpi.F90 1581 2015-06-07 08:18:34Z lnerger $ -!BOP -! -! !MODULE: +!> Command line parser +!! +!! This module provides routine to parse command line +!! arguments of different types. This version is for +!! use with MPI parallelization. +!! +!! By default, this routine uses the intrinsics +!! 'get_command_count' and 'get_command_argument' +!! that are defined by the Fortran 2003 standard. +!! If a compiler does not support these functions, you +!! can use '-DF77' as a definition for the preprocessor. +!! In this case the Fortran77 standard 'iargc()' and +!! 'getarg()' are used. +!! +!! The module provides a generic subroutine to parse +!! variables of type INTEGER, REAL, or CHARACTER +!! (with length up to 100) from the command line. +!! +!! Usage: +!! SUBROUTINE PARSE(char(len=32) handle, variable) +!! The string 'handle' determines the name of +!! the parsed variable. +!! Example: handle='iters' parses a variable +!! specified on the command line by +!! '-iters value' +!! +!! Usage: +!! CALL PARSE(handle, int_variable) +!! Parses a variable of type integer +!! whose name is given by the string +!! handle. +!! +!! CALL PARSE(handle, real_variable) +!! Parses a variable of type real +!! whose name is given by the string +!! handle. +!! +!! CALL PARSE(handle, character_variable) +!! Parses a string variable of maxmimal +!! length of 100 characters whose name is +!! given by the string handle. +!! +!! CALL PARSE(handle, logical_variable) +!! Parses a variable of type logical +!! whose name is given by the string +!! handle. In the command line it has +!! to be specified as 'T' or 'F'. +!! +!! __Revision history:__ +!! * 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code +!! * Later revisions - see repository log +!! MODULE parser -! !DESCRIPTION: -! This module provides routine to parse command line -! arguments of different types. This version is for -! use with MPI parallelization. -! By default, this routine uses the intrinsics -! 'get\_command\_count' and 'get\_command\_argument' -! that are define by the Fortran 2003 standard. -! If a compiler does not support these functions, you -! can use '-DF77' as a definition for the preprocessor. -! In this case the Fortran77 standard 'iargc()' and -! 'getarg()' are used. -! -! The module provides a generic subroutine to parse -! variables of type INTEGER, REAL, or CHARACTER -! (with length up to 100) from the command line. -! -! Usage: \begin{verbatim} -! SUBROUTINE PARSE(char(len=32) handle, variable) -! The string 'handle' determines the name of -! the parsed variable. -! Example: handle='iters' parses a variable -! specified on the command line by -! '-iters value' -! -! Usage: -! CALL PARSE(handle, int_variable) -! Parses a variable of type integer -! whose name is given by the string -! handle. -! -! CALL PARSE(handle, real_variable) -! Parses a variable of type real -! whose name is given by the string -! handle. -! -! CALL PARSE(handle, character_variable) -! Parses a string variable of maxmimal -! length of 100 characters whose name is -! given by the string handle. -! -! CALL PARSE(handle, logical_variable) -! Parses a variable of type logical -! whose name is given by the string -! handle. In the command line it has -! to be specified as 'T' or 'F'. -! \end{verbatim} -! -! !REVISION HISTORY: -! 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE mpi + use mpi USE mod_parallel_model, & ONLY: abort_parallel + IMPLICIT NONE SAVE diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar/Makefile b/tutorial/classical/online_2D_parallelmodel_fullpar/Makefile index e97afe890..3a6136ddf 100644 --- a/tutorial/classical/online_2D_parallelmodel_fullpar/Makefile +++ b/tutorial/classical/online_2D_parallelmodel_fullpar/Makefile @@ -77,6 +77,8 @@ OBJ_USER_ENKF = add_obs_error_pdaf.o \ # User-supplied routines for localized analysis (LESTKF/LSEIK/LETKF) OBJ_USER_LOCAL = init_n_domains_pdaf.o \ init_dim_l_pdaf.o \ + g2l_state_pdaf.o \ + l2g_state_pdaf.o \ prodrinva_l_pdaf.o \ init_obs_l_pdaf.o \ init_dim_obs_l_pdaf.o \ @@ -125,7 +127,7 @@ libpdaf-d.a: ###################################################### .F90.o : - $(FC) $(OPT) $(CPP_DEFS) -I$(BASEDIR)/include $(MPI_INC) -c $*.F90 + $(FC) $(OPT) $(CPP_DEFS) -c $*.F90 # For older compilers one might need to separate the # preprocessing from the compilation as defined below: diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar/assimilate_pdaf.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar/assimilate_pdaf.F90 index 4c5ddf6ed..8d0c17ce4 100644 --- a/tutorial/classical/online_2D_parallelmodel_fullpar/assimilate_pdaf.F90 +++ b/tutorial/classical/online_2D_parallelmodel_fullpar/assimilate_pdaf.F90 @@ -46,6 +46,8 @@ SUBROUTINE assimilate_pdaf() EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains init_dim_l_pdaf, & ! Initialize state dimension for local ana. domain init_dim_obs_l_pdaf,& ! Initialize dim. of obs. vector for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from global state + l2g_state_pdaf, & ! Init global state from state on local analysis domain g2l_obs_pdaf, & ! Restrict a global obs. vector to local analysis domain init_obs_l_pdaf, & ! Provide vector of measurements for local ana. domain prodRinvA_l_pdaf, & ! Provide product R^-1 A for some local matrix A @@ -64,11 +66,11 @@ SUBROUTINE assimilate_pdaf() init_dim_obs_pdaf, obs_op_pdaf, init_obs_pdaf, prepoststep_ens_pdaf, & prodRinvA_pdaf, init_obsvar_pdaf, next_observation_pdaf, status_pdaf) ELSEIF (filtertype == 7) THEN - CALL PDAFlocal_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAF_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, init_obs_f_pdaf, init_obs_l_pdaf, & prepoststep_ens_pdaf, prodRinvA_l_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_obs_pdaf, init_obsvar_pdaf, & - init_obsvar_l_pdaf, next_observation_pdaf, status_pdaf) + init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, next_observation_pdaf, status_pdaf) END IF ! Check for errors during execution of PDAF diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar/g2l_state_pdaf.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar/g2l_state_pdaf.F90 new file mode 100644 index 000000000..8e9415dc4 --- /dev/null +++ b/tutorial/classical/online_2D_parallelmodel_fullpar/g2l_state_pdaf.F90 @@ -0,0 +1,60 @@ +!$Id: g2l_state_pdaf.F90 1565 2015-02-28 17:04:41Z lnerger $ +!BOP +! +! !ROUTINE: g2l_state_pdaf --- Restrict a model state to a local analysis domain +! +! !INTERFACE: +SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) + +! !DESCRIPTION: +! User-supplied routine for PDAF. +! Used in the filters: LSEIK/LETKF/LESTKF +! +! The routine is called during the loop over all +! local analysis domains in PDAF\_lseik\_update +! before the analysis on a single local analysis +! domain. It has to project the full PE-local +! model state onto the current local analysis +! domain. +! +! Generic implementation using index vector +! ID_LSTATE_IN_PSTATE. +! +! !REVISION HISTORY: +! 2013-02 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE mod_assimilation, & + ONLY: id_lstate_in_pstate + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(in) :: step ! Current time step + INTEGER, INTENT(in) :: domain_p ! Current local analysis domain + INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension + INTEGER, INTENT(in) :: dim_l ! Local state dimension + REAL, INTENT(in) :: state_p(dim_p) ! PE-local full state vector + REAL, INTENT(out) :: state_l(dim_l) ! State vector on local analysis domain + +! !CALLING SEQUENCE: +! Called by: PDAF_lseik_update (as U_g2l_state) +! Called by: PDAF_letkf_update (as U_g2l_state) +! Called by: PDAF_lestkf_update (as U_g2l_state) +!EOP + +! *** local variables *** + INTEGER :: i ! Counter + + +! ************************************* +! *** Initialize local state vector *** +! ************************************* + + ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF + DO i = 1, dim_l + state_l(i) = state_p(id_lstate_in_pstate(i)) + END DO + +END SUBROUTINE g2l_state_pdaf diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar/init_dim_l_pdaf.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar/init_dim_l_pdaf.F90 index 44ebf8235..dcf3f3401 100644 --- a/tutorial/classical/online_2D_parallelmodel_fullpar/init_dim_l_pdaf.F90 +++ b/tutorial/classical/online_2D_parallelmodel_fullpar/init_dim_l_pdaf.F90 @@ -23,12 +23,10 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! Later revisions - see svn log ! ! !USES: - USE PDAFlocal, & ! Routine to provide local indices to PDAF - ONLY: PDAFlocal_set_indices USE mod_model, & ! Model variables ONLY: ny, nx_p USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l + ONLY: coords_l, id_lstate_in_pstate USE mod_parallel_pdaf, & ! assimilation parallelization variables ONLY: mype_filter @@ -39,17 +37,16 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) INTEGER, INTENT(in) :: domain_p ! Current local analysis domain INTEGER, INTENT(out) :: dim_l ! Local state dimension -! !LOCAL VARIABLES: - INTEGER :: i ! Counters - INTEGER :: off_p ! Process-local offset in global state vector - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector - ! !CALLING SEQUENCE: ! Called by: PDAF_lseik_update (as U_init_dim_l) ! Called by: PDAF_lestkf_update (as U_init_dim_l) ! Called by: PDAF_letkf_update (as U_init_dim_l) !EOP +! *** local variables *** + INTEGER :: i ! Counters + INTEGER :: off_p ! Process-local offset in global state vector + ! **************************************** ! *** Initialize local state dimension *** @@ -78,15 +75,10 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array + IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! Here the local domain is a single grid point and variable given by DOMAIN_P id_lstate_in_pstate(1) = domain_p - ! Provide the index vector to PDAF - CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) - - ! Deallocate index array - DEALLOCATE(id_lstate_in_pstate) - END SUBROUTINE init_dim_l_pdaf diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar/l2g_state_pdaf.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar/l2g_state_pdaf.F90 new file mode 100644 index 000000000..143f2a36b --- /dev/null +++ b/tutorial/classical/online_2D_parallelmodel_fullpar/l2g_state_pdaf.F90 @@ -0,0 +1,61 @@ +!$Id: l2g_state_pdaf.F90 1565 2015-02-28 17:04:41Z lnerger $ +!BOP +! +! !ROUTINE: l2g_state_pdaf --- Initialize full state from local analysis +! +! !INTERFACE: +SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) + +! !DESCRIPTION: +! User-supplied routine for PDAF. +! Used in the filters: LSEIK/LETKF/LESTKF +! +! The routine is called during the loop over all +! local analysis domains in PDAF\_X\_update +! after the analysis and ensemble transformation +! on a single local analysis domain. It has to +! initialize elements of the PE-local full state +! vector from the provided analysis state vector +! on the local analysis domain. +! +!! Generic implementation using index vector +!! ID_LSTATE_IN_PSTATE. +! +! !REVISION HISTORY: +! 2013-02 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE mod_assimilation, & + ONLY: id_lstate_in_pstate + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(in) :: step ! Current time step + INTEGER, INTENT(in) :: domain_p ! Current local analysis domain + INTEGER, INTENT(in) :: dim_l ! Local state dimension + INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension + REAL, INTENT(in) :: state_l(dim_l) ! State vector on local analysis domain + REAL, INTENT(inout) :: state_p(dim_p) ! PE-local full state vector + +! !CALLING SEQUENCE: +! Called by: PDAF_lseik_update (as U_l2g_state) +! Called by: PDAF_lestkf_update (as U_l2g_state) +! Called by: PDAF_letkf_update (as U_l2g_state) +!EOP + +! *** local variables *** + INTEGER :: i ! Counter + + +! ************************************************** +! *** Initialize elements of global state vector *** +! ************************************************** + + ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF + DO i = 1, dim_l + state_p(id_lstate_in_pstate(i)) = state_l(i) + END DO + +END SUBROUTINE l2g_state_pdaf diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar/mod_assimilation.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar/mod_assimilation.F90 index 2dd076d10..da59084b3 100644 --- a/tutorial/classical/online_2D_parallelmodel_fullpar/mod_assimilation.F90 +++ b/tutorial/classical/online_2D_parallelmodel_fullpar/mod_assimilation.F90 @@ -25,7 +25,7 @@ MODULE mod_assimilation SAVE !EOP -! *** Variables specific for online tutorial example *** +! *** Model- and data specific variables *** INTEGER :: dim_state ! Global model state dimension INTEGER :: dim_state_p ! Model state dimension for PE-local domain @@ -36,14 +36,6 @@ MODULE mod_assimilation REAL, ALLOCATABLE :: obs_f(:) ! Vector holding full vector of observations REAL, ALLOCATABLE :: coords_obs_f(:,:) ! Array for full observation coordinates - INTEGER :: ensgroup ! Type of initial ensemble - - REAL :: coords_l(2) ! Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector - REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations - -!$OMP THREADPRIVATE(coords_l, id_lobs_in_fobs, distance_l) - ! *** Below are the generic variables used for configuring PDAF *** ! *** Their values are set in init_PDAF *** @@ -149,7 +141,7 @@ MODULE mod_assimilation ! (2) use 5th-order polynomial ! (3) regulated localization of R with mean error variance ! (4) regulated localization of R with single-point error variance - REAL :: sradius ! Support radius for 5th order polynomial + REAL :: sradius ! Support radius for 5th order polynomial ! or radius for 1/e for exponential weighting ! ! SEIK-subtype4/LSEIK-subtype4/ESTKF/LESTKF INTEGER :: type_sqrt ! Type of the transform matrix square-root @@ -166,5 +158,11 @@ MODULE mod_assimilation ! of P has also to be specified in PDAF_filter_init. ! Only for upward-compatibility of PDAF! REAL :: time ! model time + REAL :: coords_l(2) ! Coordinates of local analysis domain + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector + INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector + REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations + +!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate, id_lobs_in_fobs, distance_l) END MODULE mod_assimilation diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar/parser_mpi.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar/parser_mpi.F90 index 6c40684e3..6ddcbb65d 100644 --- a/tutorial/classical/online_2D_parallelmodel_fullpar/parser_mpi.F90 +++ b/tutorial/classical/online_2D_parallelmodel_fullpar/parser_mpi.F90 @@ -1,64 +1,61 @@ -!$Id: parser_mpi.F90 1581 2015-06-07 08:18:34Z lnerger $ -!BOP -! -! !MODULE: +!> Command line parser +!! +!! This module provides routine to parse command line +!! arguments of different types. This version is for +!! use with MPI parallelization. +!! +!! By default, this routine uses the intrinsics +!! 'get_command_count' and 'get_command_argument' +!! that are defined by the Fortran 2003 standard. +!! If a compiler does not support these functions, you +!! can use '-DF77' as a definition for the preprocessor. +!! In this case the Fortran77 standard 'iargc()' and +!! 'getarg()' are used. +!! +!! The module provides a generic subroutine to parse +!! variables of type INTEGER, REAL, or CHARACTER +!! (with length up to 100) from the command line. +!! +!! Usage: +!! SUBROUTINE PARSE(char(len=32) handle, variable) +!! The string 'handle' determines the name of +!! the parsed variable. +!! Example: handle='iters' parses a variable +!! specified on the command line by +!! '-iters value' +!! +!! Usage: +!! CALL PARSE(handle, int_variable) +!! Parses a variable of type integer +!! whose name is given by the string +!! handle. +!! +!! CALL PARSE(handle, real_variable) +!! Parses a variable of type real +!! whose name is given by the string +!! handle. +!! +!! CALL PARSE(handle, character_variable) +!! Parses a string variable of maxmimal +!! length of 100 characters whose name is +!! given by the string handle. +!! +!! CALL PARSE(handle, logical_variable) +!! Parses a variable of type logical +!! whose name is given by the string +!! handle. In the command line it has +!! to be specified as 'T' or 'F'. +!! +!! __Revision history:__ +!! * 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code +!! * Later revisions - see repository log +!! MODULE parser -! !DESCRIPTION: -! This module provides routine to parse command line -! arguments of different types. This version is for -! use with MPI parallelization. -! By default, this routine uses the intrinsics -! 'get\_command\_count' and 'get\_command\_argument' -! that are define by the Fortran 2003 standard. -! If a compiler does not support these functions, you -! can use '-DF77' as a definition for the preprocessor. -! In this case the Fortran77 standard 'iargc()' and -! 'getarg()' are used. -! -! The module provides a generic subroutine to parse -! variables of type INTEGER, REAL, or CHARACTER -! (with length up to 100) from the command line. -! -! Usage: \begin{verbatim} -! SUBROUTINE PARSE(char(len=32) handle, variable) -! The string 'handle' determines the name of -! the parsed variable. -! Example: handle='iters' parses a variable -! specified on the command line by -! '-iters value' -! -! Usage: -! CALL PARSE(handle, int_variable) -! Parses a variable of type integer -! whose name is given by the string -! handle. -! -! CALL PARSE(handle, real_variable) -! Parses a variable of type real -! whose name is given by the string -! handle. -! -! CALL PARSE(handle, character_variable) -! Parses a string variable of maxmimal -! length of 100 characters whose name is -! given by the string handle. -! -! CALL PARSE(handle, logical_variable) -! Parses a variable of type logical -! whose name is given by the string -! handle. In the command line it has -! to be specified as 'T' or 'F'. -! \end{verbatim} -! -! !REVISION HISTORY: -! 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE mpi + use mpi USE mod_parallel_model, & ONLY: abort_parallel + IMPLICIT NONE SAVE diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/Makefile b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/Makefile index 9c2e40ad0..9d3170e1a 100644 --- a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/Makefile +++ b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/Makefile @@ -77,6 +77,8 @@ OBJ_USER_ENKF = add_obs_error_pdaf.o \ # User-supplied routines for localized analysis (LESTKF/LSEIK/LETKF) OBJ_USER_LOCAL = init_n_domains_pdaf.o \ init_dim_l_pdaf.o \ + g2l_state_pdaf.o \ + l2g_state_pdaf.o \ prodrinva_l_pdaf.o \ init_obs_l_pdaf.o \ init_dim_obs_l_pdaf.o \ @@ -125,7 +127,7 @@ libpdaf-d.a: ###################################################### .F90.o : - $(FC) $(OPT) $(CPP_DEFS) -I$(BASEDIR)/include $(MPI_INC) -c $*.F90 + $(FC) $(OPT) $(CPP_DEFS) -c $*.F90 # For older compilers one might need to separate the # preprocessing from the compilation as defined below: diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/assimilate_pdaf.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/assimilate_pdaf.F90 index 4c5ddf6ed..8d0c17ce4 100644 --- a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/assimilate_pdaf.F90 +++ b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/assimilate_pdaf.F90 @@ -46,6 +46,8 @@ SUBROUTINE assimilate_pdaf() EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains init_dim_l_pdaf, & ! Initialize state dimension for local ana. domain init_dim_obs_l_pdaf,& ! Initialize dim. of obs. vector for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from global state + l2g_state_pdaf, & ! Init global state from state on local analysis domain g2l_obs_pdaf, & ! Restrict a global obs. vector to local analysis domain init_obs_l_pdaf, & ! Provide vector of measurements for local ana. domain prodRinvA_l_pdaf, & ! Provide product R^-1 A for some local matrix A @@ -64,11 +66,11 @@ SUBROUTINE assimilate_pdaf() init_dim_obs_pdaf, obs_op_pdaf, init_obs_pdaf, prepoststep_ens_pdaf, & prodRinvA_pdaf, init_obsvar_pdaf, next_observation_pdaf, status_pdaf) ELSEIF (filtertype == 7) THEN - CALL PDAFlocal_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAF_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, init_obs_f_pdaf, init_obs_l_pdaf, & prepoststep_ens_pdaf, prodRinvA_l_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_obs_pdaf, init_obsvar_pdaf, & - init_obsvar_l_pdaf, next_observation_pdaf, status_pdaf) + init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, next_observation_pdaf, status_pdaf) END IF ! Check for errors during execution of PDAF diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/g2l_state_pdaf.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/g2l_state_pdaf.F90 new file mode 100644 index 000000000..8e9415dc4 --- /dev/null +++ b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/g2l_state_pdaf.F90 @@ -0,0 +1,60 @@ +!$Id: g2l_state_pdaf.F90 1565 2015-02-28 17:04:41Z lnerger $ +!BOP +! +! !ROUTINE: g2l_state_pdaf --- Restrict a model state to a local analysis domain +! +! !INTERFACE: +SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) + +! !DESCRIPTION: +! User-supplied routine for PDAF. +! Used in the filters: LSEIK/LETKF/LESTKF +! +! The routine is called during the loop over all +! local analysis domains in PDAF\_lseik\_update +! before the analysis on a single local analysis +! domain. It has to project the full PE-local +! model state onto the current local analysis +! domain. +! +! Generic implementation using index vector +! ID_LSTATE_IN_PSTATE. +! +! !REVISION HISTORY: +! 2013-02 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE mod_assimilation, & + ONLY: id_lstate_in_pstate + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(in) :: step ! Current time step + INTEGER, INTENT(in) :: domain_p ! Current local analysis domain + INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension + INTEGER, INTENT(in) :: dim_l ! Local state dimension + REAL, INTENT(in) :: state_p(dim_p) ! PE-local full state vector + REAL, INTENT(out) :: state_l(dim_l) ! State vector on local analysis domain + +! !CALLING SEQUENCE: +! Called by: PDAF_lseik_update (as U_g2l_state) +! Called by: PDAF_letkf_update (as U_g2l_state) +! Called by: PDAF_lestkf_update (as U_g2l_state) +!EOP + +! *** local variables *** + INTEGER :: i ! Counter + + +! ************************************* +! *** Initialize local state vector *** +! ************************************* + + ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF + DO i = 1, dim_l + state_l(i) = state_p(id_lstate_in_pstate(i)) + END DO + +END SUBROUTINE g2l_state_pdaf diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/init_dim_l_pdaf.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/init_dim_l_pdaf.F90 index 44ebf8235..dcf3f3401 100644 --- a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/init_dim_l_pdaf.F90 +++ b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/init_dim_l_pdaf.F90 @@ -23,12 +23,10 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! Later revisions - see svn log ! ! !USES: - USE PDAFlocal, & ! Routine to provide local indices to PDAF - ONLY: PDAFlocal_set_indices USE mod_model, & ! Model variables ONLY: ny, nx_p USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l + ONLY: coords_l, id_lstate_in_pstate USE mod_parallel_pdaf, & ! assimilation parallelization variables ONLY: mype_filter @@ -39,17 +37,16 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) INTEGER, INTENT(in) :: domain_p ! Current local analysis domain INTEGER, INTENT(out) :: dim_l ! Local state dimension -! !LOCAL VARIABLES: - INTEGER :: i ! Counters - INTEGER :: off_p ! Process-local offset in global state vector - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector - ! !CALLING SEQUENCE: ! Called by: PDAF_lseik_update (as U_init_dim_l) ! Called by: PDAF_lestkf_update (as U_init_dim_l) ! Called by: PDAF_letkf_update (as U_init_dim_l) !EOP +! *** local variables *** + INTEGER :: i ! Counters + INTEGER :: off_p ! Process-local offset in global state vector + ! **************************************** ! *** Initialize local state dimension *** @@ -78,15 +75,10 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array + IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! Here the local domain is a single grid point and variable given by DOMAIN_P id_lstate_in_pstate(1) = domain_p - ! Provide the index vector to PDAF - CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) - - ! Deallocate index array - DEALLOCATE(id_lstate_in_pstate) - END SUBROUTINE init_dim_l_pdaf diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/l2g_state_pdaf.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/l2g_state_pdaf.F90 new file mode 100644 index 000000000..143f2a36b --- /dev/null +++ b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/l2g_state_pdaf.F90 @@ -0,0 +1,61 @@ +!$Id: l2g_state_pdaf.F90 1565 2015-02-28 17:04:41Z lnerger $ +!BOP +! +! !ROUTINE: l2g_state_pdaf --- Initialize full state from local analysis +! +! !INTERFACE: +SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) + +! !DESCRIPTION: +! User-supplied routine for PDAF. +! Used in the filters: LSEIK/LETKF/LESTKF +! +! The routine is called during the loop over all +! local analysis domains in PDAF\_X\_update +! after the analysis and ensemble transformation +! on a single local analysis domain. It has to +! initialize elements of the PE-local full state +! vector from the provided analysis state vector +! on the local analysis domain. +! +!! Generic implementation using index vector +!! ID_LSTATE_IN_PSTATE. +! +! !REVISION HISTORY: +! 2013-02 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE mod_assimilation, & + ONLY: id_lstate_in_pstate + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(in) :: step ! Current time step + INTEGER, INTENT(in) :: domain_p ! Current local analysis domain + INTEGER, INTENT(in) :: dim_l ! Local state dimension + INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension + REAL, INTENT(in) :: state_l(dim_l) ! State vector on local analysis domain + REAL, INTENT(inout) :: state_p(dim_p) ! PE-local full state vector + +! !CALLING SEQUENCE: +! Called by: PDAF_lseik_update (as U_l2g_state) +! Called by: PDAF_lestkf_update (as U_l2g_state) +! Called by: PDAF_letkf_update (as U_l2g_state) +!EOP + +! *** local variables *** + INTEGER :: i ! Counter + + +! ************************************************** +! *** Initialize elements of global state vector *** +! ************************************************** + + ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF + DO i = 1, dim_l + state_p(id_lstate_in_pstate(i)) = state_l(i) + END DO + +END SUBROUTINE l2g_state_pdaf diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/mod_assimilation.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/mod_assimilation.F90 index 2dd076d10..da59084b3 100644 --- a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/mod_assimilation.F90 +++ b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/mod_assimilation.F90 @@ -25,7 +25,7 @@ MODULE mod_assimilation SAVE !EOP -! *** Variables specific for online tutorial example *** +! *** Model- and data specific variables *** INTEGER :: dim_state ! Global model state dimension INTEGER :: dim_state_p ! Model state dimension for PE-local domain @@ -36,14 +36,6 @@ MODULE mod_assimilation REAL, ALLOCATABLE :: obs_f(:) ! Vector holding full vector of observations REAL, ALLOCATABLE :: coords_obs_f(:,:) ! Array for full observation coordinates - INTEGER :: ensgroup ! Type of initial ensemble - - REAL :: coords_l(2) ! Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector - REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations - -!$OMP THREADPRIVATE(coords_l, id_lobs_in_fobs, distance_l) - ! *** Below are the generic variables used for configuring PDAF *** ! *** Their values are set in init_PDAF *** @@ -149,7 +141,7 @@ MODULE mod_assimilation ! (2) use 5th-order polynomial ! (3) regulated localization of R with mean error variance ! (4) regulated localization of R with single-point error variance - REAL :: sradius ! Support radius for 5th order polynomial + REAL :: sradius ! Support radius for 5th order polynomial ! or radius for 1/e for exponential weighting ! ! SEIK-subtype4/LSEIK-subtype4/ESTKF/LESTKF INTEGER :: type_sqrt ! Type of the transform matrix square-root @@ -166,5 +158,11 @@ MODULE mod_assimilation ! of P has also to be specified in PDAF_filter_init. ! Only for upward-compatibility of PDAF! REAL :: time ! model time + REAL :: coords_l(2) ! Coordinates of local analysis domain + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector + INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector + REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations + +!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate, id_lobs_in_fobs, distance_l) END MODULE mod_assimilation diff --git a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 index 6c40684e3..6ddcbb65d 100644 --- a/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 +++ b/tutorial/classical/online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 @@ -1,64 +1,61 @@ -!$Id: parser_mpi.F90 1581 2015-06-07 08:18:34Z lnerger $ -!BOP -! -! !MODULE: +!> Command line parser +!! +!! This module provides routine to parse command line +!! arguments of different types. This version is for +!! use with MPI parallelization. +!! +!! By default, this routine uses the intrinsics +!! 'get_command_count' and 'get_command_argument' +!! that are defined by the Fortran 2003 standard. +!! If a compiler does not support these functions, you +!! can use '-DF77' as a definition for the preprocessor. +!! In this case the Fortran77 standard 'iargc()' and +!! 'getarg()' are used. +!! +!! The module provides a generic subroutine to parse +!! variables of type INTEGER, REAL, or CHARACTER +!! (with length up to 100) from the command line. +!! +!! Usage: +!! SUBROUTINE PARSE(char(len=32) handle, variable) +!! The string 'handle' determines the name of +!! the parsed variable. +!! Example: handle='iters' parses a variable +!! specified on the command line by +!! '-iters value' +!! +!! Usage: +!! CALL PARSE(handle, int_variable) +!! Parses a variable of type integer +!! whose name is given by the string +!! handle. +!! +!! CALL PARSE(handle, real_variable) +!! Parses a variable of type real +!! whose name is given by the string +!! handle. +!! +!! CALL PARSE(handle, character_variable) +!! Parses a string variable of maxmimal +!! length of 100 characters whose name is +!! given by the string handle. +!! +!! CALL PARSE(handle, logical_variable) +!! Parses a variable of type logical +!! whose name is given by the string +!! handle. In the command line it has +!! to be specified as 'T' or 'F'. +!! +!! __Revision history:__ +!! * 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code +!! * Later revisions - see repository log +!! MODULE parser -! !DESCRIPTION: -! This module provides routine to parse command line -! arguments of different types. This version is for -! use with MPI parallelization. -! By default, this routine uses the intrinsics -! 'get\_command\_count' and 'get\_command\_argument' -! that are define by the Fortran 2003 standard. -! If a compiler does not support these functions, you -! can use '-DF77' as a definition for the preprocessor. -! In this case the Fortran77 standard 'iargc()' and -! 'getarg()' are used. -! -! The module provides a generic subroutine to parse -! variables of type INTEGER, REAL, or CHARACTER -! (with length up to 100) from the command line. -! -! Usage: \begin{verbatim} -! SUBROUTINE PARSE(char(len=32) handle, variable) -! The string 'handle' determines the name of -! the parsed variable. -! Example: handle='iters' parses a variable -! specified on the command line by -! '-iters value' -! -! Usage: -! CALL PARSE(handle, int_variable) -! Parses a variable of type integer -! whose name is given by the string -! handle. -! -! CALL PARSE(handle, real_variable) -! Parses a variable of type real -! whose name is given by the string -! handle. -! -! CALL PARSE(handle, character_variable) -! Parses a string variable of maxmimal -! length of 100 characters whose name is -! given by the string handle. -! -! CALL PARSE(handle, logical_variable) -! Parses a variable of type logical -! whose name is given by the string -! handle. In the command line it has -! to be specified as 'T' or 'F'. -! \end{verbatim} -! -! !REVISION HISTORY: -! 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE mpi + use mpi USE mod_parallel_model, & ONLY: abort_parallel + IMPLICIT NONE SAVE diff --git a/tutorial/classical/online_2D_serialmodel/Makefile b/tutorial/classical/online_2D_serialmodel/Makefile index 2bb254274..20b935ece 100644 --- a/tutorial/classical/online_2D_serialmodel/Makefile +++ b/tutorial/classical/online_2D_serialmodel/Makefile @@ -75,6 +75,8 @@ OBJ_USER_ENKF = add_obs_error_pdaf.o \ # User-supplied routines for localized analysis (LESTKF/LSEIK/LETKF) OBJ_USER_LOCAL = init_n_domains_pdaf.o \ init_dim_l_pdaf.o \ + g2l_state_pdaf.o \ + l2g_state_pdaf.o \ prodrinva_l_pdaf.o \ init_obs_l_pdaf.o \ init_dim_obs_l_pdaf.o \ @@ -123,7 +125,7 @@ libpdaf-d.a: ###################################################### .F90.o : - $(FC) $(OPT) $(CPP_DEFS) -I$(BASEDIR)/include $(MPI_INC) -c $*.F90 + $(FC) $(OPT) $(CPP_DEFS) -c $*.F90 # For older compilers one might need to separate the # preprocessing from the compilation as defined below: diff --git a/tutorial/classical/online_2D_serialmodel/assimilate_pdaf.F90 b/tutorial/classical/online_2D_serialmodel/assimilate_pdaf.F90 index 23d697907..6e621a209 100644 --- a/tutorial/classical/online_2D_serialmodel/assimilate_pdaf.F90 +++ b/tutorial/classical/online_2D_serialmodel/assimilate_pdaf.F90 @@ -46,6 +46,8 @@ SUBROUTINE assimilate_pdaf() EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains init_dim_l_pdaf, & ! Initialize state dimension for local ana. domain init_dim_obs_l_pdaf,& ! Initialize dim. of obs. vector for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from global state + l2g_state_pdaf, & ! Init global state from state on local analysis domain g2l_obs_pdaf, & ! Restrict a global obs. vector to local analysis domain init_obs_l_pdaf, & ! Provide vector of measurements for local ana. domain prodRinvA_l_pdaf, & ! Provide product R^-1 A for some local matrix A @@ -64,11 +66,11 @@ SUBROUTINE assimilate_pdaf() init_dim_obs_pdaf, obs_op_pdaf, init_obs_pdaf, prepoststep_ens_pdaf, & prodRinvA_pdaf, init_obsvar_pdaf, next_observation_pdaf, status_pdaf) ELSEIF (filtertype == 7) THEN - CALL PDAFlocal_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAF_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, init_obs_f_pdaf, init_obs_l_pdaf, & prepoststep_ens_pdaf, prodRinvA_l_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_obs_pdaf, init_obsvar_pdaf, & - init_obsvar_l_pdaf, next_observation_pdaf, status_pdaf) + init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, next_observation_pdaf, status_pdaf) END IF ! Check for errors during execution of PDAF @@ -76,7 +78,7 @@ SUBROUTINE assimilate_pdaf() IF (status_pdaf /= 0) THEN WRITE (*,'(/1x,a6,i3,a43,i4,a1/)') & 'ERROR ', status_pdaf, & - ' in PDAF_assimilate - stopping! (PE ', mype_world,')' + ' in PDAF_put_state - stopping! (PE ', mype_world,')' CALL abort_parallel() END IF diff --git a/tutorial/classical/online_2D_serialmodel/g2l_state_pdaf.F90 b/tutorial/classical/online_2D_serialmodel/g2l_state_pdaf.F90 new file mode 100644 index 000000000..dc1337ed6 --- /dev/null +++ b/tutorial/classical/online_2D_serialmodel/g2l_state_pdaf.F90 @@ -0,0 +1,62 @@ +!$Id: g2l_state_pdaf.F90 82 2019-02-26 15:12:22Z lnerger $ +!BOP +! +! !ROUTINE: g2l_state_pdaf --- Restrict a model state to a local analysis domain +! +! !INTERFACE: +SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) + +! !DESCRIPTION: +! User-supplied routine for PDAF. +! Used in the filters: LSEIK/LETKF/LESTKF/LNETF +! +! The routine is called during the loop over all +! local analysis domains in PDAF\_lseik\_update +! before the analysis on a single local analysis +! domain. It has to project the full PE-local +! model state onto the current local analysis +! domain. +! +! Generic implementation using index vector +! ID_LSTATE_IN_PSTATE. +! +! The routine is called by each filter process. +! +! !REVISION HISTORY: +! 2005-09 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE mod_assimilation, & + ONLY: id_lstate_in_pstate + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(in) :: step ! Current time step + INTEGER, INTENT(in) :: domain_p ! Current local analysis domain + INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension + INTEGER, INTENT(in) :: dim_l ! Local state dimension + REAL, INTENT(in) :: state_p(dim_p) ! PE-local full state vector + REAL, INTENT(out) :: state_l(dim_l) ! State vector on local analysis domain + +! !CALLING SEQUENCE: +! Called by: PDAF_lseik_update (as U_g2l_state) +! Called by: PDAF_letkf_update (as U_g2l_state) +! Called by: PDAF_lestkf_update (as U_g2l_state) +!EOP + +! *** local variables *** + INTEGER :: i ! Counter + + +! ************************************* +! *** Initialize local state vector *** +! ************************************* + + ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF + DO i = 1, dim_l + state_l(i) = state_p(id_lstate_in_pstate(i)) + END DO + +END SUBROUTINE g2l_state_pdaf diff --git a/tutorial/classical/online_2D_serialmodel/init_dim_l_pdaf.F90 b/tutorial/classical/online_2D_serialmodel/init_dim_l_pdaf.F90 index 59525751e..d75d2a0b6 100644 --- a/tutorial/classical/online_2D_serialmodel/init_dim_l_pdaf.F90 +++ b/tutorial/classical/online_2D_serialmodel/init_dim_l_pdaf.F90 @@ -23,12 +23,10 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! Later revisions - see svn log ! ! !USES: - USE PDAFlocal, & ! Routine to provide local indices to PDAF - ONLY: PDAFlocal_set_indices USE mod_model, & ! Model variables ONLY: ny USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l + ONLY: coords_l, id_lstate_in_pstate IMPLICIT NONE @@ -37,9 +35,6 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) INTEGER, INTENT(in) :: domain_p ! Current local analysis domain INTEGER, INTENT(out) :: dim_l ! Local state dimension -! !LOCAL VARIABLES: - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector - ! !CALLING SEQUENCE: ! Called by: PDAF_lseik_update (as U_init_dim_l) ! Called by: PDAF_lestkf_update (as U_init_dim_l) @@ -69,15 +64,10 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array + IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! Here the local domain is a single grid point and variable given by DOMAIN_P id_lstate_in_pstate(1) = domain_p - ! Provide the index vector to PDAF - CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) - - ! Deallocate index array - DEALLOCATE(id_lstate_in_pstate) - END SUBROUTINE init_dim_l_pdaf diff --git a/tutorial/classical/online_2D_serialmodel/l2g_state_pdaf.F90 b/tutorial/classical/online_2D_serialmodel/l2g_state_pdaf.F90 new file mode 100644 index 000000000..adaed6a4d --- /dev/null +++ b/tutorial/classical/online_2D_serialmodel/l2g_state_pdaf.F90 @@ -0,0 +1,64 @@ +!$Id: l2g_state_pdaf.F90 82 2019-02-26 15:12:22Z lnerger $ +!BOP +! +! !ROUTINE: l2g_state_pdaf --- Initialize full state from local analysis +! +! !INTERFACE: +SUBROUTINE l2g_state_pdaf(step, domain, dim_l, state_l, dim_p, state_p) + +! !DESCRIPTION: +! User-supplied routine for PDAF. +! Used in the filters: LSEIK/LETKF/LESTKF/LNETF +! +! The routine is called during the loop over all +! local analysis domains in PDAF\_X\_update +! after the analysis and ensemble transformation +! on a single local analysis domain. It has to +! initialize elements of the PE-local full state +! vector from the provided analysis state vector +! on the local analysis domain. +! +! Generic implementation using index vector +! ID_LSTATE_IN_PSTATE. +! +! The routine is called by each filter process. +! +! !REVISION HISTORY: +! 2005-09 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE mod_assimilation, & + ONLY: id_lstate_in_pstate + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(in) :: step ! Current time step + INTEGER, INTENT(in) :: domain ! Current local analysis domain + INTEGER, INTENT(in) :: dim_l ! Local state dimension + INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension + REAL, INTENT(in) :: state_l(dim_l) ! State vector on local analysis domain + REAL, INTENT(inout) :: state_p(dim_p) ! PE-local full state vector + +! !CALLING SEQUENCE: +! Called by: PDAF_lseik_update (as U_l2g_state) +! Called by: PDAF_lestkf_update (as U_l2g_state) +! Called by: PDAF_letkf_update (as U_l2g_state) +! Called by: PDAF_lnetf_update (as U_l2g_state) +!EOP + +! *** local variables *** + INTEGER :: i ! Counter + + +! ************************************************** +! *** Initialize elements of global state vector *** +! ************************************************** + + ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF + DO i = 1, dim_l + state_p(id_lstate_in_pstate(i)) = state_l(i) + END DO + +END SUBROUTINE l2g_state_pdaf diff --git a/tutorial/classical/online_2D_serialmodel/mod_assimilation.F90 b/tutorial/classical/online_2D_serialmodel/mod_assimilation.F90 index 2dd076d10..c7d6aea7b 100644 --- a/tutorial/classical/online_2D_serialmodel/mod_assimilation.F90 +++ b/tutorial/classical/online_2D_serialmodel/mod_assimilation.F90 @@ -36,14 +36,6 @@ MODULE mod_assimilation REAL, ALLOCATABLE :: obs_f(:) ! Vector holding full vector of observations REAL, ALLOCATABLE :: coords_obs_f(:,:) ! Array for full observation coordinates - INTEGER :: ensgroup ! Type of initial ensemble - - REAL :: coords_l(2) ! Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector - REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations - -!$OMP THREADPRIVATE(coords_l, id_lobs_in_fobs, distance_l) - ! *** Below are the generic variables used for configuring PDAF *** ! *** Their values are set in init_PDAF *** @@ -111,6 +103,7 @@ MODULE mod_assimilation ! (0) standard LNETF INTEGER :: incremental ! Perform incremental updating in LSEIK INTEGER :: dim_lag ! Number of time instances for smoother + INTEGER :: ensgroup ! Type of initial ensemble ! ! Filter settings - available as command line options ! ! General @@ -149,7 +142,7 @@ MODULE mod_assimilation ! (2) use 5th-order polynomial ! (3) regulated localization of R with mean error variance ! (4) regulated localization of R with single-point error variance - REAL :: sradius ! Support radius for 5th order polynomial + REAL :: sradius ! Support radius for 5th order polynomial ! or radius for 1/e for exponential weighting ! ! SEIK-subtype4/LSEIK-subtype4/ESTKF/LESTKF INTEGER :: type_sqrt ! Type of the transform matrix square-root @@ -166,5 +159,11 @@ MODULE mod_assimilation ! of P has also to be specified in PDAF_filter_init. ! Only for upward-compatibility of PDAF! REAL :: time ! model time + REAL :: coords_l(2) ! Coordinates of local analysis domain + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector + INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector + REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations + +!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate, id_lobs_in_fobs, distance_l) END MODULE mod_assimilation diff --git a/tutorial/classical/online_2D_serialmodel/parser_mpi.F90 b/tutorial/classical/online_2D_serialmodel/parser_mpi.F90 index 321f6dbb6..40258b6ac 100644 --- a/tutorial/classical/online_2D_serialmodel/parser_mpi.F90 +++ b/tutorial/classical/online_2D_serialmodel/parser_mpi.F90 @@ -1,64 +1,61 @@ -!$Id: parser_mpi.F90 1581 2015-06-07 08:18:34Z lnerger $ -!BOP -! -! !MODULE: +!> Command line parser +!! +!! This module provides routine to parse command line +!! arguments of different types. This version is for +!! use with MPI parallelization. +!! +!! By default, this routine uses the intrinsics +!! 'get_command_count' and 'get_command_argument' +!! that are defined by the Fortran 2003 standard. +!! If a compiler does not support these functions, you +!! can use '-DF77' as a definition for the preprocessor. +!! In this case the Fortran77 standard 'iargc()' and +!! 'getarg()' are used. +!! +!! The module provides a generic subroutine to parse +!! variables of type INTEGER, REAL, or CHARACTER +!! (with length up to 100) from the command line. +!! +!! Usage: +!! SUBROUTINE PARSE(char(len=32) handle, variable) +!! The string 'handle' determines the name of +!! the parsed variable. +!! Example: handle='iters' parses a variable +!! specified on the command line by +!! '-iters value' +!! +!! Usage: +!! CALL PARSE(handle, int_variable) +!! Parses a variable of type integer +!! whose name is given by the string +!! handle. +!! +!! CALL PARSE(handle, real_variable) +!! Parses a variable of type real +!! whose name is given by the string +!! handle. +!! +!! CALL PARSE(handle, character_variable) +!! Parses a string variable of maxmimal +!! length of 100 characters whose name is +!! given by the string handle. +!! +!! CALL PARSE(handle, logical_variable) +!! Parses a variable of type logical +!! whose name is given by the string +!! handle. In the command line it has +!! to be specified as 'T' or 'F'. +!! +!! __Revision history:__ +!! * 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code +!! * Later revisions - see repository log +!! MODULE parser -! !DESCRIPTION: -! This module provides routine to parse command line -! arguments of different types. This version is for -! use with MPI parallelization. -! By default, this routine uses the intrinsics -! 'get\_command\_count' and 'get\_command\_argument' -! that are define by the Fortran 2003 standard. -! If a compiler does not support these functions, you -! can use '-DF77' as a definition for the preprocessor. -! In this case the Fortran77 standard 'iargc()' and -! 'getarg()' are used. -! -! The module provides a generic subroutine to parse -! variables of type INTEGER, REAL, or CHARACTER -! (with length up to 100) from the command line. -! -! Usage: \begin{verbatim} -! SUBROUTINE PARSE(char(len=32) handle, variable) -! The string 'handle' determines the name of -! the parsed variable. -! Example: handle='iters' parses a variable -! specified on the command line by -! '-iters value' -! -! Usage: -! CALL PARSE(handle, int_variable) -! Parses a variable of type integer -! whose name is given by the string -! handle. -! -! CALL PARSE(handle, real_variable) -! Parses a variable of type real -! whose name is given by the string -! handle. -! -! CALL PARSE(handle, character_variable) -! Parses a string variable of maxmimal -! length of 100 characters whose name is -! given by the string handle. -! -! CALL PARSE(handle, logical_variable) -! Parses a variable of type logical -! whose name is given by the string -! handle. In the command line it has -! to be specified as 'T' or 'F'. -! \end{verbatim} -! -! !REVISION HISTORY: -! 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE mpi + use mpi USE mod_parallel_pdaf, & ONLY: abort_parallel + IMPLICIT NONE SAVE diff --git a/tutorial/offline_2D_parallel/parser_mpi.F90 b/tutorial/offline_2D_parallel/parser_mpi.F90 index 0b814ab44..40258b6ac 100644 --- a/tutorial/offline_2D_parallel/parser_mpi.F90 +++ b/tutorial/offline_2D_parallel/parser_mpi.F90 @@ -47,7 +47,7 @@ !! to be specified as 'T' or 'F'. !! !! __Revision history:__ -!! * 2019-06 - Stephan Frickenhaus, Lars Nerger - Initial code +!! * 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code !! * Later revisions - see repository log !! MODULE parser diff --git a/tutorial/offline_2D_serial/parser_mpi.F90 b/tutorial/offline_2D_serial/parser_mpi.F90 index 0b814ab44..40258b6ac 100644 --- a/tutorial/offline_2D_serial/parser_mpi.F90 +++ b/tutorial/offline_2D_serial/parser_mpi.F90 @@ -47,7 +47,7 @@ !! to be specified as 'T' or 'F'. !! !! __Revision history:__ -!! * 2019-06 - Stephan Frickenhaus, Lars Nerger - Initial code +!! * 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code !! * Later revisions - see repository log !! MODULE parser diff --git a/tutorial/online_2D_parallelmodel/parser_mpi.F90 b/tutorial/online_2D_parallelmodel/parser_mpi.F90 index efa8b5e74..6ddcbb65d 100644 --- a/tutorial/online_2D_parallelmodel/parser_mpi.F90 +++ b/tutorial/online_2D_parallelmodel/parser_mpi.F90 @@ -47,7 +47,7 @@ !! to be specified as 'T' or 'F'. !! !! __Revision history:__ -!! * 2019-06 - Stephan Frickenhaus, Lars Nerger - Initial code +!! * 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code !! * Later revisions - see repository log !! MODULE parser diff --git a/tutorial/online_2D_parallelmodel_fullpar/parser_mpi.F90 b/tutorial/online_2D_parallelmodel_fullpar/parser_mpi.F90 index efa8b5e74..6ddcbb65d 100644 --- a/tutorial/online_2D_parallelmodel_fullpar/parser_mpi.F90 +++ b/tutorial/online_2D_parallelmodel_fullpar/parser_mpi.F90 @@ -47,7 +47,7 @@ !! to be specified as 'T' or 'F'. !! !! __Revision history:__ -!! * 2019-06 - Stephan Frickenhaus, Lars Nerger - Initial code +!! * 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code !! * Later revisions - see repository log !! MODULE parser diff --git a/tutorial/online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 b/tutorial/online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 index efa8b5e74..6ddcbb65d 100644 --- a/tutorial/online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 +++ b/tutorial/online_2D_parallelmodel_fullpar_1fpe/parser_mpi.F90 @@ -47,7 +47,7 @@ !! to be specified as 'T' or 'F'. !! !! __Revision history:__ -!! * 2019-06 - Stephan Frickenhaus, Lars Nerger - Initial code +!! * 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code !! * Later revisions - see repository log !! MODULE parser diff --git a/tutorial/online_2D_serialmodel/parser_mpi.F90 b/tutorial/online_2D_serialmodel/parser_mpi.F90 index 0b814ab44..40258b6ac 100644 --- a/tutorial/online_2D_serialmodel/parser_mpi.F90 +++ b/tutorial/online_2D_serialmodel/parser_mpi.F90 @@ -47,7 +47,7 @@ !! to be specified as 'T' or 'F'. !! !! __Revision history:__ -!! * 2019-06 - Stephan Frickenhaus, Lars Nerger - Initial code +!! * 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code !! * Later revisions - see repository log !! MODULE parser diff --git a/tutorial/online_2D_serialmodel_2fields/parser_mpi.F90 b/tutorial/online_2D_serialmodel_2fields/parser_mpi.F90 index 0b814ab44..40258b6ac 100644 --- a/tutorial/online_2D_serialmodel_2fields/parser_mpi.F90 +++ b/tutorial/online_2D_serialmodel_2fields/parser_mpi.F90 @@ -47,7 +47,7 @@ !! to be specified as 'T' or 'F'. !! !! __Revision history:__ -!! * 2019-06 - Stephan Frickenhaus, Lars Nerger - Initial code +!! * 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code !! * Later revisions - see repository log !! MODULE parser From 732c404ab89fb0b6fb2dd5a98ced2ca4dbd4e134 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Sat, 7 Sep 2024 17:58:53 +0200 Subject: [PATCH 74/83] Update out.* files for PDAF 2.3 --- tutorial/verification/out.offline_2D_openmp | 16 ++- tutorial/verification/out.offline_2D_parallel | 32 +++--- tutorial/verification/out.offline_2D_serial | 16 ++- .../out.offline_2D_serial_3denvar_opt2 | 22 ++-- .../out.offline_2D_serial_3dhybvar_opt2 | 22 ++-- .../out.offline_2D_serial_3dlenvar_opt2 | 6 +- .../out.offline_2D_serial_3dlhybvar_opt2 | 18 ++- .../out.offline_2D_serial_3dv_opt1 | 14 +-- .../out.offline_2D_serial_3dv_opt2 | 16 +-- .../out.offline_2D_serial_3dv_opt3 | 8 +- .../verification/out.offline_2D_serial_ESTKF | 8 +- .../verification/out.online_2D_parallelmodel | 40 ++++--- .../out.online_2D_parallelmodel_3denvar_opt12 | 92 +++++++-------- .../out.online_2D_parallelmodel_3denvar_opt13 | 88 +++++++-------- ...out.online_2D_parallelmodel_3dhybvar_opt12 | 82 +++++++------- ...out.online_2D_parallelmodel_3dhybvar_opt13 | 86 +++++++------- ...out.online_2D_parallelmodel_3dlenvar_opt12 | 98 ++++++++-------- ...out.online_2D_parallelmodel_3dlenvar_opt13 | 88 +++++++-------- ...ut.online_2D_parallelmodel_3dlhybvar_opt12 | 102 +++++++++-------- ...ut.online_2D_parallelmodel_3dlhybvar_opt13 | 98 ++++++++-------- .../out.online_2D_parallelmodel_3dv_opt1 | 70 ++++++------ .../out.online_2D_parallelmodel_3dv_opt12 | 68 +++++------ .../out.online_2D_parallelmodel_3dv_opt13 | 48 ++++---- .../out.online_2D_parallelmodel_ESTKF | 20 ++-- .../out.online_2D_parallelmodel_fullpar | 26 ++--- .../out.online_2D_parallelmodel_fullpar_1fpe | 30 +++-- .../out.online_2D_serial_3dv_opt1 | 64 +++++------ .../out.online_2D_serial_3dv_opt2 | 66 +++++------ .../out.online_2D_serial_3dv_opt3 | 46 ++++---- .../verification/out.online_2D_serialmodel | 34 +++--- .../out.online_2D_serialmodel_2fields | 34 +++--- .../out.online_2D_serialmodel_2fields_ESTKF | 18 +-- .../out.online_2D_serialmodel_2fields_obsB | 80 +++++++------ .../out.online_2D_serialmodel_3denvar_opt2 | 74 ++++++------ .../out.online_2D_serialmodel_3denvar_opt3 | 66 +++++------ .../out.online_2D_serialmodel_3dhybvar_opt2 | 62 +++++----- .../out.online_2D_serialmodel_3dlenvar_opt2 | 106 +++++++++--------- .../out.online_2D_serialmodel_3dlenvar_opt3 | 88 +++++++-------- .../out.online_2D_serialmodel_3dlhybvar_opt2 | 96 ++++++++-------- .../out.online_2D_serialmodel_ESTKF | 18 +-- .../out.online_2D_serialmodel_openmp | 26 ++--- 41 files changed, 1027 insertions(+), 1065 deletions(-) diff --git a/tutorial/verification/out.offline_2D_openmp b/tutorial/verification/out.offline_2D_openmp index 793ed0fa4..ea65e889a 100644 --- a/tutorial/verification/out.offline_2D_openmp +++ b/tutorial/verification/out.offline_2D_openmp @@ -35,7 +35,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -140,19 +140,17 @@ PDAF analysis step: 0.020 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.003 s -PDAF init_ens_pdaf: 0.003 s -PDAF LESTKF analysis: 0.003 s +PDAF Initialize PDAF: 0.002 s +PDAF init_ens_pdaf: 0.002 s +PDAF LESTKF analysis: 0.002 s PDAF PDAF-internal operations: 0.000 s PDAF OMI-internal routines: 0.000 s PDAF init_n_domains_pdaf: 0.000 s PDAF init_dim_l_pdaf: 0.000 s -PDAF g2l_state_pdaf: 0.000 s -PDAF l2g_state_pdaf: 0.000 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.000 s +PDAF init_dim_obs_pdafomi: 0.001 s PDAF obs_op_pdafomi: 0.000 s -PDAF init_dim_obs_l_pdafomi: 0.003 s -PDAF prepoststep_pdaf: 0.006 s +PDAF init_dim_obs_l_pdafomi: 0.001 s +PDAF prepoststep_pdaf: 0.009 s PDAF offline mode: END diff --git a/tutorial/verification/out.offline_2D_parallel b/tutorial/verification/out.offline_2D_parallel index 2f2353cf8..fb8f408d3 100644 --- a/tutorial/verification/out.offline_2D_parallel +++ b/tutorial/verification/out.offline_2D_parallel @@ -44,7 +44,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -140,33 +140,31 @@ PDAF Forecast ------------------------------------------------------- model PE exited: mype 0 PDAF offline mode: EXITED ASSIMILATION - model PE exited: mype 1 - model PE exited: mype 2 - model PE exited: mype 3 PDAF PDAF Memory overview PDAF --------------------------------------------- -PDAF Globally allocated memory (MiB) -PDAF state and A: 0.012 MiB (persistent) -PDAF ensemble array: 0.044 MiB (persistent) -PDAF analysis step: 0.079 MiB (temporary) +PDAF Allocated memory (MiB) +PDAF state and A: 0.003 MiB (persistent) +PDAF ensemble array: 0.011 MiB (persistent) +PDAF analysis step: 0.020 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.003 s -PDAF init_ens_pdaf: 0.003 s -PDAF LESTKF analysis: 0.099 s -PDAF PDAF-internal operations: 0.009 s +PDAF Initialize PDAF: 0.002 s +PDAF init_ens_pdaf: 0.002 s +PDAF LESTKF analysis: 0.110 s +PDAF PDAF-internal operations: 0.010 s PDAF OMI-internal routines: 0.000 s PDAF init_n_domains_pdaf: 0.000 s PDAF init_dim_l_pdaf: 0.000 s -PDAF g2l_state_pdaf: 0.000 s -PDAF l2g_state_pdaf: 0.000 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.027 s -PDAF obs_op_pdafomi: 0.068 s +PDAF init_dim_obs_pdafomi: 0.023 s +PDAF obs_op_pdafomi: 0.075 s PDAF init_dim_obs_l_pdafomi: 0.000 s -PDAF prepoststep_pdaf: 0.011 s +PDAF prepoststep_pdaf: 0.019 s PDAF offline mode: END + model PE exited: mype 2 + model PE exited: mype 3 + model PE exited: mype 1 diff --git a/tutorial/verification/out.offline_2D_serial b/tutorial/verification/out.offline_2D_serial index 913d1df09..43f8a8943 100644 --- a/tutorial/verification/out.offline_2D_serial +++ b/tutorial/verification/out.offline_2D_serial @@ -35,7 +35,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -140,19 +140,17 @@ PDAF analysis step: 0.020 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.003 s -PDAF init_ens_pdaf: 0.003 s -PDAF LESTKF analysis: 0.003 s +PDAF Initialize PDAF: 0.002 s +PDAF init_ens_pdaf: 0.002 s +PDAF LESTKF analysis: 0.002 s PDAF PDAF-internal operations: 0.000 s PDAF OMI-internal routines: 0.000 s PDAF init_n_domains_pdaf: 0.000 s PDAF init_dim_l_pdaf: 0.000 s -PDAF g2l_state_pdaf: 0.001 s -PDAF l2g_state_pdaf: 0.001 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.000 s +PDAF init_dim_obs_pdafomi: 0.001 s PDAF obs_op_pdafomi: 0.000 s -PDAF init_dim_obs_l_pdafomi: 0.001 s -PDAF prepoststep_pdaf: 0.006 s +PDAF init_dim_obs_l_pdafomi: 0.000 s +PDAF prepoststep_pdaf: 0.010 s PDAF offline mode: END diff --git a/tutorial/verification/out.offline_2D_serial_3denvar_opt2 b/tutorial/verification/out.offline_2D_serial_3denvar_opt2 index c09481f41..471b5134f 100644 --- a/tutorial/verification/out.offline_2D_serial_3denvar_opt2 +++ b/tutorial/verification/out.offline_2D_serial_3denvar_opt2 @@ -34,7 +34,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -80,7 +80,7 @@ PDAF: Call routine for ensemble initialization Initialize B^1/2 for 3D-Var PDAF: Initialization completed -PDAF --- duration of PDAF initialization: 0.004 s +PDAF --- duration of PDAF initialization: 0.002 s PDAF Activate PDAF offline mode PDAF offline mode: START ASSIMILATION @@ -115,7 +115,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 4.406D+01 4.858D+00 8.5D-02 4.1D-02 - 2 5 3.635D+01 7.166D-09 6.5D-01 -4.8D-15 + 2 5 3.635D+01 7.166D-09 6.5D-01 -5.2D-15 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -124,13 +124,13 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of En3D-Var update: 0.001 s +PDAF --- duration of En3D-Var update: 0.000 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 1.0503E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.008 s +PDAF --- duration of poststep: 0.007 s PDAF Forecast ------------------------------------------------------- model PE exited: mype 0 @@ -146,19 +146,19 @@ PDAF analysis step: 0.033 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.004 s -PDAF init_ens_pdaf: 0.004 s -PDAF Hyb3DVAR analysis: 0.002 s -PDAF PDAF-internal operations: 0.001 s +PDAF Initialize PDAF: 0.002 s +PDAF init_ens_pdaf: 0.002 s +PDAF Hyb3DVAR analysis: 0.000 s +PDAF PDAF-internal operations: 0.000 s PDAF OMI-internal routines: 0.000 s PDAF Solver: 0.000 s PDAF cvt_ens_pdaf: 0.000 s PDAF cvt_ens_adj_pdaf: 0.000 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.000 s +PDAF init_dim_obs_pdafomi: 0.001 s PDAF obs_op_pdafomi: 0.000 s PDAF obs_op_lin_pdafomi: 0.000 s PDAF obs_op_adj_pdafomi: 0.000 s -PDAF prepoststep_pdaf: 0.008 s +PDAF prepoststep_pdaf: 0.007 s PDAF offline mode: END diff --git a/tutorial/verification/out.offline_2D_serial_3dhybvar_opt2 b/tutorial/verification/out.offline_2D_serial_3dhybvar_opt2 index 4c7675324..b12b01ee9 100644 --- a/tutorial/verification/out.offline_2D_serial_3dhybvar_opt2 +++ b/tutorial/verification/out.offline_2D_serial_3dhybvar_opt2 @@ -35,7 +35,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -83,7 +83,7 @@ PDAF: Call routine for ensemble initialization Initialize B^1/2 for 3D-Var PDAF: Initialization completed -PDAF --- duration of PDAF initialization: 0.002 s +PDAF --- duration of PDAF initialization: 0.004 s PDAF Activate PDAF offline mode PDAF offline mode: START ASSIMILATION @@ -119,7 +119,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 4.406D+01 4.858D+00 8.5D-02 4.1D-02 - 2 5 3.635D+01 7.166D-09 6.5D-01 -6.2D-15 + 2 5 3.635D+01 7.166D-09 6.5D-01 -6.1D-15 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -128,13 +128,13 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of hyb3D-Var update: 0.000 s +PDAF --- duration of hyb3D-Var update: 0.001 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 1.0503E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.006 s +PDAF --- duration of poststep: 0.007 s PDAF Forecast ------------------------------------------------------- model PE exited: mype 0 @@ -150,19 +150,19 @@ PDAF analysis step: 0.038 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.002 s -PDAF init_ens_pdaf: 0.002 s -PDAF Hyb3DVAR analysis: 0.000 s -PDAF PDAF-internal operations: 0.000 s +PDAF Initialize PDAF: 0.004 s +PDAF init_ens_pdaf: 0.003 s +PDAF Hyb3DVAR analysis: 0.002 s +PDAF PDAF-internal operations: 0.001 s PDAF OMI-internal routines: 0.000 s PDAF Solver: 0.000 s PDAF cvt_ens_pdaf: 0.000 s PDAF cvt_ens_adj_pdaf: 0.000 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.001 s +PDAF init_dim_obs_pdafomi: 0.000 s PDAF obs_op_pdafomi: 0.000 s PDAF obs_op_lin_pdafomi: 0.000 s PDAF obs_op_adj_pdafomi: 0.000 s -PDAF prepoststep_pdaf: 0.006 s +PDAF prepoststep_pdaf: 0.007 s PDAF offline mode: END diff --git a/tutorial/verification/out.offline_2D_serial_3dlenvar_opt2 b/tutorial/verification/out.offline_2D_serial_3dlenvar_opt2 index 24ace2dd2..513f7f690 100644 --- a/tutorial/verification/out.offline_2D_serial_3dlenvar_opt2 +++ b/tutorial/verification/out.offline_2D_serial_3dlenvar_opt2 @@ -34,7 +34,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -116,7 +116,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 4.406D+01 4.858D+00 8.5D-02 4.1D-02 - 2 5 3.635D+01 7.166D-09 6.5D-01 -5.2D-15 + 2 5 3.635D+01 7.166D-09 6.5D-01 -4.8D-15 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -177,8 +177,6 @@ PDAF cvt_ens_adj_pdaf: 0.000 s PDAF Timers in LESTKF only PDAF init_n_domains_pdaf: 0.000 s PDAF init_dim_l_pdaf: 0.000 s -PDAF g2l_state_pdaf: 0.000 s -PDAF l2g_state_pdaf: 0.000 s PDAF Time in OMI observation module routines PDAF init_dim_obs_pdafomi: 0.001 s PDAF obs_op_pdafomi: 0.000 s diff --git a/tutorial/verification/out.offline_2D_serial_3dlhybvar_opt2 b/tutorial/verification/out.offline_2D_serial_3dlhybvar_opt2 index 616e49a68..051c1169c 100644 --- a/tutorial/verification/out.offline_2D_serial_3dlhybvar_opt2 +++ b/tutorial/verification/out.offline_2D_serial_3dlhybvar_opt2 @@ -35,7 +35,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -83,7 +83,7 @@ PDAF: Call routine for ensemble initialization Initialize B^1/2 for 3D-Var PDAF: Initialization completed -PDAF --- duration of PDAF initialization: 0.002 s +PDAF --- duration of PDAF initialization: 0.003 s PDAF Activate PDAF offline mode PDAF offline mode: START ASSIMILATION @@ -169,25 +169,23 @@ PDAF analysis step: 0.036 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.002 s +PDAF Initialize PDAF: 0.003 s PDAF init_ens_pdaf: 0.002 s PDAF Hyb3DVAR analysis: 0.004 s -PDAF PDAF-internal operations: 0.000 s -PDAF OMI-internal routines: 0.001 s -PDAF Solver: 0.001 s +PDAF PDAF-internal operations: 0.001 s +PDAF OMI-internal routines: 0.000 s +PDAF Solver: 0.000 s PDAF cvt_ens_pdaf: 0.000 s PDAF cvt_ens_adj_pdaf: 0.000 s PDAF Timers in LESTKF only PDAF init_n_domains_pdaf: 0.000 s PDAF init_dim_l_pdaf: 0.000 s -PDAF g2l_state_pdaf: 0.000 s -PDAF l2g_state_pdaf: 0.000 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.000 s +PDAF init_dim_obs_pdafomi: 0.001 s PDAF obs_op_pdafomi: 0.000 s PDAF obs_op_lin_pdafomi: 0.000 s PDAF obs_op_adj_pdafomi: 0.000 s -PDAF init_dim_obs_l_pdafomi: 0.002 s +PDAF init_dim_obs_l_pdafomi: 0.000 s PDAF prepoststep_pdaf: 0.007 s PDAF offline mode: END diff --git a/tutorial/verification/out.offline_2D_serial_3dv_opt1 b/tutorial/verification/out.offline_2D_serial_3dv_opt1 index b34800ba4..cf19f8c51 100644 --- a/tutorial/verification/out.offline_2D_serial_3dv_opt1 +++ b/tutorial/verification/out.offline_2D_serial_3dv_opt1 @@ -35,7 +35,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -81,7 +81,7 @@ PDAF: Call routine for ensemble initialization Initialize B^1/2 PDAF: Initialization completed -PDAF --- duration of PDAF initialization: 0.002 s +PDAF --- duration of PDAF initialization: 0.003 s PDAF Activate PDAF offline mode PDAF offline mode: START ASSIMILATION @@ -128,7 +128,7 @@ F = final function value CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL - Total User time 1.900E-04 seconds. + Total User time 2.880E-04 seconds. PDAF --- Exit optimization, status CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL PDAF --- update duration: 0.001 s @@ -136,7 +136,7 @@ PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 3.2465E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.002 s +PDAF --- duration of poststep: 0.001 s PDAF Forecast ------------------------------------------------------- model PE exited: mype 0 @@ -152,8 +152,8 @@ PDAF analysis step: 0.015 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.002 s -PDAF init_ens_pdaf: 0.002 s +PDAF Initialize PDAF: 0.003 s +PDAF init_ens_pdaf: 0.003 s PDAF 3DVAR analysis: 0.001 s PDAF PDAF-internal operations: 0.000 s PDAF OMI-internal routines: 0.000 s @@ -165,6 +165,6 @@ PDAF init_dim_obs_pdafomi: 0.001 s PDAF obs_op_pdafomi: 0.000 s PDAF obs_op_lin_pdafomi: 0.000 s PDAF obs_op_adj_pdafomi: 0.000 s -PDAF prepoststep_pdaf: 0.002 s +PDAF prepoststep_pdaf: 0.001 s PDAF offline mode: END diff --git a/tutorial/verification/out.offline_2D_serial_3dv_opt2 b/tutorial/verification/out.offline_2D_serial_3dv_opt2 index dc458d0c6..ab0cbc176 100644 --- a/tutorial/verification/out.offline_2D_serial_3dv_opt2 +++ b/tutorial/verification/out.offline_2D_serial_3dv_opt2 @@ -35,7 +35,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -81,7 +81,7 @@ PDAF: Call routine for ensemble initialization Initialize B^1/2 PDAF: Initialization completed -PDAF --- duration of PDAF initialization: 0.002 s +PDAF --- duration of PDAF initialization: 0.003 s PDAF Activate PDAF offline mode PDAF offline mode: START ASSIMILATION @@ -118,12 +118,12 @@ INITIAL VALUES: SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 -PDAF --- update duration: 0.000 s +PDAF --- update duration: 0.001 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 3.2465E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.002 s +PDAF --- duration of poststep: 0.001 s PDAF Forecast ------------------------------------------------------- model PE exited: mype 0 @@ -139,19 +139,19 @@ PDAF analysis step: 0.011 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.002 s +PDAF Initialize PDAF: 0.003 s PDAF init_ens_pdaf: 0.002 s -PDAF 3DVAR analysis: 0.000 s +PDAF 3DVAR analysis: 0.001 s PDAF PDAF-internal operations: 0.000 s PDAF OMI-internal routines: 0.000 s PDAF Solver: 0.000 s PDAF cvt_pdaf: 0.000 s PDAF cvt_adj_pdaf: 0.000 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.000 s +PDAF init_dim_obs_pdafomi: 0.001 s PDAF obs_op_pdafomi: 0.000 s PDAF obs_op_lin_pdafomi: 0.000 s PDAF obs_op_adj_pdafomi: 0.000 s -PDAF prepoststep_pdaf: 0.002 s +PDAF prepoststep_pdaf: 0.001 s PDAF offline mode: END diff --git a/tutorial/verification/out.offline_2D_serial_3dv_opt3 b/tutorial/verification/out.offline_2D_serial_3dv_opt3 index 1b1ff8a1b..25dac4b17 100644 --- a/tutorial/verification/out.offline_2D_serial_3dv_opt3 +++ b/tutorial/verification/out.offline_2D_serial_3dv_opt3 @@ -35,7 +35,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -107,7 +107,7 @@ PDAF --- CG solver converged PDAF iter eps F PDAF 4 0.000E+00 3.635E+01 -PDAF --- update duration: 0.001 s +PDAF --- update duration: 0.000 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 3.2465E-01 @@ -130,14 +130,14 @@ PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- PDAF Initialize PDAF: 0.003 s PDAF init_ens_pdaf: 0.003 s -PDAF 3DVAR analysis: 0.001 s +PDAF 3DVAR analysis: 0.000 s PDAF PDAF-internal operations: 0.000 s PDAF OMI-internal routines: 0.000 s PDAF Solver: 0.000 s PDAF cvt_pdaf: 0.000 s PDAF cvt_adj_pdaf: 0.000 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.001 s +PDAF init_dim_obs_pdafomi: 0.000 s PDAF obs_op_pdafomi: 0.000 s PDAF obs_op_lin_pdafomi: 0.000 s PDAF obs_op_adj_pdafomi: 0.000 s diff --git a/tutorial/verification/out.offline_2D_serial_ESTKF b/tutorial/verification/out.offline_2D_serial_ESTKF index ae126a40e..50caf020a 100644 --- a/tutorial/verification/out.offline_2D_serial_ESTKF +++ b/tutorial/verification/out.offline_2D_serial_ESTKF @@ -35,7 +35,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -126,12 +126,12 @@ PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- PDAF Initialize PDAF: 0.003 s PDAF init_ens_pdaf: 0.003 s -PDAF ESTKF analysis: 0.001 s -PDAF PDAF-internal operations: 0.001 s +PDAF ESTKF analysis: 0.000 s +PDAF PDAF-internal operations: 0.000 s PDAF OMI-internal routines: 0.000 s PDAF Time in OMI observation module routines PDAF init_dim_obs_pdafomi: 0.000 s PDAF obs_op_pdafomi: 0.000 s -PDAF prepoststep_pdaf: 0.008 s +PDAF prepoststep_pdaf: 0.010 s PDAF offline mode: END diff --git a/tutorial/verification/out.online_2D_parallelmodel b/tutorial/verification/out.online_2D_parallelmodel index 51d2f14c9..0bcc4fb8a 100644 --- a/tutorial/verification/out.online_2D_parallelmodel +++ b/tutorial/verification/out.online_2D_parallelmodel @@ -6,20 +6,20 @@ world filter model couple filterPE rank rank task rank task rank T/F ---------------------------------------------------------- - 13 7 1 2 6 F - 11 6 1 2 5 F 7 4 1 2 3 F - 15 8 1 2 7 F - 12 7 0 1 6 F - 10 6 0 1 5 F + 11 6 1 2 5 F + 13 7 1 2 6 F 6 4 0 1 3 F + 10 6 0 1 5 F + 12 7 0 1 6 F 9 5 1 2 4 F 5 3 1 2 2 F 3 2 1 2 1 F - 14 8 0 1 7 F + 15 8 1 2 7 F 8 5 0 1 4 F 4 3 0 1 2 F 2 2 0 1 1 F + 14 8 0 1 7 F 17 9 1 2 8 F 16 9 0 1 8 F 1 1 1 1 2 0 T @@ -53,7 +53,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -502,21 +502,19 @@ PDAF analysis step: 0.039 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.036 s -PDAF init_ens_pdaf: 0.003 s -PDAF Ensemble forecast: 0.130 s -PDAF MPI communication in PDAF: 0.130 s +PDAF Initialize PDAF: 0.024 s +PDAF init_ens_pdaf: 0.004 s +PDAF Ensemble forecast: 0.183 s +PDAF MPI communication in PDAF: 0.183 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF LESTKF analysis: 0.235 s -PDAF PDAF-internal operations: 0.023 s -PDAF OMI-internal routines: 0.017 s +PDAF LESTKF analysis: 0.846 s +PDAF PDAF-internal operations: 0.012 s +PDAF OMI-internal routines: 0.000 s PDAF init_n_domains_pdaf: 0.000 s -PDAF init_dim_l_pdaf: 0.000 s -PDAF g2l_state_pdaf: 0.003 s -PDAF l2g_state_pdaf: 0.001 s +PDAF init_dim_l_pdaf: 0.001 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.077 s -PDAF obs_op_pdafomi: 0.146 s -PDAF init_dim_obs_l_pdafomi: 0.006 s -PDAF prepoststep_pdaf: 0.253 s +PDAF init_dim_obs_pdafomi: 0.381 s +PDAF obs_op_pdafomi: 0.449 s +PDAF init_dim_obs_l_pdafomi: 0.000 s +PDAF prepoststep_pdaf: 0.220 s diff --git a/tutorial/verification/out.online_2D_parallelmodel_3denvar_opt12 b/tutorial/verification/out.online_2D_parallelmodel_3denvar_opt12 index dca40b294..680fd2a8e 100644 --- a/tutorial/verification/out.online_2D_parallelmodel_3denvar_opt12 +++ b/tutorial/verification/out.online_2D_parallelmodel_3denvar_opt12 @@ -6,12 +6,12 @@ world filter model couple filterPE rank rank task rank task rank T/F ---------------------------------------------------------- - 13 7 1 2 6 F 7 4 1 2 3 F 11 6 1 2 5 F + 13 7 1 2 6 F + 6 4 0 1 3 F 10 6 0 1 5 F 12 7 0 1 6 F - 6 4 0 1 3 F 9 5 1 2 4 F 5 3 1 2 2 F 3 2 1 2 1 F @@ -55,7 +55,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -100,7 +100,7 @@ PDAF: Call routine for ensemble initialization --- Ensemble size: 9 PDAF: Initialization completed -PDAF --- duration of PDAF initialization: 0.050 s +PDAF --- duration of PDAF initialization: 0.023 s PDAF ---------------------------------------------------------------- @@ -110,7 +110,7 @@ PDAF Call pre-post routine at initial time Analyze initial state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.7637E-01 -PDAF --- duration of prestep: 0.000 s +PDAF --- duration of prestep: 0.001 s PDAF Forecast ------------------------------------------------------- 0 Next observation at time step 2 PDAF Evolve state ensemble @@ -120,13 +120,13 @@ PDAF --- Distribute sub-ensembles step 2 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.032 s +PDAF --- duration of forecast phase: 0.016 s PDAF Call pre-post routine after forecast; step 2 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.014 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 2 Assimilating observations - ensemble 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -156,7 +156,7 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of En3D-Var update: 0.007 s +PDAF --- duration of En3D-Var update: 0.003 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -171,13 +171,13 @@ PDAF --- Distribute sub-ensembles step 4 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.008 s +PDAF --- duration of forecast phase: 0.010 s PDAF Call pre-post routine after forecast; step 4 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 1.2745E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.012 s +PDAF --- duration of prestep: 0.022 s PDAF Analysis ------------------------------------------------------- PDAF 4 Assimilating observations - ensemble 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -213,7 +213,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 9.2179E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.013 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 4 Next observation at time step 6 PDAF Evolve state ensemble @@ -222,7 +222,7 @@ PDAF --- Distribute sub-ensembles step 6 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.023 s +PDAF --- duration of forecast phase: 0.015 s PDAF Call pre-post routine after forecast; step 6 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -258,13 +258,13 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of En3D-Var update: 0.002 s +PDAF --- duration of En3D-Var update: 0.001 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 7.5872E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.014 s +PDAF --- duration of poststep: 0.013 s PDAF Forecast ------------------------------------------------------- 6 Next observation at time step 8 PDAF Evolve state ensemble @@ -273,7 +273,7 @@ PDAF --- Distribute sub-ensembles step 8 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.027 s +PDAF --- duration of forecast phase: 0.041 s PDAF Call pre-post routine after forecast; step 8 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -309,13 +309,13 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of En3D-Var update: 0.003 s +PDAF --- duration of En3D-Var update: 0.001 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 6.5977E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.013 s +PDAF --- duration of poststep: 0.011 s PDAF Forecast ------------------------------------------------------- 8 Next observation at time step 10 PDAF Evolve state ensemble @@ -324,7 +324,7 @@ PDAF --- Distribute sub-ensembles step 10 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.024 s +PDAF --- duration of forecast phase: 0.011 s PDAF Call pre-post routine after forecast; step 10 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -359,13 +359,13 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of En3D-Var update: 0.002 s +PDAF --- duration of En3D-Var update: 0.004 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.9158E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.013 s +PDAF --- duration of poststep: 0.015 s PDAF Forecast ------------------------------------------------------- 10 Next observation at time step 12 PDAF Evolve state ensemble @@ -380,7 +380,7 @@ PDAF Call pre-post routine after forecast; step 12 --- compute ensemble mean RMS error according to sampled variance: 5.9158E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.011 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 12 Assimilating observations - ensemble 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -410,13 +410,13 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of En3D-Var update: 0.001 s +PDAF --- duration of En3D-Var update: 0.004 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.4093E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.014 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 12 Next observation at time step 14 PDAF Evolve state ensemble @@ -425,13 +425,13 @@ PDAF --- Distribute sub-ensembles step 14 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.008 s +PDAF --- duration of forecast phase: 0.017 s PDAF Call pre-post routine after forecast; step 14 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.4093E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.012 s +PDAF --- duration of prestep: 0.011 s PDAF Analysis ------------------------------------------------------- PDAF 14 Assimilating observations - ensemble 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -461,7 +461,7 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of En3D-Var update: 0.001 s +PDAF --- duration of En3D-Var update: 0.002 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -476,13 +476,13 @@ PDAF --- Distribute sub-ensembles step 16 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.026 s +PDAF --- duration of forecast phase: 0.011 s PDAF Call pre-post routine after forecast; step 16 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.0140E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.013 s +PDAF --- duration of prestep: 0.014 s PDAF Analysis ------------------------------------------------------- PDAF 16 Assimilating observations - ensemble 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -511,13 +511,13 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of En3D-Var update: 0.001 s +PDAF --- duration of En3D-Var update: 0.005 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 4.6945E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.013 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 16 Next observation at time step 18 PDAF Evolve state ensemble @@ -526,13 +526,13 @@ PDAF --- Distribute sub-ensembles step 18 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.030 s +PDAF --- duration of forecast phase: 0.024 s PDAF Call pre-post routine after forecast; step 18 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 4.6945E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.013 s +PDAF --- duration of prestep: 0.014 s PDAF Analysis ------------------------------------------------------- PDAF 18 Assimilating observations - ensemble 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -561,13 +561,13 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of En3D-Var update: 0.017 s +PDAF --- duration of En3D-Var update: 0.006 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 4.4291E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.014 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 18 No more observations - end assimilation @@ -581,21 +581,21 @@ PDAF analysis step: 0.050 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.050 s -PDAF init_ens_pdaf: 0.005 s -PDAF Ensemble forecast: 0.191 s -PDAF MPI communication in PDAF: 0.191 s +PDAF Initialize PDAF: 0.023 s +PDAF init_ens_pdaf: 0.003 s +PDAF Ensemble forecast: 0.158 s +PDAF MPI communication in PDAF: 0.158 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF Hyb3DVAR analysis: 0.070 s -PDAF PDAF-internal operations: 0.108 s -PDAF OMI-internal routines: 0.276 s -PDAF Solver: 0.104 s -PDAF cvt_ens_pdaf: 0.044 s -PDAF cvt_ens_adj_pdaf: 0.031 s +PDAF Hyb3DVAR analysis: 0.054 s +PDAF PDAF-internal operations: 0.251 s +PDAF OMI-internal routines: 0.000 s +PDAF Solver: 0.217 s +PDAF cvt_ens_pdaf: 0.113 s +PDAF cvt_ens_adj_pdaf: 0.113 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.049 s +PDAF init_dim_obs_pdafomi: 0.149 s PDAF obs_op_pdafomi: 0.000 s PDAF obs_op_lin_pdafomi: 0.000 s PDAF obs_op_adj_pdafomi: 0.000 s -PDAF prepoststep_pdaf: 0.231 s +PDAF prepoststep_pdaf: 0.235 s diff --git a/tutorial/verification/out.online_2D_parallelmodel_3denvar_opt13 b/tutorial/verification/out.online_2D_parallelmodel_3denvar_opt13 index de070b7e1..d47b169f1 100644 --- a/tutorial/verification/out.online_2D_parallelmodel_3denvar_opt13 +++ b/tutorial/verification/out.online_2D_parallelmodel_3denvar_opt13 @@ -55,7 +55,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -100,7 +100,7 @@ PDAF: Call routine for ensemble initialization --- Ensemble size: 9 PDAF: Initialization completed -PDAF --- duration of PDAF initialization: 0.024 s +PDAF --- duration of PDAF initialization: 0.023 s PDAF ---------------------------------------------------------------- @@ -120,13 +120,13 @@ PDAF --- Distribute sub-ensembles step 2 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.019 s +PDAF --- duration of forecast phase: 0.017 s PDAF Call pre-post routine after forecast; step 2 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.013 s +PDAF --- duration of prestep: 0.011 s PDAF Analysis ------------------------------------------------------- PDAF 2 Assimilating observations - ensemble 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -145,13 +145,13 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of En3D-Var update: 0.002 s +PDAF --- duration of En3D-Var update: 0.001 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 1.2745E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.016 s +PDAF --- duration of poststep: 0.015 s PDAF Forecast ------------------------------------------------------- 2 Next observation at time step 4 PDAF Evolve state ensemble @@ -160,13 +160,13 @@ PDAF --- Distribute sub-ensembles step 4 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.006 s +PDAF --- duration of forecast phase: 0.008 s PDAF Call pre-post routine after forecast; step 4 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 1.2745E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.012 s +PDAF --- duration of prestep: 0.013 s PDAF Analysis ------------------------------------------------------- PDAF 4 Assimilating observations - ensemble 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -191,7 +191,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 9.2179E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.013 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 4 Next observation at time step 6 PDAF Evolve state ensemble @@ -200,13 +200,13 @@ PDAF --- Distribute sub-ensembles step 6 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.024 s +PDAF --- duration of forecast phase: 0.028 s PDAF Call pre-post routine after forecast; step 6 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 9.2179E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.011 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 6 Assimilating observations - ensemble 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -225,7 +225,7 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of En3D-Var update: 0.001 s +PDAF --- duration of En3D-Var update: 0.003 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -240,7 +240,7 @@ PDAF --- Distribute sub-ensembles step 8 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.017 s +PDAF --- duration of forecast phase: 0.019 s PDAF Call pre-post routine after forecast; step 8 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -265,13 +265,13 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of En3D-Var update: 0.001 s +PDAF --- duration of En3D-Var update: 0.006 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 6.5977E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.023 s +PDAF --- duration of poststep: 0.013 s PDAF Forecast ------------------------------------------------------- 8 Next observation at time step 10 PDAF Evolve state ensemble @@ -280,7 +280,7 @@ PDAF --- Distribute sub-ensembles step 10 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.009 s PDAF Call pre-post routine after forecast; step 10 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -305,7 +305,7 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of En3D-Var update: 0.001 s +PDAF --- duration of En3D-Var update: 0.011 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -320,13 +320,13 @@ PDAF --- Distribute sub-ensembles step 12 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.012 s +PDAF --- duration of forecast phase: 0.015 s PDAF Call pre-post routine after forecast; step 12 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.9158E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.012 s +PDAF --- duration of prestep: 0.013 s PDAF Analysis ------------------------------------------------------- PDAF 12 Assimilating observations - ensemble 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -345,13 +345,13 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of En3D-Var update: 0.001 s +PDAF --- duration of En3D-Var update: 0.006 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.4093E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.025 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 12 Next observation at time step 14 PDAF Evolve state ensemble @@ -360,13 +360,13 @@ PDAF --- Distribute sub-ensembles step 14 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.011 s PDAF Call pre-post routine after forecast; step 14 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.4093E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.013 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 14 Assimilating observations - ensemble 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -385,7 +385,7 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of En3D-Var update: 0.002 s +PDAF --- duration of En3D-Var update: 0.007 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -400,13 +400,13 @@ PDAF --- Distribute sub-ensembles step 16 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.016 s PDAF Call pre-post routine after forecast; step 16 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.0140E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.030 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 16 Assimilating observations - ensemble 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -425,7 +425,7 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of En3D-Var update: 0.001 s +PDAF --- duration of En3D-Var update: 0.005 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -440,13 +440,13 @@ PDAF --- Distribute sub-ensembles step 18 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.024 s +PDAF --- duration of forecast phase: 0.020 s PDAF Call pre-post routine after forecast; step 18 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 4.6945E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.016 s +PDAF --- duration of prestep: 0.014 s PDAF Analysis ------------------------------------------------------- PDAF 18 Assimilating observations - ensemble 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -465,13 +465,13 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of En3D-Var update: 0.002 s +PDAF --- duration of En3D-Var update: 0.006 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 4.4291E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.015 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 18 No more observations - end assimilation @@ -485,21 +485,21 @@ PDAF analysis step: 0.051 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.024 s -PDAF init_ens_pdaf: 0.004 s -PDAF Ensemble forecast: 0.123 s -PDAF MPI communication in PDAF: 0.123 s +PDAF Initialize PDAF: 0.023 s +PDAF init_ens_pdaf: 0.003 s +PDAF Ensemble forecast: 0.143 s +PDAF MPI communication in PDAF: 0.142 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF Hyb3DVAR analysis: 0.024 s -PDAF PDAF-internal operations: 0.043 s -PDAF OMI-internal routines: 0.154 s -PDAF Solver: 0.022 s -PDAF cvt_ens_pdaf: 0.047 s -PDAF cvt_ens_adj_pdaf: 0.040 s +PDAF Hyb3DVAR analysis: 0.092 s +PDAF PDAF-internal operations: 0.242 s +PDAF OMI-internal routines: 0.000 s +PDAF Solver: 0.093 s +PDAF cvt_ens_pdaf: 0.165 s +PDAF cvt_ens_adj_pdaf: 0.138 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.029 s +PDAF init_dim_obs_pdafomi: 0.089 s PDAF obs_op_pdafomi: 0.000 s -PDAF obs_op_lin_pdafomi: 0.000 s +PDAF obs_op_lin_pdafomi: 0.001 s PDAF obs_op_adj_pdafomi: 0.000 s -PDAF prepoststep_pdaf: 0.274 s +PDAF prepoststep_pdaf: 0.226 s diff --git a/tutorial/verification/out.online_2D_parallelmodel_3dhybvar_opt12 b/tutorial/verification/out.online_2D_parallelmodel_3dhybvar_opt12 index 01e05e033..d05531bdf 100644 --- a/tutorial/verification/out.online_2D_parallelmodel_3dhybvar_opt12 +++ b/tutorial/verification/out.online_2D_parallelmodel_3dhybvar_opt12 @@ -60,7 +60,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -109,7 +109,7 @@ PDAF: Call routine for ensemble initialization Initialize B^1/2 for 3D-Var PDAF: Initialization completed -PDAF --- duration of PDAF initialization: 0.031 s +PDAF --- duration of PDAF initialization: 0.022 s PDAF ---------------------------------------------------------------- @@ -135,7 +135,7 @@ PDAF Call pre-post routine after forecast; step 2 --- compute ensemble mean RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.011 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 2 Assimilating observations - hybrid 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -172,7 +172,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 1.2745E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.016 s +PDAF --- duration of poststep: 0.015 s PDAF Forecast ------------------------------------------------------- 2 Next observation at time step 4 PDAF Evolve state ensemble @@ -181,13 +181,13 @@ PDAF --- Distribute sub-ensembles step 4 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.008 s +PDAF --- duration of forecast phase: 0.009 s PDAF Call pre-post routine after forecast; step 4 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 1.2745E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.011 s +PDAF --- duration of prestep: 0.013 s PDAF Analysis ------------------------------------------------------- PDAF 4 Assimilating observations - hybrid 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -233,7 +233,7 @@ PDAF --- Distribute sub-ensembles step 6 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.008 s +PDAF --- duration of forecast phase: 0.036 s PDAF Call pre-post routine after forecast; step 6 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -270,13 +270,13 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of hyb3D-Var update: 0.001 s +PDAF --- duration of hyb3D-Var update: 0.002 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 7.5872E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.012 s +PDAF --- duration of poststep: 0.013 s PDAF Forecast ------------------------------------------------------- 6 Next observation at time step 8 PDAF Evolve state ensemble @@ -285,7 +285,7 @@ PDAF --- Distribute sub-ensembles step 8 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.022 s +PDAF --- duration of forecast phase: 0.010 s PDAF Call pre-post routine after forecast; step 8 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -328,7 +328,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 6.5977E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.014 s PDAF Forecast ------------------------------------------------------- 8 Next observation at time step 10 PDAF Evolve state ensemble @@ -337,13 +337,13 @@ PDAF --- Distribute sub-ensembles step 10 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.008 s +PDAF --- duration of forecast phase: 0.009 s PDAF Call pre-post routine after forecast; step 10 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 6.5977E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.020 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 10 Assimilating observations - hybrid 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -389,13 +389,13 @@ PDAF --- Distribute sub-ensembles step 12 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.019 s +PDAF --- duration of forecast phase: 0.043 s PDAF Call pre-post routine after forecast; step 12 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.9158E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.011 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 12 Assimilating observations - hybrid 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -441,13 +441,13 @@ PDAF --- Distribute sub-ensembles step 14 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.009 s PDAF Call pre-post routine after forecast; step 14 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.4093E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.012 s +PDAF --- duration of prestep: 0.013 s PDAF Analysis ------------------------------------------------------- PDAF 14 Assimilating observations - hybrid 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -478,13 +478,13 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of hyb3D-Var update: 0.001 s +PDAF --- duration of hyb3D-Var update: 0.002 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.0140E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.030 s +PDAF --- duration of poststep: 0.013 s PDAF Forecast ------------------------------------------------------- 14 Next observation at time step 16 PDAF Evolve state ensemble @@ -493,13 +493,13 @@ PDAF --- Distribute sub-ensembles step 16 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.009 s PDAF Call pre-post routine after forecast; step 16 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.0140E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.011 s +PDAF --- duration of prestep: 0.013 s PDAF Analysis ------------------------------------------------------- PDAF 16 Assimilating observations - hybrid 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -521,7 +521,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 1.752D+01 9.468D-01 7.4D-02 1.8D-01 - 2 5 1.743D+01 1.416D-08 2.0D-01 -6.9D-15 + 2 5 1.743D+01 1.416D-08 2.0D-01 -6.6D-15 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -530,13 +530,13 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of hyb3D-Var update: 0.001 s +PDAF --- duration of hyb3D-Var update: 0.002 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 4.6945E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.012 s +PDAF --- duration of poststep: 0.013 s PDAF Forecast ------------------------------------------------------- 16 Next observation at time step 18 PDAF Evolve state ensemble @@ -545,7 +545,7 @@ PDAF --- Distribute sub-ensembles step 18 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.027 s +PDAF --- duration of forecast phase: 0.021 s PDAF Call pre-post routine after forecast; step 18 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -573,7 +573,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 2.269D+01 1.641D+00 7.4D-02 1.8D-01 - 2 5 2.241D+01 2.208D-08 2.0D-01 -1.4D-15 + 2 5 2.241D+01 2.208D-08 2.0D-01 -8.9D-16 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -588,7 +588,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 4.4291E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 18 No more observations - end assimilation @@ -602,21 +602,21 @@ PDAF analysis step: 0.056 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.031 s -PDAF init_ens_pdaf: 0.005 s -PDAF Ensemble forecast: 0.124 s -PDAF MPI communication in PDAF: 0.124 s +PDAF Initialize PDAF: 0.022 s +PDAF init_ens_pdaf: 0.004 s +PDAF Ensemble forecast: 0.164 s +PDAF MPI communication in PDAF: 0.164 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF Hyb3DVAR analysis: 0.021 s -PDAF PDAF-internal operations: 0.071 s -PDAF OMI-internal routines: 0.300 s -PDAF Solver: 0.096 s -PDAF cvt_ens_pdaf: 0.048 s -PDAF cvt_ens_adj_pdaf: 0.021 s +PDAF Hyb3DVAR analysis: 0.028 s +PDAF PDAF-internal operations: 0.196 s +PDAF OMI-internal routines: 0.000 s +PDAF Solver: 0.177 s +PDAF cvt_ens_pdaf: 0.135 s +PDAF cvt_ens_adj_pdaf: 0.097 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.041 s -PDAF obs_op_pdafomi: 0.001 s -PDAF obs_op_lin_pdafomi: 0.000 s +PDAF init_dim_obs_pdafomi: 0.143 s +PDAF obs_op_pdafomi: 0.000 s +PDAF obs_op_lin_pdafomi: 0.001 s PDAF obs_op_adj_pdafomi: 0.000 s -PDAF prepoststep_pdaf: 0.242 s +PDAF prepoststep_pdaf: 0.229 s diff --git a/tutorial/verification/out.online_2D_parallelmodel_3dhybvar_opt13 b/tutorial/verification/out.online_2D_parallelmodel_3dhybvar_opt13 index e0e4822ac..ca168eb09 100644 --- a/tutorial/verification/out.online_2D_parallelmodel_3dhybvar_opt13 +++ b/tutorial/verification/out.online_2D_parallelmodel_3dhybvar_opt13 @@ -60,7 +60,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -109,7 +109,7 @@ PDAF: Call routine for ensemble initialization Initialize B^1/2 for 3D-Var PDAF: Initialization completed -PDAF --- duration of PDAF initialization: 0.025 s +PDAF --- duration of PDAF initialization: 0.023 s PDAF ---------------------------------------------------------------- @@ -119,7 +119,7 @@ PDAF Call pre-post routine at initial time Analyze initial state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.7637E-01 -PDAF --- duration of prestep: 0.001 s +PDAF --- duration of prestep: 0.000 s PDAF Forecast ------------------------------------------------------- 0 Next observation at time step 2 PDAF Evolve state ensemble @@ -129,13 +129,13 @@ PDAF --- Distribute sub-ensembles step 2 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.020 s +PDAF --- duration of forecast phase: 0.017 s PDAF Call pre-post routine after forecast; step 2 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.014 s +PDAF --- duration of prestep: 0.013 s PDAF Analysis ------------------------------------------------------- PDAF 2 Assimilating observations - hybrid 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -161,7 +161,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 1.2745E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.018 s +PDAF --- duration of poststep: 0.015 s PDAF Forecast ------------------------------------------------------- 2 Next observation at time step 4 PDAF Evolve state ensemble @@ -170,13 +170,13 @@ PDAF --- Distribute sub-ensembles step 4 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.009 s PDAF Call pre-post routine after forecast; step 4 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 1.2745E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.012 s +PDAF --- duration of prestep: 0.013 s PDAF Analysis ------------------------------------------------------- PDAF 4 Assimilating observations - hybrid 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -202,7 +202,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 9.2179E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.014 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 4 Next observation at time step 6 PDAF Evolve state ensemble @@ -211,7 +211,7 @@ PDAF --- Distribute sub-ensembles step 6 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.022 s +PDAF --- duration of forecast phase: 0.041 s PDAF Call pre-post routine after forecast; step 6 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -243,7 +243,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 7.5872E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.014 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 6 Next observation at time step 8 PDAF Evolve state ensemble @@ -252,13 +252,13 @@ PDAF --- Distribute sub-ensembles step 8 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.008 s +PDAF --- duration of forecast phase: 0.026 s PDAF Call pre-post routine after forecast; step 8 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 7.5872E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.015 s +PDAF --- duration of prestep: 0.013 s PDAF Analysis ------------------------------------------------------- PDAF 8 Assimilating observations - hybrid 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -278,13 +278,13 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of hyb3D-Var update: 0.001 s +PDAF --- duration of hyb3D-Var update: 0.003 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 6.5977E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.017 s +PDAF --- duration of poststep: 0.013 s PDAF Forecast ------------------------------------------------------- 8 Next observation at time step 10 PDAF Evolve state ensemble @@ -293,13 +293,13 @@ PDAF --- Distribute sub-ensembles step 10 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.014 s +PDAF --- duration of forecast phase: 0.008 s PDAF Call pre-post routine after forecast; step 10 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 6.5977E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.015 s +PDAF --- duration of prestep: 0.013 s PDAF Analysis ------------------------------------------------------- PDAF 10 Assimilating observations - hybrid 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -325,7 +325,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 5.9158E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.015 s +PDAF --- duration of poststep: 0.013 s PDAF Forecast ------------------------------------------------------- 10 Next observation at time step 12 PDAF Evolve state ensemble @@ -334,13 +334,13 @@ PDAF --- Distribute sub-ensembles step 12 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.023 s +PDAF --- duration of forecast phase: 0.012 s PDAF Call pre-post routine after forecast; step 12 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.9158E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.013 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 12 Assimilating observations - hybrid 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -360,7 +360,7 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of hyb3D-Var update: 0.002 s +PDAF --- duration of hyb3D-Var update: 0.001 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -375,13 +375,13 @@ PDAF --- Distribute sub-ensembles step 14 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.041 s PDAF Call pre-post routine after forecast; step 14 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.4093E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.026 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 14 Assimilating observations - hybrid 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -407,7 +407,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 5.0140E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.022 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 14 Next observation at time step 16 PDAF Evolve state ensemble @@ -416,13 +416,13 @@ PDAF --- Distribute sub-ensembles step 16 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.008 s +PDAF --- duration of forecast phase: 0.013 s PDAF Call pre-post routine after forecast; step 16 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.0140E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.013 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 16 Assimilating observations - hybrid 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -448,7 +448,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 4.6945E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.014 s +PDAF --- duration of poststep: 0.013 s PDAF Forecast ------------------------------------------------------- 16 Next observation at time step 18 PDAF Evolve state ensemble @@ -457,13 +457,13 @@ PDAF --- Distribute sub-ensembles step 18 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.023 s +PDAF --- duration of forecast phase: 0.021 s PDAF Call pre-post routine after forecast; step 18 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 4.6945E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.016 s +PDAF --- duration of prestep: 0.015 s PDAF Analysis ------------------------------------------------------- PDAF 18 Assimilating observations - hybrid 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -489,7 +489,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 4.4291E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.014 s +PDAF --- duration of poststep: 0.013 s PDAF Forecast ------------------------------------------------------- 18 No more observations - end assimilation @@ -503,21 +503,21 @@ PDAF analysis step: 0.056 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.025 s -PDAF init_ens_pdaf: 0.003 s -PDAF Ensemble forecast: 0.132 s -PDAF MPI communication in PDAF: 0.131 s +PDAF Initialize PDAF: 0.023 s +PDAF init_ens_pdaf: 0.004 s +PDAF Ensemble forecast: 0.188 s +PDAF MPI communication in PDAF: 0.188 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF Hyb3DVAR analysis: 0.022 s -PDAF PDAF-internal operations: 0.049 s -PDAF OMI-internal routines: 0.313 s -PDAF Solver: 0.039 s -PDAF cvt_ens_pdaf: 0.084 s -PDAF cvt_ens_adj_pdaf: 0.038 s +PDAF Hyb3DVAR analysis: 0.024 s +PDAF PDAF-internal operations: 0.153 s +PDAF OMI-internal routines: 0.000 s +PDAF Solver: 0.082 s +PDAF cvt_ens_pdaf: 0.146 s +PDAF cvt_ens_adj_pdaf: 0.079 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.032 s +PDAF init_dim_obs_pdafomi: 0.167 s PDAF obs_op_pdafomi: 0.000 s -PDAF obs_op_lin_pdafomi: 0.002 s +PDAF obs_op_lin_pdafomi: 0.001 s PDAF obs_op_adj_pdafomi: 0.000 s -PDAF prepoststep_pdaf: 0.278 s +PDAF prepoststep_pdaf: 0.231 s diff --git a/tutorial/verification/out.online_2D_parallelmodel_3dlenvar_opt12 b/tutorial/verification/out.online_2D_parallelmodel_3dlenvar_opt12 index 53bf38827..f32801bff 100644 --- a/tutorial/verification/out.online_2D_parallelmodel_3dlenvar_opt12 +++ b/tutorial/verification/out.online_2D_parallelmodel_3dlenvar_opt12 @@ -55,7 +55,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -101,7 +101,7 @@ PDAF: Call routine for ensemble initialization --- Ensemble size: 9 PDAF: Initialization completed -PDAF --- duration of PDAF initialization: 0.025 s +PDAF --- duration of PDAF initialization: 0.022 s PDAF ---------------------------------------------------------------- @@ -121,13 +121,13 @@ PDAF --- Distribute sub-ensembles step 2 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.036 s +PDAF --- duration of forecast phase: 0.021 s PDAF Call pre-post routine after forecast; step 2 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.012 s +PDAF --- duration of prestep: 0.011 s PDAF Analysis ------------------------------------------------------- PDAF 2 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -175,13 +175,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.055 s +PDAF --- duration of En3D-Var update: 0.042 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.6883E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.012 s +PDAF --- duration of poststep: 0.011 s PDAF Forecast ------------------------------------------------------- 2 Next observation at time step 4 PDAF Evolve state ensemble @@ -190,13 +190,13 @@ PDAF --- Distribute sub-ensembles step 4 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.017 s +PDAF --- duration of forecast phase: 0.009 s PDAF Call pre-post routine after forecast; step 4 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.6883E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.010 s +PDAF --- duration of prestep: 0.011 s PDAF Analysis ------------------------------------------------------- PDAF 4 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -244,13 +244,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.021 s +PDAF --- duration of En3D-Var update: 0.018 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.6119E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.010 s PDAF Forecast ------------------------------------------------------- 4 Next observation at time step 6 PDAF Evolve state ensemble @@ -259,13 +259,13 @@ PDAF --- Distribute sub-ensembles step 6 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.019 s +PDAF --- duration of forecast phase: 0.042 s PDAF Call pre-post routine after forecast; step 6 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.6119E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.010 s +PDAF --- duration of prestep: 0.011 s PDAF Analysis ------------------------------------------------------- PDAF 6 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -313,13 +313,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.035 s +PDAF --- duration of En3D-Var update: 0.017 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5793E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.010 s +PDAF --- duration of poststep: 0.011 s PDAF Forecast ------------------------------------------------------- 6 Next observation at time step 8 PDAF Evolve state ensemble @@ -328,7 +328,7 @@ PDAF --- Distribute sub-ensembles step 8 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.008 s +PDAF --- duration of forecast phase: 0.035 s PDAF Call pre-post routine after forecast; step 8 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -382,13 +382,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.017 s +PDAF --- duration of En3D-Var update: 0.019 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5609E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.012 s +PDAF --- duration of poststep: 0.010 s PDAF Forecast ------------------------------------------------------- 8 Next observation at time step 10 PDAF Evolve state ensemble @@ -403,7 +403,7 @@ PDAF Call pre-post routine after forecast; step 10 --- compute ensemble mean RMS error according to sampled variance: 5.5609E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.010 s +PDAF --- duration of prestep: 0.011 s PDAF Analysis ------------------------------------------------------- PDAF 10 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -451,13 +451,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.034 s +PDAF --- duration of En3D-Var update: 0.019 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5473E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.010 s +PDAF --- duration of poststep: 0.011 s PDAF Forecast ------------------------------------------------------- 10 Next observation at time step 12 PDAF Evolve state ensemble @@ -466,7 +466,7 @@ PDAF --- Distribute sub-ensembles step 12 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.023 s +PDAF --- duration of forecast phase: 0.037 s PDAF Call pre-post routine after forecast; step 12 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -520,7 +520,7 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.035 s +PDAF --- duration of En3D-Var update: 0.018 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -535,13 +535,13 @@ PDAF --- Distribute sub-ensembles step 14 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.008 s +PDAF --- duration of forecast phase: 0.013 s PDAF Call pre-post routine after forecast; step 14 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5387E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.027 s +PDAF --- duration of prestep: 0.011 s PDAF Analysis ------------------------------------------------------- PDAF 14 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -589,13 +589,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.034 s +PDAF --- duration of En3D-Var update: 0.022 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5309E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.010 s PDAF Forecast ------------------------------------------------------- 14 Next observation at time step 16 PDAF Evolve state ensemble @@ -604,13 +604,13 @@ PDAF --- Distribute sub-ensembles step 16 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.013 s PDAF Call pre-post routine after forecast; step 16 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5309E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.013 s +PDAF --- duration of prestep: 0.011 s PDAF Analysis ------------------------------------------------------- PDAF 16 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -658,13 +658,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.018 s +PDAF --- duration of En3D-Var update: 0.020 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5259E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.016 s +PDAF --- duration of poststep: 0.011 s PDAF Forecast ------------------------------------------------------- 16 Next observation at time step 18 PDAF Evolve state ensemble @@ -673,13 +673,13 @@ PDAF --- Distribute sub-ensembles step 18 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.021 s +PDAF --- duration of forecast phase: 0.019 s PDAF Call pre-post routine after forecast; step 18 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5259E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.011 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 18 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -727,13 +727,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.033 s +PDAF --- duration of En3D-Var update: 0.024 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5208E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.010 s +PDAF --- duration of poststep: 0.009 s PDAF Forecast ------------------------------------------------------- 18 No more observations - end assimilation @@ -747,27 +747,25 @@ PDAF analysis step: 0.051 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.025 s +PDAF Initialize PDAF: 0.022 s PDAF init_ens_pdaf: 0.004 s -PDAF Ensemble forecast: 0.152 s -PDAF MPI communication in PDAF: 0.152 s +PDAF Ensemble forecast: 0.202 s +PDAF MPI communication in PDAF: 0.202 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF En3DVAR analysis: 0.543 s -PDAF PDAF-internal operations: 0.085 s -PDAF OMI-internal routines: 0.212 s -PDAF Solver: 0.070 s -PDAF cvt_ens_pdaf: 0.024 s -PDAF cvt_ens_adj_pdaf: 0.027 s +PDAF En3DVAR analysis: 0.398 s +PDAF PDAF-internal operations: 0.239 s +PDAF OMI-internal routines: 0.001 s +PDAF Solver: 0.184 s +PDAF cvt_ens_pdaf: 0.066 s +PDAF cvt_ens_adj_pdaf: 0.140 s PDAF Timers in LESTKF only PDAF init_n_domains_pdaf: 0.000 s -PDAF init_dim_l_pdaf: 0.000 s -PDAF g2l_state_pdaf: 0.000 s -PDAF l2g_state_pdaf: 0.001 s +PDAF init_dim_l_pdaf: 0.001 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.145 s -PDAF obs_op_pdafomi: 0.149 s +PDAF init_dim_obs_pdafomi: 0.237 s +PDAF obs_op_pdafomi: 0.115 s PDAF obs_op_lin_pdafomi: 0.000 s PDAF obs_op_adj_pdafomi: 0.000 s -PDAF init_dim_obs_l_pdafomi: 0.008 s -PDAF prepoststep_pdaf: 0.217 s +PDAF init_dim_obs_l_pdafomi: 0.003 s +PDAF prepoststep_pdaf: 0.193 s diff --git a/tutorial/verification/out.online_2D_parallelmodel_3dlenvar_opt13 b/tutorial/verification/out.online_2D_parallelmodel_3dlenvar_opt13 index 0903bc2ab..2ded9da61 100644 --- a/tutorial/verification/out.online_2D_parallelmodel_3dlenvar_opt13 +++ b/tutorial/verification/out.online_2D_parallelmodel_3dlenvar_opt13 @@ -55,7 +55,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -127,7 +127,7 @@ PDAF Call pre-post routine after forecast; step 2 --- compute ensemble mean RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.013 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 2 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -164,13 +164,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.039 s +PDAF --- duration of En3D-Var update: 0.038 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.6883E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.013 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 2 Next observation at time step 4 PDAF Evolve state ensemble @@ -179,13 +179,13 @@ PDAF --- Distribute sub-ensembles step 4 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.010 s +PDAF --- duration of forecast phase: 0.009 s PDAF Call pre-post routine after forecast; step 4 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.6883E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.012 s +PDAF --- duration of prestep: 0.013 s PDAF Analysis ------------------------------------------------------- PDAF 4 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -222,7 +222,7 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.034 s +PDAF --- duration of En3D-Var update: 0.018 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -237,13 +237,13 @@ PDAF --- Distribute sub-ensembles step 6 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.028 s PDAF Call pre-post routine after forecast; step 6 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.6119E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.011 s +PDAF --- duration of prestep: 0.013 s PDAF Analysis ------------------------------------------------------- PDAF 6 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -280,13 +280,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.018 s +PDAF --- duration of En3D-Var update: 0.027 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5793E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.022 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 6 Next observation at time step 8 PDAF Evolve state ensemble @@ -295,13 +295,13 @@ PDAF --- Distribute sub-ensembles step 8 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.009 s +PDAF --- duration of forecast phase: 0.013 s PDAF Call pre-post routine after forecast; step 8 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5793E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.011 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 8 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -338,7 +338,7 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.018 s +PDAF --- duration of En3D-Var update: 0.030 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -353,13 +353,13 @@ PDAF --- Distribute sub-ensembles step 10 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.021 s +PDAF --- duration of forecast phase: 0.041 s PDAF Call pre-post routine after forecast; step 10 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5609E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.012 s +PDAF --- duration of prestep: 0.013 s PDAF Analysis ------------------------------------------------------- PDAF 10 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -396,7 +396,7 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.034 s +PDAF --- duration of En3D-Var update: 0.017 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -411,13 +411,13 @@ PDAF --- Distribute sub-ensembles step 12 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.010 s PDAF Call pre-post routine after forecast; step 12 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5473E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.014 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 12 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -454,13 +454,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.018 s +PDAF --- duration of En3D-Var update: 0.037 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5387E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.023 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 12 Next observation at time step 14 PDAF Evolve state ensemble @@ -469,7 +469,7 @@ PDAF --- Distribute sub-ensembles step 14 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.011 s PDAF Call pre-post routine after forecast; step 14 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -512,7 +512,7 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.018 s +PDAF --- duration of En3D-Var update: 0.027 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -527,13 +527,13 @@ PDAF --- Distribute sub-ensembles step 16 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.022 s +PDAF --- duration of forecast phase: 0.042 s PDAF Call pre-post routine after forecast; step 16 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5309E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.012 s +PDAF --- duration of prestep: 0.013 s PDAF Analysis ------------------------------------------------------- PDAF 16 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -570,13 +570,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.035 s +PDAF --- duration of En3D-Var update: 0.018 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5259E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.012 s +PDAF --- duration of poststep: 0.013 s PDAF Forecast ------------------------------------------------------- 16 Next observation at time step 18 PDAF Evolve state ensemble @@ -585,13 +585,13 @@ PDAF --- Distribute sub-ensembles step 18 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.025 s +PDAF --- duration of forecast phase: 0.019 s PDAF Call pre-post routine after forecast; step 18 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5259E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.013 s +PDAF --- duration of prestep: 0.014 s PDAF Analysis ------------------------------------------------------- PDAF 18 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -628,7 +628,7 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.035 s +PDAF --- duration of En3D-Var update: 0.020 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -649,26 +649,24 @@ PDAF analysis step: 0.051 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- PDAF Initialize PDAF: 0.022 s -PDAF init_ens_pdaf: 0.004 s -PDAF Ensemble forecast: 0.126 s -PDAF MPI communication in PDAF: 0.126 s +PDAF init_ens_pdaf: 0.003 s +PDAF Ensemble forecast: 0.191 s +PDAF MPI communication in PDAF: 0.191 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF En3DVAR analysis: 0.490 s -PDAF PDAF-internal operations: 0.064 s -PDAF OMI-internal routines: 0.169 s -PDAF Solver: 0.042 s -PDAF cvt_ens_pdaf: 0.021 s -PDAF cvt_ens_adj_pdaf: 0.036 s +PDAF En3DVAR analysis: 0.464 s +PDAF PDAF-internal operations: 0.212 s +PDAF OMI-internal routines: 0.000 s +PDAF Solver: 0.104 s +PDAF cvt_ens_pdaf: 0.122 s +PDAF cvt_ens_adj_pdaf: 0.156 s PDAF Timers in LESTKF only PDAF init_n_domains_pdaf: 0.000 s PDAF init_dim_l_pdaf: 0.000 s -PDAF g2l_state_pdaf: 0.000 s -PDAF l2g_state_pdaf: 0.000 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.115 s -PDAF obs_op_pdafomi: 0.144 s +PDAF init_dim_obs_pdafomi: 0.248 s +PDAF obs_op_pdafomi: 0.122 s PDAF obs_op_lin_pdafomi: 0.000 s PDAF obs_op_adj_pdafomi: 0.000 s -PDAF init_dim_obs_l_pdafomi: 0.010 s -PDAF prepoststep_pdaf: 0.239 s +PDAF init_dim_obs_l_pdafomi: 0.002 s +PDAF prepoststep_pdaf: 0.222 s diff --git a/tutorial/verification/out.online_2D_parallelmodel_3dlhybvar_opt12 b/tutorial/verification/out.online_2D_parallelmodel_3dlhybvar_opt12 index ecd5c8285..454684326 100644 --- a/tutorial/verification/out.online_2D_parallelmodel_3dlhybvar_opt12 +++ b/tutorial/verification/out.online_2D_parallelmodel_3dlhybvar_opt12 @@ -60,7 +60,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -109,7 +109,7 @@ PDAF: Call routine for ensemble initialization Initialize B^1/2 for 3D-Var PDAF: Initialization completed -PDAF --- duration of PDAF initialization: 0.029 s +PDAF --- duration of PDAF initialization: 0.025 s PDAF ---------------------------------------------------------------- @@ -129,13 +129,13 @@ PDAF --- Distribute sub-ensembles step 2 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.024 s +PDAF --- duration of forecast phase: 0.018 s PDAF Call pre-post routine after forecast; step 2 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.013 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 2 Assimilating observations - hybrid 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -184,7 +184,7 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.044 s +PDAF --- duration of hyb3D-Var update: 0.041 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -205,7 +205,7 @@ PDAF Call pre-post routine after forecast; step 4 --- compute ensemble mean RMS error according to sampled variance: 5.6883E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.011 s +PDAF --- duration of prestep: 0.013 s PDAF Analysis ------------------------------------------------------- PDAF 4 Assimilating observations - hybrid 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -227,7 +227,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 1.662D+01 6.847D-01 5.3D-02 1.4D-02 - 2 5 1.661D+01 5.031D-09 5.0D-02 -3.4D-15 + 2 5 1.661D+01 5.031D-09 5.0D-02 1.7D-15 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -254,7 +254,7 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.022 s +PDAF --- duration of hyb3D-Var update: 0.019 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -269,7 +269,7 @@ PDAF --- Distribute sub-ensembles step 6 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.020 s +PDAF --- duration of forecast phase: 0.076 s PDAF Call pre-post routine after forecast; step 6 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -297,7 +297,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 1.954D+01 4.499D-01 5.9D-02 2.1D-01 - 4 9 1.947D+01 4.970D-11 9.1D-01 2.1D-15 + 4 9 1.947D+01 4.916D-11 9.1D-01 1.5D-14 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -324,13 +324,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.022 s +PDAF --- duration of hyb3D-Var update: 0.017 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5793E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.013 s +PDAF --- duration of poststep: 0.011 s PDAF Forecast ------------------------------------------------------- 6 Next observation at time step 8 PDAF Evolve state ensemble @@ -339,13 +339,13 @@ PDAF --- Distribute sub-ensembles step 8 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.021 s +PDAF --- duration of forecast phase: 0.011 s PDAF Call pre-post routine after forecast; step 8 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5793E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.013 s +PDAF --- duration of prestep: 0.011 s PDAF Analysis ------------------------------------------------------- PDAF 8 Assimilating observations - hybrid 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -394,7 +394,7 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.036 s +PDAF --- duration of hyb3D-Var update: 0.018 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -409,13 +409,13 @@ PDAF --- Distribute sub-ensembles step 10 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.008 s +PDAF --- duration of forecast phase: 0.043 s PDAF Call pre-post routine after forecast; step 10 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5609E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.011 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 10 Assimilating observations - hybrid 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -437,7 +437,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 8.750D+00 1.548D+00 6.3D-02 2.2D-01 - 4 9 8.548D+00 1.281D-11 9.8D-01 8.9D-12 + 4 9 8.548D+00 1.282D-11 9.8D-01 8.2D-12 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -464,7 +464,7 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.019 s +PDAF --- duration of hyb3D-Var update: 0.017 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -479,13 +479,13 @@ PDAF --- Distribute sub-ensembles step 12 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.020 s +PDAF --- duration of forecast phase: 0.009 s PDAF Call pre-post routine after forecast; step 12 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5473E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.011 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 12 Assimilating observations - hybrid 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -507,7 +507,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 1.425D+01 7.126D-01 5.5D-02 8.9D-03 - 4 9 1.421D+01 6.549D-12 9.8D-01 -3.5D-13 + 4 9 1.421D+01 6.491D-12 9.8D-01 2.5D-13 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -534,13 +534,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.036 s +PDAF --- duration of hyb3D-Var update: 0.017 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5387E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.013 s +PDAF --- duration of poststep: 0.011 s PDAF Forecast ------------------------------------------------------- 12 Next observation at time step 14 PDAF Evolve state ensemble @@ -549,13 +549,13 @@ PDAF --- Distribute sub-ensembles step 14 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.043 s PDAF Call pre-post routine after forecast; step 14 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5387E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.020 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 14 Assimilating observations - hybrid 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -577,7 +577,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 1.327D+01 1.483D+00 1.3D-01 7.4D-02 - 4 9 1.317D+01 7.966D-12 9.7D-01 3.0D-13 + 4 9 1.317D+01 7.966D-12 9.7D-01 1.6D-12 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -604,7 +604,7 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.019 s +PDAF --- duration of hyb3D-Var update: 0.017 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -619,13 +619,13 @@ PDAF --- Distribute sub-ensembles step 16 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.021 s +PDAF --- duration of forecast phase: 0.030 s PDAF Call pre-post routine after forecast; step 16 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5309E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.010 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 16 Assimilating observations - hybrid 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -647,7 +647,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 1.804D+01 7.156D-01 5.8D-02 6.2D-02 - 4 9 1.792D+01 8.837D-12 9.7D-01 -2.0D-13 + 4 9 1.792D+01 8.866D-12 9.7D-01 1.6D-13 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -674,7 +674,7 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.018 s +PDAF --- duration of hyb3D-Var update: 0.017 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -689,13 +689,13 @@ PDAF --- Distribute sub-ensembles step 18 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.018 s +PDAF --- duration of forecast phase: 0.022 s PDAF Call pre-post routine after forecast; step 18 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5259E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.012 s +PDAF --- duration of prestep: 0.014 s PDAF Analysis ------------------------------------------------------- PDAF 18 Assimilating observations - hybrid 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -717,7 +717,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 2.234D+01 1.766D+00 6.2D-02 1.4D-01 - 4 9 2.205D+01 1.411D-11 9.8D-01 -3.1D-13 + 4 9 2.205D+01 1.413D-11 9.8D-01 2.8D-13 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -744,13 +744,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.022 s +PDAF --- duration of hyb3D-Var update: 0.004 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5208E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.010 s +PDAF --- duration of poststep: 0.011 s PDAF Forecast ------------------------------------------------------- 18 No more observations - end assimilation @@ -764,27 +764,25 @@ PDAF analysis step: 0.056 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.029 s +PDAF Initialize PDAF: 0.025 s PDAF init_ens_pdaf: 0.004 s -PDAF Ensemble forecast: 0.147 s -PDAF MPI communication in PDAF: 0.146 s +PDAF Ensemble forecast: 0.260 s +PDAF MPI communication in PDAF: 0.259 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF Hyb3DVAR analysis: 0.467 s -PDAF PDAF-internal operations: 0.083 s -PDAF OMI-internal routines: 0.479 s -PDAF Solver: 0.128 s -PDAF cvt_ens_pdaf: 0.056 s -PDAF cvt_ens_adj_pdaf: 0.051 s +PDAF Hyb3DVAR analysis: 0.334 s +PDAF PDAF-internal operations: 0.198 s +PDAF OMI-internal routines: 0.002 s +PDAF Solver: 0.137 s +PDAF cvt_ens_pdaf: 0.199 s +PDAF cvt_ens_adj_pdaf: 0.077 s PDAF Timers in LESTKF only PDAF init_n_domains_pdaf: 0.000 s PDAF init_dim_l_pdaf: 0.000 s -PDAF g2l_state_pdaf: 0.001 s -PDAF l2g_state_pdaf: 0.001 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.083 s -PDAF obs_op_pdafomi: 0.167 s +PDAF init_dim_obs_pdafomi: 0.299 s +PDAF obs_op_pdafomi: 0.102 s PDAF obs_op_lin_pdafomi: 0.000 s PDAF obs_op_adj_pdafomi: 0.000 s -PDAF init_dim_obs_l_pdafomi: 0.005 s -PDAF prepoststep_pdaf: 0.220 s +PDAF init_dim_obs_l_pdafomi: 0.003 s +PDAF prepoststep_pdaf: 0.214 s diff --git a/tutorial/verification/out.online_2D_parallelmodel_3dlhybvar_opt13 b/tutorial/verification/out.online_2D_parallelmodel_3dlhybvar_opt13 index 5281cc9c3..35dabf0d6 100644 --- a/tutorial/verification/out.online_2D_parallelmodel_3dlhybvar_opt13 +++ b/tutorial/verification/out.online_2D_parallelmodel_3dlhybvar_opt13 @@ -60,7 +60,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -109,7 +109,7 @@ PDAF: Call routine for ensemble initialization Initialize B^1/2 for 3D-Var PDAF: Initialization completed -PDAF --- duration of PDAF initialization: 0.023 s +PDAF --- duration of PDAF initialization: 0.022 s PDAF ---------------------------------------------------------------- @@ -129,7 +129,7 @@ PDAF --- Distribute sub-ensembles step 2 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.018 s +PDAF --- duration of forecast phase: 0.019 s PDAF Call pre-post routine after forecast; step 2 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -173,13 +173,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.046 s +PDAF --- duration of hyb3D-Var update: 0.039 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.6883E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.014 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 2 Next observation at time step 4 PDAF Evolve state ensemble @@ -188,7 +188,7 @@ PDAF --- Distribute sub-ensembles step 4 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.009 s PDAF Call pre-post routine after forecast; step 4 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -232,7 +232,7 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.037 s +PDAF --- duration of hyb3D-Var update: 0.018 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -247,13 +247,13 @@ PDAF --- Distribute sub-ensembles step 6 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.035 s PDAF Call pre-post routine after forecast; step 6 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.6119E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.017 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 6 Assimilating observations - hybrid 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -291,7 +291,7 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.035 s +PDAF --- duration of hyb3D-Var update: 0.018 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -306,13 +306,13 @@ PDAF --- Distribute sub-ensembles step 8 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.041 s PDAF Call pre-post routine after forecast; step 8 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5793E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.019 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 8 Assimilating observations - hybrid 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -350,13 +350,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.035 s +PDAF --- duration of hyb3D-Var update: 0.017 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5609E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.012 s +PDAF --- duration of poststep: 0.011 s PDAF Forecast ------------------------------------------------------- 8 Next observation at time step 10 PDAF Evolve state ensemble @@ -365,13 +365,13 @@ PDAF --- Distribute sub-ensembles step 10 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.010 s PDAF Call pre-post routine after forecast; step 10 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5609E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.014 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 10 Assimilating observations - hybrid 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -409,13 +409,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.034 s +PDAF --- duration of hyb3D-Var update: 0.018 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5473E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.013 s +PDAF --- duration of poststep: 0.011 s PDAF Forecast ------------------------------------------------------- 10 Next observation at time step 12 PDAF Evolve state ensemble @@ -424,13 +424,13 @@ PDAF --- Distribute sub-ensembles step 12 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.008 s +PDAF --- duration of forecast phase: 0.011 s PDAF Call pre-post routine after forecast; step 12 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5473E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.024 s +PDAF --- duration of prestep: 0.014 s PDAF Analysis ------------------------------------------------------- PDAF 12 Assimilating observations - hybrid 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -468,13 +468,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.036 s +PDAF --- duration of hyb3D-Var update: 0.017 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5387E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.013 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 12 Next observation at time step 14 PDAF Evolve state ensemble @@ -483,13 +483,13 @@ PDAF --- Distribute sub-ensembles step 14 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.042 s PDAF Call pre-post routine after forecast; step 14 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5387E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.014 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 14 Assimilating observations - hybrid 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -527,13 +527,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.036 s +PDAF --- duration of hyb3D-Var update: 0.017 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5309E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.013 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 14 Next observation at time step 16 PDAF Evolve state ensemble @@ -542,13 +542,13 @@ PDAF --- Distribute sub-ensembles step 16 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.009 s PDAF Call pre-post routine after forecast; step 16 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5309E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.018 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 16 Assimilating observations - hybrid 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -586,7 +586,7 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.033 s +PDAF --- duration of hyb3D-Var update: 0.017 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -601,13 +601,13 @@ PDAF --- Distribute sub-ensembles step 18 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.020 s +PDAF --- duration of forecast phase: 0.041 s PDAF Call pre-post routine after forecast; step 18 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5259E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.019 s +PDAF --- duration of prestep: 0.015 s PDAF Analysis ------------------------------------------------------- PDAF 18 Assimilating observations - hybrid 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -645,13 +645,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.018 s +PDAF --- duration of hyb3D-Var update: 0.017 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5208E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.012 s +PDAF --- duration of poststep: 0.011 s PDAF Forecast ------------------------------------------------------- 18 No more observations - end assimilation @@ -665,27 +665,25 @@ PDAF analysis step: 0.056 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.023 s -PDAF init_ens_pdaf: 0.004 s -PDAF Ensemble forecast: 0.088 s -PDAF MPI communication in PDAF: 0.088 s +PDAF Initialize PDAF: 0.022 s +PDAF init_ens_pdaf: 0.003 s +PDAF Ensemble forecast: 0.217 s +PDAF MPI communication in PDAF: 0.217 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF Hyb3DVAR analysis: 0.612 s -PDAF PDAF-internal operations: 0.054 s -PDAF OMI-internal routines: 0.248 s -PDAF Solver: 0.035 s -PDAF cvt_ens_pdaf: 0.038 s -PDAF cvt_ens_adj_pdaf: 0.042 s +PDAF Hyb3DVAR analysis: 0.356 s +PDAF PDAF-internal operations: 0.150 s +PDAF OMI-internal routines: 0.001 s +PDAF Solver: 0.082 s +PDAF cvt_ens_pdaf: 0.178 s +PDAF cvt_ens_adj_pdaf: 0.089 s PDAF Timers in LESTKF only PDAF init_n_domains_pdaf: 0.000 s -PDAF init_dim_l_pdaf: 0.000 s -PDAF g2l_state_pdaf: 0.000 s -PDAF l2g_state_pdaf: 0.002 s +PDAF init_dim_l_pdaf: 0.001 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.096 s -PDAF obs_op_pdafomi: 0.232 s +PDAF init_dim_obs_pdafomi: 0.255 s +PDAF obs_op_pdafomi: 0.112 s PDAF obs_op_lin_pdafomi: 0.000 s PDAF obs_op_adj_pdafomi: 0.000 s -PDAF init_dim_obs_l_pdafomi: 0.008 s -PDAF prepoststep_pdaf: 0.264 s +PDAF init_dim_obs_l_pdafomi: 0.004 s +PDAF prepoststep_pdaf: 0.220 s diff --git a/tutorial/verification/out.online_2D_parallelmodel_3dv_opt1 b/tutorial/verification/out.online_2D_parallelmodel_3dv_opt1 index a7b6735eb..313af086d 100644 --- a/tutorial/verification/out.online_2D_parallelmodel_3dv_opt1 +++ b/tutorial/verification/out.online_2D_parallelmodel_3dv_opt1 @@ -35,7 +35,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -103,7 +103,7 @@ PDAF Call pre-post routine after forecast; step 2 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.003 s +PDAF --- duration of prestep: 0.002 s PDAF Analysis ------------------------------------------------------- PDAF 2 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: LBFGS @@ -137,15 +137,15 @@ F = final function value CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH - Total User time 2.290E-04 seconds. + Total User time 1.890E-04 seconds. PDAF --- Exit optimization, status CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH -PDAF --- update duration: 0.001 s +PDAF --- update duration: 0.000 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.002 s +PDAF --- duration of poststep: 0.001 s PDAF Forecast ------------------------------------------------------- 2 Next observation at time step 4 PDAF Evolve state ensemble @@ -191,7 +191,7 @@ F = final function value CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH - Total User time 1.070E-04 seconds. + Total User time 8.600E-05 seconds. PDAF --- Exit optimization, status CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH PDAF --- update duration: 0.000 s @@ -199,7 +199,7 @@ PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.002 s +PDAF --- duration of poststep: 0.001 s PDAF Forecast ------------------------------------------------------- 4 Next observation at time step 6 PDAF Evolve state ensemble @@ -245,15 +245,15 @@ F = final function value CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL - Total User time 8.200E-05 seconds. + Total User time 1.090E-04 seconds. PDAF --- Exit optimization, status CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL -PDAF --- update duration: 0.001 s +PDAF --- update duration: 0.000 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.001 s +PDAF --- duration of poststep: 0.002 s PDAF Forecast ------------------------------------------------------- 6 Next observation at time step 8 PDAF Evolve state ensemble @@ -265,7 +265,7 @@ PDAF Call pre-post routine after forecast; step 8 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.002 s +PDAF --- duration of prestep: 0.001 s PDAF Analysis ------------------------------------------------------- PDAF 8 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: LBFGS @@ -299,15 +299,15 @@ F = final function value CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL - Total User time 6.100E-05 seconds. + Total User time 6.900E-05 seconds. PDAF --- Exit optimization, status CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL -PDAF --- update duration: 0.000 s +PDAF --- update duration: 0.001 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.003 s +PDAF --- duration of poststep: 0.001 s PDAF Forecast ------------------------------------------------------- 8 Next observation at time step 10 PDAF Evolve state ensemble @@ -319,7 +319,7 @@ PDAF Call pre-post routine after forecast; step 10 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.003 s +PDAF --- duration of prestep: 0.001 s PDAF Analysis ------------------------------------------------------- PDAF 10 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: LBFGS @@ -353,7 +353,7 @@ F = final function value CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL - Total User time 1.200E-04 seconds. + Total User time 6.600E-05 seconds. PDAF --- Exit optimization, status CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL PDAF --- update duration: 0.001 s @@ -361,7 +361,7 @@ PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.002 s +PDAF --- duration of poststep: 0.001 s PDAF Forecast ------------------------------------------------------- 10 Next observation at time step 12 PDAF Evolve state ensemble @@ -373,7 +373,7 @@ PDAF Call pre-post routine after forecast; step 12 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.003 s +PDAF --- duration of prestep: 0.002 s PDAF Analysis ------------------------------------------------------- PDAF 12 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: LBFGS @@ -407,7 +407,7 @@ F = final function value CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL - Total User time 1.120E-04 seconds. + Total User time 1.050E-04 seconds. PDAF --- Exit optimization, status CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL PDAF --- update duration: 0.001 s @@ -415,7 +415,7 @@ PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.003 s +PDAF --- duration of poststep: 0.001 s PDAF Forecast ------------------------------------------------------- 12 Next observation at time step 14 PDAF Evolve state ensemble @@ -427,7 +427,7 @@ PDAF Call pre-post routine after forecast; step 14 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.002 s +PDAF --- duration of prestep: 0.003 s PDAF Analysis ------------------------------------------------------- PDAF 14 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: LBFGS @@ -461,7 +461,7 @@ F = final function value CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL - Total User time 9.999E-05 seconds. + Total User time 1.520E-04 seconds. PDAF --- Exit optimization, status CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL PDAF --- update duration: 0.000 s @@ -469,7 +469,7 @@ PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.002 s +PDAF --- duration of poststep: 0.003 s PDAF Forecast ------------------------------------------------------- 14 Next observation at time step 16 PDAF Evolve state ensemble @@ -481,7 +481,7 @@ PDAF Call pre-post routine after forecast; step 16 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.002 s +PDAF --- duration of prestep: 0.003 s PDAF Analysis ------------------------------------------------------- PDAF 16 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: LBFGS @@ -515,7 +515,7 @@ F = final function value CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL - Total User time 7.300E-05 seconds. + Total User time 1.140E-04 seconds. PDAF --- Exit optimization, status CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL PDAF --- update duration: 0.000 s @@ -523,7 +523,7 @@ PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.001 s +PDAF --- duration of poststep: 0.003 s PDAF Forecast ------------------------------------------------------- 16 Next observation at time step 18 PDAF Evolve state ensemble @@ -535,7 +535,7 @@ PDAF Call pre-post routine after forecast; step 18 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.002 s +PDAF --- duration of prestep: 0.003 s PDAF Analysis ------------------------------------------------------- PDAF 18 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: LBFGS @@ -569,7 +569,7 @@ F = final function value CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL - Total User time 7.300E-05 seconds. + Total User time 1.120E-04 seconds. PDAF --- Exit optimization, status CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL PDAF --- update duration: 0.000 s @@ -577,7 +577,7 @@ PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.002 s +PDAF --- duration of poststep: 0.003 s PDAF Forecast ------------------------------------------------------- 18 No more observations - end assimilation @@ -597,15 +597,15 @@ PDAF State forecast: 0.000 s PDAF MPI communication in PDAF: 0.000 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF 3DVAR analysis: 0.004 s -PDAF PDAF-internal operations: 0.001 s -PDAF OMI-internal routines: 0.002 s -PDAF Solver: 0.000 s +PDAF 3DVAR analysis: 0.003 s +PDAF PDAF-internal operations: 0.000 s +PDAF OMI-internal routines: 0.000 s +PDAF Solver: 0.001 s PDAF cvt_pdaf: 0.000 s PDAF cvt_adj_pdaf: 0.000 s PDAF Time in OMI observation module routines PDAF init_dim_obs_pdafomi: 0.002 s PDAF obs_op_pdafomi: 0.000 s PDAF obs_op_lin_pdafomi: 0.000 s -PDAF obs_op_adj_pdafomi: 0.001 s -PDAF prepoststep_pdaf: 0.039 s +PDAF obs_op_adj_pdafomi: 0.000 s +PDAF prepoststep_pdaf: 0.035 s diff --git a/tutorial/verification/out.online_2D_parallelmodel_3dv_opt12 b/tutorial/verification/out.online_2D_parallelmodel_3dv_opt12 index 149b4c567..0f84ab320 100644 --- a/tutorial/verification/out.online_2D_parallelmodel_3dv_opt12 +++ b/tutorial/verification/out.online_2D_parallelmodel_3dv_opt12 @@ -40,7 +40,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -86,7 +86,7 @@ PDAF: Call routine for ensemble initialization Initialize B^1/2 PDAF: Initialization completed -PDAF --- duration of PDAF initialization: 0.003 s +PDAF --- duration of PDAF initialization: 0.002 s PDAF ---------------------------------------------------------------- @@ -96,7 +96,7 @@ PDAF Call pre-post routine at initial time Analyze initial state for 3D-Var Initialize B^1/2 RMS error according to sampled variance: 5.7637E-01 -PDAF --- duration of prestep: 0.002 s +PDAF --- duration of prestep: 0.001 s PDAF Forecast ------------------------------------------------------- 0 Next observation at time step 2 PDAF Evolve state ensemble @@ -133,7 +133,7 @@ INITIAL VALUES: SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 -PDAF --- update duration: 0.029 s +PDAF --- update duration: 0.019 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 @@ -174,12 +174,12 @@ INITIAL VALUES: SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 -PDAF --- update duration: 0.026 s +PDAF --- update duration: 0.019 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.003 s +PDAF --- duration of poststep: 0.002 s PDAF Forecast ------------------------------------------------------- 4 Next observation at time step 6 PDAF Evolve state ensemble @@ -191,7 +191,7 @@ PDAF Call pre-post routine after forecast; step 6 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.003 s +PDAF --- duration of prestep: 0.001 s PDAF Analysis ------------------------------------------------------- PDAF 6 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: CG+ parallelized @@ -215,12 +215,12 @@ INITIAL VALUES: SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 -PDAF --- update duration: 0.027 s +PDAF --- update duration: 0.019 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.003 s +PDAF --- duration of poststep: 0.002 s PDAF Forecast ------------------------------------------------------- 6 Next observation at time step 8 PDAF Evolve state ensemble @@ -256,12 +256,12 @@ INITIAL VALUES: SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 -PDAF --- update duration: 0.011 s +PDAF --- update duration: 0.009 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.001 s +PDAF --- duration of poststep: 0.002 s PDAF Forecast ------------------------------------------------------- 8 Next observation at time step 10 PDAF Evolve state ensemble @@ -273,7 +273,7 @@ PDAF Call pre-post routine after forecast; step 10 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.001 s +PDAF --- duration of prestep: 0.002 s PDAF Analysis ------------------------------------------------------- PDAF 10 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: CG+ parallelized @@ -297,12 +297,12 @@ INITIAL VALUES: SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 -PDAF --- update duration: 0.014 s +PDAF --- update duration: 0.012 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.003 s +PDAF --- duration of poststep: 0.002 s PDAF Forecast ------------------------------------------------------- 10 Next observation at time step 12 PDAF Evolve state ensemble @@ -338,12 +338,12 @@ INITIAL VALUES: SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 -PDAF --- update duration: 0.010 s +PDAF --- update duration: 0.015 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.001 s +PDAF --- duration of poststep: 0.003 s PDAF Forecast ------------------------------------------------------- 12 Next observation at time step 14 PDAF Evolve state ensemble @@ -355,7 +355,7 @@ PDAF Call pre-post routine after forecast; step 14 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.001 s +PDAF --- duration of prestep: 0.003 s PDAF Analysis ------------------------------------------------------- PDAF 14 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: CG+ parallelized @@ -379,12 +379,12 @@ INITIAL VALUES: SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 -PDAF --- update duration: 0.009 s +PDAF --- update duration: 0.015 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.002 s +PDAF --- duration of poststep: 0.003 s PDAF Forecast ------------------------------------------------------- 14 Next observation at time step 16 PDAF Evolve state ensemble @@ -396,7 +396,7 @@ PDAF Call pre-post routine after forecast; step 16 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.002 s +PDAF --- duration of prestep: 0.003 s PDAF Analysis ------------------------------------------------------- PDAF 16 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: CG+ parallelized @@ -420,12 +420,12 @@ INITIAL VALUES: SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 -PDAF --- update duration: 0.010 s +PDAF --- update duration: 0.014 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.003 s +PDAF --- duration of poststep: 0.004 s PDAF Forecast ------------------------------------------------------- 16 Next observation at time step 18 PDAF Evolve state ensemble @@ -461,12 +461,12 @@ INITIAL VALUES: SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 -PDAF --- update duration: 0.013 s +PDAF --- update duration: 0.015 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.002 s +PDAF --- duration of poststep: 0.003 s PDAF Forecast ------------------------------------------------------- 18 No more observations - end assimilation @@ -480,21 +480,21 @@ PDAF analysis step: 0.011 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.003 s -PDAF init_ens_pdaf: 0.003 s +PDAF Initialize PDAF: 0.002 s +PDAF init_ens_pdaf: 0.002 s PDAF State forecast: 0.000 s PDAF MPI communication in PDAF: 0.000 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF 3DVAR analysis: 0.149 s -PDAF PDAF-internal operations: 0.035 s -PDAF OMI-internal routines: 0.135 s -PDAF Solver: 0.045 s -PDAF cvt_pdaf: 0.017 s -PDAF cvt_adj_pdaf: 0.026 s +PDAF 3DVAR analysis: 0.137 s +PDAF PDAF-internal operations: 0.036 s +PDAF OMI-internal routines: 0.000 s +PDAF Solver: 0.047 s +PDAF cvt_pdaf: 0.014 s +PDAF cvt_adj_pdaf: 0.022 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.014 s +PDAF init_dim_obs_pdafomi: 0.011 s PDAF obs_op_pdafomi: 0.000 s PDAF obs_op_lin_pdafomi: 0.000 s PDAF obs_op_adj_pdafomi: 0.000 s -PDAF prepoststep_pdaf: 0.038 s +PDAF prepoststep_pdaf: 0.042 s diff --git a/tutorial/verification/out.online_2D_parallelmodel_3dv_opt13 b/tutorial/verification/out.online_2D_parallelmodel_3dv_opt13 index 594aac2e4..c9543b5a7 100644 --- a/tutorial/verification/out.online_2D_parallelmodel_3dv_opt13 +++ b/tutorial/verification/out.online_2D_parallelmodel_3dv_opt13 @@ -40,7 +40,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -96,7 +96,7 @@ PDAF Call pre-post routine at initial time Analyze initial state for 3D-Var Initialize B^1/2 RMS error according to sampled variance: 5.7637E-01 -PDAF --- duration of prestep: 0.002 s +PDAF --- duration of prestep: 0.001 s PDAF Forecast ------------------------------------------------------- 0 Next observation at time step 2 PDAF Evolve state ensemble @@ -109,7 +109,7 @@ PDAF Call pre-post routine after forecast; step 2 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.004 s +PDAF --- duration of prestep: 0.002 s PDAF Analysis ------------------------------------------------------- PDAF 2 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: plain CG parallelized @@ -122,7 +122,7 @@ PDAF --- CG solver converged PDAF iter eps F PDAF 4 0.000E+00 1.878E+01 -PDAF --- update duration: 0.020 s +PDAF --- update duration: 0.016 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 @@ -182,12 +182,12 @@ PDAF --- CG solver converged PDAF iter eps F PDAF 4 0.000E+00 1.947E+01 -PDAF --- update duration: 0.022 s +PDAF --- update duration: 0.015 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.004 s +PDAF --- duration of poststep: 0.003 s PDAF Forecast ------------------------------------------------------- 6 Next observation at time step 8 PDAF Evolve state ensemble @@ -199,7 +199,7 @@ PDAF Call pre-post routine after forecast; step 8 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.002 s +PDAF --- duration of prestep: 0.001 s PDAF Analysis ------------------------------------------------------- PDAF 8 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: plain CG parallelized @@ -212,7 +212,7 @@ PDAF --- CG solver converged PDAF iter eps F PDAF 4 1.776E-15 9.365E+00 -PDAF --- update duration: 0.009 s +PDAF --- update duration: 0.008 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 @@ -242,7 +242,7 @@ PDAF --- CG solver converged PDAF iter eps F PDAF 4 0.000E+00 8.214E+00 -PDAF --- update duration: 0.008 s +PDAF --- update duration: 0.009 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 @@ -277,7 +277,7 @@ PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.002 s +PDAF --- duration of poststep: 0.003 s PDAF Forecast ------------------------------------------------------- 12 Next observation at time step 14 PDAF Evolve state ensemble @@ -289,7 +289,7 @@ PDAF Call pre-post routine after forecast; step 14 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.001 s +PDAF --- duration of prestep: 0.003 s PDAF Analysis ------------------------------------------------------- PDAF 14 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: plain CG parallelized @@ -302,12 +302,12 @@ PDAF --- CG solver converged PDAF iter eps F PDAF 4 3.553E-15 1.311E+01 -PDAF --- update duration: 0.010 s +PDAF --- update duration: 0.013 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.001 s +PDAF --- duration of poststep: 0.003 s PDAF Forecast ------------------------------------------------------- 14 Next observation at time step 16 PDAF Evolve state ensemble @@ -319,7 +319,7 @@ PDAF Call pre-post routine after forecast; step 16 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.002 s +PDAF --- duration of prestep: 0.003 s PDAF Analysis ------------------------------------------------------- PDAF 16 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: plain CG parallelized @@ -332,12 +332,12 @@ PDAF --- CG solver converged PDAF iter eps F PDAF 4 0.000E+00 1.739E+01 -PDAF --- update duration: 0.008 s +PDAF --- update duration: 0.013 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.002 s +PDAF --- duration of poststep: 0.004 s PDAF Forecast ------------------------------------------------------- 16 Next observation at time step 18 PDAF Evolve state ensemble @@ -362,7 +362,7 @@ PDAF --- CG solver converged PDAF iter eps F PDAF 4 3.553E-15 2.234E+01 -PDAF --- update duration: 0.011 s +PDAF --- update duration: 0.014 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 @@ -388,14 +388,14 @@ PDAF MPI communication in PDAF: 0.000 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s PDAF 3DVAR analysis: 0.116 s -PDAF PDAF-internal operations: 0.029 s -PDAF OMI-internal routines: 0.104 s -PDAF Solver: 0.023 s -PDAF cvt_pdaf: 0.026 s -PDAF cvt_adj_pdaf: 0.024 s +PDAF PDAF-internal operations: 0.030 s +PDAF OMI-internal routines: 0.000 s +PDAF Solver: 0.024 s +PDAF cvt_pdaf: 0.022 s +PDAF cvt_adj_pdaf: 0.025 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.012 s +PDAF init_dim_obs_pdafomi: 0.013 s PDAF obs_op_pdafomi: 0.000 s PDAF obs_op_lin_pdafomi: 0.000 s PDAF obs_op_adj_pdafomi: 0.000 s -PDAF prepoststep_pdaf: 0.045 s +PDAF prepoststep_pdaf: 0.048 s diff --git a/tutorial/verification/out.online_2D_parallelmodel_ESTKF b/tutorial/verification/out.online_2D_parallelmodel_ESTKF index 82d82fe20..9584d7d4c 100644 --- a/tutorial/verification/out.online_2D_parallelmodel_ESTKF +++ b/tutorial/verification/out.online_2D_parallelmodel_ESTKF @@ -53,7 +53,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -374,16 +374,16 @@ PDAF analysis step: 0.044 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.040 s -PDAF init_ens_pdaf: 0.003 s -PDAF Ensemble forecast: 0.084 s -PDAF MPI communication in PDAF: 0.083 s +PDAF Initialize PDAF: 0.025 s +PDAF init_ens_pdaf: 0.004 s +PDAF Ensemble forecast: 0.146 s +PDAF MPI communication in PDAF: 0.146 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF ESTKF analysis: 0.096 s -PDAF PDAF-internal operations: 0.011 s -PDAF OMI-internal routines: 0.015 s +PDAF ESTKF analysis: 0.194 s +PDAF PDAF-internal operations: 0.080 s +PDAF OMI-internal routines: 0.000 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.085 s +PDAF init_dim_obs_pdafomi: 0.114 s PDAF obs_op_pdafomi: 0.000 s -PDAF prepoststep_pdaf: 0.288 s +PDAF prepoststep_pdaf: 0.261 s diff --git a/tutorial/verification/out.online_2D_parallelmodel_fullpar b/tutorial/verification/out.online_2D_parallelmodel_fullpar index 6152af6a8..8f9749cae 100644 --- a/tutorial/verification/out.online_2D_parallelmodel_fullpar +++ b/tutorial/verification/out.online_2D_parallelmodel_fullpar @@ -17,8 +17,8 @@ 8 4 0 1 4 M 14 7 0 1 7 M 13 6 1 2 6 M - 12 6 0 1 6 M 19 9 1 2 9 M + 12 6 0 1 6 M 18 9 0 1 9 M 17 8 1 2 8 M 3 1 1 2 1 M @@ -55,7 +55,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -511,21 +511,19 @@ PDAF analysis step: 0.039 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.056 s +PDAF Initialize PDAF: 0.027 s PDAF init_ens_pdaf: 0.004 s -PDAF Ensemble forecast: 0.210 s -PDAF MPI communication in PDAF: 0.210 s +PDAF Ensemble forecast: 0.169 s +PDAF MPI communication in PDAF: 0.169 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF LESTKF analysis: 0.333 s -PDAF PDAF-internal operations: 0.052 s -PDAF OMI-internal routines: 0.047 s +PDAF LESTKF analysis: 0.802 s +PDAF PDAF-internal operations: 0.030 s +PDAF OMI-internal routines: 0.000 s PDAF init_n_domains_pdaf: 0.000 s PDAF init_dim_l_pdaf: 0.001 s -PDAF g2l_state_pdaf: 0.000 s -PDAF l2g_state_pdaf: 0.000 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.079 s -PDAF obs_op_pdafomi: 0.238 s -PDAF init_dim_obs_l_pdafomi: 0.008 s -PDAF prepoststep_pdaf: 0.293 s +PDAF init_dim_obs_pdafomi: 0.279 s +PDAF obs_op_pdafomi: 0.488 s +PDAF init_dim_obs_l_pdafomi: 0.004 s +PDAF prepoststep_pdaf: 0.234 s diff --git a/tutorial/verification/out.online_2D_parallelmodel_fullpar_1fpe b/tutorial/verification/out.online_2D_parallelmodel_fullpar_1fpe index 79b32af13..5213257c5 100644 --- a/tutorial/verification/out.online_2D_parallelmodel_fullpar_1fpe +++ b/tutorial/verification/out.online_2D_parallelmodel_fullpar_1fpe @@ -6,15 +6,15 @@ world filter model couple model/filter rank rank task rank task rank M/F ---------------------------------------------------------- - 11 6 0 1 6 M 7 4 0 1 4 M - 3 2 0 1 2 M + 11 6 0 1 6 M 6 3 1 M 10 5 1 M - 15 8 0 1 8 M - 9 5 0 1 5 M 5 3 0 1 3 M + 9 5 0 1 5 M 12 6 1 M + 3 2 0 1 2 M + 15 8 0 1 8 M 8 4 1 M 4 2 1 M 14 7 1 M @@ -54,7 +54,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -510,21 +510,19 @@ PDAF analysis step: 0.020 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.030 s -PDAF init_ens_pdaf: 0.004 s -PDAF Ensemble forecast: 0.201 s -PDAF MPI communication in PDAF: 0.201 s +PDAF Initialize PDAF: 0.015 s +PDAF init_ens_pdaf: 0.003 s +PDAF Ensemble forecast: 0.306 s +PDAF MPI communication in PDAF: 0.306 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF LESTKF analysis: 0.032 s -PDAF PDAF-internal operations: 0.010 s -PDAF OMI-internal routines: 0.019 s +PDAF LESTKF analysis: 0.025 s +PDAF PDAF-internal operations: 0.008 s +PDAF OMI-internal routines: 0.001 s PDAF init_n_domains_pdaf: 0.000 s PDAF init_dim_l_pdaf: 0.001 s -PDAF g2l_state_pdaf: 0.001 s -PDAF l2g_state_pdaf: 0.001 s PDAF Time in OMI observation module routines PDAF init_dim_obs_pdafomi: 0.005 s PDAF obs_op_pdafomi: 0.000 s -PDAF init_dim_obs_l_pdafomi: 0.013 s -PDAF prepoststep_pdaf: 0.280 s +PDAF init_dim_obs_l_pdafomi: 0.007 s +PDAF prepoststep_pdaf: 0.288 s diff --git a/tutorial/verification/out.online_2D_serial_3dv_opt1 b/tutorial/verification/out.online_2D_serial_3dv_opt1 index c02908adb..cd3eb490d 100644 --- a/tutorial/verification/out.online_2D_serial_3dv_opt1 +++ b/tutorial/verification/out.online_2D_serial_3dv_opt1 @@ -32,7 +32,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -100,7 +100,7 @@ PDAF Call pre-post routine after forecast; step 2 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.002 s +PDAF --- duration of prestep: 0.001 s PDAF Analysis ------------------------------------------------------- PDAF 2 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: LBFGS @@ -135,7 +135,7 @@ F = final function value CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH - Total User time 2.200E-04 seconds. + Total User time 1.950E-04 seconds. PDAF --- Exit optimization, status CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH PDAF --- update duration: 0.001 s @@ -143,7 +143,7 @@ PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.002 s +PDAF --- duration of poststep: 0.001 s PDAF Forecast ------------------------------------------------------- 2 Next observation at time step 4 PDAF Evolve state ensemble @@ -190,7 +190,7 @@ F = final function value CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH - Total User time 1.270E-04 seconds. + Total User time 9.800E-05 seconds. PDAF --- Exit optimization, status CONVERGENCE: REL_REDUCTION_OF_F_<=_FACTR*EPSMCH PDAF --- update duration: 0.000 s @@ -245,15 +245,15 @@ F = final function value CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL - Total User time 6.900E-05 seconds. + Total User time 7.900E-05 seconds. PDAF --- Exit optimization, status CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL -PDAF --- update duration: 0.000 s +PDAF --- update duration: 0.001 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.002 s +PDAF --- duration of poststep: 0.001 s PDAF Forecast ------------------------------------------------------- 6 Next observation at time step 8 PDAF Evolve state ensemble @@ -300,10 +300,10 @@ F = final function value CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL - Total User time 9.000E-05 seconds. + Total User time 8.200E-05 seconds. PDAF --- Exit optimization, status CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL -PDAF --- update duration: 0.000 s +PDAF --- update duration: 0.001 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 @@ -320,7 +320,7 @@ PDAF Call pre-post routine after forecast; step 10 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.002 s +PDAF --- duration of prestep: 0.001 s PDAF Analysis ------------------------------------------------------- PDAF 10 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: LBFGS @@ -355,10 +355,10 @@ F = final function value CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL - Total User time 8.400E-05 seconds. + Total User time 7.799E-05 seconds. PDAF --- Exit optimization, status CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL -PDAF --- update duration: 0.000 s +PDAF --- update duration: 0.001 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 @@ -375,7 +375,7 @@ PDAF Call pre-post routine after forecast; step 12 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.001 s +PDAF --- duration of prestep: 0.002 s PDAF Analysis ------------------------------------------------------- PDAF 12 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: LBFGS @@ -410,15 +410,15 @@ F = final function value CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL - Total User time 6.100E-05 seconds. + Total User time 8.300E-05 seconds. PDAF --- Exit optimization, status CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL -PDAF --- update duration: 0.001 s +PDAF --- update duration: 0.000 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.001 s +PDAF --- duration of poststep: 0.002 s PDAF Forecast ------------------------------------------------------- 12 Next observation at time step 14 PDAF Evolve state ensemble @@ -465,7 +465,7 @@ F = final function value CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL - Total User time 9.300E-05 seconds. + Total User time 1.030E-04 seconds. PDAF --- Exit optimization, status CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL PDAF --- update duration: 0.001 s @@ -485,7 +485,7 @@ PDAF Call pre-post routine after forecast; step 16 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.002 s +PDAF --- duration of prestep: 0.001 s PDAF Analysis ------------------------------------------------------- PDAF 16 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: LBFGS @@ -520,15 +520,15 @@ F = final function value CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL - Total User time 7.300E-05 seconds. + Total User time 8.200E-05 seconds. PDAF --- Exit optimization, status CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL -PDAF --- update duration: 0.000 s +PDAF --- update duration: 0.001 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.003 s +PDAF --- duration of poststep: 0.001 s PDAF Forecast ------------------------------------------------------- 16 Next observation at time step 18 PDAF Evolve state ensemble @@ -540,7 +540,7 @@ PDAF Call pre-post routine after forecast; step 18 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.003 s +PDAF --- duration of prestep: 0.002 s PDAF Analysis ------------------------------------------------------- PDAF 18 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: LBFGS @@ -575,7 +575,7 @@ F = final function value CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL - Total User time 1.380E-04 seconds. + Total User time 7.600E-05 seconds. PDAF --- Exit optimization, status CONVERGENCE: NORM_OF_PROJECTED_GRADIENT_<=_PGTOL PDAF --- update duration: 0.001 s @@ -583,7 +583,7 @@ PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.002 s +PDAF --- duration of poststep: 0.001 s PDAF Forecast ------------------------------------------------------- 18 No more observations - end assimilation @@ -598,20 +598,20 @@ PDAF analysis step: 0.015 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- PDAF Initialize PDAF: 0.003 s -PDAF init_ens_pdaf: 0.003 s +PDAF init_ens_pdaf: 0.002 s PDAF State forecast: 0.000 s PDAF MPI communication in PDAF: 0.000 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF 3DVAR analysis: 0.004 s -PDAF PDAF-internal operations: 0.000 s -PDAF OMI-internal routines: 0.001 s -PDAF Solver: 0.000 s +PDAF 3DVAR analysis: 0.007 s +PDAF PDAF-internal operations: 0.001 s +PDAF OMI-internal routines: 0.000 s +PDAF Solver: 0.001 s PDAF cvt_pdaf: 0.000 s PDAF cvt_adj_pdaf: 0.000 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.003 s +PDAF init_dim_obs_pdafomi: 0.005 s PDAF obs_op_pdafomi: 0.000 s PDAF obs_op_lin_pdafomi: 0.000 s PDAF obs_op_adj_pdafomi: 0.000 s -PDAF prepoststep_pdaf: 0.031 s +PDAF prepoststep_pdaf: 0.024 s diff --git a/tutorial/verification/out.online_2D_serial_3dv_opt2 b/tutorial/verification/out.online_2D_serial_3dv_opt2 index a8414bea5..866d6cb7b 100644 --- a/tutorial/verification/out.online_2D_serial_3dv_opt2 +++ b/tutorial/verification/out.online_2D_serial_3dv_opt2 @@ -32,7 +32,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -78,7 +78,7 @@ PDAF: Call routine for ensemble initialization Initialize B^1/2 PDAF: Initialization completed -PDAF --- duration of PDAF initialization: 0.005 s +PDAF --- duration of PDAF initialization: 0.002 s PDAF ---------------------------------------------------------------- @@ -100,7 +100,7 @@ PDAF Call pre-post routine after forecast; step 2 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.004 s +PDAF --- duration of prestep: 0.002 s PDAF Analysis ------------------------------------------------------- PDAF 2 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: CG+ @@ -125,7 +125,7 @@ INITIAL VALUES: SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 -PDAF --- update duration: 0.001 s +PDAF --- update duration: 0.000 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 @@ -167,7 +167,7 @@ INITIAL VALUES: SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 -PDAF --- update duration: 0.001 s +PDAF --- update duration: 0.000 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 @@ -184,7 +184,7 @@ PDAF Call pre-post routine after forecast; step 6 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.002 s +PDAF --- duration of prestep: 0.001 s PDAF Analysis ------------------------------------------------------- PDAF 6 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: CG+ @@ -214,7 +214,7 @@ PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.002 s +PDAF --- duration of poststep: 0.001 s PDAF Forecast ------------------------------------------------------- 6 Next observation at time step 8 PDAF Evolve state ensemble @@ -226,7 +226,7 @@ PDAF Call pre-post routine after forecast; step 8 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.003 s +PDAF --- duration of prestep: 0.002 s PDAF Analysis ------------------------------------------------------- PDAF 8 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: CG+ @@ -251,12 +251,12 @@ INITIAL VALUES: SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 -PDAF --- update duration: 0.001 s +PDAF --- update duration: 0.000 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.003 s +PDAF --- duration of poststep: 0.001 s PDAF Forecast ------------------------------------------------------- 8 Next observation at time step 10 PDAF Evolve state ensemble @@ -268,7 +268,7 @@ PDAF Call pre-post routine after forecast; step 10 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.003 s +PDAF --- duration of prestep: 0.002 s PDAF Analysis ------------------------------------------------------- PDAF 10 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: CG+ @@ -293,12 +293,12 @@ INITIAL VALUES: SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 -PDAF --- update duration: 0.001 s +PDAF --- update duration: 0.000 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.002 s +PDAF --- duration of poststep: 0.001 s PDAF Forecast ------------------------------------------------------- 10 Next observation at time step 12 PDAF Evolve state ensemble @@ -310,7 +310,7 @@ PDAF Call pre-post routine after forecast; step 12 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.003 s +PDAF --- duration of prestep: 0.002 s PDAF Analysis ------------------------------------------------------- PDAF 12 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: CG+ @@ -335,7 +335,7 @@ INITIAL VALUES: SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 -PDAF --- update duration: 0.000 s +PDAF --- update duration: 0.001 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 @@ -352,7 +352,7 @@ PDAF Call pre-post routine after forecast; step 14 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.001 s +PDAF --- duration of prestep: 0.002 s PDAF Analysis ------------------------------------------------------- PDAF 14 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: CG+ @@ -373,7 +373,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 1.331D+01 3.334D+00 1.3D-01 4.2D-01 - 2 5 1.311D+01 1.167D-08 3.5D-02 7.8D-16 + 2 5 1.311D+01 1.167D-08 3.5D-02 -6.4D-16 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -382,7 +382,7 @@ PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.001 s +PDAF --- duration of poststep: 0.002 s PDAF Forecast ------------------------------------------------------- 14 Next observation at time step 16 PDAF Evolve state ensemble @@ -394,7 +394,7 @@ PDAF Call pre-post routine after forecast; step 16 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.002 s +PDAF --- duration of prestep: 0.003 s PDAF Analysis ------------------------------------------------------- PDAF 16 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: CG+ @@ -415,16 +415,16 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 1.746D+01 1.029D+00 3.4D-02 7.8D-02 - 2 5 1.739D+01 1.646D-08 1.4D-01 -4.2D-15 + 2 5 1.739D+01 1.646D-08 1.4D-01 5.8D-15 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 -PDAF --- update duration: 0.001 s +PDAF --- update duration: 0.000 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.001 s +PDAF --- duration of poststep: 0.002 s PDAF Forecast ------------------------------------------------------- 16 Next observation at time step 18 PDAF Evolve state ensemble @@ -436,7 +436,7 @@ PDAF Call pre-post routine after forecast; step 18 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.002 s +PDAF --- duration of prestep: 0.003 s PDAF Analysis ------------------------------------------------------- PDAF 18 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: CG+ @@ -457,7 +457,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 2.272D+01 2.596D+00 4.1D-02 2.4D-01 - 2 5 2.234D+01 2.600D-08 1.1D-01 -1.7D-16 + 2 5 2.234D+01 2.600D-08 1.1D-01 -1.2D-15 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -466,7 +466,7 @@ PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.001 s +PDAF --- duration of poststep: 0.003 s PDAF Forecast ------------------------------------------------------- 18 No more observations - end assimilation @@ -480,21 +480,21 @@ PDAF analysis step: 0.011 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.005 s -PDAF init_ens_pdaf: 0.005 s +PDAF Initialize PDAF: 0.002 s +PDAF init_ens_pdaf: 0.002 s PDAF State forecast: 0.000 s PDAF MPI communication in PDAF: 0.000 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF 3DVAR analysis: 0.007 s -PDAF PDAF-internal operations: 0.000 s -PDAF OMI-internal routines: 0.002 s -PDAF Solver: 0.001 s +PDAF 3DVAR analysis: 0.003 s +PDAF PDAF-internal operations: 0.001 s +PDAF OMI-internal routines: 0.000 s +PDAF Solver: 0.000 s PDAF cvt_pdaf: 0.000 s PDAF cvt_adj_pdaf: 0.001 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.004 s +PDAF init_dim_obs_pdafomi: 0.001 s PDAF obs_op_pdafomi: 0.000 s PDAF obs_op_lin_pdafomi: 0.000 s PDAF obs_op_adj_pdafomi: 0.000 s -PDAF prepoststep_pdaf: 0.038 s +PDAF prepoststep_pdaf: 0.035 s diff --git a/tutorial/verification/out.online_2D_serial_3dv_opt3 b/tutorial/verification/out.online_2D_serial_3dv_opt3 index 8df911fd8..4b8a80509 100644 --- a/tutorial/verification/out.online_2D_serial_3dv_opt3 +++ b/tutorial/verification/out.online_2D_serial_3dv_opt3 @@ -32,7 +32,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -95,12 +95,12 @@ PDAF Evolve state ensemble step 1 step 2 PDAF Perform assimilation with PDAF -PDAF --- duration of forecast phase: 0.001 s +PDAF --- duration of forecast phase: 0.000 s PDAF Call pre-post routine after forecast; step 2 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.001 s +PDAF --- duration of prestep: 0.002 s PDAF Analysis ------------------------------------------------------- PDAF 2 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: plain CG @@ -119,7 +119,7 @@ PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.002 s +PDAF --- duration of poststep: 0.001 s PDAF Forecast ------------------------------------------------------- 2 Next observation at time step 4 PDAF Evolve state ensemble @@ -176,12 +176,12 @@ PDAF --- CG solver converged PDAF iter eps F PDAF 4 3.553E-15 1.947E+01 -PDAF --- update duration: 0.001 s +PDAF --- update duration: 0.000 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.001 s +PDAF --- duration of poststep: 0.002 s PDAF Forecast ------------------------------------------------------- 6 Next observation at time step 8 PDAF Evolve state ensemble @@ -207,12 +207,12 @@ PDAF --- CG solver converged PDAF iter eps F PDAF 4 3.553E-15 9.365E+00 -PDAF --- update duration: 0.001 s +PDAF --- update duration: 0.000 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.001 s +PDAF --- duration of poststep: 0.002 s PDAF Forecast ------------------------------------------------------- 8 Next observation at time step 10 PDAF Evolve state ensemble @@ -224,7 +224,7 @@ PDAF Call pre-post routine after forecast; step 10 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.002 s +PDAF --- duration of prestep: 0.001 s PDAF Analysis ------------------------------------------------------- PDAF 10 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: plain CG @@ -269,7 +269,7 @@ PDAF --- CG solver converged PDAF iter eps F PDAF 4 1.776E-15 1.393E+01 -PDAF --- update duration: 0.001 s +PDAF --- update duration: 0.000 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 @@ -300,12 +300,12 @@ PDAF --- CG solver converged PDAF iter eps F PDAF 4 3.553E-15 1.311E+01 -PDAF --- update duration: 0.001 s +PDAF --- update duration: 0.000 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.002 s +PDAF --- duration of poststep: 0.003 s PDAF Forecast ------------------------------------------------------- 14 Next observation at time step 16 PDAF Evolve state ensemble @@ -317,7 +317,7 @@ PDAF Call pre-post routine after forecast; step 16 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.003 s +PDAF --- duration of prestep: 0.002 s PDAF Analysis ------------------------------------------------------- PDAF 16 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: plain CG @@ -348,7 +348,7 @@ PDAF Call pre-post routine after forecast; step 18 Analyze and write forecasted state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.003 s +PDAF --- duration of prestep: 0.002 s PDAF Analysis ------------------------------------------------------- PDAF 18 Assimilating observations - 3DVAR incremental, transformed PDAF --- solver: plain CG @@ -362,12 +362,12 @@ PDAF --- CG solver converged PDAF iter eps F PDAF 4 0.000E+00 2.234E+01 -PDAF --- update duration: 0.000 s +PDAF --- update duration: 0.001 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state for 3D-Var RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.002 s +PDAF --- duration of poststep: 0.003 s PDAF Forecast ------------------------------------------------------- 18 No more observations - end assimilation @@ -383,19 +383,19 @@ PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- PDAF Initialize PDAF: 0.002 s PDAF init_ens_pdaf: 0.002 s -PDAF State forecast: 0.001 s +PDAF State forecast: 0.000 s PDAF MPI communication in PDAF: 0.000 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF 3DVAR analysis: 0.005 s -PDAF PDAF-internal operations: 0.001 s -PDAF OMI-internal routines: 0.001 s +PDAF 3DVAR analysis: 0.002 s +PDAF PDAF-internal operations: 0.000 s +PDAF OMI-internal routines: 0.000 s PDAF Solver: 0.000 s PDAF cvt_pdaf: 0.000 s PDAF cvt_adj_pdaf: 0.000 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.003 s -PDAF obs_op_pdafomi: 0.001 s +PDAF init_dim_obs_pdafomi: 0.002 s +PDAF obs_op_pdafomi: 0.000 s PDAF obs_op_lin_pdafomi: 0.000 s PDAF obs_op_adj_pdafomi: 0.000 s -PDAF prepoststep_pdaf: 0.032 s +PDAF prepoststep_pdaf: 0.033 s diff --git a/tutorial/verification/out.online_2D_serialmodel b/tutorial/verification/out.online_2D_serialmodel index 2d33e8314..25ec23a98 100644 --- a/tutorial/verification/out.online_2D_serialmodel +++ b/tutorial/verification/out.online_2D_serialmodel @@ -49,9 +49,6 @@ Time steps 18 INITIALIZE PDAF - ONLINE MODE - INITIALIZE 2D TUTORIAL MODEL - Grid size: 36 x 18 - Time steps 18 PARSER: screen= 1 PARSER: dim_ens= 9 PARSER: filtertype= 7 @@ -65,7 +62,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -95,6 +92,9 @@ PDAF --> Standard LESTKF PDAF --> Transform ensemble with deterministic Omega PDAF --> Use fixed forgetting factor: 1.00 PDAF --> ensemble size: 9 + INITIALIZE 2D TUTORIAL MODEL + Grid size: 36 x 18 + Time steps 18 PDAF: Initialize Parallelization PDAF Parallelization - Filter on model PEs: @@ -531,21 +531,19 @@ PDAF analysis step: 0.020 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.010 s -PDAF init_ens_pdaf: 0.004 s -PDAF Ensemble forecast: 0.125 s -PDAF MPI communication in PDAF: 0.125 s +PDAF Initialize PDAF: 0.012 s +PDAF init_ens_pdaf: 0.005 s +PDAF Ensemble forecast: 0.162 s +PDAF MPI communication in PDAF: 0.162 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF LESTKF analysis: 0.035 s -PDAF PDAF-internal operations: 0.008 s -PDAF OMI-internal routines: 0.010 s +PDAF LESTKF analysis: 0.024 s +PDAF PDAF-internal operations: 0.007 s +PDAF OMI-internal routines: 0.000 s PDAF init_n_domains_pdaf: 0.000 s -PDAF init_dim_l_pdaf: 0.000 s -PDAF g2l_state_pdaf: 0.000 s -PDAF l2g_state_pdaf: 0.004 s +PDAF init_dim_l_pdaf: 0.001 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.007 s -PDAF obs_op_pdafomi: 0.001 s -PDAF init_dim_obs_l_pdafomi: 0.013 s -PDAF prepoststep_pdaf: 0.180 s +PDAF init_dim_obs_pdafomi: 0.006 s +PDAF obs_op_pdafomi: 0.000 s +PDAF init_dim_obs_l_pdafomi: 0.005 s +PDAF prepoststep_pdaf: 0.279 s diff --git a/tutorial/verification/out.online_2D_serialmodel_2fields b/tutorial/verification/out.online_2D_serialmodel_2fields index b450e2e29..aa185d933 100644 --- a/tutorial/verification/out.online_2D_serialmodel_2fields +++ b/tutorial/verification/out.online_2D_serialmodel_2fields @@ -6,13 +6,13 @@ world filter model couple filterPE rank rank task rank task rank T/F ---------------------------------------------------------- - 6 7 0 1 6 F - 5 6 0 1 5 F 3 4 0 1 3 F - 7 8 0 1 7 F - 1 2 0 1 1 F + 5 6 0 1 5 F + 6 7 0 1 6 F 4 5 0 1 4 F 2 3 0 1 2 F + 1 2 0 1 1 F + 7 8 0 1 7 F 8 9 0 1 8 F 0 0 1 0 1 0 T INITIALIZE 2D-2FIELDS TUTORIAL MODEL @@ -65,7 +65,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -531,21 +531,19 @@ PDAF analysis step: 0.020 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.014 s -PDAF init_ens_pdaf: 0.009 s -PDAF Ensemble forecast: 0.079 s -PDAF MPI communication in PDAF: 0.078 s +PDAF Initialize PDAF: 0.013 s +PDAF init_ens_pdaf: 0.007 s +PDAF Ensemble forecast: 0.133 s +PDAF MPI communication in PDAF: 0.133 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF LESTKF analysis: 0.055 s -PDAF PDAF-internal operations: 0.013 s -PDAF OMI-internal routines: 0.017 s +PDAF LESTKF analysis: 0.037 s +PDAF PDAF-internal operations: 0.008 s +PDAF OMI-internal routines: 0.000 s PDAF init_n_domains_pdaf: 0.000 s -PDAF init_dim_l_pdaf: 0.002 s -PDAF g2l_state_pdaf: 0.002 s -PDAF l2g_state_pdaf: 0.001 s +PDAF init_dim_l_pdaf: 0.001 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.007 s +PDAF init_dim_obs_pdafomi: 0.004 s PDAF obs_op_pdafomi: 0.000 s -PDAF init_dim_obs_l_pdafomi: 0.027 s -PDAF prepoststep_pdaf: 0.384 s +PDAF init_dim_obs_l_pdafomi: 0.011 s +PDAF prepoststep_pdaf: 0.411 s diff --git a/tutorial/verification/out.online_2D_serialmodel_2fields_ESTKF b/tutorial/verification/out.online_2D_serialmodel_2fields_ESTKF index e9fb10054..896e22edd 100644 --- a/tutorial/verification/out.online_2D_serialmodel_2fields_ESTKF +++ b/tutorial/verification/out.online_2D_serialmodel_2fields_ESTKF @@ -65,7 +65,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -403,16 +403,16 @@ PDAF analysis step: 0.032 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.013 s -PDAF init_ens_pdaf: 0.007 s -PDAF Ensemble forecast: 0.083 s -PDAF MPI communication in PDAF: 0.083 s +PDAF Initialize PDAF: 0.014 s +PDAF init_ens_pdaf: 0.008 s +PDAF Ensemble forecast: 0.137 s +PDAF MPI communication in PDAF: 0.137 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s PDAF ESTKF analysis: 0.007 s -PDAF PDAF-internal operations: 0.001 s -PDAF OMI-internal routines: 0.009 s +PDAF PDAF-internal operations: 0.003 s +PDAF OMI-internal routines: 0.000 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.006 s +PDAF init_dim_obs_pdafomi: 0.004 s PDAF obs_op_pdafomi: 0.000 s -PDAF prepoststep_pdaf: 0.455 s +PDAF prepoststep_pdaf: 0.460 s diff --git a/tutorial/verification/out.online_2D_serialmodel_2fields_obsB b/tutorial/verification/out.online_2D_serialmodel_2fields_obsB index f4e4d511b..fbe3832c4 100644 --- a/tutorial/verification/out.online_2D_serialmodel_2fields_obsB +++ b/tutorial/verification/out.online_2D_serialmodel_2fields_obsB @@ -66,7 +66,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -174,13 +174,13 @@ PDAF Local domains without observations: 1278 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- analysis/re-init duration: 0.005 s +PDAF --- analysis/re-init duration: 0.004 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS errors according to sampled variance: 5.7431E-01 7.4275E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.020 s +PDAF --- duration of poststep: 0.022 s PDAF Forecast ------------------------------------------------------- 2 Next observation at time step 4 PDAF Evolve state ensemble @@ -189,13 +189,13 @@ PDAF --- Distribute sub-ensembles step 4 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.031 s PDAF Call pre-post routine after forecast; step 4 Analyze and write forecasted state ensemble --- compute ensemble mean RMS errors according to sampled variance: 5.7431E-01 7.4275E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.022 s +PDAF --- duration of prestep: 0.024 s PDAF Analysis ------------------------------------------------------- PDAF 4 Local ESTKF analysis PDAF --- local analysis domains: 1296 @@ -221,13 +221,13 @@ PDAF Local domains without observations: 1278 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- analysis/re-init duration: 0.005 s +PDAF --- analysis/re-init duration: 0.004 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS errors according to sampled variance: 5.7271E-01 7.3544E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.021 s +PDAF --- duration of poststep: 0.023 s PDAF Forecast ------------------------------------------------------- 4 Next observation at time step 6 PDAF Evolve state ensemble @@ -236,7 +236,7 @@ PDAF --- Distribute sub-ensembles step 6 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.009 s PDAF Call pre-post routine after forecast; step 6 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -268,13 +268,13 @@ PDAF Local domains without observations: 1278 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- analysis/re-init duration: 0.005 s +PDAF --- analysis/re-init duration: 0.004 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS errors according to sampled variance: 5.7064E-01 7.2804E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.021 s +PDAF --- duration of poststep: 0.023 s PDAF Forecast ------------------------------------------------------- 6 Next observation at time step 8 PDAF Evolve state ensemble @@ -283,13 +283,13 @@ PDAF --- Distribute sub-ensembles step 8 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.023 s +PDAF --- duration of forecast phase: 0.014 s PDAF Call pre-post routine after forecast; step 8 Analyze and write forecasted state ensemble --- compute ensemble mean RMS errors according to sampled variance: 5.7064E-01 7.2804E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.021 s +PDAF --- duration of prestep: 0.023 s PDAF Analysis ------------------------------------------------------- PDAF 8 Local ESTKF analysis PDAF --- local analysis domains: 1296 @@ -315,7 +315,7 @@ PDAF Local domains without observations: 1278 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- analysis/re-init duration: 0.005 s +PDAF --- analysis/re-init duration: 0.004 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -330,13 +330,13 @@ PDAF --- Distribute sub-ensembles step 10 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.011 s PDAF Call pre-post routine after forecast; step 10 Analyze and write forecasted state ensemble --- compute ensemble mean RMS errors according to sampled variance: 5.6792E-01 7.2058E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.021 s +PDAF --- duration of prestep: 0.022 s PDAF Analysis ------------------------------------------------------- PDAF 10 Local ESTKF analysis PDAF --- local analysis domains: 1296 @@ -362,7 +362,7 @@ PDAF Local domains without observations: 1278 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- analysis/re-init duration: 0.005 s +PDAF --- analysis/re-init duration: 0.004 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -377,7 +377,7 @@ PDAF --- Distribute sub-ensembles step 12 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.010 s +PDAF --- duration of forecast phase: 0.013 s PDAF Call pre-post routine after forecast; step 12 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -409,13 +409,13 @@ PDAF Local domains without observations: 1278 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- analysis/re-init duration: 0.005 s +PDAF --- analysis/re-init duration: 0.004 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS errors according to sampled variance: 5.6481E-01 7.1165E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.022 s +PDAF --- duration of poststep: 0.023 s PDAF Forecast ------------------------------------------------------- 12 Next observation at time step 14 PDAF Evolve state ensemble @@ -424,7 +424,7 @@ PDAF --- Distribute sub-ensembles step 14 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.000 s +PDAF --- duration of forecast phase: 0.005 s PDAF Call pre-post routine after forecast; step 14 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -456,13 +456,13 @@ PDAF Local domains without observations: 1278 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- analysis/re-init duration: 0.005 s +PDAF --- analysis/re-init duration: 0.004 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS errors according to sampled variance: 5.6348E-01 7.0819E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.023 s +PDAF --- duration of poststep: 0.024 s PDAF Forecast ------------------------------------------------------- 14 Next observation at time step 16 PDAF Evolve state ensemble @@ -471,13 +471,13 @@ PDAF --- Distribute sub-ensembles step 16 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.000 s +PDAF --- duration of forecast phase: 0.006 s PDAF Call pre-post routine after forecast; step 16 Analyze and write forecasted state ensemble --- compute ensemble mean RMS errors according to sampled variance: 5.6348E-01 7.0819E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.022 s +PDAF --- duration of prestep: 0.023 s PDAF Analysis ------------------------------------------------------- PDAF 16 Local ESTKF analysis PDAF --- local analysis domains: 1296 @@ -503,7 +503,7 @@ PDAF Local domains without observations: 1278 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- analysis/re-init duration: 0.005 s +PDAF --- analysis/re-init duration: 0.004 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -518,13 +518,13 @@ PDAF --- Distribute sub-ensembles step 18 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.000 s +PDAF --- duration of forecast phase: 0.005 s PDAF Call pre-post routine after forecast; step 18 Analyze and write forecasted state ensemble --- compute ensemble mean RMS errors according to sampled variance: 5.6270E-01 7.0471E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.039 s +PDAF --- duration of prestep: 0.022 s PDAF Analysis ------------------------------------------------------- PDAF 18 Local ESTKF analysis PDAF --- local analysis domains: 1296 @@ -550,13 +550,13 @@ PDAF Local domains without observations: 1278 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- analysis/re-init duration: 0.005 s +PDAF --- analysis/re-init duration: 0.004 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS errors according to sampled variance: 5.6210E-01 7.0121E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.021 s +PDAF --- duration of poststep: 0.023 s PDAF Forecast ------------------------------------------------------- 18 No more observations - end assimilation @@ -571,20 +571,18 @@ PDAF analysis step: 0.019 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- PDAF Initialize PDAF: 0.013 s -PDAF init_ens_pdaf: 0.008 s -PDAF Ensemble forecast: 0.064 s -PDAF MPI communication in PDAF: 0.064 s +PDAF init_ens_pdaf: 0.007 s +PDAF Ensemble forecast: 0.104 s +PDAF MPI communication in PDAF: 0.102 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF LESTKF analysis: 0.045 s -PDAF PDAF-internal operations: 0.009 s -PDAF OMI-internal routines: 0.011 s +PDAF LESTKF analysis: 0.036 s +PDAF PDAF-internal operations: 0.003 s +PDAF OMI-internal routines: 0.002 s PDAF init_n_domains_pdaf: 0.000 s -PDAF init_dim_l_pdaf: 0.003 s -PDAF g2l_state_pdaf: 0.002 s -PDAF l2g_state_pdaf: 0.001 s +PDAF init_dim_l_pdaf: 0.004 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.006 s +PDAF init_dim_obs_pdafomi: 0.007 s PDAF obs_op_pdafomi: 0.000 s -PDAF init_dim_obs_l_pdafomi: 0.021 s -PDAF prepoststep_pdaf: 0.408 s +PDAF init_dim_obs_l_pdafomi: 0.011 s +PDAF prepoststep_pdaf: 0.407 s diff --git a/tutorial/verification/out.online_2D_serialmodel_3denvar_opt2 b/tutorial/verification/out.online_2D_serialmodel_3denvar_opt2 index 75aebc079..6f3048038 100644 --- a/tutorial/verification/out.online_2D_serialmodel_3denvar_opt2 +++ b/tutorial/verification/out.online_2D_serialmodel_3denvar_opt2 @@ -63,7 +63,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -136,7 +136,7 @@ PDAF --- Distribute sub-ensembles PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task START INTEGRATION -PDAF --- duration of forecast phase: 0.010 s +PDAF --- duration of forecast phase: 0.009 s PDAF Call pre-post routine after forecast; step 2 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -164,7 +164,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 5.187D+01 3.005D+01 7.7D-02 7.3D-01 - 2 5 2.490D+01 1.257D-08 6.0D-02 7.0D-16 + 2 5 2.490D+01 1.257D-08 6.0D-02 5.7D-16 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -179,7 +179,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 1.2745E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.010 s +PDAF --- duration of poststep: 0.011 s PDAF Forecast ------------------------------------------------------- 2 Next observation at time step 4 PDAF Evolve state ensemble @@ -194,7 +194,7 @@ PDAF Call pre-post routine after forecast; step 4 --- compute ensemble mean RMS error according to sampled variance: 1.2745E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.011 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 4 Assimilating observations - ensemble 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -240,7 +240,7 @@ PDAF --- Distribute sub-ensembles step 6 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.010 s +PDAF --- duration of forecast phase: 0.031 s PDAF Call pre-post routine after forecast; step 6 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -268,7 +268,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 1.954D+01 7.684D-04 6.8D-01 6.0D-06 - 2 5 1.954D+01 1.265D-09 6.7D-01 4.4D-12 + 2 5 1.954D+01 1.265D-09 6.7D-01 3.0D-13 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -283,7 +283,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 7.5872E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.010 s +PDAF --- duration of poststep: 0.013 s PDAF Forecast ------------------------------------------------------- 6 Next observation at time step 8 PDAF Evolve state ensemble @@ -292,13 +292,13 @@ PDAF --- Distribute sub-ensembles step 8 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.030 s PDAF Call pre-post routine after forecast; step 8 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 7.5872E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.013 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 8 Assimilating observations - ensemble 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -320,7 +320,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 9.561D+00 1.504D-03 7.6D-01 1.3D-05 - 2 5 9.561D+00 8.059D-10 7.5D-01 1.3D-13 + 2 5 9.561D+00 8.059D-10 7.5D-01 3.3D-13 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -329,13 +329,13 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of En3D-Var update: 0.000 s +PDAF --- duration of En3D-Var update: 0.001 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 6.5977E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 8 Next observation at time step 10 PDAF Evolve state ensemble @@ -344,13 +344,13 @@ PDAF --- Distribute sub-ensembles step 10 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.010 s PDAF Call pre-post routine after forecast; step 10 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 6.5977E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.010 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 10 Assimilating observations - ensemble 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -386,7 +386,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 5.9158E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 10 Next observation at time step 12 PDAF Evolve state ensemble @@ -401,7 +401,7 @@ PDAF Call pre-post routine after forecast; step 12 --- compute ensemble mean RMS error according to sampled variance: 5.9158E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.011 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 12 Assimilating observations - ensemble 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -432,13 +432,13 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of En3D-Var update: 0.000 s +PDAF --- duration of En3D-Var update: 0.001 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.4093E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.010 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 12 Next observation at time step 14 PDAF Evolve state ensemble @@ -447,7 +447,7 @@ PDAF --- Distribute sub-ensembles step 14 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.014 s PDAF Call pre-post routine after forecast; step 14 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -475,7 +475,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 1.331D+01 3.299D-04 8.6D-01 5.2D-07 - 2 5 1.331D+01 3.566D-10 8.6D-01 -5.3D-11 + 2 5 1.331D+01 3.566D-10 8.6D-01 4.9D-12 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -490,7 +490,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 5.0140E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 14 Next observation at time step 16 PDAF Evolve state ensemble @@ -499,13 +499,13 @@ PDAF --- Distribute sub-ensembles step 16 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.012 s PDAF Call pre-post routine after forecast; step 16 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.0140E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.010 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 16 Assimilating observations - ensemble 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -541,7 +541,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 4.6945E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.016 s PDAF Forecast ------------------------------------------------------- 16 Next observation at time step 18 PDAF Evolve state ensemble @@ -550,13 +550,13 @@ PDAF --- Distribute sub-ensembles step 18 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.021 s +PDAF --- duration of forecast phase: 0.018 s PDAF Call pre-post routine after forecast; step 18 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 4.6945E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.011 s +PDAF --- duration of prestep: 0.013 s PDAF Analysis ------------------------------------------------------- PDAF 18 Assimilating observations - ensemble 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -592,7 +592,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 4.4291E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.013 s PDAF Forecast ------------------------------------------------------- 18 No more observations - end assimilation @@ -608,19 +608,19 @@ PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- PDAF Initialize PDAF: 0.010 s PDAF init_ens_pdaf: 0.004 s -PDAF Ensemble forecast: 0.093 s -PDAF MPI communication in PDAF: 0.093 s +PDAF Ensemble forecast: 0.148 s +PDAF MPI communication in PDAF: 0.148 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF Hyb3DVAR analysis: 0.000 s -PDAF PDAF-internal operations: 0.000 s -PDAF OMI-internal routines: 0.014 s -PDAF Solver: 0.002 s +PDAF Hyb3DVAR analysis: 0.004 s +PDAF PDAF-internal operations: 0.002 s +PDAF OMI-internal routines: 0.000 s +PDAF Solver: 0.000 s PDAF cvt_ens_pdaf: 0.000 s PDAF cvt_ens_adj_pdaf: 0.000 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.005 s +PDAF init_dim_obs_pdafomi: 0.004 s PDAF obs_op_pdafomi: 0.000 s -PDAF obs_op_lin_pdafomi: 0.001 s +PDAF obs_op_lin_pdafomi: 0.000 s PDAF obs_op_adj_pdafomi: 0.000 s -PDAF prepoststep_pdaf: 0.196 s +PDAF prepoststep_pdaf: 0.219 s diff --git a/tutorial/verification/out.online_2D_serialmodel_3denvar_opt3 b/tutorial/verification/out.online_2D_serialmodel_3denvar_opt3 index 100d8a858..29709c7a4 100644 --- a/tutorial/verification/out.online_2D_serialmodel_3denvar_opt3 +++ b/tutorial/verification/out.online_2D_serialmodel_3denvar_opt3 @@ -63,7 +63,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -108,7 +108,7 @@ PDAF: Call routine for ensemble initialization --- Ensemble size: 9 PDAF: Initialization completed -PDAF --- duration of PDAF initialization: 0.010 s +PDAF --- duration of PDAF initialization: 0.009 s PDAF ---------------------------------------------------------------- @@ -118,7 +118,7 @@ PDAF Call pre-post routine at initial time Analyze initial state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.7637E-01 -PDAF --- duration of prestep: 0.000 s +PDAF --- duration of prestep: 0.001 s PDAF Forecast ------------------------------------------------------- 0 Next observation at time step 2 PDAF Evolve state ensemble @@ -136,13 +136,13 @@ PDAF --- Distribute sub-ensembles PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task START INTEGRATION -PDAF --- duration of forecast phase: 0.010 s +PDAF --- duration of forecast phase: 0.008 s PDAF Call pre-post routine after forecast; step 2 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.012 s +PDAF --- duration of prestep: 0.011 s PDAF Analysis ------------------------------------------------------- PDAF 2 Assimilating observations - ensemble 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -162,13 +162,13 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of En3D-Var update: 0.001 s +PDAF --- duration of En3D-Var update: 0.000 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 1.2745E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.012 s +PDAF --- duration of poststep: 0.011 s PDAF Forecast ------------------------------------------------------- 2 Next observation at time step 4 PDAF Evolve state ensemble @@ -177,7 +177,7 @@ PDAF --- Distribute sub-ensembles step 4 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.009 s +PDAF --- duration of forecast phase: 0.007 s PDAF Call pre-post routine after forecast; step 4 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -209,7 +209,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 9.2179E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.013 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 4 Next observation at time step 6 PDAF Evolve state ensemble @@ -218,13 +218,13 @@ PDAF --- Distribute sub-ensembles step 6 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.006 s +PDAF --- duration of forecast phase: 0.041 s PDAF Call pre-post routine after forecast; step 6 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 9.2179E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.012 s +PDAF --- duration of prestep: 0.013 s PDAF Analysis ------------------------------------------------------- PDAF 6 Assimilating observations - ensemble 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -259,7 +259,7 @@ PDAF --- Distribute sub-ensembles step 8 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.010 s PDAF Call pre-post routine after forecast; step 8 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -300,7 +300,7 @@ PDAF --- Distribute sub-ensembles step 10 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.019 s +PDAF --- duration of forecast phase: 0.009 s PDAF Call pre-post routine after forecast; step 10 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -332,7 +332,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 5.9158E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 10 Next observation at time step 12 PDAF Evolve state ensemble @@ -341,7 +341,7 @@ PDAF --- Distribute sub-ensembles step 12 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.022 s +PDAF --- duration of forecast phase: 0.009 s PDAF Call pre-post routine after forecast; step 12 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -373,7 +373,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 5.4093E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.012 s +PDAF --- duration of poststep: 0.011 s PDAF Forecast ------------------------------------------------------- 12 Next observation at time step 14 PDAF Evolve state ensemble @@ -382,13 +382,13 @@ PDAF --- Distribute sub-ensembles step 14 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.012 s PDAF Call pre-post routine after forecast; step 14 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.4093E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.015 s +PDAF --- duration of prestep: 0.013 s PDAF Analysis ------------------------------------------------------- PDAF 14 Assimilating observations - ensemble 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -408,13 +408,13 @@ PDAF Perform ensemble transformation PDAF --- use symmetric square-root of A PDAF --- Compute deterministic Omega PDAF --- Ensemble update: use blocking with size 200 -PDAF --- duration of En3D-Var update: 0.001 s +PDAF --- duration of En3D-Var update: 0.000 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.0140E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.012 s +PDAF --- duration of poststep: 0.013 s PDAF Forecast ------------------------------------------------------- 14 Next observation at time step 16 PDAF Evolve state ensemble @@ -423,13 +423,13 @@ PDAF --- Distribute sub-ensembles step 16 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.019 s PDAF Call pre-post routine after forecast; step 16 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.0140E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.013 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 16 Assimilating observations - ensemble 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -455,7 +455,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 4.6945E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.014 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 16 Next observation at time step 18 PDAF Evolve state ensemble @@ -464,7 +464,7 @@ PDAF --- Distribute sub-ensembles step 18 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.013 s +PDAF --- duration of forecast phase: 0.014 s PDAF Call pre-post routine after forecast; step 18 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -510,21 +510,21 @@ PDAF analysis step: 0.033 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.010 s -PDAF init_ens_pdaf: 0.004 s -PDAF Ensemble forecast: 0.100 s -PDAF MPI communication in PDAF: 0.100 s +PDAF Initialize PDAF: 0.009 s +PDAF init_ens_pdaf: 0.003 s +PDAF Ensemble forecast: 0.129 s +PDAF MPI communication in PDAF: 0.129 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF Hyb3DVAR analysis: 0.006 s -PDAF PDAF-internal operations: 0.003 s -PDAF OMI-internal routines: 0.011 s +PDAF Hyb3DVAR analysis: 0.002 s +PDAF PDAF-internal operations: 0.001 s +PDAF OMI-internal routines: 0.001 s PDAF Solver: 0.000 s -PDAF cvt_ens_pdaf: 0.000 s +PDAF cvt_ens_pdaf: 0.001 s PDAF cvt_ens_adj_pdaf: 0.000 s PDAF Time in OMI observation module routines PDAF init_dim_obs_pdafomi: 0.004 s PDAF obs_op_pdafomi: 0.000 s PDAF obs_op_lin_pdafomi: 0.000 s PDAF obs_op_adj_pdafomi: 0.000 s -PDAF prepoststep_pdaf: 0.226 s +PDAF prepoststep_pdaf: 0.221 s diff --git a/tutorial/verification/out.online_2D_serialmodel_3dhybvar_opt2 b/tutorial/verification/out.online_2D_serialmodel_3dhybvar_opt2 index 61af47c48..ffe92e398 100644 --- a/tutorial/verification/out.online_2D_serialmodel_3dhybvar_opt2 +++ b/tutorial/verification/out.online_2D_serialmodel_3dhybvar_opt2 @@ -53,10 +53,10 @@ PARSER: filtertype= 200 PARSER: subtype= 7 PARSER: type_opt= 2 - PARSER: dim_cvec= 9 INITIALIZE 2D TUTORIAL MODEL Grid size: 36 x 18 Time steps 18 + PARSER: dim_cvec= 9 Assimilation using 3D-Var -- Hybrid 3D-Var using ESTKF for ensemble transformation @@ -64,7 +64,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -112,7 +112,7 @@ PDAF: Call routine for ensemble initialization Initialize B^1/2 for 3D-Var PDAF: Initialization completed -PDAF --- duration of PDAF initialization: 0.010 s +PDAF --- duration of PDAF initialization: 0.009 s PDAF ---------------------------------------------------------------- @@ -140,7 +140,7 @@ PDAF --- Distribute sub-ensembles PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task START INTEGRATION -PDAF --- duration of forecast phase: 0.010 s +PDAF --- duration of forecast phase: 0.009 s PDAF Call pre-post routine after forecast; step 2 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -184,7 +184,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 1.2745E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.012 s +PDAF --- duration of poststep: 0.011 s PDAF Forecast ------------------------------------------------------- 2 Next observation at time step 4 PDAF Evolve state ensemble @@ -193,7 +193,7 @@ PDAF --- Distribute sub-ensembles step 4 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.015 s PDAF Call pre-post routine after forecast; step 4 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -237,7 +237,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 9.2179E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.012 s +PDAF --- duration of poststep: 0.013 s PDAF Forecast ------------------------------------------------------- 4 Next observation at time step 6 PDAF Evolve state ensemble @@ -246,7 +246,7 @@ PDAF --- Distribute sub-ensembles step 6 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.017 s +PDAF --- duration of forecast phase: 0.041 s PDAF Call pre-post routine after forecast; step 6 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -290,7 +290,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 7.5872E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.014 s PDAF Forecast ------------------------------------------------------- 6 Next observation at time step 8 PDAF Evolve state ensemble @@ -299,13 +299,13 @@ PDAF --- Distribute sub-ensembles step 8 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.023 s +PDAF --- duration of forecast phase: 0.041 s PDAF Call pre-post routine after forecast; step 8 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 7.5872E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.012 s +PDAF --- duration of prestep: 0.013 s PDAF Analysis ------------------------------------------------------- PDAF 8 Assimilating observations - hybrid 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -343,7 +343,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 6.5977E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 8 Next observation at time step 10 PDAF Evolve state ensemble @@ -352,13 +352,13 @@ PDAF --- Distribute sub-ensembles step 10 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.042 s PDAF Call pre-post routine after forecast; step 10 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 6.5977E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.013 s +PDAF --- duration of prestep: 0.014 s PDAF Analysis ------------------------------------------------------- PDAF 10 Assimilating observations - hybrid 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -405,7 +405,7 @@ PDAF --- Distribute sub-ensembles step 12 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.006 s +PDAF --- duration of forecast phase: 0.011 s PDAF Call pre-post routine after forecast; step 12 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -449,7 +449,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 5.4093E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.015 s +PDAF --- duration of poststep: 0.013 s PDAF Forecast ------------------------------------------------------- 12 Next observation at time step 14 PDAF Evolve state ensemble @@ -458,7 +458,7 @@ PDAF --- Distribute sub-ensembles step 14 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.011 s +PDAF --- duration of forecast phase: 0.016 s PDAF Call pre-post routine after forecast; step 14 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -511,7 +511,7 @@ PDAF --- Distribute sub-ensembles step 16 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.021 s +PDAF --- duration of forecast phase: 0.012 s PDAF Call pre-post routine after forecast; step 16 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -555,7 +555,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 4.6945E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.013 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 16 Next observation at time step 18 PDAF Evolve state ensemble @@ -564,13 +564,13 @@ PDAF --- Distribute sub-ensembles step 18 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.023 s +PDAF --- duration of forecast phase: 0.014 s PDAF Call pre-post routine after forecast; step 18 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 4.6945E-02 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.016 s +PDAF --- duration of prestep: 0.013 s PDAF Analysis ------------------------------------------------------- PDAF 18 Assimilating observations - hybrid 3DVAR with ESTKF PDAF Step 1: Update state estimate with variational solver @@ -608,7 +608,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 4.4291E-02 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.015 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 18 No more observations - end assimilation @@ -622,21 +622,21 @@ PDAF analysis step: 0.038 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.010 s +PDAF Initialize PDAF: 0.009 s PDAF init_ens_pdaf: 0.004 s -PDAF Ensemble forecast: 0.125 s -PDAF MPI communication in PDAF: 0.125 s +PDAF Ensemble forecast: 0.201 s +PDAF MPI communication in PDAF: 0.201 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s PDAF Hyb3DVAR analysis: 0.002 s PDAF PDAF-internal operations: 0.001 s -PDAF OMI-internal routines: 0.013 s -PDAF Solver: 0.002 s -PDAF cvt_ens_pdaf: 0.001 s -PDAF cvt_ens_adj_pdaf: 0.000 s +PDAF OMI-internal routines: 0.000 s +PDAF Solver: 0.003 s +PDAF cvt_ens_pdaf: 0.000 s +PDAF cvt_ens_adj_pdaf: 0.001 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.002 s +PDAF init_dim_obs_pdafomi: 0.003 s PDAF obs_op_pdafomi: 0.000 s PDAF obs_op_lin_pdafomi: 0.000 s PDAF obs_op_adj_pdafomi: 0.000 s -PDAF prepoststep_pdaf: 0.228 s +PDAF prepoststep_pdaf: 0.225 s diff --git a/tutorial/verification/out.online_2D_serialmodel_3dlenvar_opt2 b/tutorial/verification/out.online_2D_serialmodel_3dlenvar_opt2 index 8b2d70972..4be763353 100644 --- a/tutorial/verification/out.online_2D_serialmodel_3dlenvar_opt2 +++ b/tutorial/verification/out.online_2D_serialmodel_3dlenvar_opt2 @@ -44,6 +44,9 @@ Tutorial: 2D model without parallelization + INITIALIZE 2D TUTORIAL MODEL + Grid size: 36 x 18 + Time steps 18 INITIALIZE 2D TUTORIAL MODEL Grid size: 36 x 18 Time steps 18 @@ -60,20 +63,17 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ PDAF +++ 2013, 55, 110-118, doi:10.1016/j.cageo.2012.03.026 +++ PDAF +++ when publishing work resulting from using PDAF +++ - INITIALIZE 2D TUTORIAL MODEL - Grid size: 36 x 18 PDAF +++ +++ PDAF +++ PDAF itself can also be cited as +++ PDAF +++ L. Nerger. Parallel Data Assimilation Framework +++ PDAF +++ (PDAF). Zenodo. 2024. doi:10.5281/zenodo.7861812 +++ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ - Time steps 18 PDAF: Initialize filter @@ -137,7 +137,7 @@ PDAF --- Distribute sub-ensembles PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task START INTEGRATION -PDAF --- duration of forecast phase: 0.010 s +PDAF --- duration of forecast phase: 0.009 s PDAF Call pre-post routine after forecast; step 2 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -165,7 +165,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 5.187D+01 3.005D+01 7.7D-02 7.3D-01 - 2 5 2.490D+01 1.257D-08 6.0D-02 7.0D-16 + 2 5 2.490D+01 1.257D-08 6.0D-02 5.7D-16 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -193,7 +193,7 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.004 s +PDAF --- duration of En3D-Var update: 0.003 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -208,7 +208,7 @@ PDAF --- Distribute sub-ensembles step 4 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.021 s +PDAF --- duration of forecast phase: 0.007 s PDAF Call pre-post routine after forecast; step 4 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -236,7 +236,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 1.706D+01 2.423D+00 3.6D-02 1.3D-01 - 2 5 1.668D+01 4.483D-09 1.3D-01 3.0D-15 + 2 5 1.668D+01 4.483D-09 1.3D-01 -1.9D-15 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -264,13 +264,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.004 s +PDAF --- duration of En3D-Var update: 0.002 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.6119E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 4 Next observation at time step 6 PDAF Evolve state ensemble @@ -279,13 +279,13 @@ PDAF --- Distribute sub-ensembles step 6 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.006 s +PDAF --- duration of forecast phase: 0.042 s PDAF Call pre-post routine after forecast; step 6 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.6119E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.012 s +PDAF --- duration of prestep: 0.011 s PDAF Analysis ------------------------------------------------------- PDAF 6 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -307,7 +307,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 1.976D+01 1.762D-01 6.0D-02 3.9D-02 - 2 5 1.976D+01 5.862D-09 2.0D-01 -5.2D-14 + 2 5 1.976D+01 5.862D-09 2.0D-01 -5.0D-14 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -350,7 +350,7 @@ PDAF --- Distribute sub-ensembles step 8 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.027 s PDAF Call pre-post routine after forecast; step 8 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -378,7 +378,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 9.564D+00 4.870D-01 1.7D-01 3.2D-01 - 2 5 9.551D+00 6.416D-09 1.1D-01 -6.6D-15 + 2 5 9.551D+00 6.416D-09 1.1D-01 -2.6D-15 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -406,7 +406,7 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.003 s +PDAF --- duration of En3D-Var update: 0.002 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -421,13 +421,13 @@ PDAF --- Distribute sub-ensembles step 10 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.010 s +PDAF --- duration of forecast phase: 0.009 s PDAF Call pre-post routine after forecast; step 10 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5609E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.011 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 10 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -449,7 +449,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 8.920D+00 1.298D+00 1.6D-01 2.8D-01 - 2 5 8.788D+00 5.293D-09 1.6D-01 4.0D-15 + 2 5 8.788D+00 5.293D-09 1.6D-01 7.0D-16 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -477,13 +477,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.004 s +PDAF --- duration of En3D-Var update: 0.002 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5473E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.010 s +PDAF --- duration of poststep: 0.011 s PDAF Forecast ------------------------------------------------------- 10 Next observation at time step 12 PDAF Evolve state ensemble @@ -492,13 +492,13 @@ PDAF --- Distribute sub-ensembles step 12 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.022 s +PDAF --- duration of forecast phase: 0.010 s PDAF Call pre-post routine after forecast; step 12 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5473E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.010 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 12 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -520,7 +520,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 1.465D+01 9.192D-01 1.3D-01 4.8D-02 - 2 5 1.453D+01 5.109D-09 2.8D-01 9.5D-16 + 2 5 1.453D+01 5.109D-09 2.8D-01 5.5D-16 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -548,13 +548,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.004 s +PDAF --- duration of En3D-Var update: 0.002 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5387E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.010 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 12 Next observation at time step 14 PDAF Evolve state ensemble @@ -563,13 +563,13 @@ PDAF --- Distribute sub-ensembles step 14 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.011 s PDAF Call pre-post routine after forecast; step 14 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5387E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.012 s +PDAF --- duration of prestep: 0.011 s PDAF Analysis ------------------------------------------------------- PDAF 14 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -591,7 +591,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 1.325D+01 2.136D-02 1.3D-01 1.5D-05 - 2 5 1.325D+01 5.795D-09 3.2D-01 4.3D-13 + 2 5 1.325D+01 5.795D-09 3.2D-01 -1.2D-13 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -619,13 +619,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.004 s +PDAF --- duration of En3D-Var update: 0.002 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5309E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 14 Next observation at time step 16 PDAF Evolve state ensemble @@ -634,13 +634,13 @@ PDAF --- Distribute sub-ensembles step 16 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.009 s PDAF Call pre-post routine after forecast; step 16 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5309E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.011 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 16 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -662,7 +662,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 1.780D+01 3.136D-01 1.8D-01 5.0D-02 - 2 5 1.778D+01 5.654D-09 3.2D-01 3.6D-15 + 2 5 1.778D+01 5.654D-09 3.2D-01 -3.1D-15 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -696,7 +696,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 5.5259E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 16 Next observation at time step 18 PDAF Evolve state ensemble @@ -705,13 +705,13 @@ PDAF --- Distribute sub-ensembles step 18 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.013 s +PDAF --- duration of forecast phase: 0.014 s PDAF Call pre-post routine after forecast; step 18 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5259E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.012 s +PDAF --- duration of prestep: 0.011 s PDAF Analysis ------------------------------------------------------- PDAF 18 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -733,7 +733,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 2.240D+01 7.699D-01 1.8D-01 6.5D-02 - 2 5 2.231D+01 7.971D-09 3.2D-01 3.7D-15 + 2 5 2.231D+01 7.971D-09 3.2D-01 1.4D-15 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -761,13 +761,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.004 s +PDAF --- duration of En3D-Var update: 0.003 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5208E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.010 s +PDAF --- duration of poststep: 0.011 s PDAF Forecast ------------------------------------------------------- 18 No more observations - end assimilation @@ -783,25 +783,23 @@ PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- PDAF Initialize PDAF: 0.010 s PDAF init_ens_pdaf: 0.004 s -PDAF Ensemble forecast: 0.103 s -PDAF MPI communication in PDAF: 0.101 s +PDAF Ensemble forecast: 0.138 s +PDAF MPI communication in PDAF: 0.138 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF En3DVAR analysis: 0.065 s -PDAF PDAF-internal operations: 0.005 s -PDAF OMI-internal routines: 0.011 s -PDAF Solver: 0.000 s -PDAF cvt_ens_pdaf: 0.001 s -PDAF cvt_ens_adj_pdaf: 0.001 s +PDAF En3DVAR analysis: 0.043 s +PDAF PDAF-internal operations: 0.011 s +PDAF OMI-internal routines: 0.000 s +PDAF Solver: 0.001 s +PDAF cvt_ens_pdaf: 0.000 s +PDAF cvt_ens_adj_pdaf: 0.000 s PDAF Timers in LESTKF only PDAF init_n_domains_pdaf: 0.000 s -PDAF init_dim_l_pdaf: 0.000 s -PDAF g2l_state_pdaf: 0.000 s -PDAF l2g_state_pdaf: 0.001 s +PDAF init_dim_l_pdaf: 0.002 s PDAF Time in OMI observation module routines PDAF init_dim_obs_pdafomi: 0.008 s PDAF obs_op_pdafomi: 0.000 s PDAF obs_op_lin_pdafomi: 0.000 s PDAF obs_op_adj_pdafomi: 0.000 s -PDAF init_dim_obs_l_pdafomi: 0.019 s -PDAF prepoststep_pdaf: 0.195 s +PDAF init_dim_obs_l_pdafomi: 0.004 s +PDAF prepoststep_pdaf: 0.203 s diff --git a/tutorial/verification/out.online_2D_serialmodel_3dlenvar_opt3 b/tutorial/verification/out.online_2D_serialmodel_3dlenvar_opt3 index 771cbf7a3..e89463c35 100644 --- a/tutorial/verification/out.online_2D_serialmodel_3dlenvar_opt3 +++ b/tutorial/verification/out.online_2D_serialmodel_3dlenvar_opt3 @@ -63,7 +63,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -119,7 +119,7 @@ PDAF Call pre-post routine at initial time Analyze initial state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.7637E-01 -PDAF --- duration of prestep: 0.001 s +PDAF --- duration of prestep: 0.000 s PDAF Forecast ------------------------------------------------------- 0 Next observation at time step 2 PDAF Evolve state ensemble @@ -182,7 +182,7 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.004 s +PDAF --- duration of En3D-Var update: 0.002 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -203,7 +203,7 @@ PDAF Call pre-post routine after forecast; step 4 --- compute ensemble mean RMS error according to sampled variance: 5.6883E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.011 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 4 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -242,13 +242,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.004 s +PDAF --- duration of En3D-Var update: 0.003 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.6119E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.013 s PDAF Forecast ------------------------------------------------------- 4 Next observation at time step 6 PDAF Evolve state ensemble @@ -257,13 +257,13 @@ PDAF --- Distribute sub-ensembles step 6 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.006 s +PDAF --- duration of forecast phase: 0.041 s PDAF Call pre-post routine after forecast; step 6 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.6119E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.013 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 6 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -302,13 +302,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.004 s +PDAF --- duration of En3D-Var update: 0.003 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5793E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.012 s +PDAF --- duration of poststep: 0.013 s PDAF Forecast ------------------------------------------------------- 6 Next observation at time step 8 PDAF Evolve state ensemble @@ -317,13 +317,13 @@ PDAF --- Distribute sub-ensembles step 8 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.006 s +PDAF --- duration of forecast phase: 0.041 s PDAF Call pre-post routine after forecast; step 8 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5793E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.011 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 8 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -368,7 +368,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 5.5609E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.013 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 8 Next observation at time step 10 PDAF Evolve state ensemble @@ -377,13 +377,13 @@ PDAF --- Distribute sub-ensembles step 10 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.009 s +PDAF --- duration of forecast phase: 0.017 s PDAF Call pre-post routine after forecast; step 10 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5609E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.011 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 10 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -422,13 +422,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.004 s +PDAF --- duration of En3D-Var update: 0.002 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5473E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 10 Next observation at time step 12 PDAF Evolve state ensemble @@ -437,13 +437,13 @@ PDAF --- Distribute sub-ensembles step 12 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.020 s +PDAF --- duration of forecast phase: 0.010 s PDAF Call pre-post routine after forecast; step 12 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5473E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.012 s +PDAF --- duration of prestep: 0.011 s PDAF Analysis ------------------------------------------------------- PDAF 12 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -482,13 +482,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.004 s +PDAF --- duration of En3D-Var update: 0.003 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5387E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 12 Next observation at time step 14 PDAF Evolve state ensemble @@ -497,13 +497,13 @@ PDAF --- Distribute sub-ensembles step 14 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.023 s +PDAF --- duration of forecast phase: 0.010 s PDAF Call pre-post routine after forecast; step 14 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5387E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.011 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 14 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -542,13 +542,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.003 s +PDAF --- duration of En3D-Var update: 0.002 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5309E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.012 s +PDAF --- duration of poststep: 0.013 s PDAF Forecast ------------------------------------------------------- 14 Next observation at time step 16 PDAF Evolve state ensemble @@ -557,7 +557,7 @@ PDAF --- Distribute sub-ensembles step 16 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.023 s +PDAF --- duration of forecast phase: 0.009 s PDAF Call pre-post routine after forecast; step 16 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -602,13 +602,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.004 s +PDAF --- duration of En3D-Var update: 0.003 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5259E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.013 s PDAF Forecast ------------------------------------------------------- 16 Next observation at time step 18 PDAF Evolve state ensemble @@ -617,13 +617,13 @@ PDAF --- Distribute sub-ensembles step 18 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.023 s +PDAF --- duration of forecast phase: 0.014 s PDAF Call pre-post routine after forecast; step 18 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5259E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.012 s +PDAF --- duration of prestep: 0.013 s PDAF Analysis ------------------------------------------------------- PDAF 18 Assimilating observations - ensemble 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -662,13 +662,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of En3D-Var update: 0.004 s +PDAF --- duration of En3D-Var update: 0.002 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5208E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.013 s PDAF Forecast ------------------------------------------------------- 18 No more observations - end assimilation @@ -683,26 +683,24 @@ PDAF analysis step: 0.031 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- PDAF Initialize PDAF: 0.009 s -PDAF init_ens_pdaf: 0.003 s -PDAF Ensemble forecast: 0.126 s -PDAF MPI communication in PDAF: 0.125 s +PDAF init_ens_pdaf: 0.004 s +PDAF Ensemble forecast: 0.158 s +PDAF MPI communication in PDAF: 0.158 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF En3DVAR analysis: 0.068 s -PDAF PDAF-internal operations: 0.004 s -PDAF OMI-internal routines: 0.008 s +PDAF En3DVAR analysis: 0.046 s +PDAF PDAF-internal operations: 0.008 s +PDAF OMI-internal routines: 0.001 s PDAF Solver: 0.000 s -PDAF cvt_ens_pdaf: 0.000 s -PDAF cvt_ens_adj_pdaf: 0.000 s +PDAF cvt_ens_pdaf: 0.001 s +PDAF cvt_ens_adj_pdaf: 0.001 s PDAF Timers in LESTKF only PDAF init_n_domains_pdaf: 0.000 s PDAF init_dim_l_pdaf: 0.000 s -PDAF g2l_state_pdaf: 0.001 s -PDAF l2g_state_pdaf: 0.000 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.011 s +PDAF init_dim_obs_pdafomi: 0.009 s PDAF obs_op_pdafomi: 0.000 s PDAF obs_op_lin_pdafomi: 0.000 s PDAF obs_op_adj_pdafomi: 0.000 s -PDAF init_dim_obs_l_pdafomi: 0.017 s -PDAF prepoststep_pdaf: 0.207 s +PDAF init_dim_obs_l_pdafomi: 0.004 s +PDAF prepoststep_pdaf: 0.218 s diff --git a/tutorial/verification/out.online_2D_serialmodel_3dlhybvar_opt2 b/tutorial/verification/out.online_2D_serialmodel_3dlhybvar_opt2 index e1655f81e..4faaa65b1 100644 --- a/tutorial/verification/out.online_2D_serialmodel_3dlhybvar_opt2 +++ b/tutorial/verification/out.online_2D_serialmodel_3dlhybvar_opt2 @@ -47,11 +47,11 @@ INITIALIZE 2D TUTORIAL MODEL Grid size: 36 x 18 Time steps 18 - - INITIALIZE PDAF - ONLINE MODE INITIALIZE 2D TUTORIAL MODEL Grid size: 36 x 18 Time steps 18 + + INITIALIZE PDAF - ONLINE MODE PARSER: dim_ens= 9 PARSER: filtertype= 200 PARSER: subtype= 6 @@ -64,7 +64,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -146,7 +146,7 @@ PDAF Call pre-post routine after forecast; step 2 --- compute ensemble mean RMS error according to sampled variance: 5.7637E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.011 s +PDAF --- duration of prestep: 0.010 s PDAF Analysis ------------------------------------------------------- PDAF 2 Assimilating observations - hybrid 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -197,13 +197,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.004 s +PDAF --- duration of hyb3D-Var update: 0.002 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.6883E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 2 Next observation at time step 4 PDAF Evolve state ensemble @@ -269,13 +269,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.004 s +PDAF --- duration of hyb3D-Var update: 0.003 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.6119E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.013 s PDAF Forecast ------------------------------------------------------- 4 Next observation at time step 6 PDAF Evolve state ensemble @@ -284,7 +284,7 @@ PDAF --- Distribute sub-ensembles step 6 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.031 s PDAF Call pre-post routine after forecast; step 6 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -341,13 +341,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.004 s +PDAF --- duration of hyb3D-Var update: 0.002 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5793E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.014 s PDAF Forecast ------------------------------------------------------- 6 Next observation at time step 8 PDAF Evolve state ensemble @@ -356,13 +356,13 @@ PDAF --- Distribute sub-ensembles step 8 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.006 s +PDAF --- duration of forecast phase: 0.031 s PDAF Call pre-post routine after forecast; step 8 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5793E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.012 s +PDAF --- duration of prestep: 0.013 s PDAF Analysis ------------------------------------------------------- PDAF 8 Assimilating observations - hybrid 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -413,13 +413,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.004 s +PDAF --- duration of hyb3D-Var update: 0.003 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5609E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.013 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 8 Next observation at time step 10 PDAF Evolve state ensemble @@ -428,13 +428,13 @@ PDAF --- Distribute sub-ensembles step 10 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.007 s +PDAF --- duration of forecast phase: 0.014 s PDAF Call pre-post routine after forecast; step 10 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5609E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.011 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 10 Assimilating observations - hybrid 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -457,7 +457,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 8.750D+00 1.548D+00 6.3D-02 2.2D-01 - 4 9 8.548D+00 1.292D-11 9.8D-01 7.6D-12 + 4 9 8.548D+00 1.283D-11 9.8D-01 7.9D-12 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -485,13 +485,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.003 s +PDAF --- duration of hyb3D-Var update: 0.002 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5473E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.012 s +PDAF --- duration of poststep: 0.013 s PDAF Forecast ------------------------------------------------------- 10 Next observation at time step 12 PDAF Evolve state ensemble @@ -500,7 +500,7 @@ PDAF --- Distribute sub-ensembles step 12 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.022 s +PDAF --- duration of forecast phase: 0.008 s PDAF Call pre-post routine after forecast; step 12 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -529,7 +529,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 1.425D+01 7.126D-01 5.5D-02 8.9D-03 - 4 9 1.421D+01 6.364D-12 9.8D-01 -7.6D-13 + 4 9 1.421D+01 6.418D-12 9.8D-01 3.3D-13 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -557,7 +557,7 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.003 s +PDAF --- duration of hyb3D-Var update: 0.002 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -572,7 +572,7 @@ PDAF --- Distribute sub-ensembles step 14 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.021 s +PDAF --- duration of forecast phase: 0.013 s PDAF Call pre-post routine after forecast; step 14 Analyze and write forecasted state ensemble --- compute ensemble mean @@ -601,7 +601,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 1.327D+01 1.483D+00 1.3D-01 7.4D-02 - 4 9 1.317D+01 7.967D-12 9.7D-01 5.5D-13 + 4 9 1.317D+01 7.966D-12 9.7D-01 7.5D-13 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -629,7 +629,7 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.003 s +PDAF --- duration of hyb3D-Var update: 0.002 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean @@ -644,13 +644,13 @@ PDAF --- Distribute sub-ensembles step 16 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.020 s +PDAF --- duration of forecast phase: 0.010 s PDAF Call pre-post routine after forecast; step 16 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5309E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.011 s +PDAF --- duration of prestep: 0.012 s PDAF Analysis ------------------------------------------------------- PDAF 16 Assimilating observations - hybrid 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -673,7 +673,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 1.804D+01 7.156D-01 5.8D-02 6.2D-02 - 4 9 1.792D+01 8.888D-12 9.7D-01 1.6D-13 + 4 9 1.792D+01 8.857D-12 9.7D-01 -1.0D-13 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -707,7 +707,7 @@ PDAF Call pre-post routine after analysis step --- compute ensemble mean RMS error according to sampled variance: 5.5259E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.012 s PDAF Forecast ------------------------------------------------------- 16 Next observation at time step 18 PDAF Evolve state ensemble @@ -716,13 +716,13 @@ PDAF --- Distribute sub-ensembles step 18 PDAF Perform assimilation with PDAF PDAF --- Gather sub-ensembles on filter task -PDAF --- duration of forecast phase: 0.023 s +PDAF --- duration of forecast phase: 0.019 s PDAF Call pre-post routine after forecast; step 18 Analyze and write forecasted state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5259E-01 --- write ensemble and state estimate -PDAF --- duration of prestep: 0.012 s +PDAF --- duration of prestep: 0.013 s PDAF Analysis ------------------------------------------------------- PDAF 18 Assimilating observations - hybrid 3DVAR with LESTKF PDAF Step 1: Update state estimate with variational solver @@ -745,7 +745,7 @@ INITIAL VALUES: I NFN FUNC GNORM STEPLEN BETA ---------------------------------------------------- 1 3 2.234D+01 1.766D+00 6.2D-02 1.4D-01 - 4 9 2.205D+01 1.486D-11 9.8D-01 3.6D-13 + 4 9 2.205D+01 1.422D-11 9.8D-01 2.8D-13 SUCCESSFUL CONVERGENCE (NO ERRORS). IFLAG = 0 @@ -773,13 +773,13 @@ PDAF Local domains without observations: 620 PDAF Maximum local observation dimension: 1 PDAF Total avg. local observation dimension: 0.0 PDAF Avg. for domains with observations: 1.0 -PDAF --- duration of hyb3D-Var update: 0.003 s +PDAF --- duration of hyb3D-Var update: 0.002 s PDAF Call pre-post routine after analysis step Analyze and write assimilated state ensemble --- compute ensemble mean RMS error according to sampled variance: 5.5208E-01 --- write ensemble and state estimate -PDAF --- duration of poststep: 0.011 s +PDAF --- duration of poststep: 0.013 s PDAF Forecast ------------------------------------------------------- 18 No more observations - end assimilation @@ -795,25 +795,23 @@ PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- PDAF Initialize PDAF: 0.009 s PDAF init_ens_pdaf: 0.004 s -PDAF Ensemble forecast: 0.123 s -PDAF MPI communication in PDAF: 0.123 s +PDAF Ensemble forecast: 0.143 s +PDAF MPI communication in PDAF: 0.143 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF Hyb3DVAR analysis: 0.062 s -PDAF PDAF-internal operations: 0.008 s -PDAF OMI-internal routines: 0.012 s -PDAF Solver: 0.000 s -PDAF cvt_ens_pdaf: 0.001 s +PDAF Hyb3DVAR analysis: 0.041 s +PDAF PDAF-internal operations: 0.009 s +PDAF OMI-internal routines: 0.000 s +PDAF Solver: 0.001 s +PDAF cvt_ens_pdaf: 0.002 s PDAF cvt_ens_adj_pdaf: 0.000 s PDAF Timers in LESTKF only PDAF init_n_domains_pdaf: 0.000 s -PDAF init_dim_l_pdaf: 0.001 s -PDAF g2l_state_pdaf: 0.000 s -PDAF l2g_state_pdaf: 0.001 s +PDAF init_dim_l_pdaf: 0.000 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.008 s +PDAF init_dim_obs_pdafomi: 0.005 s PDAF obs_op_pdafomi: 0.000 s -PDAF obs_op_lin_pdafomi: 0.001 s +PDAF obs_op_lin_pdafomi: 0.000 s PDAF obs_op_adj_pdafomi: 0.000 s -PDAF init_dim_obs_l_pdafomi: 0.014 s -PDAF prepoststep_pdaf: 0.210 s +PDAF init_dim_obs_l_pdafomi: 0.006 s +PDAF prepoststep_pdaf: 0.222 s diff --git a/tutorial/verification/out.online_2D_serialmodel_ESTKF b/tutorial/verification/out.online_2D_serialmodel_ESTKF index 4b5414914..e23e9ffc4 100644 --- a/tutorial/verification/out.online_2D_serialmodel_ESTKF +++ b/tutorial/verification/out.online_2D_serialmodel_ESTKF @@ -65,7 +65,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -403,16 +403,16 @@ PDAF analysis step: 0.027 MiB (temporary) PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- -PDAF Initialize PDAF: 0.026 s +PDAF Initialize PDAF: 0.010 s PDAF init_ens_pdaf: 0.004 s -PDAF Ensemble forecast: 0.111 s -PDAF MPI communication in PDAF: 0.110 s +PDAF Ensemble forecast: 0.146 s +PDAF MPI communication in PDAF: 0.145 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF ESTKF analysis: 0.005 s -PDAF PDAF-internal operations: 0.001 s -PDAF OMI-internal routines: 0.008 s +PDAF ESTKF analysis: 0.007 s +PDAF PDAF-internal operations: 0.002 s +PDAF OMI-internal routines: 0.000 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.004 s +PDAF init_dim_obs_pdafomi: 0.005 s PDAF obs_op_pdafomi: 0.000 s -PDAF prepoststep_pdaf: 0.218 s +PDAF prepoststep_pdaf: 0.219 s diff --git a/tutorial/verification/out.online_2D_serialmodel_openmp b/tutorial/verification/out.online_2D_serialmodel_openmp index e3f06e507..c6436dc36 100644 --- a/tutorial/verification/out.online_2D_serialmodel_openmp +++ b/tutorial/verification/out.online_2D_serialmodel_openmp @@ -47,11 +47,11 @@ INITIALIZE 2D TUTORIAL MODEL Grid size: 36 x 18 Time steps 18 - - INITIALIZE PDAF - ONLINE MODE INITIALIZE 2D TUTORIAL MODEL Grid size: 36 x 18 Time steps 18 + + INITIALIZE PDAF - ONLINE MODE PARSER: screen= 1 PARSER: dim_ens= 9 PARSER: filtertype= 7 @@ -65,7 +65,7 @@ PDAF ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ PDAF +++ PDAF +++ PDAF +++ Parallel Data Assimilation Framework +++ PDAF +++ +++ -PDAF +++ Version 2.2.1 +++ +PDAF +++ Version 2.3 +++ PDAF +++ +++ PDAF +++ Please cite +++ PDAF +++ L. Nerger and W. Hiller, Computers and Geosciences +++ @@ -533,19 +533,17 @@ PDAF PDAF Timing information - call-back routines PDAF ---------------------------------------------------- PDAF Initialize PDAF: 0.010 s PDAF init_ens_pdaf: 0.004 s -PDAF Ensemble forecast: 0.111 s -PDAF MPI communication in PDAF: 0.111 s +PDAF Ensemble forecast: 0.160 s +PDAF MPI communication in PDAF: 0.159 s PDAF distribute_state_pdaf: 0.000 s PDAF collect_state_pdaf: 0.000 s -PDAF LESTKF analysis: 0.031 s -PDAF PDAF-internal operations: 0.003 s -PDAF OMI-internal routines: 0.013 s +PDAF LESTKF analysis: 0.022 s +PDAF PDAF-internal operations: 0.008 s +PDAF OMI-internal routines: 0.000 s PDAF init_n_domains_pdaf: 0.000 s -PDAF init_dim_l_pdaf: 0.002 s -PDAF g2l_state_pdaf: 0.000 s -PDAF l2g_state_pdaf: 0.000 s +PDAF init_dim_l_pdaf: 0.000 s PDAF Time in OMI observation module routines -PDAF init_dim_obs_pdafomi: 0.004 s +PDAF init_dim_obs_pdafomi: 0.002 s PDAF obs_op_pdafomi: 0.000 s -PDAF init_dim_obs_l_pdafomi: 0.018 s -PDAF prepoststep_pdaf: 0.188 s +PDAF init_dim_obs_l_pdafomi: 0.004 s +PDAF prepoststep_pdaf: 0.266 s From 82c839efed1954ffe7507d7bfe80df4a679af964 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Sat, 7 Sep 2024 18:03:11 +0200 Subject: [PATCH 75/83] Update readme. --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index c87d0ef65..ec0ea6da3 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ PDAF provides The PDAF release provides also - Tutorial codes demontrating the implementation -- Code templates for assist in the implementation +- Code templates to assist in the implementation - Toy models fully implemented with PDAF for the study of data assimilation methods. - Model bindings for using PDAF with different models From 447dfc2fac6ea2c585c86bb0359917e6f593ca85 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Sat, 7 Sep 2024 18:13:21 +0200 Subject: [PATCH 76/83] Revert classical template file to not use PDAFlocal --- templates/classical/offline/Makefile | 2 + .../offline/assimilation_pdaf_offline.F90 | 29 +++-- templates/classical/offline/dummympi/mpif.h | 20 --- .../classical/offline/g2l_state_pdaf.F90 | 61 ++++++++++ .../classical/offline/init_dim_l_pdaf.F90 | 14 +-- .../classical/offline/l2g_state_pdaf.F90 | 62 ++++++++++ .../classical/offline/mod_assimilation.F90 | 59 +++++---- templates/classical/offline/parser_mpi.F90 | 113 +++++++++-------- templates/classical/online/Makefile | 2 + .../classical/online/assimilate_pdaf.F90 | 34 +++--- templates/classical/online/g2l_state_pdaf.F90 | 63 ++++++++++ .../classical/online/init_dim_l_pdaf.F90 | 14 +-- templates/classical/online/l2g_state_pdaf.F90 | 64 ++++++++++ .../classical/online/mod_assimilation.F90 | 12 +- templates/classical/online/parser_mpi.F90 | 115 +++++++++--------- 15 files changed, 444 insertions(+), 220 deletions(-) delete mode 100644 templates/classical/offline/dummympi/mpif.h create mode 100644 templates/classical/offline/g2l_state_pdaf.F90 create mode 100644 templates/classical/offline/l2g_state_pdaf.F90 create mode 100644 templates/classical/online/g2l_state_pdaf.F90 create mode 100644 templates/classical/online/l2g_state_pdaf.F90 diff --git a/templates/classical/offline/Makefile b/templates/classical/offline/Makefile index e8e5cd13c..6e52683fe 100644 --- a/templates/classical/offline/Makefile +++ b/templates/classical/offline/Makefile @@ -70,6 +70,8 @@ OBJ_USER_ENKF = add_obs_error_pdaf.o \ # User-supplied routines for localized analysis (LSEIK) OBJ_USER_LOCAL = init_n_domains_pdaf.o \ init_dim_l_pdaf.o \ + g2l_state_pdaf.o \ + l2g_state_pdaf.o \ prodrinva_l_pdaf.o \ init_obs_l_pdaf.o \ init_dim_obs_l_pdaf.o \ diff --git a/templates/classical/offline/assimilation_pdaf_offline.F90 b/templates/classical/offline/assimilation_pdaf_offline.F90 index d3d4c190a..d2569b5ff 100644 --- a/templates/classical/offline/assimilation_pdaf_offline.F90 +++ b/templates/classical/offline/assimilation_pdaf_offline.F90 @@ -54,6 +54,8 @@ SUBROUTINE assimilation_pdaf_offline() EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains init_dim_l_pdaf, & ! Initialize state dimension for local ana. domain init_dim_obs_l_pdaf,& ! Initialize dim. of obs. vector for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from global state + l2g_state_pdaf, & ! Init global state from state on local analysis domain g2l_obs_pdaf, & ! Restrict a global obs. vector to local analysis domain init_obs_l_pdaf, & ! Provide vector of measurements for local ana. domain prodRinvA_l_pdaf, & ! Provide product R^-1 A for some matrix A @@ -109,32 +111,32 @@ SUBROUTINE assimilation_pdaf_offline() init_obs_pdaf, prepoststep_ens_offline, add_obs_error_pdaf, init_obscovar_pdaf, & status) ELSE IF (filtertype == 3) THEN - CALL PDAFlocal_put_state_lseik( & + CALL PDAF_put_state_lseik( & collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_offline, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, g2l_obs_pdaf, init_obsvar_pdaf, & - init_obsvar_l_pdaf, status) + init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, status) ELSE IF (filtertype == 4) THEN CALL PDAF_put_state_etkf(collect_state_pdaf, init_dim_obs_pdaf, obs_op_pdaf, & init_obs_pdaf, prepoststep_ens_offline, prodRinvA_pdaf, init_obsvar_pdaf, status) ELSE IF (filtertype == 5) THEN - CALL PDAFlocal_put_state_letkf( & + CALL PDAF_put_state_letkf( & collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_offline, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, g2l_obs_pdaf, init_obsvar_pdaf, & - init_obsvar_l_pdaf, status) + init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, status) ELSE IF (filtertype == 6) THEN CALL PDAF_put_state_estkf(collect_state_pdaf, init_dim_obs_pdaf, obs_op_pdaf, & init_obs_pdaf, prepoststep_ens_offline, prodRinvA_pdaf, init_obsvar_pdaf, status) ELSE IF (filtertype == 7) THEN - CALL PDAFlocal_put_state_lestkf( & + CALL PDAF_put_state_lestkf( & collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_offline, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, g2l_obs_pdaf, init_obsvar_pdaf, & - init_obsvar_l_pdaf, status) + init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, status) ELSE IF (filtertype == 8) THEN CALL PDAF_put_state_lenkf(collect_state_pdaf, init_dim_obs_pdaf, obs_op_pdaf, & init_obs_pdaf, prepoststep_ens_offline, localize_covar_pdaf, add_obs_error_pdaf, & @@ -144,16 +146,17 @@ SUBROUTINE assimilation_pdaf_offline() obs_op_pdaf, init_obs_pdaf, prepoststep_ens_offline, & likelihood_pdaf, status) ELSE IF (filtertype == 10) THEN - CALL PDAFlocal_put_state_lnetf(collect_state_pdaf, init_dim_obs_f_pdaf, & + CALL PDAF_put_state_lnetf(collect_state_pdaf, init_dim_obs_f_pdaf, & obs_op_f_pdaf, init_obs_l_pdaf, prepoststep_ens_offline, & likelihood_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, g2l_obs_pdaf, status) + init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + g2l_obs_pdaf, status) ELSE IF (filtertype == 11) THEN - CALL PDAFlocal_put_state_lknetf( & + CALL PDAF_put_state_lknetf( & collect_state_pdaf, init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_offline, & prodRinvA_l_pdaf, prodRinvA_hyb_l_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, & likelihood_l_pdaf, likelihood_hyb_l_pdaf, status) ELSE IF (filtertype == 12) THEN diff --git a/templates/classical/offline/dummympi/mpif.h b/templates/classical/offline/dummympi/mpif.h deleted file mode 100644 index 0c74a3d1e..000000000 --- a/templates/classical/offline/dummympi/mpif.h +++ /dev/null @@ -1,20 +0,0 @@ -! This is a strongly reduced header file for those -! MPI variables used in PDAF MPI calls. This is only -! intended for compilation without a real MPI library. - - INTEGER MPI_STATUS_SIZE - PARAMETER (MPI_STATUS_SIZE=4) - - INTEGER MPI_INTEGER, MPI_REAL, MPI_DOUBLE_PRECISION, MPI_REAL8 - PARAMETER (MPI_REAL=26,MPI_DOUBLE_PRECISION=27,MPI_INTEGER=28,MPI_REAL8=27) - - INTEGER MPI_LOGICAL, MPI_UNDEFINED - PARAMETER (MPI_LOGICAL=29,MPI_UNDEFINED=30) - - INTEGER MPI_COMM_WORLD - PARAMETER (MPI_COMM_WORLD=91) - - INTEGER MPI_COMM_NULL - PARAMETER (MPI_COMM_NULL=92) - - INTEGER MPI_SUM, MPI_MAX diff --git a/templates/classical/offline/g2l_state_pdaf.F90 b/templates/classical/offline/g2l_state_pdaf.F90 new file mode 100644 index 000000000..f0dc52dfd --- /dev/null +++ b/templates/classical/offline/g2l_state_pdaf.F90 @@ -0,0 +1,61 @@ +!$Id$ +!BOP +! +! !ROUTINE: g2l_state_pdaf --- Restrict a model state to a local analysis domain +! +! !INTERFACE: +SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) + +! !DESCRIPTION: +! User-supplied routine for PDAF. +! Used in the filters: LSEIK/LETKF/LESTKF +! +! The routine is called during the loop over all +! local analysis domains in PDAF\_lseik\_update +! before the analysis on a single local analysis +! domain. It has to project the full PE-local +! model state onto the current local analysis +! domain. +! +! Generic implementation using index vector +! ID_LSTATE_IN_PSTATE. +! +! !REVISION HISTORY: +! 2013-02 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE mod_assimilation, & + ONLY: id_lstate_in_pstate + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(in) :: step ! Current time step + INTEGER, INTENT(in) :: domain_p ! Current local analysis domain + INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension + INTEGER, INTENT(in) :: dim_l ! Local state dimension + REAL, INTENT(in) :: state_p(dim_p) ! PE-local full state vector + REAL, INTENT(out) :: state_l(dim_l) ! State vector on local analysis domain + +! !CALLING SEQUENCE: +! Called by: PDAF_lseik_update (as U_g2l_state) +! Called by: PDAF_letkf_update (as U_g2l_state) +! Called by: PDAF_lestkf_update (as U_g2l_state) +! Called by: PDAF_lnetf_update (as U_g2l_state) +!EOP + +! *** local variables *** + INTEGER :: i ! Counter + + +! ************************************* +! *** Initialize local state vector *** +! ************************************* + + ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF + DO i = 1, dim_l + state_l(i) = state_p(id_lstate_in_pstate(i)) + END DO + +END SUBROUTINE g2l_state_pdaf diff --git a/templates/classical/offline/init_dim_l_pdaf.F90 b/templates/classical/offline/init_dim_l_pdaf.F90 index d3bcd8b5c..d8b544482 100644 --- a/templates/classical/offline/init_dim_l_pdaf.F90 +++ b/templates/classical/offline/init_dim_l_pdaf.F90 @@ -20,10 +20,8 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! Later revisions - see svn log ! ! !USES: - USE PDAFlocal, & ! Routine to provide local indices to PDAF - ONLY: PDAFlocal_set_indices USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l + ONLY: coords_l, id_lstate_in_pstate IMPLICIT NONE @@ -32,9 +30,6 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) INTEGER, INTENT(in) :: domain_p ! Current local analysis domain INTEGER, INTENT(out) :: dim_l ! Local state dimension -! !LOCAL VARIABLES: - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector - ! !CALLING SEQUENCE: ! Called by: PDAF_lseik_update (as U_init_dim_l) ! Called by: PDAF_lestkf_update (as U_init_dim_l) @@ -68,14 +63,9 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array + IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! id_lstate_in_pstate = ?? - ! Provide the index vector to PDAF - CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) - - ! Deallocate index array - DEALLOCATE(id_lstate_in_pstate) - END SUBROUTINE init_dim_l_pdaf diff --git a/templates/classical/offline/l2g_state_pdaf.F90 b/templates/classical/offline/l2g_state_pdaf.F90 new file mode 100644 index 000000000..b02229803 --- /dev/null +++ b/templates/classical/offline/l2g_state_pdaf.F90 @@ -0,0 +1,62 @@ +!$Id$ +!BOP +! +! !ROUTINE: l2g_state_pdaf --- Initialize full state from local analysis +! +! !INTERFACE: +SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) + +! !DESCRIPTION: +! User-supplied routine for PDAF. +! Used in the filters: LSEIK/LETKF/LESTKF +! +! The routine is called during the loop over all +! local analysis domains in PDAF\_X\_update +! after the analysis and ensemble transformation +! on a single local analysis domain. It has to +! initialize elements of the PE-local full state +! vector from the provided analysis state vector +! on the local analysis domain. +! +! Generic implementation using index vector +! ID_LSTATE_IN_PSTATE. +! +! !REVISION HISTORY: +! 2013-02 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE mod_assimilation, & + ONLY: id_lstate_in_pstate + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(in) :: step ! Current time step + INTEGER, INTENT(in) :: domain_p ! Current local analysis domain + INTEGER, INTENT(in) :: dim_l ! Local state dimension + INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension + REAL, INTENT(in) :: state_l(dim_l) ! State vector on local analysis domain + REAL, INTENT(inout) :: state_p(dim_p) ! PE-local full state vector + +! !CALLING SEQUENCE: +! Called by: PDAF_lseik_update (as U_l2g_state) +! Called by: PDAF_lestkf_update (as U_l2g_state) +! Called by: PDAF_letkf_update (as U_l2g_state) +! Called by: PDAF_lnetf_update (as U_l2g_state) +!EOP + +! *** local variables *** + INTEGER :: i ! Counter + + +! ************************************************** +! *** Initialize elements of global state vector *** +! ************************************************** + + ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF + DO i = 1, dim_l + state_p(id_lstate_in_pstate(i)) = state_l(i) + END DO + +END SUBROUTINE l2g_state_pdaf diff --git a/templates/classical/offline/mod_assimilation.F90 b/templates/classical/offline/mod_assimilation.F90 index 70e4f31e7..db8731bd9 100644 --- a/templates/classical/offline/mod_assimilation.F90 +++ b/templates/classical/offline/mod_assimilation.F90 @@ -34,29 +34,6 @@ MODULE mod_assimilation REAL, ALLOCATABLE :: obs_f(:) ! Vector holding full vector of observations REAL, ALLOCATABLE :: coords_obs_f(:,:) ! Array for full observation coordinates - REAL :: coords_l(2) ! Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector - REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations - -! *** Variables to handle multiple fields in the state vector *** - - INTEGER :: n_fields !< number of fields in state vector - INTEGER, ALLOCATABLE :: off_fields(:) !< Offsets of fields in state vector - INTEGER, ALLOCATABLE :: dim_fields(:) !< Dimension of fields in state vector - - ! Declare Fortran type holding the indices of model fields in the state vector - ! This can be extended to any number of fields - it severs to give each field a name - TYPE field_ids - INTEGER :: NAME_OF_FIELD_1 -! INTEGER :: NAME_OF_FIELD_2 -! INTEGER :: ... - END TYPE field_ids - - ! Type variable holding field IDs in state vector - TYPE(field_ids) :: id - -!$OMP THREADPRIVATE(coords_l, id_lobs_in_fobs, distance_l) - ! *** Below are the generic variables used for configuring PDAF *** ! *** Their values are set in init_PDAF_offline *** @@ -75,12 +52,18 @@ MODULE mod_assimilation INTEGER :: screen ! Control verbosity of PDAF ! (0) no outputs, (1) progess info, (2) add timings ! (3) debugging output - INTEGER :: dim_ens ! Size of ensemble + INTEGER :: dim_ens ! Size of ensemble for SEIK/LSEIK/EnKF/ETKF + ! Number of EOFs to be used for SEEK INTEGER :: filtertype ! Select filter algorithm: - ! SEIK (1), EnKF (2), LSEIK (3), ETKF (4), LETKF (5) + ! SEEK (0), SEIK (1), EnKF (2), LSEIK (3), ETKF (4), LETKF (5) ! ESTKF (6), LESTKF (7), LEnKF (8) ! NETF (9), LNETF (10), LKNETF(11), PF (12), 3DVAR (200) INTEGER :: subtype ! Subtype of filter algorithm + ! SEEK: + ! (0) evolve normalized modes + ! (1) evolve scaled modes with unit U + ! (2) fixed basis (V); variable U matrix + ! (3) fixed covar matrix (V,U kept static) ! SEIK: ! (0) ensemble forecast; new formulation ! (1) ensemble forecast; old formulation @@ -147,6 +130,9 @@ MODULE mod_assimilation ! (2) apply inflation on analysis ensemble REAL :: forget ! Forgetting factor for filter analysis INTEGER :: dim_bias ! dimension of bias vector +! ! SEEK + INTEGER :: int_rediag ! Interval to perform re-diagonalization in SEEK + REAL :: epsilon ! Epsilon for gradient approx. in SEEK forecast ! ! ENKF INTEGER :: rank_ana_enkf ! Rank to be considered for inversion of HPH ! ! SEIK/ETKF/ESTKF/LSEIK/LETKF/LESTKF/NETF/LNETF/LKNETF @@ -249,5 +235,28 @@ MODULE mod_assimilation ! ! Other variables - _NOT_ available as command line options! REAL :: time ! model time + REAL :: coords_l(2) ! Coordinates of local analysis domain + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector + INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector + REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations + +! *** Variables to handle multiple fields in the state vector *** + + INTEGER :: n_fields !< number of fields in state vector + INTEGER, ALLOCATABLE :: off_fields(:) !< Offsets of fields in state vector + INTEGER, ALLOCATABLE :: dim_fields(:) !< Dimension of fields in state vector + + ! Declare Fortran type holding the indices of model fields in the state vector + ! This can be extended to any number of fields - it severs to give each field a name + TYPE field_ids + INTEGER :: NAME_OF_FIELD_1 +! INTEGER :: NAME_OF_FIELD_2 +! INTEGER :: ... + END TYPE field_ids + + ! Type variable holding field IDs in state vector + TYPE(field_ids) :: id + +!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate, id_lobs_in_fobs, distance_l) END MODULE mod_assimilation diff --git a/templates/classical/offline/parser_mpi.F90 b/templates/classical/offline/parser_mpi.F90 index 6c42d82f8..603ab46c0 100644 --- a/templates/classical/offline/parser_mpi.F90 +++ b/templates/classical/offline/parser_mpi.F90 @@ -1,67 +1,64 @@ -!$Id$ -!BOP -! -! !MODULE: +!> Command line parser +!! +!! This module provides routine to parse command line +!! arguments of different types. This version is for +!! use with MPI parallelization. +!! +!! By default, this routine uses the intrinsics +!! 'get_command_count' and 'get_command_argument' +!! that are defined by the Fortran 2003 standard. +!! If a compiler does not support these functions, you +!! can use '-DF77' as a definition for the preprocessor. +!! In this case the Fortran77 standard 'iargc()' and +!! 'getarg()' are used. +!! +!! The module provides a generic subroutine to parse +!! variables of type INTEGER, REAL, or CHARACTER +!! (with length up to 100) from the command line. +!! +!! Usage: +!! SUBROUTINE PARSE(char(len=32) handle, variable) +!! The string 'handle' determines the name of +!! the parsed variable. +!! Example: handle='iters' parses a variable +!! specified on the command line by +!! '-iters value' +!! +!! Usage: +!! CALL PARSE(handle, int_variable) +!! Parses a variable of type integer +!! whose name is given by the string +!! handle. +!! +!! CALL PARSE(handle, real_variable) +!! Parses a variable of type real +!! whose name is given by the string +!! handle. +!! +!! CALL PARSE(handle, character_variable) +!! Parses a string variable of maxmimal +!! length of 100 characters whose name is +!! given by the string handle. +!! +!! CALL PARSE(handle, logical_variable) +!! Parses a variable of type logical +!! whose name is given by the string +!! handle. In the command line it has +!! to be specified as 'T' or 'F'. +!! +!! __Revision history:__ +!! * 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code +!! * Later revisions - see repository log +!! MODULE parser -! !DESCRIPTION: -! This module provides routine to parse command line -! arguments of different types. This version is for -! use with MPI parallelization. -! By default, this routine uses the intrinsics -! 'get\_command\_count' and 'get\_command\_argument' -! that are define by the Fortran 2003 standard. -! If a compiler does not support these functions, you -! can use '-DF77' as a definition for the preprocessor. -! In this case the Fortran77 standard 'iargc()' and -! 'getarg()' are used. -! -! The module provides a generic subroutine to parse -! variables of type INTEGER, REAL, or CHARACTER -! (with length up to 100) from the command line. -! -! Usage: \begin{verbatim} -! SUBROUTINE PARSE(char(len=32) handle, variable) -! The string 'handle' determines the name of -! the parsed variable. -! Example: handle='iters' parses a variable -! specified on the command line by -! '-iters value' -! -! Usage: -! CALL PARSE(handle, int_variable) -! Parses a variable of type integer -! whose name is given by the string -! handle. -! -! CALL PARSE(handle, real_variable) -! Parses a variable of type real -! whose name is given by the string -! handle. -! -! CALL PARSE(handle, character_variable) -! Parses a string variable of maxmimal -! length of 100 characters whose name is -! given by the string handle. -! -! CALL PARSE(handle, logical_variable) -! Parses a variable of type logical -! whose name is given by the string -! handle. In the command line it has -! to be specified as 'T' or 'F'. -! \end{verbatim} -! -! !REVISION HISTORY: -! 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE mpi + use mpi USE mod_parallel, & ONLY: abort_parallel + IMPLICIT NONE SAVE - + ! !PUBLIC MEMBER FUNCTIONS: PUBLIC :: parse CHARACTER(len=32), PUBLIC :: handle ! handle for command line parser diff --git a/templates/classical/online/Makefile b/templates/classical/online/Makefile index 41ac05904..e115c1d9e 100644 --- a/templates/classical/online/Makefile +++ b/templates/classical/online/Makefile @@ -68,6 +68,8 @@ OBJ_USER_ENKF = add_obs_error_pdaf.o \ # User-supplied routines for localized analysis (LSEIK) OBJ_USER_LOCAL = init_n_domains_pdaf.o \ init_dim_l_pdaf.o \ + g2l_state_pdaf.o \ + l2g_state_pdaf.o \ prodrinva_l_pdaf.o \ init_obs_l_pdaf.o \ init_dim_obs_l_pdaf.o \ diff --git a/templates/classical/online/assimilate_pdaf.F90 b/templates/classical/online/assimilate_pdaf.F90 index 89aabd9b6..e2fcc0221 100644 --- a/templates/classical/online/assimilate_pdaf.F90 +++ b/templates/classical/online/assimilate_pdaf.F90 @@ -54,6 +54,8 @@ SUBROUTINE assimilate_pdaf() EXTERNAL :: init_n_domains_pdaf, & ! Provide number of local analysis domains init_dim_l_pdaf, & ! Initialize state dimension for local ana. domain init_dim_obs_l_pdaf,& ! Initialize dim. of obs. vector for local ana. domain + g2l_state_pdaf, & ! Get state on local ana. domain from global state + l2g_state_pdaf, & ! Init global state from state on local analysis domain g2l_obs_pdaf, & ! Restrict a global obs. vector to local analysis domain init_obs_l_pdaf, & ! Provide vector of measurements for local ana. domain prodRinvA_l_pdaf, & ! Provide product R^-1 A for some local matrix A @@ -89,33 +91,34 @@ SUBROUTINE assimilate_pdaf() init_obs_pdaf, prepoststep_ens_pdaf, add_obs_error_pdaf, init_obscovar_pdaf, & next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 3) THEN - CALL PDAFlocal_assimilate_lseik(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAF_assimilate_lseik(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_pdaf, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, & - next_observation_pdaf, status_pdaf) + init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 4) THEN CALL PDAF_assimilate_etkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdaf, obs_op_pdaf, & init_obs_pdaf, prepoststep_ens_pdaf, prodRinvA_pdaf, init_obsvar_pdaf, next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 5) THEN - CALL PDAFlocal_assimilate_letkf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAF_assimilate_letkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_pdaf, & prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, & - next_observation_pdaf, status_pdaf) + init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 6) THEN CALL PDAF_assimilate_estkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdaf, obs_op_pdaf, & init_obs_pdaf, prepoststep_ens_pdaf, prodRinvA_pdaf, init_obsvar_pdaf, next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 7) THEN - CALL PDAFlocal_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & - init_dim_obs_f_pdaf, obs_op_f_pdaf, init_obs_f_pdaf, init_obs_l_pdaf, & - prepoststep_ens_pdaf, prodRinvA_l_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_obs_pdaf, init_obsvar_pdaf, & - init_obsvar_l_pdaf, next_observation_pdaf, status_pdaf) + CALL PDAF_assimilate_lestkf(collect_state_pdaf, distribute_state_pdaf, & + init_dim_obs_f_pdaf, obs_op_f_pdaf, & + init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_pdaf, & + prodRinvA_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & + init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 8) THEN CALL PDAF_assimilate_lenkf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_pdaf, obs_op_pdaf, & @@ -127,17 +130,18 @@ SUBROUTINE assimilate_pdaf() obs_op_pdaf, init_obs_pdaf, prepoststep_ens_pdaf, & likelihood_pdaf, next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 10) THEN - CALL PDAFlocal_assimilate_lnetf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAF_assimilate_lnetf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, & obs_op_f_pdaf, init_obs_l_pdaf, prepoststep_ens_pdaf, & likelihood_l_pdaf, init_n_domains_pdaf, init_dim_l_pdaf, & - init_dim_obs_l_pdaf, g2l_obs_pdaf, next_observation_pdaf, status_pdaf) + init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & + g2l_obs_pdaf, next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 11) THEN - CALL PDAFlocal_assimilate_lknetf(collect_state_pdaf, distribute_state_pdaf, & + CALL PDAF_assimilate_lknetf(collect_state_pdaf, distribute_state_pdaf, & init_dim_obs_f_pdaf, obs_op_f_pdaf, & init_obs_f_pdaf, init_obs_l_pdaf, prepoststep_ens_pdaf, & prodRinvA_l_pdaf, prodRinvA_hyb_l_pdaf, init_n_domains_pdaf, & - init_dim_l_pdaf, init_dim_obs_l_pdaf, & + init_dim_l_pdaf, init_dim_obs_l_pdaf, g2l_state_pdaf, l2g_state_pdaf, & g2l_obs_pdaf, init_obsvar_pdaf, init_obsvar_l_pdaf, & likelihood_l_pdaf, likelihood_hyb_l_pdaf, next_observation_pdaf, status_pdaf) ELSE IF (filtertype == 12) THEN diff --git a/templates/classical/online/g2l_state_pdaf.F90 b/templates/classical/online/g2l_state_pdaf.F90 new file mode 100644 index 000000000..bac45d3a2 --- /dev/null +++ b/templates/classical/online/g2l_state_pdaf.F90 @@ -0,0 +1,63 @@ +!$Id$ +!BOP +! +! !ROUTINE: g2l_state_pdaf --- Restrict a model state to a local analysis domain +! +! !INTERFACE: +SUBROUTINE g2l_state_pdaf(step, domain_p, dim_p, state_p, dim_l, state_l) + +! !DESCRIPTION: +! User-supplied routine for PDAF. +! Used in the filters: LSEIK/LETKF/LESTKF/LNETF +! +! The routine is called during the loop over all +! local analysis domains in PDAF\_lseik\_update +! before the analysis on a single local analysis +! domain. It has to project the full PE-local +! model state onto the current local analysis +! domain. +! +! Generic implementation using index vector +! ID_LSTATE_IN_PSTATE. +! +! The routine is called by each filter process. +! +! !REVISION HISTORY: +! 2005-09 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE mod_assimilation, & + ONLY: id_lstate_in_pstate + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(in) :: step ! Current time step + INTEGER, INTENT(in) :: domain_p ! Current local analysis domain + INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension + INTEGER, INTENT(in) :: dim_l ! Local state dimension + REAL, INTENT(in) :: state_p(dim_p) ! PE-local full state vector + REAL, INTENT(out) :: state_l(dim_l) ! State vector on local analysis domain + +! !CALLING SEQUENCE: +! Called by: PDAF_lseik_update (as U_g2l_state) +! Called by: PDAF_letkf_update (as U_g2l_state) +! Called by: PDAF_lestkf_update (as U_g2l_state) +!EOP + +! *** local variables *** + INTEGER :: i ! Counter + + +! ************************************* +! *** Initialize local state vector *** +! ************************************* + + ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF + DO i = 1, dim_l + state_l(i) = state_p(id_lstate_in_pstate(i)) + END DO + + +END SUBROUTINE g2l_state_pdaf diff --git a/templates/classical/online/init_dim_l_pdaf.F90 b/templates/classical/online/init_dim_l_pdaf.F90 index 082d2c795..c2acd109d 100644 --- a/templates/classical/online/init_dim_l_pdaf.F90 +++ b/templates/classical/online/init_dim_l_pdaf.F90 @@ -22,10 +22,8 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! Later revisions - see svn log ! ! !USES: - USE PDAFlocal, & ! Routine to provide local indices to PDAF - ONLY: PDAFlocal_set_indices USE mod_assimilation, & ! Variables for assimilation - ONLY: coords_l + ONLY: coords_l, id_lstate_in_pstate IMPLICIT NONE @@ -34,9 +32,6 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) INTEGER, INTENT(in) :: domain_p ! Current local analysis domain INTEGER, INTENT(out) :: dim_l ! Local state dimension -! !LOCAL VARIABLES: - INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector - ! !CALLING SEQUENCE: ! Called by: PDAF_lseik_update (as U_init_dim_l) ! Called by: PDAF_lestkf_update (as U_init_dim_l) @@ -70,14 +65,9 @@ SUBROUTINE init_dim_l_pdaf(step, domain_p, dim_l) ! ****************************************************** ! Allocate array + IF (ALLOCATED(id_lstate_in_pstate)) DEALLOCATE(id_lstate_in_pstate) ALLOCATE(id_lstate_in_pstate(dim_l)) ! id_lstate_in_pstate = ?? - ! Provide the index vector to PDAF - CALL PDAFlocal_set_indices(dim_l, id_lstate_in_pstate) - - ! Deallocate index array - DEALLOCATE(id_lstate_in_pstate) - END SUBROUTINE init_dim_l_pdaf diff --git a/templates/classical/online/l2g_state_pdaf.F90 b/templates/classical/online/l2g_state_pdaf.F90 new file mode 100644 index 000000000..05197184b --- /dev/null +++ b/templates/classical/online/l2g_state_pdaf.F90 @@ -0,0 +1,64 @@ +!$Id$ +!BOP +! +! !ROUTINE: l2g_state_pdaf --- Initialize full state from local analysis +! +! !INTERFACE: +SUBROUTINE l2g_state_pdaf(step, domain_p, dim_l, state_l, dim_p, state_p) + +! !DESCRIPTION: +! User-supplied routine for PDAF. +! Used in the filters: LSEIK/LETKF/LESTKF +! +! The routine is called during the loop over all +! local analysis domains in PDAF\_X\_update +! after the analysis and ensemble transformation +! on a single local analysis domain. It has to +! initialize elements of the PE-local full state +! vector from the provided analysis state vector +! on the local analysis domain. +! +! Generic implementation using index vector +! ID_LSTATE_IN_PSTATE. +! +! The routine is called by each filter process. +! +! !REVISION HISTORY: +! 2005-09 - Lars Nerger - Initial code +! Later revisions - see svn log +! +! !USES: + USE mod_assimilation, & + ONLY: id_lstate_in_pstate + + IMPLICIT NONE + +! !ARGUMENTS: + INTEGER, INTENT(in) :: step ! Current time step + INTEGER, INTENT(in) :: domain_p ! Current local analysis domain + INTEGER, INTENT(in) :: dim_l ! Local state dimension + INTEGER, INTENT(in) :: dim_p ! PE-local full state dimension + REAL, INTENT(in) :: state_l(dim_l) ! State vector on local analysis domain + REAL, INTENT(inout) :: state_p(dim_p) ! PE-local full state vector + +! !CALLING SEQUENCE: +! Called by: PDAF_lseik_update (as U_l2g_state) +! Called by: PDAF_lestkf_update (as U_l2g_state) +! Called by: PDAF_letkf_update (as U_l2g_state) +! Called by: PDAF_lnetf_update (as U_l2g_state) +!EOP + +! *** local variables *** + INTEGER :: i ! Counter + + +! ************************************************** +! *** Initialize elements of global state vector *** +! ************************************************** + + ! Generic initialization using ID_LSTATE_IN_PSTATE set in INIT_DIM_L_PDAF + DO i = 1, dim_l + state_p(id_lstate_in_pstate(i)) = state_l(i) + END DO + +END SUBROUTINE l2g_state_pdaf diff --git a/templates/classical/online/mod_assimilation.F90 b/templates/classical/online/mod_assimilation.F90 index f562776d0..8789a7e9a 100644 --- a/templates/classical/online/mod_assimilation.F90 +++ b/templates/classical/online/mod_assimilation.F90 @@ -33,12 +33,6 @@ MODULE mod_assimilation REAL, ALLOCATABLE :: obs_f(:) ! Vector holding full vector of observations REAL, ALLOCATABLE :: coords_obs_f(:,:) ! Array for full observation coordinates - REAL :: coords_l(2) ! Coordinates of local analysis domain - INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector - REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations - -!$OMP THREADPRIVATE(coords_l, id_lobs_in_fobs, distance_l) - ! *** Below are the generic variables used for configuring PDAF *** ! *** Their values are set in init_PDAF *** @@ -231,5 +225,11 @@ MODULE mod_assimilation ! ! Other variables - _NOT_ available as command line options! REAL :: time ! model time + REAL :: coords_l(2) ! Coordinates of local analysis domain + INTEGER, ALLOCATABLE :: id_lstate_in_pstate(:) ! Indices of local state vector in PE-local global state vector + INTEGER, ALLOCATABLE :: id_lobs_in_fobs(:) ! Indices of local observations in full obs. vector + REAL, ALLOCATABLE :: distance_l(:) ! Vector holding distances of local observations + +!$OMP THREADPRIVATE(coords_l, id_lstate_in_pstate, id_lobs_in_fobs, distance_l) END MODULE mod_assimilation diff --git a/templates/classical/online/parser_mpi.F90 b/templates/classical/online/parser_mpi.F90 index 0344f8665..6ddcbb65d 100644 --- a/templates/classical/online/parser_mpi.F90 +++ b/templates/classical/online/parser_mpi.F90 @@ -1,67 +1,64 @@ -!$Id: parser_mpi.F90 831 2021-11-06 16:16:30Z lnerger $ -!BOP -! -! !MODULE: +!> Command line parser +!! +!! This module provides routine to parse command line +!! arguments of different types. This version is for +!! use with MPI parallelization. +!! +!! By default, this routine uses the intrinsics +!! 'get_command_count' and 'get_command_argument' +!! that are defined by the Fortran 2003 standard. +!! If a compiler does not support these functions, you +!! can use '-DF77' as a definition for the preprocessor. +!! In this case the Fortran77 standard 'iargc()' and +!! 'getarg()' are used. +!! +!! The module provides a generic subroutine to parse +!! variables of type INTEGER, REAL, or CHARACTER +!! (with length up to 100) from the command line. +!! +!! Usage: +!! SUBROUTINE PARSE(char(len=32) handle, variable) +!! The string 'handle' determines the name of +!! the parsed variable. +!! Example: handle='iters' parses a variable +!! specified on the command line by +!! '-iters value' +!! +!! Usage: +!! CALL PARSE(handle, int_variable) +!! Parses a variable of type integer +!! whose name is given by the string +!! handle. +!! +!! CALL PARSE(handle, real_variable) +!! Parses a variable of type real +!! whose name is given by the string +!! handle. +!! +!! CALL PARSE(handle, character_variable) +!! Parses a string variable of maxmimal +!! length of 100 characters whose name is +!! given by the string handle. +!! +!! CALL PARSE(handle, logical_variable) +!! Parses a variable of type logical +!! whose name is given by the string +!! handle. In the command line it has +!! to be specified as 'T' or 'F'. +!! +!! __Revision history:__ +!! * 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code +!! * Later revisions - see repository log +!! MODULE parser -! !DESCRIPTION: -! This module provides routine to parse command line -! arguments of different types. This version is for -! use with MPI parallelization. -! By default, this routine uses the intrinsics -! 'get\_command\_count' and 'get\_command\_argument' -! that are define by the Fortran 2003 standard. -! If a compiler does not support these functions, you -! can use '-DF77' as a definition for the preprocessor. -! In this case the Fortran77 standard 'iargc()' and -! 'getarg()' are used. -! -! The module provides a generic subroutine to parse -! variables of type INTEGER, REAL, or CHARACTER -! (with length up to 100) from the command line. -! -! Usage: \begin{verbatim} -! SUBROUTINE PARSE(char(len=32) handle, variable) -! The string 'handle' determines the name of -! the parsed variable. -! Example: handle='iters' parses a variable -! specified on the command line by -! '-iters value' -! -! Usage: -! CALL PARSE(handle, int_variable) -! Parses a variable of type integer -! whose name is given by the string -! handle. -! -! CALL PARSE(handle, real_variable) -! Parses a variable of type real -! whose name is given by the string -! handle. -! -! CALL PARSE(handle, character_variable) -! Parses a string variable of maxmimal -! length of 100 characters whose name is -! given by the string handle. -! -! CALL PARSE(handle, logical_variable) -! Parses a variable of type logical -! whose name is given by the string -! handle. In the command line it has -! to be specified as 'T' or 'F'. -! \end{verbatim} -! -! !REVISION HISTORY: -! 2003-02 - Stephan Frickenhaus, Lars Nerger - Initial code -! Later revisions - see svn log -! -! !USES: - USE mpi - USE mod_parallel_pdaf, & + use mpi + USE mod_parallel_model, & ONLY: abort_parallel + IMPLICIT NONE SAVE - + ! !PUBLIC MEMBER FUNCTIONS: PUBLIC :: parse CHARACTER(len=32), PUBLIC :: handle ! handle for command line parser From f3aa6565fa800d55d3de763ffa15ccf07f9fa4a6 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Sun, 8 Sep 2024 19:52:31 +0200 Subject: [PATCH 77/83] Add example of user-provided routine to initialize local observations --- .../offline_2D_parallel/finalize_pdaf.F90 | 2 +- .../init_dim_obs_l_pdafomi_user.F90 | 115 ++++++++++++++++++ 2 files changed, 116 insertions(+), 1 deletion(-) create mode 100644 tutorial/offline_2D_parallel/init_dim_obs_l_pdafomi_user.F90 diff --git a/tutorial/classical/offline_2D_parallel/finalize_pdaf.F90 b/tutorial/classical/offline_2D_parallel/finalize_pdaf.F90 index 9c4cd494d..026673622 100644 --- a/tutorial/classical/offline_2D_parallel/finalize_pdaf.F90 +++ b/tutorial/classical/offline_2D_parallel/finalize_pdaf.F90 @@ -24,7 +24,7 @@ SUBROUTINE finalize_pdaf() !EOP ! *** Show allocated memory for PDAF *** - CALL PDAF_print_info(11) + IF (mype_world==0) CALL PDAF_print_info(10) ! *** Print PDAF timings onto screen *** IF (mype_world==0) CALL PDAF_print_info(3) diff --git a/tutorial/offline_2D_parallel/init_dim_obs_l_pdafomi_user.F90 b/tutorial/offline_2D_parallel/init_dim_obs_l_pdafomi_user.F90 new file mode 100644 index 000000000..4bf448e20 --- /dev/null +++ b/tutorial/offline_2D_parallel/init_dim_obs_l_pdafomi_user.F90 @@ -0,0 +1,115 @@ +!> Set dimension of local obs. vector and local obs. arrays +!! +!! This routine sets the number of local observations for the +!! current observation type for the local analysis domain +!! with coordinates COORD_l and a vector of localization cut-off +!! radii CRADIUS. +!! Further the routine initializes arrays for the index of a +!! local observation in the full observation vector and its +!! corresponding distance. +!! +!! This is a user-coded variant of PDAFomi_init_dim_obs_l +!! which yields better performance than the generic routine +!! provided by PDAF-OMI. This example uses an isotropic +!! localization with Cartesian distance calculation and +!! no periodicity of the model domain. +!! +!! __Revision history:__ +!! * 2024-09 - Lars Nerger - Initial code +!! * Later revisions - see repository log +!! +MODULE dim_obs_l_user + +CONTAINS + SUBROUTINE init_dim_obs_l_pdafomi_user(thisobs_l, thisobs, coords_l, locweight, cradius, & + sradius, cnt_obs_l_all) + + USE PDAFomi, & + ONLY: obs_f, obs_l, PDAFomi_set_dim_obs_l, PDAFomi_set_localization + + IMPLICIT NONE + +! *** Arguments *** + TYPE(obs_f), INTENT(inout) :: thisobs !< Data type with full observation + TYPE(obs_l), TARGET, INTENT(inout) :: thisobs_l !< Data type with local observation + REAL, INTENT(in) :: coords_l(thisobs%ncoord) !< Coordinates of current analysis domain + INTEGER, INTENT(in) :: locweight !< Type of localization function + REAL, INTENT(in) :: cradius !< Vector of localization cut-off radii + REAL, INTENT(in) :: sradius !< Vector of support radii of localization function + INTEGER, INTENT(inout) :: cnt_obs_l_all !< Local dimension of observation vector over all obs. types + +! *** Local variables *** + INTEGER :: i, cnt_l ! Counters + INTEGER :: cnt_obs ! Counted number of local observations + REAL :: distance2 ! squared distance + REAL :: dists(thisobs%ncoord) ! Distance vector between analysis point and observation + REAL :: crad2 ! square cut-off radius + + + doassim: IF (thisobs%doassim == 1) THEN + + +! ************************************** +! *** Store localization information *** +! ************************************** + + CALL PDAFomi_set_localization(thisobs_l, cradius, sradius, locweight) + + +! ********************************************** +! *** Initialize local observation dimension *** +! ********************************************** + + crad2 = thisobs_l%cradius(1) * thisobs_l%cradius(1) + + cnt_obs = 0 + countobs: DO i = 1, thisobs%dim_obs_f + + dists(1) = ABS(coords_l(1) - thisobs%ocoord_f(1, i)) + dists(2) = ABS(coords_l(2) - thisobs%ocoord_f(2, i)) + + distance2 = dists(1)*dists(1) + dists(2)*dists(2) + + ! Count observations within squared radius + IF (distance2 <= crad2) cnt_obs = cnt_obs + 1 + END DO countobs + + +! ************************************************ +! *** Initialize local observation for PDAFomi *** +! ************************************************ + + CALL PDAFomi_set_dim_obs_l(thisobs_l, thisobs, cnt_obs_l_all, cnt_obs) + + +! **************************************************************** +! *** Initialize local arrays in thisobs_l for local distances *** +! *** and indices of local obs. in full obs. vector *** +! **************************************************************** + + haveobs: IF (cnt_obs>0) THEN + + cnt_l = 0 + scanobs: DO i = 1, thisobs%dim_obs_f + + dists(1) = ABS(coords_l(1) - thisobs%ocoord_f(1, i)) + dists(2) = ABS(coords_l(2) - thisobs%ocoord_f(2, i)) + + distance2 = dists(1)*dists(1) + dists(2)*dists(2) + + IF (distance2 <= crad2) THEN + + cnt_l = cnt_l + 1 + + thisobs_l%id_obs_l(cnt_l) = i ! Index of local obs. in full obs. vector + thisobs_l%distance_l(cnt_l) = SQRT(distance2) ! distance + thisobs_l%cradius_l(cnt_l) = thisobs_l%cradius(1) ! cut-off radius + thisobs_l%sradius_l(cnt_l) = thisobs_l%sradius(1) ! support radius + END IF + END DO scanobs + END IF haveobs + + END IF doassim + + END SUBROUTINE init_dim_obs_l_pdafomi_user +END MODULE dim_obs_l_user From 3504e20993b0e8f9633f7cfcab540f4567f14a04 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Tue, 10 Sep 2024 08:20:06 +0200 Subject: [PATCH 78/83] Add example of user-provided alternative for PDAFomi_init_dim_obs_l --- .../init_dim_obs_l_pdafomi_user.F90 | 103 +++++++++--------- 1 file changed, 49 insertions(+), 54 deletions(-) diff --git a/tutorial/offline_2D_parallel/init_dim_obs_l_pdafomi_user.F90 b/tutorial/offline_2D_parallel/init_dim_obs_l_pdafomi_user.F90 index 4bf448e20..b467d032d 100644 --- a/tutorial/offline_2D_parallel/init_dim_obs_l_pdafomi_user.F90 +++ b/tutorial/offline_2D_parallel/init_dim_obs_l_pdafomi_user.F90 @@ -18,68 +18,64 @@ !! * 2024-09 - Lars Nerger - Initial code !! * Later revisions - see repository log !! -MODULE dim_obs_l_user +SUBROUTINE init_dim_obs_l_pdafomi_user(thisobs_l, thisobs, coords_l, locweight, cradius, & + sradius, cnt_obs_l_all) -CONTAINS - SUBROUTINE init_dim_obs_l_pdafomi_user(thisobs_l, thisobs, coords_l, locweight, cradius, & - sradius, cnt_obs_l_all) + USE PDAFomi, & + ONLY: obs_f, obs_l, PDAFomi_set_dim_obs_l, PDAFomi_set_localization - USE PDAFomi, & - ONLY: obs_f, obs_l, PDAFomi_set_dim_obs_l, PDAFomi_set_localization - - IMPLICIT NONE + IMPLICIT NONE ! *** Arguments *** - TYPE(obs_f), INTENT(inout) :: thisobs !< Data type with full observation - TYPE(obs_l), TARGET, INTENT(inout) :: thisobs_l !< Data type with local observation - REAL, INTENT(in) :: coords_l(thisobs%ncoord) !< Coordinates of current analysis domain - INTEGER, INTENT(in) :: locweight !< Type of localization function - REAL, INTENT(in) :: cradius !< Vector of localization cut-off radii - REAL, INTENT(in) :: sradius !< Vector of support radii of localization function - INTEGER, INTENT(inout) :: cnt_obs_l_all !< Local dimension of observation vector over all obs. types + TYPE(obs_f), INTENT(inout) :: thisobs !< Data type with full observation + TYPE(obs_l), TARGET, INTENT(inout) :: thisobs_l !< Data type with local observation + REAL, INTENT(in) :: coords_l(thisobs%ncoord) !< Coordinates of current analysis domain + INTEGER, INTENT(in) :: locweight !< Type of localization function + REAL, INTENT(in) :: cradius !< Vector of localization cut-off radii + REAL, INTENT(in) :: sradius !< Vector of support radii of localization function + INTEGER, INTENT(inout) :: cnt_obs_l_all !< Local dimension of observation vector over all obs. types ! *** Local variables *** - INTEGER :: i, cnt_l ! Counters - INTEGER :: cnt_obs ! Counted number of local observations - REAL :: distance2 ! squared distance - REAL :: dists(thisobs%ncoord) ! Distance vector between analysis point and observation - REAL :: crad2 ! square cut-off radius - + INTEGER :: i, cnt_l ! Counters + INTEGER :: cnt_obs ! Counted number of local observations + REAL :: distance2 ! squared distance + REAL :: dists(thisobs%ncoord) ! Distance vector between analysis point and observation + REAL :: crad2 ! square cut-off radius - doassim: IF (thisobs%doassim == 1) THEN + doassim: IF (thisobs%doassim == 1) THEN ! ************************************** ! *** Store localization information *** ! ************************************** - CALL PDAFomi_set_localization(thisobs_l, cradius, sradius, locweight) + CALL PDAFomi_set_localization(thisobs_l, cradius, sradius, locweight) -! ********************************************** -! *** Initialize local observation dimension *** -! ********************************************** +! ******************************** +! *** Count local observations *** +! ******************************** - crad2 = thisobs_l%cradius(1) * thisobs_l%cradius(1) + crad2 = thisobs_l%cradius(1) * thisobs_l%cradius(1) - cnt_obs = 0 - countobs: DO i = 1, thisobs%dim_obs_f + cnt_obs = 0 + countobs: DO i = 1, thisobs%dim_obs_f - dists(1) = ABS(coords_l(1) - thisobs%ocoord_f(1, i)) - dists(2) = ABS(coords_l(2) - thisobs%ocoord_f(2, i)) + dists(1) = ABS(coords_l(1) - thisobs%ocoord_f(1, i)) + dists(2) = ABS(coords_l(2) - thisobs%ocoord_f(2, i)) - distance2 = dists(1)*dists(1) + dists(2)*dists(2) + distance2 = dists(1)*dists(1) + dists(2)*dists(2) - ! Count observations within squared radius - IF (distance2 <= crad2) cnt_obs = cnt_obs + 1 - END DO countobs + ! Count observations within squared radius + IF (distance2 <= crad2) cnt_obs = cnt_obs + 1 + END DO countobs ! ************************************************ ! *** Initialize local observation for PDAFomi *** ! ************************************************ - CALL PDAFomi_set_dim_obs_l(thisobs_l, thisobs, cnt_obs_l_all, cnt_obs) + CALL PDAFomi_set_dim_obs_l(thisobs_l, thisobs, cnt_obs_l_all, cnt_obs) ! **************************************************************** @@ -87,29 +83,28 @@ SUBROUTINE init_dim_obs_l_pdafomi_user(thisobs_l, thisobs, coords_l, locweight, ! *** and indices of local obs. in full obs. vector *** ! **************************************************************** - haveobs: IF (cnt_obs>0) THEN + haveobs: IF (cnt_obs>0) THEN - cnt_l = 0 - scanobs: DO i = 1, thisobs%dim_obs_f + cnt_l = 0 + scanobs: DO i = 1, thisobs%dim_obs_f - dists(1) = ABS(coords_l(1) - thisobs%ocoord_f(1, i)) - dists(2) = ABS(coords_l(2) - thisobs%ocoord_f(2, i)) + dists(1) = ABS(coords_l(1) - thisobs%ocoord_f(1, i)) + dists(2) = ABS(coords_l(2) - thisobs%ocoord_f(2, i)) - distance2 = dists(1)*dists(1) + dists(2)*dists(2) + distance2 = dists(1)*dists(1) + dists(2)*dists(2) - IF (distance2 <= crad2) THEN + IF (distance2 <= crad2) THEN - cnt_l = cnt_l + 1 + cnt_l = cnt_l + 1 - thisobs_l%id_obs_l(cnt_l) = i ! Index of local obs. in full obs. vector - thisobs_l%distance_l(cnt_l) = SQRT(distance2) ! distance - thisobs_l%cradius_l(cnt_l) = thisobs_l%cradius(1) ! cut-off radius - thisobs_l%sradius_l(cnt_l) = thisobs_l%sradius(1) ! support radius - END IF - END DO scanobs - END IF haveobs + thisobs_l%id_obs_l(cnt_l) = i ! Index of local obs. in full obs. vector + thisobs_l%distance_l(cnt_l) = SQRT(distance2) ! distance + thisobs_l%cradius_l(cnt_l) = thisobs_l%cradius(1) ! cut-off radius + thisobs_l%sradius_l(cnt_l) = thisobs_l%sradius(1) ! support radius + END IF + END DO scanobs + END IF haveobs - END IF doassim + END IF doassim - END SUBROUTINE init_dim_obs_l_pdafomi_user -END MODULE dim_obs_l_user +END SUBROUTINE init_dim_obs_l_pdafomi_user From 65d539104c832eb9745a975ba1a942d50bf9119a Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Tue, 10 Sep 2024 08:23:03 +0200 Subject: [PATCH 79/83] Some cleanup --- src/PDAFomi_dim_obs_l.F90 | 29 +++++++++++++++++++++-------- src/PDAFomi_obs_l.F90 | 2 +- 2 files changed, 22 insertions(+), 9 deletions(-) diff --git a/src/PDAFomi_dim_obs_l.F90 b/src/PDAFomi_dim_obs_l.F90 index 525aa4cac..91a6a0543 100644 --- a/src/PDAFomi_dim_obs_l.F90 +++ b/src/PDAFomi_dim_obs_l.F90 @@ -39,8 +39,17 @@ !! Compute and check distance for isotropic localization !! * PDAFomi_check_dist2_noniso_loop \n !! Compute and check distance for non-isotropic localization -!! * PDAFomi_set_dim_obs_l \ +!! * PDAFomi_set_localization \n +!! Store localization parameters in OMI (for isotropic localization) +!! * PDAFomi_set_localization_noniso \n +!! Store localization parameters in OMI (for non-isotropic localization) +!! * PDAFomi_set_dim_obs_l \n !! Register local observation with OMI +!! * PDAFomi_store_obs_l_index \n +!! Store index, distance, cradius, and sradius of a local observation +!! * PDAFomi_store_obs_l_index_vdist \n +!! Store index, distance, cradius, sradius, and vertical distance of +!! a local observation for 2+1D factorized localization !! !! __Revision history:__ !! * 2019-06 - Lars Nerger - Initial code @@ -1528,11 +1537,11 @@ SUBROUTINE PDAFomi_set_localization_noniso(thisobs_l, nradii, cradius, sradius, ! *** Arguments *** TYPE(obs_l), INTENT(inout) :: thisobs_l !< Data type with local observation - INTEGER, INTENT(in) :: nradii !< Number of radii to consider for localization - REAL, INTENT(in) :: cradius(nradii) !< Localization cut-off radius - REAL, INTENT(in) :: sradius(nradii) !< Support radius of localization function - INTEGER, INTENT(in) :: locweight !< Type of localization function - INTEGER, INTENT(in) :: locweight_v !< Type of localization function in vertical direction (only for nradii=3) + INTEGER, INTENT(in) :: nradii !< Number of radii to consider for localization + REAL, INTENT(in) :: cradius(nradii) !< Localization cut-off radius + REAL, INTENT(in) :: sradius(nradii) !< Support radius of localization function + INTEGER, INTENT(in) :: locweight !< Type of localization function + INTEGER, INTENT(in) :: locweight_v !< Type of localization function in vertical direction (only for nradii=3) @@ -1570,7 +1579,7 @@ SUBROUTINE PDAFomi_set_dim_obs_l(thisobs_l, thisobs, cnt_obs_l_all, cnt_obs_l) ! *** Arguments *** TYPE(obs_f), INTENT(inout) :: thisobs !< Data type with full observation - TYPE(obs_l), TARGET, INTENT(inout) :: thisobs_l !< Data type with local observation + TYPE(obs_l), INTENT(inout) :: thisobs_l !< Data type with local observation INTEGER, INTENT(inout) :: cnt_obs_l_all !< Local dimension of observation vector over all obs. types INTEGER, INTENT(inout) :: cnt_obs_l !< Local dimension of single observation type vector @@ -1659,7 +1668,9 @@ SUBROUTINE PDAFomi_store_obs_l_index(thisobs_l, idx, id_obs_l, distance, & INTEGER, INTENT(in) :: id_obs_l !< Index of local observation in full observation array REAL, INTENT(in) :: distance !< Distance between local analysis domain and observation REAL, INTENT(in) :: cradius_l !< cut-off radius for this local observation + ! (directional radius in case of non-isotropic localization) REAL, INTENT(in) :: sradius_l !< support radius for this local observation + ! (directional radius in case of non-isotropic localization) ! *** Store values *** @@ -1700,8 +1711,10 @@ SUBROUTINE PDAFomi_store_obs_l_index_vdist(thisobs_l, idx, id_obs_l, distance, & INTEGER, INTENT(in) :: id_obs_l !< Index of local observation in full observation array REAL, INTENT(in) :: distance !< Distance between local analysis domain and observation REAL, INTENT(in) :: cradius_l !< cut-off radius for this local observation + ! (directional radius in case of non-isotropic localization) REAL, INTENT(in) :: sradius_l !< support radius for this local observation - REAL, INTENT(in) :: vdist !< support radius in vertical direction for 2+1D factorized + ! (directional radius in case of non-isotropic localization) + REAL, INTENT(in) :: vdist !< support radius in vertical direction for 2+1D factorized localization ! *** Store values *** diff --git a/src/PDAFomi_obs_l.F90 b/src/PDAFomi_obs_l.F90 index 4e6705b16..e9f720fc3 100644 --- a/src/PDAFomi_obs_l.F90 +++ b/src/PDAFomi_obs_l.F90 @@ -1175,7 +1175,7 @@ SUBROUTINE PDAFomi_observation_localization_weights(thisobs_l, thisobs, ncols, & INTEGER, INTENT(in) :: ncols !< Rank of initial covariance matrix REAL, INTENT(in) :: A_l(:, :) !< Input matrix (thisobs_l%dim_obs_l, ncols) INTEGER, INTENT(in) :: verbose !< Verbosity flag - REAL, dimension(thisobs_l%dim_obs_l), INTENT(out) :: weight !> Localization weights + REAL, INTENT(out) :: weight(thisobs_l%dim_obs_l) !> Localization weights ! *** local variables *** From 81d32647d37438f7fd71995a6832ae2f58d76ac2 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Sun, 15 Sep 2024 09:45:54 +0200 Subject: [PATCH 80/83] Add options to select which tests to run --- tutorial/runtests.sh | 244 +++++++++++++++++++++++-------------------- 1 file changed, 132 insertions(+), 112 deletions(-) diff --git a/tutorial/runtests.sh b/tutorial/runtests.sh index 8e9bc8db4..1dd27db78 100755 --- a/tutorial/runtests.sh +++ b/tutorial/runtests.sh @@ -7,6 +7,9 @@ export DA_SPECS2="-filtertype 6 -screen 1" export DA_SPECS3="-filtertype 7 screen 1 -assim_A .false. -assim_B .true" COMPILE=1 +RUN_OFFLINE=1 +RUN_ONLINE_SERIAL=1 +RUN_ONLINE_PARALLEL=1 echo "------------------ COMPILING ----------------" @@ -85,116 +88,133 @@ fi echo " " echo "-------------------- RUNNING ----------------" +#--------- OFFLINE ------------- -echo "------------ offline_2D_serial ---------------------------------------------" -export OMP_NUM_THREADS=1 -cd offline_2D_serial -make cleandataq -./PDAF_offline $DA_SPECS > ../out.offline_2D_serial -cd .. -python verification/check_offline.py offline_2D_serial - -echo "------------ offline_2D_serial ---------------------------------------------" -export OMP_NUM_THREADS=1 -cd offline_2D_serial -make cleandataq -./PDAF_offline $DA_SPECS2 > ../out.offline_2D_serial_ESTKF -cd .. -python verification/check_offline2.py offline_2D_serial offline_2D_serial_ESTKF - -echo "------------ offline_2D_openmp ---------------------------------------------" -export OMP_NUM_THREADS=4 -cd offline_2D_serial -make cleandataq -./PDAF_offline $DA_SPECS > ../out.offline_2D_openmp -cd .. -python verification/check_offline.py offline_2D_serial - -echo "------------ offline_2D_parallel -------------------------------------------" -export OMP_NUM_THREADS=1 -cd offline_2D_parallel -make cleandataq -mpirun -np 4 ./PDAF_offline $DA_SPECS > ../out.offline_2D_parallel -cd .. -python verification/check_offline.py offline_2D_parallel - -echo "------------ online_2D_serialmodel LESTKF ----------------------------------" -export OMP_NUM_THREADS=1 -cd online_2D_serialmodel -make cleandataq -mpirun --oversubscribe -np 9 ./model_pdaf -dim_ens 9 $DA_SPECS > ../out.online_2D_serialmodel -cd .. -python verification/check_online2.py online_2D_serialmodel online_2D_serialmodel - -echo "------------ online_2D_serialmodel_openmp LESTKF ---------------------------" -export OMP_NUM_THREADS=2 -cd online_2D_serialmodel -make cleandataq -mpirun --oversubscribe -np 9 ./model_pdaf -dim_ens 9 $DA_SPECS > ../out.online_2D_serialmodel_openmp -cd .. -python verification/check_online.py online_2D_serialmodel - -echo "------------ online_2D_serialmodel_2fields LESTKF --------------------------" -export OMP_NUM_THREADS=1 -cd online_2D_serialmodel_2fields -make cleandataq -mpirun --oversubscribe -np 9 ./model_pdaf -dim_ens 9 $DA_SPECS > ../out.online_2D_serialmodel_2fields -cd .. -python verification/check_online2.py online_2D_serialmodel_2fields online_2D_serialmodel - -echo "------------ online_2D_serialmodel_2fields LESTKF obs-type B ---------------" -export OMP_NUM_THREADS=1 -cd online_2D_serialmodel_2fields -make cleandataq -mpirun --oversubscribe -np 9 ./model_pdaf -dim_ens 9 $DA_SPECS3 > ../out.online_2D_serialmodel_2fields_obsB -cd .. -python verification/check_online3.py online_2D_serialmodel_2fields online_2D_serialmodel_2fields_obsB - -echo "------------ online_2D_parallelmodel LESTKF --------------------------------" -export OMP_NUM_THREADS=1 -cd online_2D_parallelmodel -make cleandataq -mpirun --oversubscribe -np 18 ./model_pdaf -dim_ens 9 $DA_SPECS > ../out.online_2D_parallelmodel -cd .. -python verification/check_online.py online_2D_parallelmodel - -echo "------------ online_2D_serialmodel ESTKF -----------------------------------" -export OMP_NUM_THREADS=1 -cd online_2D_serialmodel -make cleandataq -mpirun --oversubscribe -np 9 ./model_pdaf -dim_ens 9 $DA_SPECS2 > ../out.online_2D_serialmodel_ESTKF -cd .. -python verification/check_online2.py online_2D_serialmodel online_2D_serialmodel_ESTKF - -echo "------------ online_2D_serialmodel_2fields ESTKF ---------------------------" -export OMP_NUM_THREADS=1 -cd online_2D_serialmodel_2fields -make cleandataq -mpirun --oversubscribe -np 9 ./model_pdaf -dim_ens 9 $DA_SPECS2 > ../out.online_2D_serialmodel_2fields_ESTKF -cd .. -python verification/check_online2.py online_2D_serialmodel_2fields online_2D_serialmodel_ESTKF - -echo "------------ online_2D_parallelmodel ESTKF ---------------------------------" -export OMP_NUM_THREADS=1 -cd online_2D_parallelmodel -make cleandataq -mpirun --oversubscribe -np 18 ./model_pdaf -dim_ens 9 $DA_SPECS2 > ../out.online_2D_parallelmodel_ESTKF -cd .. -python verification/check_online2.py online_2D_parallelmodel online_2D_parallelmodel_ESTKF - - -echo "------------ online_2D_parallelmodel_fullpar LESTKF ------------------------" -export OMP_NUM_THREADS=1 -cd online_2D_parallelmodel_fullpar -make cleandataq -mpirun --oversubscribe -np 20 ./model_pdaf -dim_ens 9 $DA_SPECS > ../out.online_2D_parallelmodel_fullpar -cd .. -python verification/check_online.py online_2D_parallelmodel_fullpar - -echo "------------ online_2D_parallelmodel_fullpar_1fpe LESTKF -------------------" -export OMP_NUM_THREADS=1 -cd online_2D_parallelmodel_fullpar_1fpe -make cleandataq -mpirun --oversubscribe -np 19 ./model_pdaf -dim_ens 9 $DA_SPECS > ../out.online_2D_parallelmodel_fullpar_1fpe -cd .. -python verification/check_online.py online_2D_parallelmodel_fullpar_1fpe +if [ $RUN_OFFLINE -eq 1 ] +then + + echo "------------ offline_2D_serial ---------------------------------------------" + export OMP_NUM_THREADS=1 + cd offline_2D_serial + make cleandataq + ./PDAF_offline $DA_SPECS > ../out.offline_2D_serial + cd .. + python verification/check_offline.py offline_2D_serial + + echo "------------ offline_2D_serial ---------------------------------------------" + export OMP_NUM_THREADS=1 + cd offline_2D_serial + make cleandataq + ./PDAF_offline $DA_SPECS2 > ../out.offline_2D_serial_ESTKF + cd .. + python verification/check_offline2.py offline_2D_serial offline_2D_serial_ESTKF + + echo "------------ offline_2D_openmp ---------------------------------------------" + export OMP_NUM_THREADS=4 + cd offline_2D_serial + make cleandataq + ./PDAF_offline $DA_SPECS > ../out.offline_2D_openmp + cd .. + python verification/check_offline.py offline_2D_serial + + echo "------------ offline_2D_parallel -------------------------------------------" + export OMP_NUM_THREADS=1 + cd offline_2D_parallel + make cleandataq + mpirun -np 4 ./PDAF_offline $DA_SPECS > ../out.offline_2D_parallel + cd .. + python verification/check_offline.py offline_2D_parallel +fi + +#--------- ONLINE SERIAL ------------- + +if [ $RUN_ONLINE_SERIAL -eq 1 ] +then + + echo "------------ online_2D_serialmodel LESTKF ----------------------------------" + export OMP_NUM_THREADS=1 + cd online_2D_serialmodel + make cleandataq + mpirun --oversubscribe -np 9 ./model_pdaf -dim_ens 9 $DA_SPECS > ../out.online_2D_serialmodel + cd .. + python verification/check_online2.py online_2D_serialmodel online_2D_serialmodel + + echo "------------ online_2D_serialmodel_openmp LESTKF ---------------------------" + export OMP_NUM_THREADS=2 + cd online_2D_serialmodel + make cleandataq + mpirun --oversubscribe -np 9 ./model_pdaf -dim_ens 9 $DA_SPECS > ../out.online_2D_serialmodel_openmp + cd .. + python verification/check_online.py online_2D_serialmodel + + echo "------------ online_2D_serialmodel_2fields LESTKF --------------------------" + export OMP_NUM_THREADS=1 + cd online_2D_serialmodel_2fields + make cleandataq + mpirun --oversubscribe -np 9 ./model_pdaf -dim_ens 9 $DA_SPECS > ../out.online_2D_serialmodel_2fields + cd .. + python verification/check_online2.py online_2D_serialmodel_2fields online_2D_serialmodel + + echo "------------ online_2D_serialmodel_2fields LESTKF obs-type B ---------------" + export OMP_NUM_THREADS=1 + cd online_2D_serialmodel_2fields + make cleandataq + mpirun --oversubscribe -np 9 ./model_pdaf -dim_ens 9 $DA_SPECS3 > ../out.online_2D_serialmodel_2fields_obsB + cd .. + python verification/check_online3.py online_2D_serialmodel_2fields online_2D_serialmodel_2fields_obsB + +fi + +#--------- ONLINE PARALLEL ------------- + +if [ $RUN_ONLINE_PARALLEL -eq 1 ] +then + + echo "------------ online_2D_parallelmodel LESTKF --------------------------------" + export OMP_NUM_THREADS=1 + cd online_2D_parallelmodel + make cleandataq + mpirun --oversubscribe -np 18 ./model_pdaf -dim_ens 9 $DA_SPECS > ../out.online_2D_parallelmodel + cd .. + python verification/check_online.py online_2D_parallelmodel + + echo "------------ online_2D_serialmodel ESTKF -----------------------------------" + export OMP_NUM_THREADS=1 + cd online_2D_serialmodel + make cleandataq + mpirun --oversubscribe -np 9 ./model_pdaf -dim_ens 9 $DA_SPECS2 > ../out.online_2D_serialmodel_ESTKF + cd .. + python verification/check_online2.py online_2D_serialmodel online_2D_serialmodel_ESTKF + + echo "------------ online_2D_serialmodel_2fields ESTKF ---------------------------" + export OMP_NUM_THREADS=1 + cd online_2D_serialmodel_2fields + make cleandataq + mpirun --oversubscribe -np 9 ./model_pdaf -dim_ens 9 $DA_SPECS2 > ../out.online_2D_serialmodel_2fields_ESTKF + cd .. + python verification/check_online2.py online_2D_serialmodel_2fields online_2D_serialmodel_ESTKF + + echo "------------ online_2D_parallelmodel ESTKF ---------------------------------" + export OMP_NUM_THREADS=1 + cd online_2D_parallelmodel + make cleandataq + mpirun --oversubscribe -np 18 ./model_pdaf -dim_ens 9 $DA_SPECS2 > ../out.online_2D_parallelmodel_ESTKF + cd .. + python verification/check_online2.py online_2D_parallelmodel online_2D_parallelmodel_ESTKF + + echo "------------ online_2D_parallelmodel_fullpar LESTKF ------------------------" + export OMP_NUM_THREADS=1 + cd online_2D_parallelmodel_fullpar + make cleandataq + mpirun --oversubscribe -np 20 ./model_pdaf -dim_ens 9 $DA_SPECS > ../out.online_2D_parallelmodel_fullpar + cd .. + python verification/check_online.py online_2D_parallelmodel_fullpar + + echo "------------ online_2D_parallelmodel_fullpar_1fpe LESTKF -------------------" + export OMP_NUM_THREADS=1 + cd online_2D_parallelmodel_fullpar_1fpe + make cleandataq + mpirun --oversubscribe -np 19 ./model_pdaf -dim_ens 9 $DA_SPECS > ../out.online_2D_parallelmodel_fullpar_1fpe + cd .. + python verification/check_online.py online_2D_parallelmodel_fullpar_1fpe +fi From 2de0ca9667bad467d128a4ceeb44fd0df776a97b Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Sun, 15 Sep 2024 09:46:50 +0200 Subject: [PATCH 81/83] Correction: Add 'TARGET' again to thisobs_l in PDAFomi_set_dim_obs_l since in this routine the pointer is set --- src/PDAFomi_dim_obs_l.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/PDAFomi_dim_obs_l.F90 b/src/PDAFomi_dim_obs_l.F90 index 91a6a0543..0d8ad25d7 100644 --- a/src/PDAFomi_dim_obs_l.F90 +++ b/src/PDAFomi_dim_obs_l.F90 @@ -1579,7 +1579,7 @@ SUBROUTINE PDAFomi_set_dim_obs_l(thisobs_l, thisobs, cnt_obs_l_all, cnt_obs_l) ! *** Arguments *** TYPE(obs_f), INTENT(inout) :: thisobs !< Data type with full observation - TYPE(obs_l), INTENT(inout) :: thisobs_l !< Data type with local observation + TYPE(obs_l), TARGET, INTENT(inout) :: thisobs_l !< Data type with local observation INTEGER, INTENT(inout) :: cnt_obs_l_all !< Local dimension of observation vector over all obs. types INTEGER, INTENT(inout) :: cnt_obs_l !< Local dimension of single observation type vector From 9bbb496afe55fec491f593e44c66293b2e8c56a2 Mon Sep 17 00:00:00 2001 From: Lars Nerger Date: Sun, 15 Sep 2024 10:00:49 +0200 Subject: [PATCH 82/83] Corection order of serial and parallel runs --- tutorial/runtests.sh | 29 ++++++++++++++--------------- 1 file changed, 14 insertions(+), 15 deletions(-) diff --git a/tutorial/runtests.sh b/tutorial/runtests.sh index 1dd27db78..84113c847 100755 --- a/tutorial/runtests.sh +++ b/tutorial/runtests.sh @@ -163,21 +163,6 @@ then cd .. python verification/check_online3.py online_2D_serialmodel_2fields online_2D_serialmodel_2fields_obsB -fi - -#--------- ONLINE PARALLEL ------------- - -if [ $RUN_ONLINE_PARALLEL -eq 1 ] -then - - echo "------------ online_2D_parallelmodel LESTKF --------------------------------" - export OMP_NUM_THREADS=1 - cd online_2D_parallelmodel - make cleandataq - mpirun --oversubscribe -np 18 ./model_pdaf -dim_ens 9 $DA_SPECS > ../out.online_2D_parallelmodel - cd .. - python verification/check_online.py online_2D_parallelmodel - echo "------------ online_2D_serialmodel ESTKF -----------------------------------" export OMP_NUM_THREADS=1 cd online_2D_serialmodel @@ -193,6 +178,20 @@ then mpirun --oversubscribe -np 9 ./model_pdaf -dim_ens 9 $DA_SPECS2 > ../out.online_2D_serialmodel_2fields_ESTKF cd .. python verification/check_online2.py online_2D_serialmodel_2fields online_2D_serialmodel_ESTKF +fi + +#--------- ONLINE PARALLEL ------------- + +if [ $RUN_ONLINE_PARALLEL -eq 1 ] +then + + echo "------------ online_2D_parallelmodel LESTKF --------------------------------" + export OMP_NUM_THREADS=1 + cd online_2D_parallelmodel + make cleandataq + mpirun --oversubscribe -np 18 ./model_pdaf -dim_ens 9 $DA_SPECS > ../out.online_2D_parallelmodel + cd .. + python verification/check_online.py online_2D_parallelmodel echo "------------ online_2D_parallelmodel ESTKF ---------------------------------" export OMP_NUM_THREADS=1 From b81a289dbb46e89e966dfd2da0098d988b9ed655 Mon Sep 17 00:00:00 2001 From: Johannes Keller Date: Wed, 29 Oct 2025 12:09:10 +0100 Subject: [PATCH 83/83] cmake.h: Read `MODULEOPT` from CMake input needs to change for Intel/Gnu compilers --- make.arch/cmake.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/make.arch/cmake.h b/make.arch/cmake.h index 2d455a6bb..c9ead4575 100644 --- a/make.arch/cmake.h +++ b/make.arch/cmake.h @@ -52,7 +52,7 @@ AR_SPEC = RAN_SPEC = # Specification for directory holding modules (-module for Intel, -J for GNU) -MODULEOPT = -module +MODULEOPT = ${TSMPPDAFMODULEOPT} # Include path for MPI header file MPI_INC = ${TSMPPDAFMPI_INC}