2#if defined NONLINEAR && defined SOLVE3D
17# if defined STEP2D_FB_LF_AM3
19# elif defined STEP2D_FB_LF_AM3
29# if defined MODEL_COUPLING && defined MCT_LIB
59# ifdef TIDE_GENERATING_FORCES
62# if defined NLM_OUTER || \
64 defined rbl4dvar_ana_sensitivity || \
65 defined rbl4dvar_fct_sensitivity || \
69# if defined ADJUST_STFLUX || defined ADJUST_WSTRESS
76# if defined NLM_OUTER || defined RBL4DVAR || \
77 defined rbl4dvar_ana_sensitivity || defined rbl4dvar_fct_sensitivity
80# if defined DIFF_3DCOEF || defined VISC_3DCOEF
81 USE hmixing_mod,
ONLY : hmixing
83# if defined ICE_MODEL && defined ALBEDO && defined SHORTWAVE
89# if defined ATM_COUPLING && defined MCT_LIB
92# if defined WAV_COUPLING && defined MCT_LIB
105# if defined ADJUST_BOUNDARY
125# if defined SSH_TIDES || defined UV_TIDES
129# if !(defined STEP2D_FB_AB3_AM4 || defined STEP2D_FB_LF_AM3)
142# if defined WDISS_THORGUZA || defined WDISS_CHURTHOR
143 USE wec_dissip_mod,
ONLY : wec_dissip
146 USE wec_roller_mod,
ONLY : wec_roller
148 USE wec_stokes_mod,
ONLY : wec_stokes
149 USE wec_vf_mod,
ONLY : wec_vf
151 USE wec_wave_mix_mod,
ONLY : wec_wave_mix
155 USE wec_wvelocity_mod,
ONLY : wec_wvelocity
163 real(dp),
intent(in) :: RunInterval
167 logical :: DoNestLayer, Time_Step
169 integer :: Nsteps, Rsteps
170 integer :: ig, il, istep, ng, nl, tile
171 integer :: my_iif, next_indx1
173 integer :: Lend, Lstr, chunk_size
176 character (len=*),
parameter :: MyFile = &
189 kernel_loop :
DO WHILE (time_step)
201 nest_layer :
DO WHILE (donestlayer)
216 step_loop :
DO istep=1,nsteps
246 & __line__, myfile))
RETURN
265# if defined NLM_OUTER || \
266 defined rbl4dvar || \
267 defined rbl4dvar_ana_sensitivity || \
268 defined rbl4dvar_fct_sensitivity
287# if defined WEAK_NOINTERP
288 IF ((
iic(ng).gt.1).and.(
iic(ng).ne.
ntend(ng)+1).and. &
289 & (mod(
iic(ng)-1,
nadj(ng)).eq.0))
THEN
291 WRITE (
stdout,*)
' FORCING NLM at iic = ',
iic(ng)
314# if defined WEAK_NOINTERP
352# ifdef TIDE_GENERATING_FORCES
353 CALL equilibrium_tide (ng, tile,
inlm)
364# if defined ATM_COUPLING && defined MCT_LIB
376 CALL ocn2atm_coupling (ng, tile)
383# if defined WAV_COUPLING && defined MCT_LIB
395 CALL ocn2wav_coupling (ng, tile)
411# if defined WDISS_THORGUZA || defined WDISS_CHURTHOR
412 CALL wec_dissip (ng, tile)
415 CALL wec_roller (ng, tile)
417 CALL wec_stokes (ng, tile)
433# if defined ICE_MODEL && defined ALBEDO && defined SHORTWAVE
434 CALL ice_albedo (ng, tile,
inlm)
436# if defined FOUR_DVAR && defined PRIOR_BULK_FLUXES
446# if defined SSH_TIDES || defined UV_TIDES
466# if defined ICE_MODEL
475# ifdef ADJUST_BOUNDARY
495# if defined ADJUST_STFLUX || defined ADJUST_WSTRESS
526# elif defined LMD_MIXING
528# elif defined BVF_MIXING
531# if defined DIFF_3DCOEF || defined VISC_3DCOEF
532 CALL hmixing (ng, tile)
537 CALL wec_wvelocity (ng, tile,
nstp(ng))
543# if !(defined STEP2D_FB_AB3_AM4 || defined STEP2D_FB_LF_AM3) || \
544 defined diagnostics || defined averages
555# if !(defined STEP2D_FB_AB3_AM4 || defined STEP2D_FB_LF_AM3)
632 CALL rhs3d (ng, tile)
635# elif defined GLS_MIXING
656# ifdef STEP2D_FB_AB3_AM4
666 loop_2d :
DO my_iif=1,maxval(
nfast)
670 IF (my_iif.le.
nfast(ng))
THEN
676 IF (mod(
knew(ng),2).eq.0)
THEN
707# ifdef STEP2D_FB_LF_AM3
717 loop_2d :
DO my_iif=1,maxval(
nfast)
723 IF (my_iif.le.
nfast(ng))
THEN
764 IF (my_iif.le.
nfast(ng))
THEN
810 loop_2d :
DO my_iif=1,maxval(
nfast)+1
817 next_indx1=3-
indx1(ng)
819 & my_iif.le.(
nfast(ng)+1))
THEN
822 IF (first_2d_step)
THEN
837 IF (my_iif.le.(
nfast(ng)+1))
THEN
924# if defined MASKING && defined WET_DRY
953# if !(defined STEP2D_FB_AB3_AM4 || defined STEP2D_FB_LF_AM3)
1020# elif defined GLS_MIXING
1023# if defined WEC_VF && defined WAVE_MIXING
1024 CALL wec_wave_mix (ng, tile)
1081 IF (do_twoway(
inlm, nl, il, ng, istep))
THEN
1120 lend=min(
nfloats(ng),lstr+chunk_size-1)
subroutine main3d(runinterval)
subroutine ana_vmix(ng, tile, model)
subroutine, public bblm(ng, tile)
subroutine, public biology(ng, tile)
subroutine, public bulk_flux(ng, tile)
subroutine, public bvf_mix(ng, tile)
subroutine, public time_string(mytime, date_string)
subroutine, public diag(ng, tile)
subroutine, public nl_dotproduct(ng, tile, linp)
subroutine, public forcing(ng, tile, kfrc, nfrc)
subroutine, public load_frc(ng, tile, lout)
subroutine, public frc_adjust(ng, tile, linp)
subroutine, public frc_iau(ng, tile, irec)
subroutine, public gls_corstep(ng, tile)
subroutine, public gls_prestep(ng, tile)
subroutine, public lmd_vmix(ng, tile)
integer, dimension(:,:), allocatable couplesteps
real(r8), dimension(:), allocatable twowayinterval
logical, dimension(:), allocatable donortofiner
integer, dimension(:), allocatable first_tile
integer, dimension(:), allocatable last_tile
integer, dimension(:), allocatable nfloats
integer, dimension(:,:), allocatable gridnumber
integer, dimension(:), allocatable gridsinlayer
logical, dimension(:), allocatable lfloats
integer, dimension(:), allocatable iic
real(dp), dimension(:), allocatable dt
real(dp), dimension(:), allocatable timeiau
integer, dimension(:), allocatable next_kstp
logical, dimension(:), allocatable predictor_2d_step
integer, dimension(:), allocatable jic
real(dp), dimension(:), allocatable tdays
logical, dimension(:), allocatable frequentimpulse
integer, dimension(:), allocatable nfast
real(dp), parameter sec2day
integer, dimension(:), allocatable ntend
character(len=22), dimension(:), allocatable time_code
logical, dimension(:), allocatable iauswitch
real(dp), dimension(:), allocatable time4jedi
integer, dimension(:), allocatable indx1
logical, dimension(:,:), allocatable compositegrid
real(dp), dimension(:), allocatable time
logical, dimension(:), allocatable refinedgrid
integer, dimension(:), allocatable refinescale
integer, dimension(:), allocatable ntstart
integer, dimension(:), allocatable step_counter
logical, dimension(:), allocatable processinputdata
integer, dimension(:), allocatable nadj
integer, dimension(:), allocatable iif
integer, dimension(:), allocatable nfm2
integer, dimension(:), allocatable lbout
integer, dimension(:), allocatable kstp
integer, dimension(:), allocatable knew
integer, dimension(:), allocatable nfm1
integer, dimension(:), allocatable nrhs
integer, dimension(:), allocatable lfinp
integer, dimension(:), allocatable lbinp
integer, dimension(:), allocatable nf
integer, dimension(:), allocatable nfm3
integer, dimension(:), allocatable nnew
integer, dimension(:), allocatable nfp1
integer, dimension(:), allocatable lnew
integer, dimension(:), allocatable krhs
integer, dimension(:), allocatable lfout
integer, dimension(:), allocatable nstp
subroutine, public my25_corstep(ng, tile)
subroutine, public my25_prestep(ng, tile)
subroutine, public nesting(ng, model, isection)
subroutine, public obc_adjust(ng, tile, linp)
subroutine, public load_obc(ng, tile, lout)
subroutine, public omega(ng, tile, model)
subroutine, public post_initial(ng, model)
subroutine, public rho_eos(ng, tile, model)
subroutine, public rhs3d(ng, tile)
subroutine, public sediment(ng, tile)
subroutine, public set_avg(ng, tile)
subroutine, public set_depth(ng, tile, model)
subroutine, public set_massflux(ng, tile, model)
subroutine, public set_tides(ng, tile)
subroutine, public set_vbc(ng, tile)
subroutine, public set_zeta(ng, tile)
subroutine, public step2d(ng, tile)
subroutine, public step3d_t(ng, tile)
subroutine, public step3d_uv(ng, tile)
subroutine, public step_floats(ng, lstr, lend)
logical function, public founderror(flag, noerr, line, routine)
subroutine, public wvelocity(ng, tile, ninp)
subroutine ntimesteps(model, runinterval, nl, nsteps, rsteps)
subroutine set_data(ng, tile)
subroutine set_diags(ng, tile)