Skip to content
Open
Show file tree
Hide file tree
Changes from 40 commits
Commits
Show all changes
74 commits
Select commit Hold shift + click to select a range
6eb2eef
feat(fesom) add tracer diagnostics to FESOM2.5
ogurses Oct 15, 2024
3e84a88
add recom_sms diag
ogurses Nov 20, 2024
434f0e6
feat(recom): add ciso and medusa components
ogurses Dec 10, 2024
0864237
input to bc_surface from medusa added and Sed_input deleted
a270105 Dec 13, 2024
a3dfd9f
changes in src for tracer parallelisation
a270105 Jan 24, 2025
911fd3c
change defined(__recom)||defined(__usetp) to only defined(__usetp) in…
a270105 Jan 24, 2025
358082d
corrections to compile with tracer parallelisation on
a270105 Jan 27, 2025
0d3834a
cleanup and small corrections of flags for recom and tracer paralleli…
a270105 Jan 29, 2025
74a5e59
corrections in array allocation for Diags and initialization for use_…
a270105 Jan 30, 2025
e8117d8
make MPI calls consistent fix?? cpl_oasis3mct_init call in fesom_module
ackerlar Feb 5, 2025
604a88a
localcommunicator removed in fesom_module.F90
a270105 Feb 5, 2025
cb11456
Merge branch 'fesom2.6_recom_tp' of https://github.com/FESOM/fesom2 i…
a270105 Feb 5, 2025
dd22697
set code version without tracer parallelisation as default
Feb 6, 2025
076bc71
set recom_coupled off as default
Feb 6, 2025
9f3c6d6
clean up kh comments
a270105 Feb 7, 2025
9e17e15
Merge branch 'fesom2.6_recom_tp' of https://github.com/FESOM/fesom2 i…
a270105 Feb 7, 2025
4a053a9
point only when defined
ackerlar Feb 12, 2025
45d7fd3
add missing tracer
ackerlar Feb 12, 2025
8283c1b
Merge branch 'main' into fesom2.6_recom_tp
JanStreffing Jun 25, 2025
4f01ed8
remove spurious leftover end if
JanStreffing Jun 25, 2025
6f37080
try different preprocessor flags in .h file, hopefully passing CI
JanStreffing Jun 25, 2025
ade5fd9
remove kh comments and fix for partit
a270105 Jun 25, 2025
132066d
fix for ltra_diag in recom_main and for restart with TP in io_restart…
a270105 Jun 26, 2025
17cc3b1
set ltra_diag by default to false and improve alignment in fesom_modu…
a270105 Jun 27, 2025
26957ba
Merge branch 'main' into fesom2.6_recom_tp
a270105 Jun 27, 2025
9247ca4
fix in io_restart.F90 for writing restart
a270105 Jun 27, 2025
4da69a2
Merge branch 'fesom2.6_recom_tp' of github.com:FESOM/fesom2 into feso…
a270105 Jun 27, 2025
fc517d5
fix continued
a270105 Jun 27, 2025
6e73322
fix in io_restart.F90
a270105 Jun 27, 2025
bbcb3fe
adapt recom restart writing for AB_order
JanStreffing Jun 27, 2025
96532bf
index of data corrected
a270105 Jul 8, 2025
ef3a7a5
line with valuesold in io_restart commented
a270105 Aug 19, 2025
b1e140b
delete duplicates in io_restart
a270105 Aug 28, 2025
283ba53
Merge branch 'main' into fesom2.6_recom_tp
JanStreffing Sep 2, 2025
e2b7408
Fix FESOM-2.6 compilation errors: MPI communicator structure members …
JanStreffing Sep 2, 2025
37d16f9
include netcdf.inc added for reading sediment input file
a270105 Sep 4, 2025
d305c3d
Merge branch 'main' into fesom2.6_recom_tp
suvarchal Sep 5, 2025
5b05ce6
Fix preprocessor directives
suvarchal Sep 5, 2025
732509a
Merge branch 'main' into fesom2.6_recom_tp
JanStreffing Sep 8, 2025
f78e7fd
delete redundant comments in CMakelists
Sep 22, 2025
60a118c
add namelists to use tracer parallelisation
Oct 8, 2025
35c815c
Merge branch 'fesom2.6_recom_tp' of https://github.com/FESOM/fesom2 i…
Oct 8, 2025
360d224
change sizeof(cpl_send/recv) to nsend/nrecv in fesom_module.F90
Oct 15, 2025
2804139
remove usetp from default to test awiesm-2.6-recom
Oct 22, 2025
67475c1
add -fPIC in CMakeLists
Oct 24, 2025
9a03b2d
put num_fesom_groups back to run_config
Oct 27, 2025
b42fbbd
delete read_namelist_run_config
Oct 27, 2025
a8b6eb5
turn on RECOM_COUPLED by default
Oct 27, 2025
7ec55f2
add read_namelist_run_config back to fesom_module.F90
Oct 29, 2025
db9d64c
replace ifdef with DEC preprocessing flags in .h files
JanStreffing Oct 30, 2025
ed36284
Merge branch 'fesom2.6_recom_tp' of ssh://github.com/FESOM/fesom2 int…
JanStreffing Oct 30, 2025
f04fabf
remove preprocessor directives in .h files
Oct 31, 2025
e07391f
pH/DOC dependent parameterisation of Fe-binding ligands completed
a270105 Nov 4, 2025
40431c5
fix for tracer parallelisation in coupled setup
Nov 11, 2025
0d44a2a
Merge branch 'fesom2.6_recom_tp' of https://github.com/FESOM/fesom2 i…
Nov 11, 2025
53fc830
correction in fesom_module.F90 to allocate nsend and nrecv for parall…
Nov 11, 2025
b914046
set flag_debug to false
a270105 Nov 26, 2025
206b4d9
merge conflict fix
a270105 Nov 26, 2025
0a5cb63
bugfix in io_resatart.F90
a270105 Nov 26, 2025
c78a72a
bugfix in io_restart.F90 after merge
a270105 Nov 26, 2025
2dc8828
bugfix in bio_files in io_restart.F90
Nov 28, 2025
34e9e21
fesom namelists updated in bin_2p1z1d_tp
a270105 Dec 6, 2025
fb8f1dd
namelists updated for 2.7
Dec 16, 2025
1dc0f84
fix in depth denpendecy of calcite dissolution
Dec 16, 2025
53c45ed
DIC_PI false by default
Jan 4, 2026
760ebc7
Merge branch 'main' into fesom2.6_recom_tp
Jan 5, 2026
aa514b1
updating namelists and grouping iron chesmitry paramters in namelist.…
a270105 Jan 7, 2026
a8cf488
Merge branch 'main' into fesom2.6_recom_tp
JanStreffing Jan 7, 2026
15dd785
Merge branch 'fesom2.6_recom_tp' of https://github.com/FESOM/fesom2 i…
Jan 7, 2026
3737859
bugfix for sedimentary input from MEDUSA in gen_surface_forcing.F90
Jan 8, 2026
7e41192
fix of line breaks in recom namelist
Jan 9, 2026
7b119ff
delete namelists not needed for 2.7
Jan 9, 2026
d7654e5
updating namelists
Jan 9, 2026
fc84f04
changes by Kai for benthic and sinking fluxes when using tracer paral…
Jan 11, 2026
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
5 changes: 4 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,9 @@ if(${ENABLE_OPENMP})
find_package(OpenMP REQUIRED COMPONENTS Fortran)
endif()

