Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
5719acc
refactor: moving state equation error check out of pressure_bv loop
wiltonloch Mar 15, 2023
96c03c3
refactor: removing trim calls inside kernels for gpu build
wiltonloch Mar 15, 2023
59d10a5
chore: whitespace cleanup in gen_modules_config
wiltonloch Mar 15, 2023
17b596f
porting: preparing density calculation subroutines for gpu execution
wiltonloch Mar 17, 2023
c451172
chore: removing dangling state equation error messages
wiltonloch Mar 17, 2023
d3b0856
refactor: rewriting pressure_bv loops explicitly
wiltonloch Mar 17, 2023
3fc7003
refactor: using arrays explicitly for state equation calls in pressur…
wiltonloch Mar 17, 2023
d31d2ce
porting: added decorations to pressure_bv inner loops
wiltonloch Mar 17, 2023
585866e
refactor: moving state equation error check out of zxxxx_easypgf loop
wiltonloch Mar 24, 2023
946af16
refactor: moved error check out of zxxxx_easypgf loop for gpu execution
wiltonloch Apr 19, 2023
751fd2b
refactor: relevant kernel loops written explicitly
wiltonloch Apr 19, 2023
692c9a3
porting: added decorations to zxxxx_easypgf kernel
wiltonloch Apr 19, 2023
48b5e1b
refactor: writing compute_sigma_xy loops explicitly
wiltonloch Mar 27, 2023
d3a351d
porting: added decorations to compute_sigma_xy
wiltonloch Mar 27, 2023
ac4c168
porting: added decorations to compute_neutral_slope
wiltonloch Mar 27, 2023
601cb59
fix: removed dangling variable from openmp directive
wiltonloch Mar 27, 2023
20a5caa
porting: formatted and added decorations to sw_alpha_beta
wiltonloch Mar 27, 2023
f037376
chore: whitespace cleanup in gen_support file
wiltonloch Apr 5, 2023
6a09ceb
porting: added decorations to smooth_nod3D subroutine
wiltonloch Apr 5, 2023
a37ee51
porting: added single enclosing data region for smooth_nod3D subroutine
wiltonloch Apr 5, 2023
a4b184a
porting: added single enclosing data region to pressure_bv subroutine
wiltonloch Apr 5, 2023
eb27d8e
porting: added single enclosing data region to zxxxx_easypgf subroutine
wiltonloch Apr 5, 2023
00d04d2
porting: added single enclosing data region to sw_alpha_beta subroutine
wiltonloch Apr 5, 2023
56e3569
porting: added single enclosing data region to compute_sigma_xy subro…
wiltonloch Apr 5, 2023
48884d8
fix: fixed bug to allow g2g communication for 3D arrays
wiltonloch Apr 19, 2023
a6219dd
refactor: added directives for reproducible gpu results to compute_ne…
wiltonloch Apr 19, 2023
9ff5529
porting: added single enclosing data region to compute_neutral_slope …
wiltonloch Apr 19, 2023
c9930a3
chore: whitespace cleanup in oce_ale.F90
wiltonloch Apr 19, 2023
715d5ce
porting: added single enclosing data region aroung all dynamics kernels
wiltonloch Apr 19, 2023
f671aa2
porting: changing kernels default from none to present
wiltonloch Apr 19, 2023
16b15b6
porting: removing kernel local data regions
wiltonloch Apr 19, 2023
7f8d293
Merge branch 'refactoring' into dynamics_gpu_port
suvarchal Dec 13, 2023
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
2 changes: 1 addition & 1 deletion src/gen_halo_exchange.F90
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ subroutine exchange_nod3D_n(nod_array3D, partit, luse_g2g)
real(real64), intent(inout) :: nod_array3D(:,:,:)
logical, intent(in),optional :: luse_g2g
if (partit%npes>1) then
call exchange_nod3D_n_begin(nod_array3D, partit)
call exchange_nod3D_n_begin(nod_array3D, partit, luse_g2g)
call exchange_nod_end(partit)
endif

Expand Down
82 changes: 41 additions & 41 deletions src/gen_modules_config.F90
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
!
! Module of model configuration parameters + routines to set model configuration
! It combines gen_modules_config and gen_setup_model of FESOM release
! in a single module.
! It combines gen_modules_config and gen_setup_model of FESOM release
! in a single module.
! S. Danilov, 5.04.2012
!
! ======================================================================
Expand All @@ -13,14 +13,14 @@ module g_config
! *** Modelname ***
character(5) :: runid='test1' ! a model/setup name
namelist /modelname/ runid

!_____________________________________________________________________________
! *** time step ***
integer :: step_per_day=72 ! number of steps per day
integer :: run_length=1 ! run length
character :: run_length_unit='y' ! unit: y, d, s
namelist /timestep/ step_per_day, run_length, run_length_unit

!_____________________________________________________________________________
! *** Paths for all in and out ***
character(MAX_PATH) :: MeshPath='./mesh/'
Expand All @@ -29,7 +29,7 @@ module g_config
character(MAX_PATH) :: ResultPath='./result/'
namelist /paths/ MeshPath, ClimateDataPath, &
TideForcingPath, ResultPath

!_____________________________________________________________________________
! *** restart_log ***
integer :: logfile_outfreq=1 ! logfile info. outp. freq., # steps
Expand All @@ -39,36 +39,36 @@ module g_config
character(3) :: raw_restart_length_unit='m'
integer :: bin_restart_length=1
character(3) :: bin_restart_length_unit='m'
namelist /restart_log/ restart_length , restart_length_unit, &

