Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion interface/framework/init_dim_obs_f_pdaf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -966,7 +966,8 @@ SUBROUTINE init_dim_obs_f_pdaf(step, dim_obs_f)

! Error if observation deeper than clmstatevec_max_layer
if(clmobs_layer(i) > min(clmstatevec_max_layer, col%nbedrock(c))) then
print *, "TSMP-PDAF mype(w)=", mype_world, ": ERROR observation layer deeper than clmstatevec_max_layer or bedrock."
print *, "TSMP-PDAF mype(w)=", mype_world, ": ERROR "
print *, "Observation layer deeper than clmstatevec_max_layer or bedrock."
print *, "i=", i
print *, "c=", c
print *, "clmobs_layer(i)=", clmobs_layer(i)
Expand Down
3 changes: 2 additions & 1 deletion interface/framework/init_dim_obs_pdaf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -959,7 +959,8 @@ SUBROUTINE init_dim_obs_pdaf(step, dim_obs_p)

! Error if observation deeper than clmstatevec_max_layer
if(clmobs_layer(i) > min(clmstatevec_max_layer, col%nbedrock(c))) then
print *, "TSMP-PDAF mype(w)=", mype_world, ": ERROR observation layer deeper than clmstatevec_max_layer or bedrock."
print *, "TSMP-PDAF mype(w)=", mype_world, ": ERROR "
print *, "Observation layer deeper than clmstatevec_max_layer or bedrock."
print *, "i=", i
print *, "c=", c
print *, "clmobs_layer(i)=", clmobs_layer(i)
Expand Down
14 changes: 7 additions & 7 deletions interface/framework/init_parallel_pdaf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -44,18 +44,18 @@ SUBROUTINE init_parallel_pdaf(dim_ens, screen)
! over to PDAF in the call to
! PDAF\_init\_parallel.
!
! 3 Communicators are generated:\\
! 3 Communicators are generated:
! - COMM\_filter: Communicator in which the
! filter itself operates\\
! filter itself operates
! - COMM\_model: Communicators for parallel
! model forecasts\\
! model forecasts
! - COMM\_couple: Communicator for coupling
! between models and filter\\
! Other variables that have to be initialized are:\\
! between models and filter
! Other variables that have to be initialized are:
! - filterpe - Logical: Does the PE execute the
! filter?\\
! filter?
! - my\_ensemble - Integer: The index of the PE's
! model task\\
! model task
! - local\_npes\_model - Integer array holding
! numbers of PEs per model task
!
Expand Down
3 changes: 2 additions & 1 deletion interface/framework/init_pdaf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ SUBROUTINE init_pdaf()

#ifdef PDAF_DEBUG
! Debug output: local state dimension array
if (mype_model == 0) WRITE(*, '(a,x,a,i5,x,a,x)', advance="no") "TSMP-PDAF-debug", "mype(w)=", mype_world, "init_pdaf: dim_state_p_count in modified:"
if (mype_model == 0) WRITE(*, '(a,x,a,i5,x,a,x)', advance="no") "TSMP-PDAF-debug", "mype(w)=", mype_world, &
"init_pdaf: dim_state_p_count in modified:"
if (mype_model == 0) WRITE(*, *) dim_state_p_count
#endif

Expand Down
3 changes: 3 additions & 0 deletions interface/framework/integrate_pdaf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,8 @@
!-------------------------------------------------------------------------------------------

subroutine integrate

implicit none

print *, "Hello World!"
end subroutine integrate
15 changes: 10 additions & 5 deletions interface/framework/mod_assimilation.F90
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,15 @@ MODULE mod_assimilation
! *** Variables specific for TSMP-PDAF ***