option(RECOM_COUPLED "Use RECOM" OFF)
message(STATUS "RECOM_COUPLED: ${RECOM_COUPLED}")

option(USE_ICEPACK "Use ICEPACK" OFF)
message(STATUS "USE_ICEPACK: ${USE_ICEPACK}")

Expand Down Expand Up @@ -247,7 +250,7 @@ if(OPENMP_REPRODUCIBLE)
endif()

if(${RECOM_COUPLED})
target_compile_definitions(${PROJECT_NAME} PRIVATE __recom USE_PRECISION=2 __3Zoo2Det __coccos)# __usetp)
target_compile_definitions(${PROJECT_NAME} PRIVATE __recom USE_PRECISION=2 __usetp) #__3Zoo2Det __coccos)
endif()

if(${CISO_COUPLED})
Expand Down
12 changes: 11 additions & 1 deletion src/MOD_PARTIT.F90
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,12 @@ module MOD_PARTIT
integer :: MPI_COMM_FESOM ! FESOM communicator (for ocean only runs if often a copy of MPI_COMM_WORLD)
integer :: MPI_COMM_WORLD ! FESOM communicator (for ocean only runs if often a copy of MPI_COMM_WORLD)

! communicator for multi FESOM group loop parallelization
integer :: MPI_COMM_FESOM_WORLD

