72 INTEGER,
INTENT(IN) :: IDX
73 REAL(SP) :: ZREF(KBM1),ZREFJ(KBM1),TSIGMA(KBM1),SSIGMA(KBM1)
74 REAL(SP) :: TTMP(KBM1),STMP(KBM1),TREF(KBM1),SREF(KBM1)
75 REAL(SP) :: PHY_Z(KBM1),PHY_Z1(KBM1)
76 REAL(SP) :: TT1(KBM1),TT2(KBM1),SS1(KBM1),SS2(KBM1)
78 REAL(SP) :: TIME1,FACT,UFACT,FORCE,UI,VI,UNTMP,VNTMP,TX,TY,HFLUX
80 REAL(SP) :: DTXTMP,DTYTMP,SPRO,WDS,CD,SPCP,ROSEA,ROSEA1(MT),SPRO1(MT)
81 REAL(SP) :: PHAI_IJ,ALPHA1,DHFLUXTMP,DHSHORTTMP,HSHORT,TIMERK1
84 REAL(SP) :: ANG_WND,WNDALONG,RHOINTNXT,RHOINTCUR,CUMEL
85 REAL(SP) :: TAU_X,TAU_Y, mag_wnd
86 REAL(SP),
POINTER,
DIMENSION(:) :: lcl_dat, gbl_dat
89 REAL(SP),
POINTER :: eta_lcl(:), eta_gbl(:) ,elfgeo_gbl(:),elfgeo_lcl(:)
91 INTEGER I,J,K,I1,I2,J1,J2,II,L1,L2,IERR
92 INTEGER cdx,ndx,KDAM_TMP,K_RK
102 if(dbg_set(dbg_sbr))
write(ipt,*)
"Start: bcond_gcn: ",idx
109 IF(obc_elevation_forcing_on)
CALL bcond_asl 121 IF (obc_longshore_flow_on)
THEN 136 tau_x = tau_x/real(
ntve(i1),sp)
137 tau_y = tau_y/real(
ntve(i1),sp)
139 tau_x = tau_x * 1000.0_sp
140 tau_y = tau_y * 1000.0_sp
142 mag_wnd = sqrt(tau_x**2+tau_y**2)
145 IF (mag_wnd .GT. 0.0_sp)
THEN 146 ang_wnd=atan2(tau_y,tau_x) -
wdf_ang(i)
152 wndalong=sin(ang_wnd)*mag_wnd
190 allocate(eta_lcl(nobclsf)); eta_lcl=0.0_sp
205 rhointnxt=rhointnxt+(1.0_sp+
rho1(cdx,k))*1.0e3_sp*
dz(cdx,k)
220 IF (i /= nobclsf)
THEN 221 eta_lcl(i)=-(1.0_sp/(0.5_sp*(rhointnxt+rhointcur))) &
222 *((
h(cdx)*rhointnxt-
h(ndx)*rhointcur) &
223 -0.5_sp*1.0e3_sp*(2.0_sp+
rho1(cdx,kbm1)+
rho1(ndx,kbm1)) &
234 cumel=cumel+eta_lcl(i)
256 IF(
isbce(i) == 3)
THEN 268 IF(
isbce(i) == 1)
THEN 271 IF(river_inflow_location ==
'node')
THEN 276 IF((i == j1).OR.(i == j2))
THEN 279 untmp=max(untmp,0.0_sp)
285 ELSE IF(river_inflow_location ==
'edge')
THEN 291 untmp=max(untmp,0.0_sp)
302 ui=
uaf(i)*(sin(alpha1))**2-
vaf(i)*sin(alpha1)*cos(alpha1)
303 vi=-
uaf(i)*sin(alpha1)*cos(alpha1)+
vaf(i)*(cos(alpha1))**2
349 if(
isbce(i).eq.3)
then 354 if(
isbce(i).eq.1)
then 357 if(river_inflow_location.eq.
'node')
then 362 if((i.eq.j1).or.(i.eq.j2))
then 365 untmp=max(untmp,0.0_sp)
371 else if(river_inflow_location.eq.
'edge')
then 377 untmp=max(untmp,0.0_sp)
384 print*,
'river_inflow_location not correct' 390 ui=
uf(i,k)*(sin(alpha1))**2-
vf(i,k)*sin(alpha1)*cos(alpha1)
391 vi=-
uf(i,k)*sin(alpha1)*cos(alpha1)+
vf(i,k)*(cos(alpha1))**2
425 if(
isbce(i).eq.3)
then 430 if(
isbce(i).eq.1)
then 433 if(river_inflow_location.eq.
'node')
then 438 if((i.eq.j1).or.(i.eq.j2))
then 441 untmp=max(untmp,0.0_sp)
447 else if(river_inflow_location.eq.
'edge')
then 453 untmp=max(untmp,0.0_sp)
460 print*,
'river_inflow_location not correct' 466 ui=
u(i,k)*(sin(alpha1))**2-
v(i,k)*sin(alpha1)*cos(alpha1)
467 vi=-
u(i,k)*sin(alpha1)*cos(alpha1)+
v(i,k)*(cos(alpha1))**2
502 IF(numqbc_gl .GT. 0)
THEN 519 IF (wind_type == speed)
THEN 524 ELSEIF(wind_type == stress)
THEN 560 IF (precipitation_on)
THEN 574 IF (groundwater_on)
THEN 587 IF(numqbc_gl .GT. 0)
THEN 598 IF (precipitation_on)
THEN 605 IF (wind_type == speed)
THEN 610 ELSEIF(wind_type == stress)
THEN 624 IF (groundwater_on)
THEN 630 if(dbg_set(dbg_sbr))
write(ipt,*)&
real(sp), dimension(:), allocatable, target alpha
real(sp), dimension(:), allocatable, target qprec
real(sp), dimension(:), allocatable, target h
integer, dimension(:), allocatable, target ibclsf
real(sp), dimension(:,:), allocatable, target v
real(sp), dimension(:), allocatable, target qevap2
real(sp), dimension(:,:), allocatable, target rho1
integer, dimension(:), allocatable, target nbclsf
real(sp), dimension(:), allocatable, target qdis2
real(sp), dimension(:), allocatable, target wtsurf_watts
real(sp), dimension(:), allocatable, target qdis
subroutine bcond_gcn(IDX, K_RK)
real(sp), dimension(:,:), allocatable, target vf
real(sp), dimension(:), allocatable, target wusurf_save
real(sp), dimension(:), allocatable, target bfwdis2
real(sp), dimension(:,:), allocatable, target u
real(sp), dimension(:), allocatable, target angleq
real(sp), dimension(:), allocatable, target sdis
real(sp), dimension(:), allocatable, target bfwslt
real(sp), dimension(:), allocatable, target swrad
real(sp), dimension(:,:), allocatable, target uf
real(sp), dimension(:), allocatable, target wvsurf2
real(sp), dimension(:), allocatable, target vaf
subroutine, public update_groundwater(NOW, GW_FLUX, GW_TEMP, GW_SALT)
integer, dimension(:), allocatable, target ntve
real(sp), dimension(:), allocatable, target elf
real(sp), dimension(:), allocatable, target bfwdis
real(sp), dimension(:), allocatable, target wusurf
real(sp), dimension(:), allocatable, target bfwtmp
real(sp), dimension(:), allocatable, target wdf_ang
real(sp), dimension(:), allocatable, target wusurf2
real(sp), dimension(:), allocatable, target qevap
subroutine, public update_precipitation(NOW, Qprec, Qevap)
real(sp), dimension(:,:), allocatable, target dz
real(sp), dimension(:), allocatable, target swrad_watts
subroutine bcond_bki(K_RK)
integer, dimension(:), allocatable, target icellq
subroutine, public update_wind(NOW, wstrx, wstry)
subroutine asimple_drag(spdx, spdy, strx, stry)
integer, dimension(:,:), allocatable, target nbve
real(sp), dimension(:), allocatable, target vvwind
real(sp), dimension(:), allocatable, target uaf
subroutine bcond_gwi(K_RK)
real(sp), dimension(:), allocatable, target qprec2
integer, dimension(:), allocatable, target isbce
real(sp), dimension(:), allocatable, target wvsurf_save
subroutine, public update_rivers(NOW, FLUX, TEMP, SALT, WQM, SED, BIO)
real(sp), dimension(:), allocatable, target rbc_geo
subroutine, public update_heat(NOW, HEAT_SWV, HEAT_NET)
real(sp), dimension(:), allocatable, target tdis
real(sp), dimension(:), allocatable, target rbc_wdf
real(sp), dimension(:), allocatable, target wtsurf
integer, dimension(:), allocatable, target inodeq
real(sp), dimension(:), allocatable, target wvsurf
real(sp), dimension(:), allocatable, target uuwind