Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
1702f41
create idemix2 module and wrapper, expand the namelist.cvmix
patrickscholz Jan 28, 2026
b0c0d51
add module to compute the distance of every points to the closest coa…
patrickscholz Feb 2, 2026
d12fbe1
finish and test module to compute distance from coast for elements a…
patrickscholz Feb 5, 2026
3f0caf2
improve routine to read from netcdf with various checks and error mes…
patrickscholz Feb 5, 2026
36fd213
add idemix 2 option to oce_ale.F90
patrickscholz Feb 5, 2026
2931e05
proceed with implementation of idemix2
patrickscholz Feb 5, 2026
d35f2cc
add idemix2 variables to IO
patrickscholz Mar 11, 2026
72ff9ab
add idemix2 variables to the TKE interface
patrickscholz Mar 11, 2026
0aca2ac
add interpolation routine for elem2node in 1d,2d,3d
patrickscholz Mar 11, 2026
307b2f8
change interface for subroutine find_up_downwind_triangles
patrickscholz Mar 11, 2026
9daed55
change interface for subroutine find_up_downwind_triangle and tracer…
patrickscholz Mar 11, 2026
246003c
add routine for horizontal/vertical superbee advection, this is not t…
patrickscholz Mar 11, 2026
09b531e
small fix to src/gen_modules_dist2coast.F90
patrickscholz Mar 11, 2026
e95dd96
improve idemix2 routine and fesom2 interface
patrickscholz Mar 11, 2026
c268005
add interpolation routine for 3d data
patrickscholz Mar 11, 2026
4774ab9
improve some stuff
patrickscholz Mar 11, 2026
6a478e9
improve some comments
patrickscholz Mar 11, 2026
c87c588
add halo exchange for spectral data
patrickscholz Mar 20, 2026
87cc4ac
add wall clock time meassuremtns for mixing scheme
patrickscholz Mar 20, 2026
b585a63
add wall clock time meassuremtns for mixing scheme
patrickscholz Mar 20, 2026
bffbae7
add halo exchange for spectral data
patrickscholz Mar 20, 2026
da203b4
fix small bug
patrickscholz Mar 20, 2026
d743c55
add gather over spectral domain
patrickscholz Mar 24, 2026
ca56b2d
try to debug idemix implementation
patrickscholz Mar 24, 2026
db9dfdb
Merge branch 'main' into origin/tmp/apply_patches_for_icb_v3
JanStreffing Apr 14, 2026
038b1ae
debug occurence of negative E_niw, introduce cross-spectral CFL limi…
patrickscholz Apr 27, 2026
13d14a9
fix halo exchange for cross-spectral data
patrickscholz May 22, 2026
b975409
fix bug in idemix2, now Energy converges towards equilibrium
patrickscholz May 22, 2026
57289b1
Merge branch 'origin/tmp/apply_patches_for_icb_v3' of https://github.…
ackerlar May 23, 2026
edf4e61
Merge branch 'main' into origin/tmp/apply_patches_for_icb_v3
ackerlar May 23, 2026
2b37652
fix some problems in idemix and idemix2, add some more idemix2 variables
patrickscholz May 27, 2026
83e868b
add percentage column to wcl log file information
patrickscholz May 27, 2026
b065b6c
fix non-energy-conserving reflective coastal BC causing NIW runaway
patrickscholz Jun 2, 2026
11fca45
add improved time scaling diagnostics
patrickscholz Jun 2, 2026
2e4851e
fix small allocation bug
patrickscholz Jun 2, 2026
64b352d
refactor reflect BC diagnostics and add OMP/arithmetic performance im…
patrickscholz Jun 3, 2026
60ab983
fix merging conflicts
patrickscholz Jun 3, 2026
c5530a6
fix superbee limiter and flag_2ndord_time inversion in adv_tra_hor_spbee
patrickscholz Jun 3, 2026
1f6ffc7
Merge branch 'main' into workbench_idemix2
patrickscholz Jun 3, 2026
cca458e
fix iceberg netcdf time units and empty attrs
JanStreffing Jun 3, 2026
59a47a7
Merge branch 'main' into origin/tmp/apply_patches_for_icb_v3
JanStreffing Jun 4, 2026
d74f24c
switch off global energy checker
patrickscholz Jun 4, 2026
0b1a0a9
Merge branch 'main' into workbench_idemix2
patrickscholz Jun 4, 2026
36d9680
Merge pull request #876 from FESOM/origin/tmp/apply_patches_for_icb_v3
FinnHeu Jun 4, 2026
89b019c
fix some ci-test problems
patrickscholz Jun 4, 2026
7c7a423
fix some ci-test problems
patrickscholz Jun 4, 2026
cfe2fce
fix some ci-test problems
patrickscholz Jun 4, 2026
212cf26
fix some ci-test problems
patrickscholz Jun 4, 2026
7a66f83
Merge branch 'main' into workbench_idemix2
patrickscholz Jun 4, 2026
c2502b1
Merge branch 'main' into fix/annual-event-debug-spam
JanStreffing Jun 4, 2026
4c892c1
Merge pull request #931 from FESOM/fix/annual-event-debug-spam
JanStreffing Jun 4, 2026
f9c8630
improve comments, switch of some part when idemix2 runs in idemix1 mode
patrickscholz Jun 4, 2026
8ef065b
Merge branch 'main' into workbench_idemix2
patrickscholz Jun 4, 2026
823a276
fix the restart for IDEMIX2
patrickscholz Jun 5, 2026
e7a6566
move time index to last index position, reduce the saving to 2 timesl…
patrickscholz Jun 5, 2026
c89f358
move time index to last index position, reduce the saving to 2 timesl…
patrickscholz Jun 5, 2026
e0af545
fix bug in the vertical Eiw diffusion
patrickscholz Jun 9, 2026
6d674fd
fix dissipation srf and bottom
patrickscholz Jun 10, 2026
aff0c5f
add upper ceiling threshold for internal wave energy Eiw, add smoothi…
patrickscholz Jun 10, 2026
df62f65
add smoothing option for Eiw, Eiw_diss and alpha_c, fields that are s…
patrickscholz Jun 12, 2026
ca3f0e6
add smoothing option for Eiw, Eiw_diss and alpha_c, fields that are s…
patrickscholz Jun 12, 2026
3292eef
delete comment from namelist
patrickscholz Jun 12, 2026
3aeb3d0
fix minor issues
patrickscholz Jun 12, 2026
acfc40c
fix bug in upper/lower loop boundaries idemix param and baroclinic ve…
patrickscholz Jun 15, 2026
c4566c5
introduce lower cap for cn baroclinic gravity wave speed in instable…
patrickscholz Jun 16, 2026
cb43dc2
fix IDEMIX2 smoothing: move smooth_nod from prognostic Eiw to TKE-int…
patrickscholz Jun 16, 2026
c655a4b
fix iwe2_E_iw_hdif diagnostic always zero in iterative implicit hdiff…
patrickscholz Jun 16, 2026
b71aa8a
fix IDEMIX2 horizontal diffusion silent no-op and diagnostic units
patrickscholz Jun 17, 2026
5682634
fix IDEMIX2 wave-wave struct slice, tau_compart UB, and IDEMIX1 diagn…
patrickscholz Jun 18, 2026
dbfd056
fix NIW equatorial kdot artifact and IDEMIX1 iwe_v0 diagnostic
patrickscholz Jun 19, 2026
97f4793
Merge branch 'main' into workbench_idemix2
patrickscholz Jun 19, 2026
6471ed4
small fix, mostly comments and unused variables
patrickscholz Jun 19, 2026
869fa70
fix minor issue
patrickscholz Jun 19, 2026
4d6aefa
add namelist tau_M2/niw timescales, fix diag array OOB, add coast_nod…
patrickscholz Jun 24, 2026
aba90b9
change one default parameter
patrickscholz Jun 24, 2026
131fcee
Merge branch 'main' into workbench_idemix2
patrickscholz Jun 24, 2026
c8c306c
idemix2: resolve cosu/coslat question and fix reflect-BC coordinate f…
patrickscholz Jun 30, 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
79 changes: 79 additions & 0 deletions config/namelist.cvmix
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,86 @@ idemix_surforc_vname = 'var706' ! variable name in surface forcing file
!idemix_botforc_vname = 'wave_dissipation' ! variable name in bottom forcing file
idemix_botforc_file = '/albedo/pool/FESOM/fesom2.0/forcing/idemix/forcing_idemix_final_bin/FIN_STORMTIDE2_M2_plus_NYCANDER_CnoM2_bin_0.40deg.nc' ! path to bottom forcing file,
idemix_botforc_vname = 'stormt_M2_plus_nycand_CnoM2' ! variable name in bottom forcing file
/