! communicator for multi FESOM group loop parallelization
integer :: MPI_COMM_FESOM_SAME_RANK_IN_GROUPS

! MPI Datatypes for interface exchange
! Element fields (2D; 2D integer; 3D with nl-1 or nl levels, 1 - 4 values)
! small halo and / or full halo
Expand All @@ -85,8 +91,12 @@ module MOD_PARTIT
integer, allocatable :: s_mpitype_nod2D(:), r_mpitype_nod2D(:)
integer, allocatable :: s_mpitype_nod2D_i(:), r_mpitype_nod2D_i(:)
integer, allocatable :: s_mpitype_nod3D(:,:,:), r_mpitype_nod3D(:,:,:)
integer, allocatable :: s_mpitype_nod4D(:,:,:,:), r_mpitype_nod4D(:,:,:,:)

integer :: MPIERR

integer :: MPIERR
! multi FESOM group loop parallelization
integer :: my_fesom_group

!!! remPtr_* are constructed during the runtime and shall not be dumped!!!
integer, allocatable :: remPtr_nod2D(:), remList_nod2D(:)
Expand Down
12 changes: 11 additions & 1 deletion src/MOD_TRACER.F90
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@ MODULE MOD_TRACER
real(kind=WP) :: tra_adv_pv = 1. ! a parameter to be used in horizontal advection (for QR4C it is the fraction of fourth-order contribution in the solution)
integer :: AB_order=2
integer :: ID
!___________________________________________________________________________
! TODO: Make it as a part of namelist.tra
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be done before more?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to clarify with Özgür

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logical :: ltra_diag = .false. ! OG - tra_diag

contains
procedure WRITE_T_TRACER_DATA
Expand All @@ -41,7 +44,14 @@ MODULE MOD_TRACER
! compute Tstar = 0.5*( T^(n+1) + T^n)
real(kind=WP), allocatable, dimension(:,:,:) :: dvd_trflx_hor, dvd_trflx_ver

!_______________________________________________________________________________
! in case ltra_diag=.true. --> calculate tracer diags ! OG - tra_diag
real(kind=WP), allocatable :: tra_advhoriz(:,:,:), tra_advvert(:,:,:)
real(kind=WP), allocatable :: tra_diff_part_hor_redi(:,:,:)
real(kind=WP), allocatable :: tra_diff_part_ver_expl(:,:,:)
real(kind=WP), allocatable :: tra_diff_part_ver_redi_expl(:,:,:)
real(kind=WP), allocatable :: tra_diff_part_ver_impl(:,:,:)
real(kind=WP), allocatable :: tra_recom_sms(:,:,:)