namelist /restart_log/ restart_length , restart_length_unit, &
raw_restart_length, raw_restart_length_unit, &
bin_restart_length, bin_restart_length_unit, &
logfile_outfreq
!_____________________________________________________________________________
! *** ale_def ***
! Which ALE case to use : 'linfs', 'zlevel', 'zstar'
character(20) :: which_ALE='linfs'
! use partial bottom cell configuration .true./.false.
logical :: use_partial_cell=.false.
! if a thicker partial bottom layer thickness is more realistic than always
! apply it, BUT when a thinner partial bottom layer thickness is more realistic than
! only apply it when the initial full cell bottom layer thickness is above the
! treshhold partial_cell_tresh to not allow already thin layers to become even
! thinner. e.g
! partial_cell_tresh=10 --> thinner partial bottom cells will be only applied for initial
! bottom layer thicknesses larger than 10m
real(kind=WP) :: partial_cell_thresh=0.0_WP
! for zlevel: layer thickness should not become smaller than min_hnode of
character(20) :: which_ALE='linfs'

! use partial bottom cell configuration .true./.false.
logical :: use_partial_cell=.false.

! if a thicker partial bottom layer thickness is more realistic than always
! apply it, BUT when a thinner partial bottom layer thickness is more realistic than
! only apply it when the initial full cell bottom layer thickness is above the
! treshhold partial_cell_tresh to not allow already thin layers to become even
! thinner. e.g
! partial_cell_tresh=10 --> thinner partial bottom cells will be only applied for initial
! bottom layer thicknesses larger than 10m
real(kind=WP) :: partial_cell_thresh=0.0_WP

! for zlevel: layer thickness should not become smaller than min_hnode of
! original layer thickness. If it happens switch from zelvel to local zstar
real(kind=WP) :: min_hnode=0.5
! for zlevel: in case min_hnode criteria is reached over how many level should
real(kind=WP) :: min_hnode=0.5

! for zlevel: in case min_hnode criteria is reached over how many level should
! ssh change be distributed
integer :: lzstar_lev=4

! maximal pressure from ice felt by the ocean
real(kind=WP) :: max_ice_loading=5.0

Expand All @@ -86,13 +86,13 @@ module g_config
real(kind=WP) :: gammaEuler=-90. ! then around new z.
! Set to zeros to work with
! geographical coordinates
integer :: thers_zbar_lev=5 ! minimum number of levels to be
character(len=5) :: which_depth_n2e='mean'
integer :: thers_zbar_lev=5 ! minimum number of levels to be
character(len=5) :: which_depth_n2e='mean'

logical :: use_depthonelem =.false.
character(len=10) :: use_depthfile='aux3d' ! 'aux3d', 'depth@'
character(len=10) :: use_depthfile='aux3d' ! 'aux3d', 'depth@'
logical :: use_cavityonelem=.false.

namelist /geometry/ cartesian, fplane, &
cyclic_length, rotated_grid, force_rotation, &
alphaEuler, betaEuler, gammaEuler, &
Expand All @@ -103,30 +103,32 @@ module g_config
logical :: include_fleapyear=.false.
logical :: use_flpyrcheck =.true.
namelist /calendar/ include_fleapyear, use_flpyrcheck

!_____________________________________________________________________________
! *** machine ***
integer :: n_levels = 1 ! Number of levels for hierarchic partitioning
integer, dimension(10) :: n_part = RESHAPE((/0/), (/10/), (/0/)) ! Number of partitions on each hierarchy level
namelist /machine/ n_levels, n_part

!_____________________________________________________________________________
! *** configuration***
logical :: use_sw_pene=.true.
logical :: use_ice=.false.
logical :: use_ice=.false.
logical :: use_floatice = .false.
logical :: use_cavity = .false. ! switch on/off cavity usage
logical :: use_cavity_partial_cell = .false. ! switch on/off cavity usage
logical :: use_cavity_fw2press = .true. ! switch on/off cavity+zstar input of freshwater leads to increase in pressure
real(kind=WP) :: cavity_partial_cell_thresh=0.0_WP ! same as partial_cell_tresh but for surface
logical :: toy_ocean=.false. ! Ersatz forcing has to be supplied
character(100) :: which_toy="soufflet"
logical :: flag_debug=.false. ! prints name of actual subroutine he is in
character(100) :: which_toy="soufflet"
logical :: flag_debug=.false. ! prints name of actual subroutine he is in
logical :: flag_warn_cflz=.true. ! switches off cflz warning
namelist /run_config/ use_ice,use_floatice, use_sw_pene, use_cavity, &
namelist /run_config/ use_ice,use_floatice, use_sw_pene, use_cavity, &
use_cavity_partial_cell, cavity_partial_cell_thresh, &
use_cavity_fw2press, toy_ocean, which_toy, flag_debug, flag_warn_cflz


!$ACC DECLARE COPYIN(toy_ocean, which_toy)

!_____________________________________________________________________________
! *** others ***
real(kind=WP) :: dt
Expand All @@ -136,7 +138,5 @@ module g_config
real(kind=WP) :: rtime_oce=0.0, rtime_oce_dyn=0.0, rtime_oce_dynssh=0.0, rtime_oce_solvessh=0.0
real(kind=WP) :: rtime_oce_solvetra=0.0, rtime_oce_GMRedi=0.0, rtime_oce_mixpres=0.0
real(kind=WP) :: dummy=1.e10


end module g_config

end module g_config
Loading