Skip to content

Commit

Permalink
Changed setup specific parts from nemo to dbgyre and geometry in name…
Browse files Browse the repository at this point in the history
…list.config.toy_dbgyre
  • Loading branch information
alexwilms committed Dec 22, 2024
1 parent 89157a2 commit 12ebe1c
Show file tree
Hide file tree
Showing 12 changed files with 29 additions and 29 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ use_partial_cell=.false.
/

&geometry
cartesian=.true.
cartesian=.false.
fplane=.false.
cyclic_length=90 ![degree]
rotated_grid=.false. !option only valid for coupled model case now
force_rotation=.false.
alphaEuler=50. ![degree] Euler angles, convention:
betaEuler=15. ![degree] first around z, then around new x,
gammaEuler=-90. ![degree] then around new z.
alphaEuler=0 ![degree] Euler angles, convention:
betaEuler=0 ![degree] first around z, then around new x,
gammaEuler=0 ![degree] then around new z.
/

&calendar
Expand All @@ -60,7 +60,7 @@ use_sw_pene=.true.
flag_debug=.false.
flag_warn_cflz=.false.
toy_ocean=.true.
which_toy="nemo"
which_toy="dbgyre"
flag_debug=.false.
/

Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
14 changes: 7 additions & 7 deletions src/gen_forcing_init.F90
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ subroutine forcing_array_setup(partit, mesh)
end module


module forcing_array_setup_nemo_interfaces
module forcing_array_setup_dbgyre_interfaces
interface
subroutine forcing_array_setup_nemo(partit, mesh)
subroutine forcing_array_setup_dbgyre(partit, mesh)
use mod_mesh
USE MOD_PARTIT
USE MOD_PARSUP
Expand All @@ -34,7 +34,7 @@ subroutine forcing_setup(partit, mesh)
USE MOD_PARTIT
USE MOD_PARSUP
use forcing_array_setup_interfaces
use forcing_array_setup_nemo_interfaces
use forcing_array_setup_dbgyre_interfaces
implicit none
type(t_mesh), intent(in), target :: mesh
type(t_partit), intent(inout), target :: partit
Expand All @@ -46,13 +46,13 @@ subroutine forcing_setup(partit, mesh)
call sbc_ini(partit, mesh) ! initialize forcing fields
#endif
endif
if ((toy_ocean) .AND. TRIM(which_toy)=="nemo" .AND. (use_sw_pene)) then
call forcing_array_setup_nemo(partit, mesh)
if ((toy_ocean) .AND. TRIM(which_toy)=="dbgyre" .AND. (use_sw_pene)) then
call forcing_array_setup_dbgyre(partit, mesh)
endif
end subroutine forcing_setup

! ==========================================================
subroutine forcing_array_setup_nemo(partit, mesh)
subroutine forcing_array_setup_dbgyre(partit, mesh)
use g_forcing_arrays
use mod_mesh
USE MOD_PARTIT
Expand All @@ -72,7 +72,7 @@ subroutine forcing_array_setup_nemo(partit, mesh)
allocate(sw_3d(nl,n2))
chl=0.1_WP

end subroutine forcing_array_setup_nemo
end subroutine forcing_array_setup_dbgyre

! ==========================================================
subroutine forcing_array_setup(partit, mesh)
Expand Down
2 changes: 1 addition & 1 deletion src/gen_modules_backscatter.F90
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,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") .AND. .not. (TRIM(which_toy)=="nemo") ) then
if(.not. (TRIM(which_toy)=="soufflet") .AND. .not. (TRIM(which_toy)=="dbgyre") ) then
call elem_center(ed, ex, ey)
!a1=-104.*rad
!a2=-49.*rad
Expand Down
2 changes: 1 addition & 1 deletion src/oce_ale.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3242,7 +3242,7 @@ subroutine impl_vert_visc_ale(dynamics, partit, mesh)