! gw
INTEGER, ALLOCATABLE :: dim_state_p_count(:) !Vector holding local state vector dimensions for processors of a single model communicator
INTEGER, ALLOCATABLE :: dim_state_p_count(:) !Vector holding local state vector dimensions for
! processors of a single model communicator
! gw end
REAL, ALLOCATABLE :: obs(:) ! Vector holding all observations for Global domain
INTEGER, ALLOCATABLE :: obs_index_l(:) ! Vector holding local state-vector indices of observations
INTEGER, ALLOCATABLE :: obs_interp_indices_p(:,:) ! Vector holding state-vector indices of grid cells surrounding interpolation for PE-local domain
INTEGER, ALLOCATABLE :: obs_interp_weights_p(:,:) ! Vector holding weights of grid cells surrounding observation for PE-local domain
INTEGER, ALLOCATABLE :: obs_interp_indices_p(:,:) ! Vector holding state-vector indices of grid cells
! surrounding interpolation for PE-local domain
INTEGER, ALLOCATABLE :: obs_interp_weights_p(:,:) ! Vector holding weights of grid cells surrounding
! observation for PE-local domain
INTEGER, ALLOCATABLE :: local_dims_obs(:) ! Array for process-local observation dimensions
INTEGER, ALLOCATABLE :: local_disp_obs(:) ! Observation displacement array for gathering. Displacement: #obs before current PE
! pdaf-ordered index: determined by domain-decomposition
Expand All @@ -88,8 +91,10 @@ MODULE mod_assimilation
REAL, ALLOCATABLE :: clm_obserr_p(:) ! Vector holding observation errors for CLM run at each PE-local domain
REAL, ALLOCATABLE :: distance(:) ! Localization distance
INTEGER, ALLOCATABLE :: global_to_local(:) ! Vector to map global index to local domain index
INTEGER, ALLOCATABLE :: longxy(:), latixy(:), longxy_obs(:), latixy_obs(:) ! longitude and latitude of grid cells and observation cells
INTEGER, ALLOCATABLE :: longxy_obs_floor(:), latixy_obs_floor(:) ! indices of grid cells with smaller lon/lat than observation location
INTEGER, ALLOCATABLE :: longxy(:), latixy(:), longxy_obs(:), latixy_obs(:) ! longitude and latitude of grid cells
! and observation cells
INTEGER, ALLOCATABLE :: longxy_obs_floor(:), latixy_obs_floor(:) ! indices of grid cells with smaller lon/lat
! than observation location
INTEGER, ALLOCATABLE :: var_id_obs(:) ! for remote sensing data the variable identifier to group
! variables distributed over a grid surface area
!kuw
Expand Down
2 changes: 1 addition & 1 deletion interface/framework/mod_read_obs.F90
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
!-------------------------------------------------------------------------------------------

module mod_read_obs
use iso_C_binding, only: c_int, c_ptr, c_loc
use, intrinsic :: iso_C_binding, only: c_int, c_ptr, c_loc

implicit none

Expand Down
6 changes: 3 additions & 3 deletions interface/framework/mod_tsmp.F90
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
!-------------------------------------------------------------------------------------------

module mod_tsmp
use iso_c_binding, only: c_int, c_ptr, c_double
use, intrinsic :: iso_c_binding, only: c_int, c_ptr, c_double

implicit none

Expand Down Expand Up @@ -96,7 +96,7 @@ end subroutine update_tsmp

interface
subroutine init_n_domains_pfl(n_domains_p) bind(c)
use iso_c_binding, only: c_int
use, intrinsic :: iso_c_binding, only: c_int
import
implicit none
INTEGER(c_int), INTENT(out) :: n_domains_p ! PE-local number of analysis domains
Expand All @@ -105,7 +105,7 @@ end subroutine init_n_domains_pfl