! ============================================================================
! IDEMIX2 (INTERNAL WAVE ENERGY PARAMETERIZATION)
! ============================================================================
! Based on: F. Pohlmann, C. Eden, D. Olbers and Z. Zhao (draft) Anisotropy of
! internal tide generation and propagation in the consistent internal wave mixing
! closure IDEMIX
! ============================================================================
&param_idemix2
! --- Time Scales ---
idemix2_tau_v = 172800.0 ! vertical symmetrization time scale [s] (2 days)
idemix2_tau_h = 1296000.0 ! horizontal symmetrization time scale [s] (15 days)

! --- Spectral Parameters ---
idemix2_gamma = 1.570 ! spectral shape constant [dimensionless] (order 1)
idemix2_jstar = 5.0 ! spectral bandwidth in vertical modes [dimensionless]
idemix2_mu0 = 0.33333333 ! dissipation parameter [dimensionless]

! --- superbee-spectral advection scheme and Adams-Bashfort timestepping ---
idemix2_enable_AB = .true.
idemix2_AB_epsilon = 0.1_WP

! --- Number of used spectral frequency bins
idemix2_nfbin = 52

! --- ensures idemix1 functionality ---
idemix2_enable_hor_diff_expl = .false.
idemix2_enable_hor_diff_impl_iter = .true. ! from Pollman et al. (2017)
idemix2_hor_diff_niter = 5

