2#if defined ADJOINT && !defined SOLVE3D
21# if defined MODEL_COUPLING && defined MCT_LIB
34# if defined AD_SENSITIVITY || defined I4DVAR_ANA_SENSITIVITY || \
35 defined opt_observations || defined sensitivity_4dvar
39# if defined WEAK_CONSTRAINT || defined FORCING_SV
46# ifdef AD_OUTPUT_STATE
49# if defined FOUR_DVAR && defined OBSERVATIONS
50# ifdef WEAK_CONSTRAINT
56# ifdef ADJUST_BOUNDARY
59# ifdef NEARSHORE_MELLOR_NOT_YET
65# if defined SSH_TIDES_NOT_YET || defined UV_TIDES_NOT_YET
74# ifdef TIDE_GENERATING_FORCES
77# ifdef WEAK_CONSTRAINT
80# ifdef AIR_OCEAN_NOT_YET && defined MCT_LIB
83# if defined WAV_COUPLING_NOT_YET && defined MCT_LIB
86# if (defined FOUR_DVAR && !defined I4DVAR_ANA_SENSITIVITY) && \
99 real(dp),
intent(in) :: RunInterval
103 logical:: backward = .true.
106 integer :: next_indx1
107# ifdef FLOATS_NOT_YET
108 integer :: Lend, Lstr, chunk_size
110 integer :: ksav, ktmp
112 real(r8) :: HalfDT, MaxDT, my_StepTime
114 character (len=*),
parameter :: MyFile = &
124 step_loop :
DO WHILE (my_steptime.le.(runinterval+0.5_r8*maxdt))
126 my_steptime=my_steptime+maxdt
157# ifdef TIDE_GENERATING_FORCES
158 CALL equilibrium_tide (ng, tile,
iadm)
168# if (defined FOUR_DVAR && !defined I4DVAR_ANA_SENSITIVITY) && \
177# ifdef SENSITIVITY_4DVAR
186 & __line__, myfile))
RETURN
198# ifdef WEAK_CONSTRAINT
205# ifdef SENSITIVITY_4DVAR
214# ifdef WEAK_CONSTRAINT
232 time_step:
IF (minval(
iic).ne.minval(
ntstart))
THEN
234# ifdef FLOATS_NOT_YET
253 lend=min(
nfloats(ng),lstr+chunk_size-1)
258 CALL ad_step_floats (ng, lstr, lend)
283 next_indx1=3-
indx1(ng)
325 IF (mod(
iic(ng)-1,
nadj(ng)).eq.0)
THEN
341# if defined SSH_TIDES_NOT_YET || defined UV_TIDES_NOT_YET
342 CALL ad_set_tides (ng, tile)
348# ifdef NEARSHORE_MELLOR_NOT_YET
356 CALL ad_radiation_stress (ng, tile)
361# if defined WAV_COUPLING_NOT_YET && defined MCT_LIB
372 CALL ocn2wav_coupling (ng, tile)
378# if defined ATM_COUPLING_NOT_YET && defined MCT_LIB
389 CALL ocn2atm_coupling (ng, tile)
394# ifdef AD_OUTPUT_STATE
458# ifdef ADJUST_WSTRESS
465# ifdef RBL4DVAR_FCT_SENSITIVITY
486# ifdef ADJUST_BOUNDARY
493# ifdef RBL4DVAR_FCT_SENSITIVITY
514# if defined WEAK_CONSTRAINT && !defined SP4DVAR
538# if defined WEAK_CONSTRAINT && !defined SP4DVAR
545 IF (mod(
iic(ng)-1,
nadj(ng)).eq.0)
THEN
553# if defined AD_SENSITIVITY || defined I4DVAR_ANA_SENSITIVITY || \
554 defined opt_observations || defined sensitivity_4dvar
562# ifdef SENSITIVITY_4DVAR
565# if !defined AD_IMPULSE
572# if !defined AD_IMPULSE
575# ifdef SENSITIVITY_4DVAR
subroutine ad_get_data(ng)
subroutine ad_set_data(ng, tile)
subroutine, public ad_diag(ng, tile)
subroutine, public ad_forcing(ng, tile, kfrc, nfrc)
subroutine, public ad_frc_adjust(ng, tile, linp)
subroutine ad_htobs(ng, tile, model)
subroutine, public ad_ini_fields(ng, tile, model)
subroutine, public ad_out_zeta(ng, tile, model)
subroutine, public ad_ini_zeta(ng, tile, model)
subroutine, public ad_out_fields(ng, tile, model)
subroutine ad_misfit(ng, tile, model)
subroutine, public ad_obc_adjust(ng, tile, linp)
subroutine, public ad_set_avg(ng, tile)
subroutine, public ad_set_vbc(ng, tile)
subroutine, public ad_step2d(ng, tile)
subroutine, public adsen_force(ng, tile)
subroutine, public time_string(mytime, date_string)
subroutine, public frc_clear(ng, tile)
subroutine, public frc_adgather(ng, tile)
integer, dimension(:,:), allocatable couplesteps
logical, dimension(:), allocatable lsadd
logical, dimension(:), allocatable lsen4dvar
logical, dimension(:), allocatable processobs
integer, dimension(:), allocatable first_tile
integer, dimension(:), allocatable last_tile
integer, dimension(:), allocatable nfloats
integer, dimension(:), allocatable nstr
integer, dimension(:), allocatable nend
logical, dimension(:), allocatable lfloats
real(dp), dimension(:), allocatable obstime
integer, dimension(:), allocatable iic
real(dp), dimension(:), allocatable dt
integer, dimension(:), allocatable sorec
logical, dimension(:), allocatable predictor_2d_step
real(dp), dimension(:), allocatable tdays
real(r8), dimension(:), allocatable dends
integer, dimension(:), allocatable nfast
real(dp), parameter sec2day
integer, dimension(:), allocatable ntend
character(len=22), dimension(:), allocatable time_code
integer, dimension(:), allocatable indx1
real(r8), dimension(:), allocatable dstrs
real(dp), dimension(:), allocatable time
integer, dimension(:), allocatable ntstart
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 nf
integer, dimension(:), allocatable nfm3
integer, dimension(:), allocatable nnew
integer, dimension(:), allocatable nfp1
integer, dimension(:), allocatable krhs
integer, dimension(:), allocatable lfout
integer, dimension(:), allocatable nstp
type(t_storage), dimension(:), allocatable storage
subroutine, public obs_read(ng, model, backward)
logical function, public founderror(flag, noerr, line, routine)
subroutine ad_pack(ng, tile, mstr, mend, ad_state)