interface
subroutine init_dim_l_pfl(dim_l) bind(c)
use iso_c_binding, only: c_int
use, intrinsic :: iso_c_binding, only: c_int
import
implicit none
INTEGER(c_int), INTENT(out) :: dim_l ! Local state dimension
Expand Down
2 changes: 1 addition & 1 deletion interface/framework/prepoststep_ens_pdaf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ SUBROUTINE prepoststep_ens_pdaf(step, dim_p, dim_ens, dim_ens_p, dim_obs_p, &
! variance, dim_p, MPI_DOUBLE_PRECISION, &
! 0, comm_filter, MPIerr)
call MPI_Gatherv(variance_p, dim_p, MPI_DOUBLE_PRECISION, variance, dim_state_p_count, &
dim_state_p_stride, MPI_DOUBLE_PRECISION, 0, comm_filter, MPIerr);
dim_state_p_stride, MPI_DOUBLE_PRECISION, 0, comm_filter, MPIerr)
if (MPIerr /= MPI_SUCCESS) then
print *,"mpi gather failed"
call MPI_Abort(MPI_COMM_WORLD, 1, MPIerr)
Expand Down
5 changes: 5 additions & 0 deletions interface/framework/prodrinva_l_pdaf.F90
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ SUBROUTINE prodRinvA_l_pdaf(domain_p, step, dim_obs_l, rank, obs_l, A_l, C_l)
USE mod_assimilation, ONLY: obs_index_l
USE mod_parallel_pdaf, &
ONLY: mype_filter
USE mod_parallel_pdaf, ONLY: abort_parallel
USE mod_read_obs, ONLY: multierr
USE mod_read_obs, ONLY: clm_obserr
USE mod_read_obs, ONLY: pressure_obserr
Expand Down Expand Up @@ -218,6 +219,10 @@ SUBROUTINE prodRinvA_l_pdaf(domain_p, step, dim_obs_l, rank, obs_l, A_l, C_l)
#endif
END DO
END DO
CASE DEFAULT

print *, "ERROR: unsupported multierr in prodrinva_l_pdaf.F90"
call abort_parallel()

END SELECT

Expand Down
4 changes: 2 additions & 2 deletions interface/model/eclm/enkf_clm_5.F90
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ subroutine clm_init(finname, pdaf_id, pdaf_max, mype) bind(C,name="clm_init")
! use cime_comp_mod, only : cime_final
!!<< TSMP PDAF comment out end
!!>> TSMP PDAF addition beginning
use iso_C_binding, only: c_char, c_int
use, intrinsic :: iso_C_binding, only: c_char, c_int
use enkf_clm_mod, only: COMM_model_clm
#if defined CLMSA
use enkf_clm_mod, only: define_clm_statevec
Expand Down Expand Up @@ -202,7 +202,7 @@ end subroutine clm_init
subroutine clm_advance(ntstep, tstartcycle, mype) bind(C,name="clm_advance")
use cime_comp_mod, only : cime_run
use enkf_clm_mod, only : set_clm_statevec
use iso_C_binding, only : c_int
use, intrinsic :: iso_C_binding, only : c_int

implicit none
!--------------------------------------------------------------------------
Expand Down
4 changes: 2 additions & 2 deletions interface/model/eclm/enkf_clm_mod_5.F90
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@

module enkf_clm_mod

use iso_c_binding, only: c_int, c_double, c_char
use IEEE_ARITHMETIC, only: ieee_is_nan
use, intrinsic :: iso_c_binding, only: c_int, c_double, c_char
use, intrinsic :: IEEE_ARITHMETIC, only: ieee_is_nan

! !USES:
use shr_kind_mod , only : r8 => shr_kind_r8, SHR_KIND_CL
Expand Down
2 changes: 1 addition & 1 deletion interface/model/eclm/print_update_clm_5.F90
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
#if defined CLMSA
subroutine print_update_clm(ts,ttot) bind(C,name="print_update_clm")

use iso_c_binding, only : c_int
use, intrinsic :: iso_c_binding, only : c_int
use shr_kind_mod , only : r8 => shr_kind_r8
use subgridavemod, only : p2g, c2g
use domainMod , only : ldomain
Expand Down