if ((toy_ocean) .AND. (TRIM(which_toy)=="soufflet")) then
friction=-0.005
elseif ((toy_ocean) .AND. (TRIM(which_toy)=="nemo")) then
elseif ((toy_ocean) .AND. (TRIM(which_toy)=="dbgyre")) then
friction=-0.001
else
friction=-C_d*sqrt(UV(1,nzmax-1,elem)**2+ &
Expand Down
2 changes: 1 addition & 1 deletion src/oce_ale_pressure_bv.F90
Original file line number Diff line number Diff line change
Expand Up @@ -3068,7 +3068,7 @@ SUBROUTINE density_linear(t, s, bulk_0, bulk_pz, bulk_pz2, rho_out)

IF((toy_ocean) .AND. (TRIM(which_toy)=="soufflet")) THEN
rho_out = density_0 - 0.00025_WP*(t - 10.0_WP)*density_0
ELSE IF((toy_ocean) .AND. (TRIM(which_toy)=="nemo")) THEN
ELSE IF((toy_ocean) .AND. (TRIM(which_toy)=="dbgyre")) THEN
rho_out = density_0 - density_0*0.0002052_WP*(t - 10.0_WP) + density_0*0.00079_WP*(s - 35.0_WP)
ELSE
rho_out = density_0 + 0.8_WP*(s - 34.0_WP) - 0.2*(t - 20.0_WP)
Expand Down
6 changes: 3 additions & 3 deletions src/oce_ale_tracer.F90
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ subroutine solve_tracers_ale(ice, dynamics, tracers, partit, mesh)
use g_comm_auto
use o_tracers
use Toy_Channel_Soufflet
use Toy_Channel_Nemo
use Toy_Channel_Dbgyre
use o_ARRAYS, only: heat_flux
use g_forcing_arrays, only: sw_3d
use diff_tracers_ale_interface
Expand Down Expand Up @@ -990,9 +990,9 @@ subroutine diff_ver_part_impl_ale(tr_num, dynamics, tracers, ice, partit, mesh)
!!PS tr(nz)=tr(nz)+(sw_3d(nz, n)-sw_3d(nz+1, n) * ( area(nz+1,n)/areasvol(nz,n)) ) * zinv
tr(nz)=tr(nz)+(sw_3d(nz, n)-sw_3d(nz+1, n) * area(nz+1,n)/areasvol(nz,n)) * zinv
end do
elseif (use_sw_pene .and. (tracers%data(tr_num)%ID==1) .and. toy_ocean .and. TRIM(which_toy)=="nemo") then
elseif (use_sw_pene .and. (tracers%data(tr_num)%ID==1) .and. toy_ocean .and. TRIM(which_toy)=="dbgyre") then

call cal_shortwave_rad_nemo(ice, tracers, partit, mesh)
call cal_shortwave_rad_dbgyre(ice, tracers, partit, mesh)
do nz=nzmin, nzmax-1
zinv=1.0_WP*dt !/(zbar(nz)-zbar(nz+1)) ale!
tr(nz)=tr(nz)+(sw_3d(nz, n)-sw_3d(nz+1, n)*area(nz+1,n)/area(nz,n))*zinv
Expand Down
6 changes: 3 additions & 3 deletions src/oce_setup_step.F90
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ subroutine ocean_setup(dynamics, tracers, partit, mesh)
use g_cvmix_tidal
use g_backscatter
use Toy_Channel_Soufflet
use Toy_Channel_Nemo
use Toy_Channel_Dbgyre
use oce_initial_state_interface
use oce_adv_tra_fct_interfaces
use init_ale_interface
Expand Down Expand Up @@ -227,8 +227,8 @@ subroutine ocean_setup(dynamics, tracers, partit, mesh)
call compute_zonal_mean_ini(partit, mesh)
call compute_zonal_mean(dynamics, tracers, partit, mesh)
end if
CASE("nemo")
call initial_state_nemo(dynamics, tracers, partit, mesh)
CASE("dbgyre")
call initial_state_dbgyre(dynamics, tracers, partit, mesh)
END SELECT
else
if (flag_debug .and. partit%mype==0) print *, achar(27)//'[36m'//' --> call oce_initial_state'//achar(27)//'[0m'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
subroutine cal_shortwave_rad_nemo(ice, tracers, partit, mesh)
subroutine cal_shortwave_rad_dbgyre(ice, tracers, partit, mesh)
! This routine is inherited from FESOM 1.4 and adopted appropreately. It calculates
! shortwave penetration into the ocean assuming the constant chlorophyll concentration.
! No penetration under the ice is applied. A decent way for ice region is to be discussed.
Expand All @@ -14,7 +14,7 @@ subroutine cal_shortwave_rad_nemo(ice, tracers, partit, mesh)
USE g_CONFIG
use g_forcing_arrays
use g_comm_auto
use Toy_Channel_Nemo
use Toy_Channel_Dbgyre
IMPLICIT NONE
type(t_ice) ,intent(in), target :: ice
type(t_tracer), intent(inout), target :: tracers
Expand Down Expand Up @@ -121,4 +121,4 @@ subroutine cal_shortwave_rad_nemo(ice, tracers, partit, mesh)
end do
!call par_ex
!stop
end subroutine cal_shortwave_rad_nemo
end subroutine cal_shortwave_rad_dbgyre
10 changes: 5 additions & 5 deletions src/toy_channel_nemo.F90 → src/toy_channel_dbgyre.F90
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
MODULE Toy_Channel_Nemo
MODULE Toy_Channel_Dbgyre
use mod_mesh
USE o_ARRAYS
USE o_PARAM
Expand All @@ -11,7 +11,7 @@ MODULE Toy_Channel_Nemo
implicit none
SAVE
private
public :: initial_state_nemo
public :: initial_state_dbgyre
real(kind=WP) :: ysize =3180000.0 ! the meridional lenght of the channel [m]
real(kind=WP) :: xsize =2120000.0 ! the zonal lenght of the channel [m] !4.5*pi*r_earth=90018410.49779853
real(kind=WP) :: zsize =4000.0 ! m The depth
Expand All @@ -23,7 +23,7 @@ MODULE Toy_Channel_Nemo
!
!--------------------------------------------------------------------------------------------

subroutine initial_state_nemo(dynamics, tracers, partit, mesh)
subroutine initial_state_dbgyre(dynamics, tracers, partit, mesh)
! Profiles NEMO 2010
implicit none
type(t_mesh), intent(inout) , target :: mesh
Expand Down Expand Up @@ -257,5 +257,5 @@ subroutine initial_state_nemo(dynamics, tracers, partit, mesh)
!write(*,*) mype, 'dst', dst
!write(*,*) mype, 'rad', rad

end subroutine initial_state_nemo
END MODULE Toy_Channel_Nemo
end subroutine initial_state_dbgyre
END MODULE Toy_Channel_Dbgyre

0 comments on commit 12ebe1c

Please sign in to comment.