22 & LBi, UBi, LBj, UBj, &
23 & Finp, Fout, update, &
40 logical,
intent(in),
optional :: SetBC
42 logical,
intent(out) :: update
44 integer,
intent(in) :: ng, tile, model, ifield
45 integer,
intent(in) :: LBi, UBi, LBj, UBj
48 real(r8),
intent(in) :: Finp(LBi:,LBj:,:)
49 real(r8),
intent(out) :: Fout(LBi:,LBj:)
51 real(r8),
intent(in) :: Finp(LBi:UBi,LBj:UBj,2)
52 real(r8),
intent(out) :: Fout(LBi:UBi,LBj:UBj)
57 logical :: LapplyBC, Lgrided, Lonerec
59 integer :: Tindex, gtype, i, it1, it2, j
61 real(dp) :: SecScale, fac, fac1, fac2
64#include "set_bounds.h"
72 IF (
PRESENT(setbc))
THEN
80 lgrided=
linfo(1,ifield,ng)
81 lonerec=
linfo(3,ifield,ng)
82 gtype =
iinfo(1,ifield,ng)
83 tindex =
iinfo(8,ifield,ng)
93 fac1=anint((
tintrp(it2,ifield,ng)-
time(ng))*secscale,dp)
94 fac2=anint((
time(ng)-
tintrp(it1,ifield,ng))*secscale,dp)
102 fout(i,j)=finp(i,j,tindex)
106 fval=
fpoint(tindex,ifield,ng)
116 ELSE IF (((fac1*fac2).ge.0.0_dp).and. &
117 & ((fac1+fac2).gt.0.0_dp))
THEN
118 fac=1.0_dp/(fac1+fac2)
124 fout(i,j)=fac1*finp(i,j,it1)+fac2*finp(i,j,it2)
128 fval=fac1*
fpoint(it1,ifield,ng)+fac2*
fpoint(it2,ifield,ng)
146 IF (
domain(ng)%SouthWest_Test(tile))
THEN
156 10
FORMAT (/,
' SET_2DFLD - current model time', &
157 &
' exceeds ending value for variable: ',a, &
158 & /,14x,
'TDAYS = ',f15.4, &
159 & /,14x,
'Data Tmin = ',f15.4,2x,
'Data Tmax = ',f15.4, &
160 & /,14x,
'Data Tstr = ',f15.4,2x,
'Data Tend = ',f15.4, &
161 & /,14x,
'TINTRP1 = ',f15.4,2x,
'TINTRP2 = ',f15.4, &
162 & /,14x,
'FAC1 = ',f15.4,2x,
'FAC2 = ',f15.4)
174 & lbi, ubi, lbj, ubj, &
176 ELSE IF (gtype.eq.
u2dvar)
THEN
178 & lbi, ubi, lbj, ubj, &
180 ELSE IF (gtype.eq.
v2dvar)
THEN
182 & lbi, ubi, lbj, ubj, &
188 IF (.not.lapplybc)
THEN
190 & lbi, ubi, lbj, ubj, &
192 & .false., .false., &
196 & lbi, ubi, lbj, ubj, &
subroutine exchange_r2d_tile(ng, tile, lbi, ubi, lbj, ubj, a)
subroutine exchange_u2d_tile(ng, tile, lbi, ubi, lbj, ubj, a)
subroutine exchange_v2d_tile(ng, tile, lbi, ubi, lbj, ubj, a)
logical, dimension(:,:,:), allocatable linfo
real(dp), dimension(:,:,:), allocatable tintrp
real(dp), dimension(:,:,:), allocatable fpoint
real(dp), dimension(:,:,:), allocatable finfo
character(len=maxlen), dimension(6, 0:nv) vname
integer, dimension(:,:,:), allocatable iinfo
type(t_domain), dimension(:), allocatable domain
integer, parameter u2dvar
integer, parameter r2dvar
integer, parameter v2dvar
real(dp), dimension(:), allocatable dt
logical, dimension(:), allocatable ewperiodic
logical, dimension(:), allocatable nsperiodic
logical, dimension(:), allocatable synchro_flag
real(dp), dimension(:), allocatable tdays
real(dp), parameter sec2day
real(dp), dimension(:), allocatable time
subroutine mp_exchange2d(ng, tile, model, nvar, lbi, ubi, lbj, ubj, nghost, ew_periodic, ns_periodic, a, b, c, d)
subroutine set_2dfld_tile(ng, tile, model, ifield, lbi, ubi, lbj, ubj, finp, fout, update, setbc)