! --- shelf definition as distance from coast in meters
idemix2_shelf_dist = 300.e3

! --- scal down baroclinic wave speed when not all modes are used ---
idemix2_scal_cn = 1.0

! --- maximum cutoff value for interal wave energy ---
idemix2_Eiw_maxthresh= 0.1

! --- M2 Forcing (Summed anisotropic M2-tide generation modes 1-2 (W/m2)) ---
idemix2_enable_M2 = .false.
idemix2_M2forc_file = '/albedo/work/user/pscholz/forcing/IDEMIX2/idemix2_IT_forc_M2modes1-2_aniso.nc'
idemix2_M2forc_vname = 'Flux_to2' ! variable name in surface forcing file
idemix2_M2forc_zname = 'phi' ! zdim variable name in surface forcing file
idemix2_tau_M2_shelf = 7.0
idemix2_tau_M2_oce = 50.0

! --- NIW Forcing (Summed anisotropic M2-tide generation modes 1-2 (W/m2)) ---
idemix2_enable_niw = .false.
idemix2_fniw_usage = 0.2 ! fraction of surface forcing used [dimensionless]
idemix2_niwforc_file = '/albedo/work/user/pscholz/forcing/IDEMIX/fourier_smooth_2005_cfsr_inert_rgrid.nc'
idemix2_niwforc_vname = 'var706'
idemix2_tau_niw_shelf = 7.0
idemix2_tau_niw_oce = 3.0

! --- Bottom Forcing (Tidal Internal Waves) ---
idemix2_enable_bot = .true.
idemix2_botforc_file = '/albedo/pool/FESOM/fesom2.0/forcing/idemix/forcing_idemix_final_bin/FIN_STORMTIDE2_M2_plus_NYCANDER_CnoM2_bin_0.40deg.nc' ! path to bottom forcing file,
idemix2_botforc_vname = 'stormt_M2_plus_nycand_CnoM2' ! variable name in bottom forcing file

! --- Root Mean Square Topographic Height forcing ---
idemix2_hrmsforc_file = '/albedo/work/user/pscholz/forcing/IDEMIX2/idemix2_hrms_Goff2023.nc'
idemix2_hrmsforc_vname= 'HRMS'