! The fct part
real(kind=WP),allocatable,dimension(:,:) :: fct_LO ! Low-order solution
real(kind=WP),allocatable,dimension(:,:) :: adv_flux_hor ! Antidif. horiz. contrib. from edges / backup for iterafive fct scheme
Expand Down
5 changes: 4 additions & 1 deletion src/associate_part_ass.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
MPI_COMM_FESOM_WORLD => partit%MPI_COMM_FESOM_WORLD
MPI_COMM_FESOM_SAME_RANK_IN_GROUPS => partit%MPI_COMM_FESOM_SAME_RANK_IN_GROUPS
MPI_COMM_FESOM => partit%MPI_COMM_FESOM
MPI_COMM_FESOM_IB => partit%MPI_COMM_FESOM_IB
com_nod2D => partit%com_nod2D
Expand All @@ -13,9 +15,10 @@ eDim_edge2D => partit%eDim_edge2D
pe_status => partit%pe_status
elem_full_flag => partit%elem_full_flag
MPIERR => partit%MPIERR
MPIERR_IB => partit%MPIERR_IB
MPIERR_IB => partit%MPIERR_IB
npes => partit%npes
mype => partit%mype
my_fesom_group => partit%my_fesom_group
maxPEnum => partit%maxPEnum
part => partit%part

Expand Down
3 changes: 3 additions & 0 deletions src/associate_part_def.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
integer, pointer :: MPI_COMM_FESOM_WORLD
integer, pointer :: MPI_COMM_FESOM_SAME_RANK_IN_GROUPS
integer, pointer :: MPI_COMM_FESOM ! FESOM communicator (for ocean only runs if often a copy of MPI_COMM_WORLD)
integer, pointer :: MPI_COMM_FESOM_IB ! FESOM communicator copy for icebergs LA: 2023-05-22
type(com_struct), pointer :: com_nod2D
Expand All @@ -20,6 +22,7 @@
integer, pointer :: MPIERR_IB ! copy for icebergs LA: 2023-05-22
integer, pointer :: npes
integer, pointer :: mype
integer, pointer :: my_fesom_group
integer, pointer :: maxPEnum

integer, dimension(:), pointer :: part
Expand Down
73 changes: 67 additions & 6 deletions src/cpl_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@ module cpl_driver
!
use mod_oasis ! oasis module
use g_config, only : dt, use_icebergs, lwiso, compute_oasis_corners
#if defined(__recom) && defined(__usetp)
use g_config, only : num_fesom_groups
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't this only relevant to tracer parallelization independent of recom?

#endif

use o_param, only : rad
USE MOD_PARTIT
use mpi
Expand Down Expand Up @@ -60,11 +64,11 @@ module cpl_driver
integer :: commRank
integer :: comp_id ! id returned by oasis_init_comp

logical, save :: oasis_was_initialized
logical, save :: oasis_was_terminated
integer, save :: write_grid
logical :: oasis_was_initialized
logical :: oasis_was_terminated
integer :: write_grid

integer, save :: seconds_til_now=0
integer :: seconds_til_now=0
integer :: ierror ! return error code
logical :: rootexchg =.true. ! logical switch

Expand Down Expand Up @@ -311,7 +315,12 @@ subroutine node_contours(my_x_corners, my_y_corners, partit, mesh)
my_y_corners=my_y_corners/rad
end subroutine node_contours

subroutine cpl_oasis3mct_init(partit, localCommunicator )
#if defined(__recom) && defined(__usetp)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this for recom or tracer parallization or both need to be defined?

subroutine cpl_oasis3mct_init(partit, localCommunicator, num_fesom_groups)
#else
subroutine cpl_oasis3mct_init(partit, localCommunicator)
#endif

USE MOD_PARTIT
implicit none
save
Expand All @@ -325,6 +334,9 @@ subroutine cpl_oasis3mct_init(partit, localCommunicator )
!
integer, intent(OUT) :: localCommunicator
type(t_partit), intent(inout), target :: partit
#if defined(__recom) && defined(__usetp)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can it also be seperated recom and tracer parallelization?

