Skip to content
Closed
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
17 changes: 17 additions & 0 deletions src/MOD_ICE.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
13 changes: 13 additions & 0 deletions src/fesom_module.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
16 changes: 16 additions & 0 deletions src/gen_forcing_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
38 changes: 38 additions & 0 deletions src/gen_model_setup.F90
Original file line number Diff line number Diff line change
@@ -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
Expand Down
9 changes: 5 additions & 4 deletions src/gen_modules_backscatter.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -248,14 +248,15 @@ 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!!
!Why is it necessary to implement the length of the array? It doesn't work without!
!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
Expand Down Expand Up @@ -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)
Expand Down
14 changes: 14 additions & 0 deletions src/ice_fct.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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_interface(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_interface

end interface
end module
!
Expand Down
25 changes: 23 additions & 2 deletions src/ice_oce_coupling.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -42,10 +42,28 @@ 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
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


!
!
!_______________________________________________________________________________
Expand Down Expand Up @@ -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
Expand Down
9 changes: 5 additions & 4 deletions src/ice_setup_step.F90
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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

!___________________________________________________________________________
Expand Down
Loading