! --- Characteristic horizontal length scale of topographic feature ---
idemix2_hlamforc_file = '/albedo/work/user/pscholz/forcing/IDEMIX2/idemix2_lambda_Goff2010.nc'
idemix2_hlamforc_vname= 'LAMBDA'

! --- apply one pass of area-weighted node smoothin after wave-wave interaction
! --- the idemix2 only mode (no EM2 or Eniw) needs some additional smoothing otherwise instable
idemix2_smooth_Eiw_diss= .false.
idemix2_smooth_Eiw = .false. ! smooth iwe2_E_iw(:,:,tip1) after wave-wave
idemix2_smooth_alpha_c = .false. ! smooth iwe2_alpha_c after parameter loop
idemix2_smooth_niter = 1

! --- diagnostics
idemix2_diag_Ecompart = .false.
idemix2_diag_Eiw = .false.
idemix2_diag_WWI = .false.
/

! ============================================================================
Expand Down
4 changes: 3 additions & 1 deletion src/MOD_MESH.F90
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ MODULE MOD_MESH
real(kind=WP), allocatable, dimension(:) :: elem_area
real(kind=WP), allocatable, dimension(:,:) :: edge_dxdy
real(kind=WP), allocatable, dimension(:,:) :: edge_cross_dxdy
integer , allocatable, dimension(:,:) :: edge_up_dn_tri
real(kind=WP), allocatable, dimension(:) :: elem_cos
real(kind=WP), allocatable, dimension(:) :: metric_factor
integer, allocatable, dimension(:,:) :: elem_neighbors
Expand Down Expand Up @@ -198,6 +199,7 @@ subroutine write_t_mesh(mesh, unit, iostat, iomsg)
call write_bin_array(mesh%elem_edges, unit, iostat, iomsg)
call write_bin_array(mesh%elem_area, unit, iostat, iomsg)
call write_bin_array(mesh%edge_dxdy, unit, iostat, iomsg)
call write_bin_array(mesh%edge_up_dn_tri,unit, iostat, iomsg)

call write_bin_array(mesh%edge_cross_dxdy, unit, iostat, iomsg)
call write_bin_array(mesh%elem_cos, unit, iostat, iomsg)
Expand Down Expand Up @@ -295,7 +297,7 @@ subroutine read_t_mesh(mesh, unit, iostat, iomsg)
call read_bin_array(mesh%elem_edges, unit, iostat, iomsg)
call read_bin_array(mesh%elem_area, unit, iostat, iomsg)
call read_bin_array(mesh%edge_dxdy, unit, iostat, iomsg)

call read_bin_array(mesh%edge_up_dn_tri,unit, iostat, iomsg)
call read_bin_array(mesh%edge_cross_dxdy, unit, iostat, iomsg)
call read_bin_array(mesh%elem_cos, unit, iostat, iomsg)
call read_bin_array(mesh%metric_factor, unit, iostat, iomsg)
Expand Down
11 changes: 11 additions & 0 deletions src/MOD_PARTIT.F90
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,17 @@ module MOD_PARTIT
integer, allocatable :: s_mpitype_nod2D_i(:), r_mpitype_nod2D_i(:)
integer, allocatable :: s_mpitype_nod3D(:,:,:), r_mpitype_nod3D(:,:,:)

! Spectral bin (fbin) fields for IDEMIX2 halo exchange
! Full spectral column exchanged at once (like standard nod3D exchanges full depth column).
! Nodal fields: (peer, nfbin:nfbin, n_val) with n_val=1..3
! Element fields: (peer, nfbin:nfbin) for 2D, (peer, nfbin:nfbin, n_val) for 3D with n_val=1..4
integer :: nfbin_mpi = 0 ! number of spectral bins for MPI types (0 = not initialized)
integer, allocatable :: s_mpitype_nod3D_fbin(:,:,:), r_mpitype_nod3D_fbin(:,:,:)
integer, allocatable :: s_mpitype_elem2D_fbin(:,:), r_mpitype_elem2D_fbin(:,:)
integer, allocatable :: s_mpitype_elem2D_full_fbin(:,:), r_mpitype_elem2D_full_fbin(:,:)
integer, allocatable :: s_mpitype_elem3D_fbin(:,:,:), r_mpitype_elem3D_fbin(:,:,:)
integer, allocatable :: s_mpitype_elem3D_full_fbin(:,:,:), r_mpitype_elem3D_full_fbin(:,:,:)

