From 7c4243109ad267667d65c4892c21811d25b4dfab Mon Sep 17 00:00:00 2001 From: Nikolay Koldunov Date: Sun, 12 Jan 2025 02:25:07 +0100 Subject: [PATCH 1/3] Add a bunch of missing interfaces to make Intel compiler happy. Otherwise I can't compile with debug flags. --- src/MOD_ICE.F90 | 17 +++ src/fesom_module.F90 | 13 ++ src/gen_forcing_init.F90 | 16 +++ src/gen_model_setup.F90 | 38 ++++++ src/gen_modules_backscatter.F90 | 9 +- src/ice_fct.F90 | 14 ++ src/ice_oce_coupling.F90 | 21 +++ src/ice_setup_step.F90 | 9 +- src/oce_ale.F90 | 232 ++++++++++++++++++++++++++++++++ src/oce_ale_tracer.F90 | 29 ++++ src/oce_dyn.F90 | 19 ++- src/oce_mesh.F90 | 41 ++++++ src/oce_setup_step.F90 | 84 ++++++++++++ 13 files changed, 533 insertions(+), 9 deletions(-) diff --git a/src/MOD_ICE.F90 b/src/MOD_ICE.F90 index 0375d37d1..ce2e4e374 100644 --- a/src/MOD_ICE.F90 +++ b/src/MOD_ICE.F90 @@ -788,6 +788,23 @@ end subroutine ice_init ! !_______________________________________________________________________________ ! initialise derived type for sea ice + +module ice_init_toyocean_dummy_interface + interface + subroutine ice_init_toyocean_dummy(ice, partit, mesh) + USE MOD_ICE + USE MOD_PARTIT + USE MOD_PARSUP + USE MOD_MESH + USE o_param, only: WP + implicit none + type(t_ice) , intent(inout), target :: ice + type(t_partit), intent(inout), target :: partit + type(t_mesh) , intent(in) , target :: mesh + end subroutine ice_init_toyocean_dummy + end interface + end module ice_init_toyocean_dummy_interface + subroutine ice_init_toyocean_dummy(ice, partit, mesh) USE MOD_ICE USE MOD_PARTIT diff --git a/src/fesom_module.F90 b/src/fesom_module.F90 index dffef9186..4bdd20397 100755 --- a/src/fesom_module.F90 +++ b/src/fesom_module.F90 @@ -37,6 +37,19 @@ module fesom_main_storage_module use iceberg_params use iceberg_step use iceberg_ocean_coupling + use par_support_interfaces + use dynamics_init_interface + use ice_timestep_interface + use setup_model_interface + use get_run_steps_interface + use mesh_setup_interface + use check_mesh_consistency_interface + use arrays_init_interface + use forcing_setup_interface + use ice_init_toyocean_dummy_interface + use allocate_icb_interface + use restart_thickness_ale_interface + use compute_vel_nodes_interface ! Define icepack module #if defined (__icepack) diff --git a/src/gen_forcing_init.F90 b/src/gen_forcing_init.F90 index 97dcdbd42..eb51e859b 100755 --- a/src/gen_forcing_init.F90 +++ b/src/gen_forcing_init.F90 @@ -10,6 +10,22 @@ subroutine forcing_array_setup(partit, mesh) end interface end module +module forcing_setup_interface + interface + subroutine forcing_setup(partit, mesh) + use g_CONFIG + use g_sbf, only: sbc_ini + use mod_mesh + USE MOD_PARTIT + USE MOD_PARSUP + use forcing_array_setup_interfaces + implicit none + type(t_mesh), intent(in) :: mesh + type(t_partit), intent(inout), target :: partit + end subroutine forcing_setup + end interface +end module forcing_setup_interface + ! Adapted from FESOM code by Q. Wang. ! Added the driving routine forcing_setup. ! S.D 05.04.12 diff --git a/src/gen_model_setup.F90 b/src/gen_model_setup.F90 index 13a669a3a..64e17b7a6 100755 --- a/src/gen_model_setup.F90 +++ b/src/gen_model_setup.F90 @@ -1,3 +1,41 @@ +module setup_model_interface + interface + subroutine setup_model(partit) + USE MOD_PARTIT + USE MOD_PARSUP + use o_param + use g_forcing_param + use g_config + use diagnostics, only: ldiag_solver, lcurt_stress_surf, ldiag_Ri, & + ldiag_TurbFlux, ldiag_trflx, ldiag_dMOC, & + ldiag_DVD, diag_list + use g_clock, only: timenew, daynew, yearnew + use g_ic3d +#ifdef __recom + use recom_config + use recom_ciso +#endif + use mod_transit + implicit none + type(t_partit), intent(inout), target :: partit + end subroutine setup_model + end interface +end module setup_model_interface + +module get_run_steps_interface + interface + subroutine get_run_steps(nsteps, partit) + use g_clock + USE MOD_PARTIT + USE MOD_PARSUP + implicit none + integer, intent(inout) :: nsteps + type(t_partit), intent(inout) :: partit + end subroutine get_run_steps + end interface +end module get_run_steps_interface + + ! ============================================================== subroutine setup_model(partit) USE MOD_PARTIT diff --git a/src/gen_modules_backscatter.F90 b/src/gen_modules_backscatter.F90 index 1a3c620cd..b12670eeb 100644 --- a/src/gen_modules_backscatter.F90 +++ b/src/gen_modules_backscatter.F90 @@ -34,7 +34,7 @@ module g_backscatter subroutine init_backscatter(partit, mesh) implicit none integer :: elem_size - type(t_mesh), intent(in), target :: mesh + type(t_mesh), intent(inout), target :: mesh type(t_partit), intent(inout), target :: partit #include "associate_part_def.h" #include "associate_mesh_def.h" @@ -82,7 +82,7 @@ subroutine visc_filt_dbcksc(dynamics, partit, mesh) real(kind=WP) , allocatable :: uuu(:) type(t_dyn) , intent(inout), target :: dynamics type(t_partit), intent(inout), target :: partit - type(t_mesh) , intent(in) , target :: mesh + type(t_mesh) , intent(inout) , target :: mesh real(kind=WP) , dimension(:,:,:), pointer :: UV, UV_rhs real(kind=WP) , dimension(:,:) , pointer :: U_c, V_c #include "associate_part_def.h" @@ -248,6 +248,7 @@ end subroutine backscatter_coef ! !_______________________________________________________________________________ subroutine uke_update(dynamics, partit, mesh) + use elem_center_interface IMPLICIT NONE !I had to change uke(:) to uke(:,:) to make output and restart work!! @@ -255,7 +256,7 @@ subroutine uke_update(dynamics, partit, mesh) !integer, intent(in) :: t_levels type(t_dyn) , intent(inout), target :: dynamics type(t_partit), intent(inout), target :: partit - type(t_mesh) , intent(in) , target :: mesh + type(t_mesh) , intent(inout), target :: mesh real(kind=WP) :: hall, h1_eta, hnz, vol integer :: elnodes(3), nz, ed, edi, node, j, elem, q @@ -362,7 +363,7 @@ subroutine uke_update(dynamics, partit, mesh) !Taking out that one place where it is always weird (Pacific Southern Ocean) !Should not really be used later on, once we fix the issue with the 1/4 degree grid if(.not. (TRIM(which_toy)=="soufflet")) then - call elem_center(ed, ex, ey) + call elem_center(ed, ex, ey, mesh) !a1=-104.*rad !a2=-49.*rad call g2r(-104.*rad, -49.*rad, a1, a2) diff --git a/src/ice_fct.F90 b/src/ice_fct.F90 index 5e0b87093..6d5f30319 100755 --- a/src/ice_fct.F90 +++ b/src/ice_fct.F90 @@ -70,6 +70,20 @@ subroutine ice_update_for_div(ice, partit, mesh) type(t_partit), intent(inout), target :: partit type(t_mesh), intent(in), target :: mesh end subroutine + + subroutine ice_fct_solve(ice, partit, mesh) + use mod_ice + use mod_partit + use mod_parsup + use mod_mesh + implicit none + type(t_ice) , intent(inout), target :: ice + type(t_partit), intent(inout), target :: partit + ! If you do *not* modify mesh, use intent(in). + ! If you really do modify mesh, use intent(inout). + type(t_mesh) , intent(in) , target :: mesh + end subroutine ice_fct_solve + end interface end module ! diff --git a/src/ice_oce_coupling.F90 b/src/ice_oce_coupling.F90 index 07b1dba78..d85e64621 100755 --- a/src/ice_oce_coupling.F90 +++ b/src/ice_oce_coupling.F90 @@ -43,9 +43,27 @@ subroutine oce_fluxes_mom(ice, dynamics, partit, mesh) type(t_partit), intent(inout), target :: partit type(t_mesh) , intent(in) , target :: mesh end subroutine + + subroutine cal_shortwave_rad(ice, partit, mesh) + USE MOD_ICE + USE MOD_PARTIT + USE MOD_PARSUP + USE MOD_MESH + USE o_PARAM + USE o_ARRAYS + USE g_CONFIG + USE g_forcing_arrays + USE g_comm_auto + IMPLICIT NONE + type(t_ice) , intent(inout), target :: ice + type(t_partit), intent(inout), target :: partit + type(t_mesh) , intent(in) , target :: mesh + end subroutine cal_shortwave_rad + end interface end module + ! ! !_______________________________________________________________________________ @@ -260,6 +278,9 @@ subroutine oce_fluxes(ice, dynamics, tracers, partit, mesh) use g_forcing_arrays use g_support use cavity_interfaces + USE o_PARAM + USE oce_fluxes_interface + #if defined (__icepack) use icedrv_main, only: icepack_to_fesom, & init_flux_atm_ocn diff --git a/src/ice_setup_step.F90 b/src/ice_setup_step.F90 index ea6dcf1d9..0100c8362 100755 --- a/src/ice_setup_step.F90 +++ b/src/ice_setup_step.F90 @@ -23,9 +23,9 @@ subroutine ice_setup(ice, tracers, partit, mesh) USE MOD_PARSUP USE MOD_MESH type(t_ice) , intent(inout), target :: ice - type(t_tracer), intent(in) , target :: tracers + type(t_tracer), intent(inout) , target :: tracers type(t_partit), intent(inout), target :: partit - type(t_mesh) , intent(in) , target :: mesh + type(t_mesh) , intent(inout) , target :: mesh end subroutine end interface end module @@ -58,10 +58,11 @@ subroutine ice_setup(ice, tracers, partit, mesh) use g_CONFIG use ice_initial_state_interface use ice_fct_interfaces + use ice_init_interface implicit none type(t_ice) , intent(inout), target :: ice - type(t_tracer), intent(in) , target :: tracers - type(t_mesh) , intent(in) , target :: mesh + type(t_tracer), intent(inout) , target :: tracers + type(t_mesh) , intent(inout) , target :: mesh type(t_partit), intent(inout), target :: partit !___________________________________________________________________________ diff --git a/src/oce_ale.F90 b/src/oce_ale.F90 index 681bfa51e..ef7df05d2 100644 --- a/src/oce_ale.F90 +++ b/src/oce_ale.F90 @@ -189,6 +189,225 @@ subroutine oce_timestep_ale(n, ice, dynamics, tracers, partit, mesh) end subroutine end interface end module +module check_viscopt_interface + interface + subroutine check_viscopt(dynamics, partit, mesh) + USE MOD_DYN + USE MOD_PARTIT + USE MOD_PARSUP + USE MOD_MESH + ! (Also uses check_validviscopt_interface in the subroutine itself, + ! but that is typically not required here in the interface.) + implicit none + type(t_dyn) , intent(inout), target :: dynamics + type(t_partit), intent(inout), target :: partit + type(t_mesh) , intent(in) , target :: mesh + end subroutine check_viscopt + end interface + end module check_viscopt_interface + + module sw_alpha_beta_interface + interface + subroutine sw_alpha_beta(TF1, SF1, partit, mesh) + USE MOD_MESH + USE MOD_PARTIT + USE MOD_PARSUP + USE o_arrays ! if needed for WP, etc. + USE o_param ! if needed for WP + implicit none + ! Arrays TF1, SF1 are declared in the subroutine as + ! real(kind=WP) :: TF1(mesh%nl-1, partit%myDim_nod2D+partit%eDim_nod2D) + ! real(kind=WP) :: SF1(mesh%nl-1, partit%myDim_nod2D+partit%eDim_nod2D) + ! but for simplicity in an interface, we often use assumed-shape: + real(kind=WP), intent(in) :: TF1(:,:), SF1(:,:) + type(t_partit), intent(inout), target :: partit + type(t_mesh) , intent(in) , target :: mesh + end subroutine sw_alpha_beta + end interface + end module sw_alpha_beta_interface + + module compute_sigma_xy_interface + interface + subroutine compute_sigma_xy(TF1, SF1, partit, mesh) + USE MOD_MESH + USE MOD_PARTIT + USE MOD_PARSUP + USE o_arrays + USE o_param + implicit none + real(kind=WP), intent(in) :: TF1(:,:), SF1(:,:) + type(t_partit), intent(inout), target :: partit + type(t_mesh) , intent(in) , target :: mesh + end subroutine compute_sigma_xy + end interface + end module compute_sigma_xy_interface + + module compute_neutral_slope_interface + interface + subroutine compute_neutral_slope(partit, mesh) + USE MOD_PARTIT + USE MOD_PARSUP + USE MOD_MESH + USE o_param + USE o_arrays + implicit none + type(t_partit), intent(inout), target :: partit + type(t_mesh) , intent(in) , target :: mesh + end subroutine compute_neutral_slope + end interface + end module compute_neutral_slope_interface + + module status_check_interface + interface + subroutine status_check(partit) + USE MOD_PARTIT + USE MOD_PARSUP + implicit none + type(t_partit), intent(inout), target :: partit + end subroutine status_check + end interface + end module status_check_interface + + module mo_convect_interface + interface + subroutine mo_convect(ice, partit, mesh) + USE MOD_ICE + USE MOD_PARTIT + USE MOD_PARSUP + USE MOD_MESH + USE o_arrays + USE o_param + implicit none + type(t_ice), intent(in), target :: ice + type(t_partit), intent(inout), target :: partit + type(t_mesh), intent(in), target :: mesh + end subroutine mo_convect + end interface + end module mo_convect_interface + + module oce_mixing_pp_interface + interface + subroutine oce_mixing_pp(dynamics, partit, mesh) + USE MOD_MESH + USE MOD_PARTIT + USE MOD_PARSUP + USE MOD_DYN + USE o_param + USE o_arrays + implicit none + type(t_dyn) , intent(inout), target :: dynamics + type(t_partit), intent(inout), target :: partit + type(t_mesh) , intent(in) , target :: mesh + end subroutine oce_mixing_pp + end interface + end module oce_mixing_pp_interface + + module viscosity_filter_interface + interface + subroutine viscosity_filter(option, dynamics, partit, mesh) + USE o_PARAM + USE MOD_MESH + USE MOD_PARTIT + USE MOD_PARSUP + USE MOD_DYN + implicit none + integer, intent(in) :: option + type(t_dyn) , intent(inout), target :: dynamics + type(t_partit), intent(inout), target :: partit + type(t_mesh) , intent(inout), target :: mesh + end subroutine viscosity_filter + end interface + end module viscosity_filter_interface + + module update_vel_interface + interface + subroutine update_vel(dynamics, partit, mesh) + USE MOD_MESH + USE MOD_PARTIT + USE MOD_PARSUP + USE MOD_DYN + USE o_PARAM + USE g_CONFIG + USE g_comm_auto + IMPLICIT NONE + type(t_dyn) , intent(inout), target :: dynamics + type(t_partit), intent(inout), target :: partit + type(t_mesh) , intent(in) , target :: mesh + end subroutine update_vel + end interface + end module update_vel_interface + + module compute_thickness_zstar_interface + interface + subroutine compute_thickness_zstar(dynamics, partit, mesh) + USE MOD_PARTIT + USE MOD_PARSUP + USE MOD_MESH + USE MOD_DYN + USE g_comm_auto + IMPLICIT NONE + type(t_dyn) , intent(inout), target :: dynamics + type(t_partit), intent(inout), target :: partit + ! Note the actual subroutine has "intent(inout)" for mesh: + type(t_mesh) , intent(inout), target :: mesh + end subroutine compute_thickness_zstar + end interface + end module compute_thickness_zstar_interface + + module compute_ke_wrho_interface + interface + subroutine compute_ke_wrho(dynamics, partit, mesh) + USE MOD_MESH + USE MOD_PARTIT + USE MOD_PARSUP + USE MOD_DYN + USE o_PARAM + USE g_CONFIG + USE g_comm_auto + USE o_ARRAYS + IMPLICIT NONE + type(t_dyn) , intent(inout), target :: dynamics + type(t_partit), intent(inout), target :: partit + type(t_mesh) , intent(in) , target :: mesh + end subroutine compute_ke_wrho + end interface + end module compute_ke_wrho_interface + + module compute_apegen_interface + interface + subroutine compute_apegen(dynamics, tracers, partit, mesh) + USE MOD_MESH + USE MOD_PARTIT + USE MOD_TRACER + USE MOD_PARSUP + USE MOD_DYN + USE o_PARAM + USE g_comm_auto + USE o_ARRAYS + IMPLICIT NONE + type(t_dyn) , intent(inout), target :: dynamics + type(t_tracer), intent(in) , target :: tracers + type(t_partit), intent(inout), target :: partit + type(t_mesh) , intent(in) , target :: mesh + end subroutine compute_apegen + end interface + end module compute_apegen_interface + + module restart_thickness_ale_interface + interface + subroutine restart_thickness_ale(partit, mesh) + use o_PARAM + use MOD_MESH + USE MOD_PARTIT + USE MOD_PARSUP + use o_ARRAYS + use g_config,only: which_ale,lzstar_lev,min_hnode + implicit none + type(t_partit), intent(inout), target :: partit + type(t_mesh) , intent(inout), target :: mesh + end subroutine restart_thickness_ale + end interface + end module restart_thickness_ale_interface ! CONTENT: @@ -3340,6 +3559,19 @@ subroutine oce_timestep_ale(n, ice, dynamics, tracers, partit, mesh) use check_blowup_interface use fer_solve_interface use impl_vert_visc_ale_vtransp_interface + use check_viscopt_interface + use sw_alpha_beta_interface + use compute_sigma_xy_interface + use compute_neutral_slope_interface + use status_check_interface + use mo_convect_interface + use oce_mixing_pp_interface + use viscosity_filter_interface + use update_vel_interface + use compute_thickness_zstar_interface + use compute_ke_wrho_interface + use compute_apegen_interface + IMPLICIT NONE integer , intent(in) :: n diff --git a/src/oce_ale_tracer.F90 b/src/oce_ale_tracer.F90 index bb40ff335..1f458e083 100644 --- a/src/oce_ale_tracer.F90 +++ b/src/oce_ale_tracer.F90 @@ -142,6 +142,34 @@ subroutine solve_tracers_ale(ice, dynamics, tracers, partit, mesh) end subroutine end interface end module + +module brine_rejection_local_interfaces + implicit none + interface + subroutine cal_rejected_salt(ice, partit, mesh) + use mod_ice + use mod_partit + use mod_mesh + use mod_parsup + use o_tracers + implicit none + type(t_ice) , intent(in), target :: ice + type(t_partit), intent(in), target :: partit + type(t_mesh) , intent(in), target :: mesh + end subroutine cal_rejected_salt + + subroutine app_rejected_salt(ttf, partit, mesh) + use mod_mesh + use mod_partit + use mod_parsup + use o_tracers + implicit none + type(t_mesh) , intent(in), target :: mesh + type(t_partit) , intent(in), target :: partit + real(kind=WP), intent(inout) :: ttf(:, :) + end subroutine app_rejected_salt + end interface + end module brine_rejection_local_interfaces ! ! !=============================================================================== @@ -160,6 +188,7 @@ subroutine solve_tracers_ale(ice, dynamics, tracers, partit, mesh) use Toy_Channel_Soufflet use diff_tracers_ale_interface use oce_adv_tra_driver_interfaces + use brine_rejection_local_interfaces #if defined(__recom) use recom_glovar use recom_config diff --git a/src/oce_dyn.F90 b/src/oce_dyn.F90 index 8b5ca7387..033d1f2ad 100755 --- a/src/oce_dyn.F90 +++ b/src/oce_dyn.F90 @@ -66,6 +66,23 @@ subroutine check_validviscopt_5(partit, mesh) end interface end module +module compute_vel_nodes_interface + interface + subroutine compute_vel_nodes(dynamics, partit, mesh) + USE MOD_MESH + USE MOD_PARTIT + USE MOD_PARSUP + USE MOD_DYN + USE o_PARAM + use g_comm_auto + implicit none + type(t_dyn) , intent(inout), target :: dynamics + type(t_partit), intent(inout), target :: partit + type(t_mesh) , intent(in) , target :: mesh + end subroutine compute_vel_nodes + end interface + end module compute_vel_nodes_interface + ! ! Contains routines needed for computations of dynamics. ! includes: update_vel, compute_vel_nodes @@ -241,7 +258,7 @@ subroutine viscosity_filter(option, dynamics, partit, mesh) integer :: option type(t_dyn) , intent(inout), target :: dynamics type(t_partit), intent(inout), target :: partit - type(t_mesh) , intent(in) , target :: mesh + type(t_mesh) , intent(inout) , target :: mesh ! Driving routine ! Background viscosity is selected in terms of Vl, where V is diff --git a/src/oce_mesh.F90 b/src/oce_mesh.F90 index 0dba2f221..283e3d37d 100755 --- a/src/oce_mesh.F90 +++ b/src/oce_mesh.F90 @@ -133,6 +133,47 @@ subroutine check_total_volume(partit, mesh) end interface end module +module mesh_setup_interface + interface + subroutine mesh_setup(partit, mesh) + USE MOD_MESH + USE MOD_PARTIT + USE MOD_PARSUP + USE g_ROTATE_grid + use read_mesh_interface + use find_levels_interface + use find_levels_cavity_interface + use mesh_auxiliary_arrays_interface + use test_tri_interface + use load_edges_interface + use find_levels_min_e2n_interface + use find_neighbors_interface + use mesh_areas_interface + use par_support_interfaces + implicit none + type(t_partit), intent(inout), target :: partit + type(t_mesh), intent(inout) :: mesh + end subroutine mesh_setup + end interface + end module mesh_setup_interface + + module check_mesh_consistency_interface + interface + subroutine check_mesh_consistency(partit, mesh) + USE MOD_MESH + USE MOD_PARTIT + USE MOD_PARSUP + USE o_PARAM + USE g_ROTATE_GRID + use g_comm_auto + implicit none + type(t_partit), intent(inout), target :: partit + type(t_mesh), intent(inout), target :: mesh + end subroutine check_mesh_consistency + end interface + end module check_mesh_consistency_interface + + ! Driving routine. The distributed mesh information and mesh proper ! are read from files. ! Auxiliary arrays with mesh information are assembled. diff --git a/src/oce_setup_step.F90 b/src/oce_setup_step.F90 index 4a1e96d9d..5cbe73828 100755 --- a/src/oce_setup_step.F90 +++ b/src/oce_setup_step.F90 @@ -71,6 +71,85 @@ subroutine before_oce_step(dynamics, tracers, partit, mesh) end subroutine end interface end module + +module init_stiff_mat_ale_interface + interface + subroutine init_stiff_mat_ale(partit, mesh) + USE o_PARAM + USE MOD_MESH + USE MOD_PARTIT + USE MOD_PARSUP + use g_CONFIG + IMPLICIT NONE + type(t_partit), intent(inout), target :: partit + type(t_mesh), intent(inout), target :: mesh + end subroutine init_stiff_mat_ale + end interface + end module init_stiff_mat_ale_interface + + module compute_nrst_pnt2cavline_interface + interface + subroutine compute_nrst_pnt2cavline(partit, mesh) + USE MOD_MESH + USE MOD_PARTIT + USE MOD_PARSUP + use o_PARAM, only: WP + IMPLICIT NONE + type(t_partit), intent(inout), target :: partit + type(t_mesh), intent(inout), target :: mesh + end subroutine compute_nrst_pnt2cavline + end interface + end module compute_nrst_pnt2cavline_interface + + module muscl_adv_init_interface + interface + subroutine muscl_adv_init(twork, partit, mesh) + USE MOD_MESH + USE MOD_PARTIT + USE MOD_PARSUP + use MOD_TRACER + use o_ARRAYS + use o_PARAM + use g_comm_auto + use g_config + ! The subroutine also uses "find_up_downwind_triangles_interface", + ! but that is not needed here in the interface unless it provides + ! types or parameters used in the dummy arguments. + IMPLICIT NONE + type(t_tracer_work), intent(inout), target :: twork + type(t_partit) , intent(inout), target :: partit + type(t_mesh) , intent(inout), target :: mesh + end subroutine muscl_adv_init + end interface + end module muscl_adv_init_interface + + module arrays_init_interface + interface + subroutine arrays_init(num_tracers, partit, mesh) + USE MOD_MESH + USE MOD_PARTIT + USE MOD_PARSUP + USE o_ARRAYS + USE o_PARAM + use g_comm_auto + use g_config + use g_forcing_arrays + use o_mixing_kpp_mod + use g_forcing_param, only: use_virt_salt + use diagnostics, only: ldiag_dMOC, ldiag_DVD + +#if defined(__recom) + use recom_glovar + use recom_config + use recom_ciso +#endif + implicit none + integer, intent(in) :: num_tracers + type(t_partit), intent(inout), target :: partit + type(t_mesh), intent(in) , target :: mesh + end subroutine arrays_init + end interface + end module arrays_init_interface ! ! !_______________________________________________________________________________ @@ -95,6 +174,11 @@ subroutine ocean_setup(dynamics, tracers, partit, mesh) use oce_adv_tra_fct_interfaces use init_ale_interface use init_thickness_ale_interface + use init_ref_density_interface + use init_stiff_mat_ale_interface + use compute_nrst_pnt2cavline_interface + use muscl_adv_init_interface + IMPLICIT NONE type(t_dyn) , intent(inout), target :: dynamics type(t_tracer), intent(inout), target :: tracers From b469807bb00b6ebabb955b9e9db7346999a6ec3c Mon Sep 17 00:00:00 2001 From: Nikolay Koldunov Date: Sun, 12 Jan 2025 02:55:17 +0100 Subject: [PATCH 2/3] Rename subroutine ice_fct_solve to ice_fct_solve_interface for clarity --- src/ice_fct.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/ice_fct.F90 b/src/ice_fct.F90 index 6d5f30319..9e469d59d 100755 --- a/src/ice_fct.F90 +++ b/src/ice_fct.F90 @@ -71,7 +71,7 @@ subroutine ice_update_for_div(ice, partit, mesh) type(t_mesh), intent(in), target :: mesh end subroutine - subroutine ice_fct_solve(ice, partit, mesh) + subroutine ice_fct_solve_interface(ice, partit, mesh) use mod_ice use mod_partit use mod_parsup From d64962d86ec813bace78994e625b37c61afe03bd Mon Sep 17 00:00:00 2001 From: Nikolay Koldunov Date: Sun, 12 Jan 2025 03:17:57 +0100 Subject: [PATCH 3/3] compiles, but does not work yet --- src/ice_fct.F90 | 2 +- src/ice_oce_coupling.F90 | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/ice_fct.F90 b/src/ice_fct.F90 index 9e469d59d..3f42a255e 100755 --- a/src/ice_fct.F90 +++ b/src/ice_fct.F90 @@ -82,7 +82,7 @@ subroutine ice_fct_solve_interface(ice, partit, mesh) ! If you do *not* modify mesh, use intent(in). ! If you really do modify mesh, use intent(inout). type(t_mesh) , intent(in) , target :: mesh - end subroutine ice_fct_solve + end subroutine ice_fct_solve_interface end interface end module diff --git a/src/ice_oce_coupling.F90 b/src/ice_oce_coupling.F90 index d85e64621..b8ccf0eeb 100755 --- a/src/ice_oce_coupling.F90 +++ b/src/ice_oce_coupling.F90 @@ -30,7 +30,7 @@ subroutine oce_fluxes(ice, dynamics, tracers, partit, mesh) type(t_tracer), intent(inout), target :: tracers type(t_partit), intent(inout), target :: partit type(t_mesh) , intent(in) , target :: mesh - end subroutine + end subroutine oce_fluxes subroutine oce_fluxes_mom(ice, dynamics, partit, mesh) USE MOD_ICE @@ -42,7 +42,7 @@ subroutine oce_fluxes_mom(ice, dynamics, partit, mesh) type(t_dyn) , intent(in) , target :: dynamics type(t_partit), intent(inout), target :: partit type(t_mesh) , intent(in) , target :: mesh - end subroutine + end subroutine oce_fluxes_mom subroutine cal_shortwave_rad(ice, partit, mesh) USE MOD_ICE @@ -279,7 +279,7 @@ subroutine oce_fluxes(ice, dynamics, tracers, partit, mesh) use g_support use cavity_interfaces USE o_PARAM - USE oce_fluxes_interface + ! USE oce_fluxes_interface #if defined (__icepack) use icedrv_main, only: icepack_to_fesom, &