integer, intent(inout) :: num_fesom_groups
#endif
!
! Local declarations
!
Expand All @@ -346,7 +358,11 @@ subroutine cpl_oasis3mct_init(partit, localCommunicator )
!------------------------------------------------------------------
! 1st Initialize the OASIS3-MCT coupling system for the application
!------------------------------------------------------------------
#if defined(__recom) && defined(__usetp)
CALL oasis_init_comp(comp_id, comp_name, ierror, num_program_groups = num_fesom_groups)
#else
CALL oasis_init_comp(comp_id, comp_name, ierror )
#endif
IF (ierror /= 0) THEN
CALL oasis_abort(comp_id, 'cpl_oasis3mct_init', 'Init_comp failed.')
ENDIF
Expand All @@ -357,7 +373,11 @@ subroutine cpl_oasis3mct_init(partit, localCommunicator )
CALL oasis_abort(comp_id, 'cpl_oasis3mct_init', 'comm_rank failed.')
ENDIF

#if defined(__recom) && defined(__usetp)
CALL oasis_get_localcomm_all_groups( localCommunicator, ierror )
#else
CALL oasis_get_localcomm( localCommunicator, ierror )
#endif
IF (ierror /= 0) THEN
CALL oasis_abort(comp_id, 'cpl_oasis3mct_init', 'get_local_comm failed.')
ENDIF
Expand Down Expand Up @@ -611,6 +631,10 @@ subroutine cpl_oasis3mct_define_unstr(partit, mesh)
print *, 'FESOM after Barrier'
endif

#if defined(__recom) && defined(__usetp)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only for tp?

if(partit%my_fesom_group == 0) then
#endif

if (mype .eq. localroot) then
print *, 'FESOM before grid writing to oasis grid files'
CALL oasis_start_grids_writing(il_flag)
Expand Down Expand Up @@ -639,6 +663,9 @@ subroutine cpl_oasis3mct_define_unstr(partit, mesh)
print *, 'FESOM after terminate_grids_writing'
endif !localroot

#if defined(__recom) && defined(__usetp)
end if !(partit%my_fesom_group == 0) then
#endif


DEALLOCATE(all_x_coords, all_y_coords, my_x_coords, my_y_coords, displs_from_all_pes, counts_from_all_pes)
Expand Down Expand Up @@ -893,7 +920,7 @@ subroutine cpl_oasis3mct_recv(ind, data_array, action, partit)
!
integer :: info
integer :: j
integer, save :: ncount = 0
integer :: ncount = 0
real (kind=WP) :: t1, t2, t3
!
!--------------------------------------------------------------------
Expand All @@ -909,15 +936,49 @@ subroutine cpl_oasis3mct_recv(ind, data_array, action, partit)
endif
#endif

#if defined(__recom) && defined(__usetp)
! the coupling is in principle as it was before, i.e. the fesom processes - in group 0 - receive their data from echam
if(partit%my_fesom_group == 0) then
#endif

call oasis_get(recv_id(ind), seconds_til_now, exfld,info)

#if defined(__recom) && defined(__usetp)
else

! defensive: assignment statement "action=(info==3 ..." below is "don't care" in this case, because the actual value for action
! is received via MPI_Bcast anyway
info = 0

end if
#endif

t2=MPI_Wtime()
!
! FESOM's interpolation routine interpolates structured
! VarStrLoc coming from OASIS3MCT to local unstructured data_array
! and delivered back to FESOM.
action=(info==3 .OR. info==10 .OR. info==11 .OR. info==12 .OR. info==13)

#if defined(__recom) && defined(__usetp)
if(num_fesom_groups > 1) then
call MPI_Bcast(action, 1, MPI_LOGICAL, 0, partit%MPI_COMM_FESOM_SAME_RANK_IN_GROUPS, partit%MPIerr)
end if
#endif

if (action) then
#if defined(__recom) && defined(__usetp)
if(partit%my_fesom_group == 0) then
#endif
data_array(1:partit%myDim_nod2d) = exfld
#if defined(__recom) && defined(__usetp)
end if

if(num_fesom_groups > 1) then
call MPI_Bcast(data_array, partit%myDim_nod2d, MPI_DOUBLE_PRECISION, 0, partit%MPI_COMM_FESOM_SAME_RANK_IN_GROUPS, partit%MPIerr)
end if
#endif

call exchange_nod(data_array, partit)
end if
t3=MPI_Wtime()
Expand Down
Loading
Loading