diff --git a/config/namelist.dyn b/config/namelist.dyn index 91816a5e4..4a598ee22 100644 --- a/config/namelist.dyn +++ b/config/namelist.dyn @@ -21,5 +21,15 @@ use_wsplit = .false. ! Switch for implicite/explicte splitting of vert. veloci wsplit_maxcfl= 1.0 ! maximum allowed CFL criteria in vertical (0.5 < w_max_cfl < 1.) ! in older FESOM it used to be w_exp_max=1.e-3 ldiag_KE=.false. ! activates energy diagnostics + +use_ssh_se_subcycl = .false. +se_BTsteps = 50 !50 +se_BTtheta = 0.14 ! default: 0.14, core2 stability plateu@ 0.37 +se_bottdrag = .true. +se_bdrag_si = .true. ! bottomdrag semi-implicite/explicite +se_visc = .true. +se_visc_gamma0 = 10 ! 150 +se_visc_gamma1 = 19500 ! 150 +se_visc_gamma2 = 0 / diff --git a/src/MOD_DYN.F90 b/src/MOD_DYN.F90 index 218f097ae..b7998f1aa 100644 --- a/src/MOD_DYN.F90 +++ b/src/MOD_DYN.F90 @@ -122,19 +122,19 @@ MODULE MOD_DYN real(kind=WP) :: wsplit_maxcfl = 1.0 ! switch between ssh computation, by solver or split explicite subcycling - ! use_ssh_splitexpl_subcycl = .false. --> solver - ! use_ssh_splitexpl_subcycl = .true. --> split explicite subcycling - logical :: use_ssh_splitexpl_subcycl = .false. + ! use_ssh_se_subcycl = .false. --> solver + ! use_ssh_se_subcycl = .true. --> split explicite subcycling + logical :: use_ssh_se_subcycl = .false. ! barotropic subcycling time-steps and dissipation parameter - integer :: splitexpl_BTsteps = 50 - real(kind=WP) :: splitexpl_BTtheta = 0.14_WP - logical :: splitexpl_bottdrag = .true. - logical :: splitexpl_bdrag_si = .true. - logical :: splitexpl_visc = .true. - real(kind=WP) :: splitexpl_visc_gamma0 = 10 - real(kind=WP) :: splitexpl_visc_gamma1 = 2750 - real(kind=WP) :: splitexpl_visc_gamma2 = 0 + integer :: se_BTsteps = 50 + real(kind=WP) :: se_BTtheta = 0.14_WP + logical :: se_bottdrag = .true. + logical :: se_bdrag_si = .true. + logical :: se_visc = .true. + real(kind=WP) :: se_visc_gamma0 = 10 + real(kind=WP) :: se_visc_gamma1 = 2750 + real(kind=WP) :: se_visc_gamma2 = 0 !___________________________________________________________________________ ! energy diagnostic part: will be computed inside the model ("hard integration"): @@ -266,7 +266,7 @@ subroutine WRITE_T_DYN(dynamics, unit, iostat, iomsg) write(unit, iostat=iostat, iomsg=iomsg) dynamics%use_freeslip write(unit, iostat=iostat, iomsg=iomsg) dynamics%use_wsplit write(unit, iostat=iostat, iomsg=iomsg) dynamics%wsplit_maxcfl - write(unit, iostat=iostat, iomsg=iomsg) dynamics%use_ssh_splitexpl_subcycl + write(unit, iostat=iostat, iomsg=iomsg) dynamics%use_ssh_se_subcycl !___________________________________________________________________________ call dynamics%solverinfo%WRITE_T_SOLVERINFO(unit) @@ -287,7 +287,7 @@ subroutine WRITE_T_DYN(dynamics, unit, iostat, iomsg) call write_bin_array(dynamics%fer_w , unit, iostat, iomsg) call write_bin_array(dynamics%fer_uv, unit, iostat, iomsg) end if - if (dynamics%use_ssh_splitexpl_subcycl) then + if (dynamics%use_ssh_se_subcycl) then call write_bin_array(dynamics%se_uvh , unit, iostat, iomsg) call write_bin_array(dynamics%se_uvBT_rhs , unit, iostat, iomsg) call write_bin_array(dynamics%se_uvBT_4AB , unit, iostat, iomsg) @@ -324,7 +324,7 @@ subroutine READ_T_DYN(dynamics, unit, iostat, iomsg) read(unit, iostat=iostat, iomsg=iomsg) dynamics%use_freeslip read(unit, iostat=iostat, iomsg=iomsg) dynamics%use_wsplit read(unit, iostat=iostat, iomsg=iomsg) dynamics%wsplit_maxcfl - read(unit, iostat=iostat, iomsg=iomsg) dynamics%use_ssh_splitexpl_subcycl + read(unit, iostat=iostat, iomsg=iomsg) dynamics%use_ssh_se_subcycl !___________________________________________________________________________ call dynamics%solverinfo%READ_T_SOLVERINFO(unit) @@ -345,7 +345,7 @@ subroutine READ_T_DYN(dynamics, unit, iostat, iomsg) call read_bin_array(dynamics%fer_w , unit, iostat, iomsg) call read_bin_array(dynamics%fer_uv , unit, iostat, iomsg) end if - if (dynamics%use_ssh_splitexpl_subcycl) then + if (dynamics%use_ssh_se_subcycl) then call read_bin_array(dynamics%se_uvh , unit, iostat, iomsg) call read_bin_array(dynamics%se_uvBT_rhs , unit, iostat, iomsg) call read_bin_array(dynamics%se_uvBT_4AB , unit, iostat, iomsg) diff --git a/src/io_blowup.F90 b/src/io_blowup.F90 index ec42e1067..4bd5245b0 100644 --- a/src/io_blowup.F90 +++ b/src/io_blowup.F90 @@ -105,7 +105,7 @@ subroutine ini_blowup_io(year, ice, dynamics, tracers, partit, mesh) !___ALE related fields______________________________________________________ call def_variable(bid, 'hbar' , (/nod2D/) , 'ALE surface elevation hbar_n+0.5', 'm', hbar); !!PS call def_variable(bid, 'hbar_old' , (/nod2D/) , 'ALE surface elevation hbar_n-0.5', 'm', hbar_old); - if (.not. dynamics%use_ssh_splitexpl_subcycl) then + if (.not. dynamics%use_ssh_se_subcycl) then call def_variable(bid, 'd_eta' , (/nod2D/) , 'change in ssh from solver', 'm', dynamics%d_eta); call def_variable(bid, 'ssh_rhs' , (/nod2D/) , 'RHS for the elevation', '?', dynamics%ssh_rhs); call def_variable(bid, 'ssh_rhs_old', (/nod2D/) , 'RHS for the elevation', '?', dynamics%ssh_rhs_old); diff --git a/src/io_meandata.F90 b/src/io_meandata.F90 index 03d6906c1..2ba3c87f0 100644 --- a/src/io_meandata.F90 +++ b/src/io_meandata.F90 @@ -621,7 +621,7 @@ subroutine ini_mean_io(ice, dynamics, tracers, partit, mesh) !_______________________________________________________________________________ ! Split-Explicite subcycling varaibles CASE ('SPLIT-EXPL') - if (dynamics%use_ssh_splitexpl_subcycl) then + if (dynamics%use_ssh_se_subcycl) then call def_stream(elem2D, myDim_elem2D , 'ubt' , 'zonal barotrop. transport' , '?' , dynamics%se_uvBT(1,:), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh) call def_stream(elem2D, myDim_elem2D , 'vbt' , 'merid. barotrop. transport', '?' , dynamics%se_uvBT(2,:), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh) call def_stream(elem2D, myDim_elem2D , 'ubt_rhs', 'zonal barotrop. transport RHS' , '?' , dynamics%se_uvBT_rhs(1,:), io_list(i)%freq, io_list(i)%unit, io_list(i)%precision, partit, mesh) diff --git a/src/oce_ale.F90 b/src/oce_ale.F90 index 09ad5cd05..7d83f28dd 100644 --- a/src/oce_ale.F90 +++ b/src/oce_ale.F90 @@ -2064,7 +2064,7 @@ subroutine vert_vel_ale(dynamics, partit, mesh) fer_Wvel=> dynamics%fer_w(:,:) end if - if ( .not. dynamics%use_ssh_splitexpl_subcycl) then + if ( .not. dynamics%use_ssh_se_subcycl) then d_eta => dynamics%d_eta(:) ssh_rhs => dynamics%ssh_rhs(:) ssh_rhs_old => dynamics%ssh_rhs_old(:) @@ -2535,7 +2535,7 @@ subroutine vert_vel_ale(dynamics, partit, mesh) write(*,*) 'water_flux = ', water_flux(n) write(*,*) write(*,*) "eta_n = ", eta_n(n) - if ( .not. dynamics%use_ssh_splitexpl_subcycl) then + if ( .not. dynamics%use_ssh_se_subcycl) then write(*,*) "d_eta = ", d_eta(n) write(*,*) "ssh_rhs = ", ssh_rhs(n) write(*,*) "ssh_rhs_old = ", ssh_rhs_old(n) @@ -3467,7 +3467,7 @@ subroutine oce_timestep_ale(n, ice, dynamics, tracers, partit, mesh) ! Energy diagnostic contribution if (dynamics%ldiag_ke) then ! if use solver - if (.not. dynamics%use_ssh_splitexpl_subcycl) then + if (.not. dynamics%use_ssh_se_subcycl) then !$OMP PARALLEL DO DEFAULT(SHARED) PRIVATE(elem, nz, nzmin, nzmax) do elem=1, myDim_elem2D nzmax = nlevels(elem) @@ -3503,7 +3503,7 @@ subroutine oce_timestep_ale(n, ice, dynamics, tracers, partit, mesh) ! Energy diagnostic contribution if (dynamics%ldiag_ke) then ! if use solver - if (.not. dynamics%use_ssh_splitexpl_subcycl) then + if (.not. dynamics%use_ssh_se_subcycl) then !$OMP PARALLEL DO DEFAULT(SHARED) PRIVATE(elem, nz, nzmin, nzmax) do elem=1, myDim_elem2D nzmax = nlevels(elem) @@ -3550,7 +3550,7 @@ subroutine oce_timestep_ale(n, ice, dynamics, tracers, partit, mesh) !___________________________________________________________________________ if (flag_debug .and. mype==0) print *, achar(27)//'[36m'//' --> call impl_vert_visc_ale'//achar(27)//'[0m' if(dynamics%use_ivertvisc) then - if ( .not. dynamics%use_ssh_splitexpl_subcycl ) then + if ( .not. dynamics%use_ssh_se_subcycl ) then call impl_vert_visc_ale(dynamics,partit, mesh) else call impl_vert_visc_ale_vtransp(dynamics, partit, mesh) @@ -3560,7 +3560,7 @@ subroutine oce_timestep_ale(n, ice, dynamics, tracers, partit, mesh) !___________________________________________________________________________ if (dynamics%ldiag_ke) then ! if use solver - if (.not. dynamics%use_ssh_splitexpl_subcycl) then + if (.not. dynamics%use_ssh_se_subcycl) then !$OMP PARALLEL DO DEFAULT(SHARED) PRIVATE(elem, nz, nzmin, nzmax) do elem=1, myDim_elem2D nzmax = nlevels(elem) @@ -3592,7 +3592,7 @@ subroutine oce_timestep_ale(n, ice, dynamics, tracers, partit, mesh) ! Compute SSH via solver ! Update stiffness matrix by dhe=hbar(n+1/2)-hbar(n-1/2) on elements, only ! needed for zlevel and zstar - if (.not. dynamics%use_ssh_splitexpl_subcycl) then + if (.not. dynamics%use_ssh_se_subcycl) then if (.not. trim(which_ale)=='linfs') call update_stiff_mat_ale(partit, mesh) if (flag_debug .and. mype==0) print *, achar(27)//'[36m'//' --> call compute_ssh_rhs_ale'//achar(27)//'[0m' ! ssh_rhs=-alpha*\nabla\int(U_n+U_rhs)dz-(1-alpha)*... @@ -3658,7 +3658,7 @@ subroutine oce_timestep_ale(n, ice, dynamics, tracers, partit, mesh) call update_trim_vel_ale_vtransp(1, dynamics, partit, mesh) t4=MPI_Wtime() t5=t4 - end if ! --> if (.not. dynamics%use_ssh_splitexpl_subcycl) then + end if ! --> if (.not. dynamics%use_ssh_se_subcycl) then !___________________________________________________________________________ ! Do horizontal and vertical scaling of GM/Redi diffusivity @@ -3689,7 +3689,7 @@ subroutine oce_timestep_ale(n, ice, dynamics, tracers, partit, mesh) ! The main step of ALE procedure --> this is were the magic happens --> here ! is decided how change in hbar is distributed over the vertical layers if (flag_debug .and. mype==0) print *, achar(27)//'[36m'//' --> call vert_vel_ale'//achar(27)//'[0m' - if ( .not. dynamics%use_ssh_splitexpl_subcycl) then + if ( .not. dynamics%use_ssh_se_subcycl) then call vert_vel_ale(dynamics, partit, mesh) else if (trim(which_ale)=='zstar' ) then @@ -3723,7 +3723,7 @@ subroutine oce_timestep_ale(n, ice, dynamics, tracers, partit, mesh) !___________________________________________________________________________ ! Trim to make velocity consistent with BT velocity at n+1/2 ! Velocity will be used to advance momentum - if (dynamics%use_ssh_splitexpl_subcycl) then + if (dynamics%use_ssh_se_subcycl) then call update_trim_vel_ale_vtransp(2, dynamics, partit, mesh) end if diff --git a/src/oce_ale_ssh_splitexpl_subcycl.F90 b/src/oce_ale_ssh_splitexpl_subcycl.F90 index 7caed87b9..9f5a92b57 100644 --- a/src/oce_ale_ssh_splitexpl_subcycl.F90 +++ b/src/oce_ale_ssh_splitexpl_subcycl.F90 @@ -809,22 +809,22 @@ subroutine compute_BT_step_SE_ale(dynamics, partit, mesh) UVBT_theta=>dynamics%se_uvBT_theta(:,:) UVBT_mean =>dynamics%se_uvBT_mean(:,:) UVBT_12 =>dynamics%se_uvBT_12(:,:) - if (dynamics%splitexpl_bottdrag) then + if (dynamics%se_bottdrag) then UV =>dynamics%uv(:,:,:) bottomdrag =>dynamics%se_uvBT_stab_bdrag(:) end if - if (dynamics%splitexpl_visc) then + if (dynamics%se_visc) then UVBT_harmvisc=>dynamics%se_uvBT_stab_hvisc(:,:) end if !___________________________________________________________________________ ! Dissipation parameter of FB dissipative method 0.14 is the default value ! from Demange et al. - thetaBT= dynamics%splitexpl_BTtheta + thetaBT= dynamics%se_BTtheta ! BTsteps should be 30 or 40. - dtBT = dt/dynamics%splitexpl_BTsteps - BT_inv = 1.0_WP/(1.0_WP*dynamics%splitexpl_BTsteps) + dtBT = dt/dynamics%se_BTsteps + BT_inv = 1.0_WP/(1.0_WP*dynamics%se_BTsteps) !___SPLIT-EXPLICITE STABILIZATION___________________________________________ ! trim R (UVBT_rhs): @@ -834,7 +834,7 @@ subroutine compute_BT_step_SE_ale(dynamics, partit, mesh) ! compute_BT_step_SE_ale) ! --> use only harmonmic viscosity operator applied to the barotropic ! velocity - if (dynamics%splitexpl_visc) then + if (dynamics%se_visc) then !_______________________________________________________________________ ! remove viscosity !$OMP PARALLEL DEFAULT(SHARED) PRIVATE(edge, edelem, nzmax, hh, len, & @@ -854,9 +854,9 @@ subroutine compute_BT_step_SE_ale(dynamics, partit, mesh) update_ubt=(UVBT(1, edelem(1))-UVBT(1, edelem(2)))/hh update_vbt=(UVBT(2, edelem(1))-UVBT(2, edelem(2)))/hh vi=update_ubt*update_ubt + update_vbt*update_vbt - vi=-dt*sqrt(max(dynamics%splitexpl_visc_gamma0, & - max(dynamics%splitexpl_visc_gamma1*sqrt(vi), & - dynamics%splitexpl_visc_gamma2*vi) & + vi=-dt*sqrt(max(dynamics%se_visc_gamma0, & + max(dynamics%se_visc_gamma1*sqrt(vi), & + dynamics%se_visc_gamma2*vi) & )*len) update_ubt=update_ubt*vi update_vbt=update_vbt*vi @@ -883,11 +883,11 @@ subroutine compute_BT_step_SE_ale(dynamics, partit, mesh) end do ! --> do edge=1, myDim_edge2D+eDim_edge2D !$OMP END DO !$OMP END PARALLEL - end if ! --> if (dynamics%splitexpl_visc) then + end if ! --> if (dynamics%se_visc) then !___________________________________________________________________________ ! remove bottom drag - if (dynamics%splitexpl_bottdrag) then + if (dynamics%se_bottdrag) then !$OMP PARALLEL DEFAULT(SHARED) PRIVATE(elem, elnodes, nzmax, hh) !$OMP DO do elem=1, myDim_elem2D @@ -901,7 +901,7 @@ subroutine compute_BT_step_SE_ale(dynamics, partit, mesh) end do !$OMP END DO !$OMP END PARALLEL - end if ! --> if (dynamics%splitexpl_bottdrag) then + end if ! --> if (dynamics%se_bottdrag) then !___________________________________________________________________________ ! initialise UVBT_mean with zeros --> OMP style @@ -914,14 +914,14 @@ subroutine compute_BT_step_SE_ale(dynamics, partit, mesh) !___________________________________________________________________________ ! eta_n elevation used in BT stepping, it is just a copy of eta_n ! UBT and VBT are transport velocities - do step=1, dynamics%splitexpl_BTsteps + do step=1, dynamics%se_BTsteps !####################################################################### !########## Dissipative forward--backward time stepping ########## !####################################################################### !_______________________________________________________________________ ! compute harmonic viscosity for stability - if (dynamics%splitexpl_visc) then + if (dynamics%se_visc) then !___________________________________________________________________ ! initialise UVBT_harmvisc with zeros --> OMP style @@ -950,9 +950,9 @@ subroutine compute_BT_step_SE_ale(dynamics, partit, mesh) update_ubt=(UVBT(1, edelem(1))-UVBT(1, edelem(2)))/hh update_vbt=(UVBT(2, edelem(1))-UVBT(2, edelem(2)))/hh vi=update_ubt*update_ubt + update_vbt*update_vbt - vi=dt*sqrt(max(dynamics%splitexpl_visc_gamma0, & - max(dynamics%splitexpl_visc_gamma1*sqrt(vi), & - dynamics%splitexpl_visc_gamma2*vi) & + vi=dt*sqrt(max(dynamics%se_visc_gamma0, & + max(dynamics%se_visc_gamma1*sqrt(vi), & + dynamics%se_visc_gamma2*vi) & )*len) update_ubt=update_ubt*vi update_vbt=update_vbt*vi @@ -979,7 +979,7 @@ subroutine compute_BT_step_SE_ale(dynamics, partit, mesh) end do ! --> do edge=1, myDim_edge2D+eDim_edge2D !$OMP END DO !$OMP END PARALLEL - end if ! -> if (dynamics%splitexpl_visc) then + end if ! -> if (dynamics%se_visc) then !_______________________________________________________________________ ! Advance velocities. I use SI stepping for the Coriolis @@ -1046,7 +1046,7 @@ subroutine compute_BT_step_SE_ale(dynamics, partit, mesh) ! ! Semi-Implicit Coriolis a = dtBT*ff*0.5_WP - if (dynamics%splitexpl_bdrag_si) then + if (dynamics%se_bdrag_si) then b = 1.0_WP+BT_inv*bottomdrag(elem)/hh else b = 1.0_WP @@ -1094,7 +1094,7 @@ subroutine compute_BT_step_SE_ale(dynamics, partit, mesh) !_______________________________________________________________________ ! Store mid-step velocity (to trim 3D velocities in momentum) - if(step==dynamics%splitexpl_BTsteps/2) then + if(step==dynamics%se_BTsteps/2) then UVBT_12=UVBT end if @@ -1161,7 +1161,7 @@ subroutine compute_BT_step_SE_ale(dynamics, partit, mesh) !$OMP END MASTER !$OMP BARRIER - end do ! --> do step=1, dynamics%splitexpl_BTsteps + end do ! --> do step=1, dynamics%se_BTsteps !___________________________________________________________________________ hbar_old = hbar diff --git a/src/oce_ale_vel_rhs.F90 b/src/oce_ale_vel_rhs.F90 index 261d82a4f..7efade82c 100644 --- a/src/oce_ale_vel_rhs.F90 +++ b/src/oce_ale_vel_rhs.F90 @@ -82,7 +82,7 @@ subroutine compute_vel_rhs(ice, dynamics, partit, mesh) inv_rhowat=> ice%thermo%inv_rhowat ! if split-explicite ssh subcycling is used - if (dynamics%use_ssh_splitexpl_subcycl) then + if (dynamics%use_ssh_se_subcycl) then UVh => dynamics%se_uvh UVBT_4AB => dynamics%se_uvBT_4AB end if @@ -160,7 +160,7 @@ subroutine compute_vel_rhs(ice, dynamics, partit, mesh) !_______________________________________________________________________ ! when ssh split-explicite subcycling method is setted use transport velocities ! u*h, v*h instead of u,v - if (.not. dynamics%use_ssh_splitexpl_subcycl) then + if (.not. dynamics%use_ssh_se_subcycl) then do nz=nzmin, nzmax-1 ! add pressure gradient terms UV_rhs( 1, nz, elem) = UV_rhs(1, nz, elem) + (Fx-pgf_x(nz, elem))*elem_area(elem) @@ -216,7 +216,7 @@ subroutine compute_vel_rhs(ice, dynamics, partit, mesh) if (mype==0) write(*,*) 'in moment not adapted mom_adv advection typ for ALE, check your namelist' call par_ex(partit%MPI_COMM_FESOM, partit%mype, 1) elseif (dynamics%momadv_opt==2) then - if (.not. dynamics%use_ssh_splitexpl_subcycl) then + if (.not. dynamics%use_ssh_se_subcycl) then call momentum_adv_scalar(dynamics, partit, mesh) else call momentum_adv_scalar_transpv(dynamics, partit, mesh) diff --git a/src/oce_dyn.F90 b/src/oce_dyn.F90 index db6bf24d8..92b3b099b 100755 --- a/src/oce_dyn.F90 +++ b/src/oce_dyn.F90 @@ -406,7 +406,7 @@ SUBROUTINE visc_filt_bcksct(dynamics, partit, mesh) nzmin = ulevels(ed) nzmax = nlevels(ed) !_______________________________________________________________________ - if (dynamics%use_ssh_splitexpl_subcycl) then + if (dynamics%use_ssh_se_subcycl) then !SD Approximate update for transports. We do not care about accuracy !SD here. --> of course, helem will be better. Do nz=nzmin, nzmax-1 @@ -539,7 +539,7 @@ SUBROUTINE visc_filt_bilapl(dynamics, partit, mesh) nzmin = maxval(ulevels(el)) nzmax = minval(nlevels(el)) !_______________________________________________________________________ - if (dynamics%use_ssh_splitexpl_subcycl) then + if (dynamics%use_ssh_se_subcycl) then !SD Approximate update for transports. We do not care about accuracy !SD here. --> of course, helem will be better. do nz=nzmin,nzmax-1 @@ -680,7 +680,7 @@ SUBROUTINE visc_filt_bidiff(dynamics, partit, mesh) nzmin = maxval(ulevels(el)) nzmax = minval(nlevels(el)) !_______________________________________________________________________ - if (dynamics%use_ssh_splitexpl_subcycl) then + if (dynamics%use_ssh_se_subcycl) then !SD Approximate update for transports. We do not care about accuracy !SD here. --> of course, helem will be better. do nz=nzmin,nzmax-1 diff --git a/src/oce_setup_step.F90 b/src/oce_setup_step.F90 index 998f2c35d..0b67b03d9 100755 --- a/src/oce_setup_step.F90 +++ b/src/oce_setup_step.F90 @@ -393,18 +393,18 @@ SUBROUTINE dynamics_init(dynamics, partit, mesh) logical :: ldiag_KE =.false. logical :: check_opt_visc=.true. real(kind=WP) :: wsplit_maxcfl - logical :: use_ssh_splitexpl_subcycl=.false. - integer :: splitexpl_BTsteps - real(kind=WP) :: splitexpl_BTtheta - logical :: splitexpl_visc, splitexpl_bottdrag, splitexpl_bdrag_si - real(kind=WP) :: splitexpl_visc_gamma0, splitexpl_visc_gamma1, splitexpl_visc_gamma2 + logical :: use_ssh_se_subcycl=.false. + integer :: se_BTsteps + real(kind=WP) :: se_BTtheta + logical :: se_visc, se_bottdrag, se_bdrag_si + real(kind=WP) :: se_visc_gamma0, se_visc_gamma1, se_visc_gamma2 namelist /dynamics_visc / opt_visc, check_opt_visc, visc_gamma0, visc_gamma1, visc_gamma2, & use_ivertvisc, visc_easybsreturn namelist /dynamics_general/ momadv_opt, use_freeslip, use_wsplit, wsplit_maxcfl, & - ldiag_KE, use_ssh_splitexpl_subcycl, splitexpl_BTsteps, & - splitexpl_BTtheta, splitexpl_bottdrag, splitexpl_bdrag_si, & - splitexpl_visc, splitexpl_visc_gamma0, splitexpl_visc_gamma1, splitexpl_visc_gamma2 + ldiag_KE, use_ssh_se_subcycl, se_BTsteps, & + se_BTtheta, se_bottdrag, se_bdrag_si, & + se_visc, se_visc_gamma0, se_visc_gamma1, se_visc_gamma2 !___________________________________________________________________________ ! pointer on necessary derived types #include "associate_part_def.h" @@ -440,16 +440,16 @@ SUBROUTINE dynamics_init(dynamics, partit, mesh) dynamics%use_wsplit = use_wsplit dynamics%wsplit_maxcfl = wsplit_maxcfl dynamics%ldiag_KE = ldiag_KE - dynamics%use_ssh_splitexpl_subcycl = use_ssh_splitexpl_subcycl - if (dynamics%use_ssh_splitexpl_subcycl) then - dynamics%splitexpl_BTsteps = splitexpl_BTsteps - dynamics%splitexpl_BTtheta = splitexpl_BTtheta - dynamics%splitexpl_bottdrag = splitexpl_bottdrag - dynamics%splitexpl_bdrag_si = splitexpl_bdrag_si - dynamics%splitexpl_visc = splitexpl_visc - dynamics%splitexpl_visc_gamma0 = splitexpl_visc_gamma0 - dynamics%splitexpl_visc_gamma1 = splitexpl_visc_gamma1 - dynamics%splitexpl_visc_gamma2 = splitexpl_visc_gamma2 + dynamics%use_ssh_se_subcycl = use_ssh_se_subcycl + if (dynamics%use_ssh_se_subcycl) then + dynamics%se_BTsteps = se_BTsteps + dynamics%se_BTtheta = se_BTtheta + dynamics%se_bottdrag = se_bottdrag + dynamics%se_bdrag_si = se_bdrag_si + dynamics%se_visc = se_visc + dynamics%se_visc_gamma0 = se_visc_gamma0 + dynamics%se_visc_gamma1 = se_visc_gamma1 + dynamics%se_visc_gamma2 = se_visc_gamma2 end if !___________________________________________________________________________ @@ -494,7 +494,7 @@ SUBROUTINE dynamics_init(dynamics, partit, mesh) ! allocate/initialise ssh arrays in derived type allocate(dynamics%eta_n( node_size)) dynamics%eta_n = 0.0_WP - if (dynamics%use_ssh_splitexpl_subcycl) then + if (dynamics%use_ssh_se_subcycl) then allocate(dynamics%se_uvh( 2, nl-1, elem_size)) allocate(dynamics%se_uvBT_rhs( 2, elem_size)) allocate(dynamics%se_uvBT_4AB( 4, elem_size)) @@ -509,11 +509,11 @@ SUBROUTINE dynamics_init(dynamics, partit, mesh) dynamics%se_uvBT_theta = 0.0_WP dynamics%se_uvBT_mean = 0.0_WP dynamics%se_uvBT_12 = 0.0_WP - if (dynamics%splitexpl_visc) then + if (dynamics%se_visc) then allocate(dynamics%se_uvBT_stab_hvisc(2, elem_size)) dynamics%se_uvBT_stab_hvisc = 0.0_WP end if - if (dynamics%splitexpl_bottdrag) then + if (dynamics%se_bottdrag) then allocate(dynamics%se_uvBT_stab_bdrag(elem_size)) dynamics%se_uvBT_stab_bdrag = 0.0_WP end if diff --git a/src/write_step_info.F90 b/src/write_step_info.F90 index e1c4d0393..85bcf9b81 100644 --- a/src/write_step_info.F90 +++ b/src/write_step_info.F90 @@ -91,7 +91,7 @@ subroutine write_step_info(istep, outfreq, ice, dynamics, tracers, partit, mesh) Wvel => dynamics%w(:,:) CFL_z => dynamics%cfl_z(:,:) eta_n => dynamics%eta_n(:) - if ( .not. dynamics%use_ssh_splitexpl_subcycl) d_eta => dynamics%d_eta(:) + if ( .not. dynamics%use_ssh_se_subcycl) d_eta => dynamics%d_eta(:) m_ice => ice%data(2)%values(:) if (mod(istep,outfreq)==0) then @@ -119,7 +119,7 @@ subroutine write_step_info(istep, outfreq, ice, dynamics, tracers, partit, mesh) loc_eta = loc_eta + areasvol(ulevels_nod2D(n), n)*eta_n(n) loc_hbar = loc_hbar + areasvol(ulevels_nod2D(n), n)*hbar(n) loc_dhbar = loc_dhbar + areasvol(ulevels_nod2D(n), n)*(hbar(n)-hbar_old(n)) - if ( .not. dynamics%use_ssh_splitexpl_subcycl) then + if ( .not. dynamics%use_ssh_se_subcycl) then loc_deta = loc_deta + areasvol(ulevels_nod2D(n), n)*d_eta(n) end if loc_wflux = loc_wflux + areasvol(ulevels_nod2D(n), n)*water_flux(n) @@ -127,7 +127,7 @@ subroutine write_step_info(istep, outfreq, ice, dynamics, tracers, partit, mesh) #if !defined(__openmp_reproducible) !$OMP END PARALLEL DO #endif - if (dynamics%use_ssh_splitexpl_subcycl) then + if (dynamics%use_ssh_se_subcycl) then loc_deta=loc_dhbar end if @@ -168,7 +168,7 @@ subroutine write_step_info(istep, outfreq, ice, dynamics, tracers, partit, mesh) call MPI_AllREDUCE(loc , min_vvel , 1, MPI_DOUBLE_PRECISION, MPI_MIN, MPI_COMM_FESOM, MPIerr) loc=omp_min_max_sum1(UVnode(2,2,:), 1, myDim_nod2D, 'min', partit) call MPI_AllREDUCE(loc , min_vvel2 , 1, MPI_DOUBLE_PRECISION, MPI_MIN, MPI_COMM_FESOM, MPIerr) - if ( .not. dynamics%use_ssh_splitexpl_subcycl) then + if ( .not. dynamics%use_ssh_se_subcycl) then loc=omp_min_max_sum1(d_eta, 1, myDim_nod2D, 'min', partit) else loc=omp_min_max_sum1(hbar-hbar_old, 1, myDim_nod2D, 'min', partit) @@ -204,7 +204,7 @@ subroutine write_step_info(istep, outfreq, ice, dynamics, tracers, partit, mesh) call MPI_AllREDUCE(loc , max_vvel , 1, MPI_DOUBLE_PRECISION, MPI_MAX, MPI_COMM_FESOM, MPIerr) loc=omp_min_max_sum1(UVnode(2,2,:), 1, myDim_nod2D, 'max', partit) call MPI_AllREDUCE(loc , max_vvel2 , 1, MPI_DOUBLE_PRECISION, MPI_MAX, MPI_COMM_FESOM, MPIerr) - if ( .not. dynamics%use_ssh_splitexpl_subcycl) then + if ( .not. dynamics%use_ssh_se_subcycl) then loc=omp_min_max_sum1(d_eta, 1, myDim_nod2D, 'max', partit) else loc=omp_min_max_sum1(hbar-hbar_old, 1, myDim_nod2D, 'max', partit) @@ -329,7 +329,7 @@ subroutine check_blowup(istep, ice, dynamics, tracers, partit, mesh) a_ice_old => ice%data(1)%values_old(:) m_ice_old => ice%data(2)%values_old(:) m_snow_old => ice%data(3)%values_old(:) - if ( .not. dynamics%use_ssh_splitexpl_subcycl) then + if ( .not. dynamics%use_ssh_se_subcycl) then d_eta => dynamics%d_eta(:) ssh_rhs => dynamics%ssh_rhs(:) ssh_rhs_old => dynamics%ssh_rhs_old(:) @@ -361,7 +361,7 @@ subroutine check_blowup(istep, ice, dynamics, tracers, partit, mesh) write(*,*) 'zbar_3d_n = ',zbar_3d_n(:,n) write(*,*) 'Z_3d_n = ',Z_3d_n(:,n) write(*,*) - if ( .not. dynamics%use_ssh_splitexpl_subcycl) then + if ( .not. dynamics%use_ssh_se_subcycl) then write(*,*) 'ssh_rhs = ',ssh_rhs(n),', ssh_rhs_old = ',ssh_rhs_old(n) end if write(*,*) @@ -414,7 +414,7 @@ subroutine check_blowup(istep, ice, dynamics, tracers, partit, mesh) write(*,*) 'd_eta(n) = ',d_eta(n) write(*,*) 'hbar = ',hbar(n) write(*,*) 'hbar_old = ',hbar_old(n) - if ( .not. dynamics%use_ssh_splitexpl_subcycl) then + if ( .not. dynamics%use_ssh_se_subcycl) then write(*,*) 'ssh_rhs = ',ssh_rhs(n) write(*,*) 'ssh_rhs_old = ',ssh_rhs_old(n) end if @@ -442,7 +442,7 @@ subroutine check_blowup(istep, ice, dynamics, tracers, partit, mesh) write(*,*) 'd_eta(n) = ',d_eta(n) write(*,*) 'hbar = ',hbar(n) write(*,*) 'hbar_old = ',hbar_old(n) - if ( .not. dynamics%use_ssh_splitexpl_subcycl) then + if ( .not. dynamics%use_ssh_se_subcycl) then write(*,*) 'ssh_rhs = ',ssh_rhs(n) write(*,*) 'ssh_rhs_old = ',ssh_rhs_old(n) end if @@ -480,7 +480,7 @@ subroutine check_blowup(istep, ice, dynamics, tracers, partit, mesh) write(*,*) 'd_eta(n) = ',d_eta(n) write(*,*) 'hbar = ',hbar(n) write(*,*) 'hbar_old = ',hbar_old(n) - if ( .not. dynamics%use_ssh_splitexpl_subcycl) then + if ( .not. dynamics%use_ssh_se_subcycl) then write(*,*) 'ssh_rhs = ',ssh_rhs(n) write(*,*) 'ssh_rhs_old = ',ssh_rhs_old(n) end if @@ -530,7 +530,7 @@ subroutine check_blowup(istep, ice, dynamics, tracers, partit, mesh) write(*,*) 'd_eta(n) = ',d_eta(n) write(*,*) 'hbar = ',hbar(n) write(*,*) 'hbar_old = ',hbar_old(n) - if ( .not. dynamics%use_ssh_splitexpl_subcycl) then + if ( .not. dynamics%use_ssh_se_subcycl) then write(*,*) 'ssh_rhs = ',ssh_rhs(n) write(*,*) 'ssh_rhs_old = ',ssh_rhs_old(n) end if