integer :: MPIERR

!!! remPtr_* are constructed during the runtime and shall not be dumped!!!
Expand Down
16 changes: 15 additions & 1 deletion src/associate_part_ass.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,18 @@ if (allocated(partit%s_mpitype_nod2D)) then

s_mpitype_nod3D(1:com_nod2D%sPEnum, lb:ub, 1:3) => partit%s_mpitype_nod3D(:,:,:)
r_mpitype_nod3D(1:com_nod2D%rPEnum, lb:ub, 1:3) => partit%r_mpitype_nod3D(:,:,:)
end if
end if

nfbin_mpi => partit%nfbin_mpi
if (allocated(partit%s_mpitype_nod3D_fbin)) then
s_mpitype_nod3D_fbin( 1:com_nod2D%sPEnum , nfbin_mpi:nfbin_mpi, 1:3) => partit%s_mpitype_nod3D_fbin( :,:,:)
r_mpitype_nod3D_fbin( 1:com_nod2D%rPEnum , nfbin_mpi:nfbin_mpi, 1:3) => partit%r_mpitype_nod3D_fbin( :,:,:)
s_mpitype_elem2D_fbin( 1:com_elem2D%sPEnum , nfbin_mpi:nfbin_mpi ) => partit%s_mpitype_elem2D_fbin( :,:)
r_mpitype_elem2D_fbin( 1:com_elem2D%rPEnum , nfbin_mpi:nfbin_mpi ) => partit%r_mpitype_elem2D_fbin( :,:)
s_mpitype_elem2D_full_fbin(1:com_elem2D_full%sPEnum, nfbin_mpi:nfbin_mpi ) => partit%s_mpitype_elem2D_full_fbin( :,:)
r_mpitype_elem2D_full_fbin(1:com_elem2D_full%rPEnum, nfbin_mpi:nfbin_mpi ) => partit%r_mpitype_elem2D_full_fbin( :,:)
s_mpitype_elem3D_fbin( 1:com_elem2D%sPEnum , nfbin_mpi:nfbin_mpi, 1:4) => partit%s_mpitype_elem3D_fbin( :,:,:)
r_mpitype_elem3D_fbin( 1:com_elem2D%rPEnum , nfbin_mpi:nfbin_mpi, 1:4) => partit%r_mpitype_elem3D_fbin( :,:,:)
s_mpitype_elem3D_full_fbin(1:com_elem2D_full%sPEnum, nfbin_mpi:nfbin_mpi, 1:4) => partit%s_mpitype_elem3D_full_fbin(:,:,:)
r_mpitype_elem3D_full_fbin(1:com_elem2D_full%rPEnum, nfbin_mpi:nfbin_mpi, 1:4) => partit%r_mpitype_elem3D_full_fbin(:,:,:)
end if
7 changes: 7 additions & 0 deletions src/associate_part_def.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,13 @@
integer, dimension(:), pointer :: s_mpitype_nod2D_i, r_mpitype_nod2D_i
integer, dimension(:,:,:), pointer :: s_mpitype_nod3D, r_mpitype_nod3D

integer, dimension(:,:,:), pointer :: s_mpitype_nod3D_fbin , r_mpitype_nod3D_fbin
integer, dimension(:,:), pointer :: s_mpitype_elem2D_fbin , r_mpitype_elem2D_fbin
integer, dimension(:,:), pointer :: s_mpitype_elem2D_full_fbin, r_mpitype_elem2D_full_fbin
integer, dimension(:,:,:), pointer :: s_mpitype_elem3D_fbin , r_mpitype_elem3D_fbin
integer, dimension(:,:,:), pointer :: s_mpitype_elem3D_full_fbin, r_mpitype_elem3D_full_fbin
integer, pointer :: nfbin_mpi

integer, pointer :: MPIERR
integer, pointer :: MPIERR_IB ! copy for icebergs LA: 2023-05-22
integer, pointer :: npes
Expand Down
Loading
Loading