My Project
bcond_gcn.f90
Go to the documentation of this file.
1 
2 
3 
4 
5 
6 
7 
8 
9 
10 
11 
12 !/===========================================================================/
13 ! Copyright (c) 2007, The University of Massachusetts Dartmouth
14 ! Produced at the School of Marine Science & Technology
15 ! Marine Ecosystem Dynamics Modeling group
16 ! All rights reserved.
17 !
18 ! FVCOM has been developed by the joint UMASSD-WHOI research team. For
19 ! details of authorship and attribution of credit please see the FVCOM
20 ! technical manual or contact the MEDM group.
21 !
22 !
23 ! This file is part of FVCOM. For details, see http://fvcom.smast.umassd.edu
24 ! The full copyright notice is contained in the file COPYRIGHT located in the
25 ! root directory of the FVCOM code. This original header must be maintained
26 ! in all distributed versions.
27 !
28 ! THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
29 ! AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
30 ! THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
31 ! PURPOSE ARE DISCLAIMED.
32 !
33 !/---------------------------------------------------------------------------/
34 ! CVS VERSION INFORMATION
35 ! $Id$
36 ! $Name$
37 ! $Revision$
38 !/===========================================================================/
39 
40 
41 !==============================================================================|
42 ! SET BOUNDARY CONDITIONS FOR ALMOST ALL VARIABLES |
43 ! |
44 ! idx: identifies which variables are considered |
45 ! 1=tidal forcing |
46 ! 2=solid bcs for external mode uaf and vaf |
47 ! 3=solid bcs for internal mode uf and vf |
48 ! 4=open bcs for s and t |
49 ! 5=solid bcs for internal mode u and v |
50 ! 6=unused |
51 ! 7=unused |
52 ! 8=the surface forcings for internal mode |
53 ! 9=the surface forcings for external mode |
54 ! |
55 !==============================================================================|
56 
57  SUBROUTINE bcond_gcn(IDX,K_RK)
58 
59 !==============================================================================|
60  USE all_vars
61  USE bcs
62  USE mod_obcs
63  USE mod_force
64  USE mod_par
65  USE mod_wd
66  USE mod_bulk
67 
68 
69 
70 
71  IMPLICIT NONE
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)
77 ! REAL(SP) :: TIME1,FACT,UFACT,FORCE,QPREC,QEVAP,UI,VI,UNTMP,VNTMP,TX,TY,HFLUX
78  REAL(SP) :: TIME1,FACT,UFACT,FORCE,UI,VI,UNTMP,VNTMP,TX,TY,HFLUX
79 ! REAL(SP) :: DTXTMP,DTYTMP,QPREC2,QEVAP2,SPRO,WDS,CD,SPCP,ROSEA
80  REAL(SP) :: DTXTMP,DTYTMP,SPRO,WDS,CD,SPCP,ROSEA,ROSEA1(MT),SPRO1(MT)
81  REAL(SP) :: PHAI_IJ,ALPHA1,DHFLUXTMP,DHSHORTTMP,HSHORT,TIMERK1
82 
83  ! VARIABLES FOR LONG SHORE FLOW STUFF
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
87 
88 
89  REAL(SP),POINTER :: eta_lcl(:), eta_gbl(:) ,elfgeo_gbl(:),elfgeo_lcl(:)
90 
91  INTEGER I,J,K,I1,I2,J1,J2,II,L1,L2,IERR
92  INTEGER cdx,ndx,KDAM_TMP,K_RK
93 
94 !!$!=================|DEBUG|============================
95 !!$ LOGICAL, save :: INIT=.false.
96 !!$ INTEGER, save :: icount
97 !!$ character(len=5):: ccount
98 !!$ REAL(SP),POINTER :: temp_lcl(:),temp_gl(:)
99 !!$!=================|DEBUG|============================
100 
101 
102  if(dbg_set(dbg_sbr)) write(ipt,*) "Start: bcond_gcn: ",idx
103 
104 
105  SELECT CASE(idx)
106 !==============================================================================|
107  CASE(1) !Surface Elevation Boundary Conditions (Tidal Forcing) !
108 !==============================================================================|
109  IF(obc_elevation_forcing_on) CALL bcond_asl
110  CALL bcond_asl_clp
111  CALL bcond_gwi(k_rk)
112  CALL bcond_bki(k_rk)
113  CALL bcond_ore
114 
115 !
116 !--Allow setup/down on north boundary in response to longshore wind
117 !--Corrects for Wind-Driven Barotropic Response (See Schwing 1989)
118 !--Implemented by Jamie Pringle - Rewritten for parallel by D.Stuebe
119 !
120 
121  IF (obc_longshore_flow_on) THEN
122 
123  ! CALCULATE THE ADJUSTMENT DUE TO WIND DRIVEN FLOW ALLONG THE
124  ! COAST OF NOVA SCOTIA
125  DO i = 1,nobclsf
126  tau_x = 0.0_sp
127  tau_y = 0.0_sp
128 
129  i1= ibclsf(i)
130  DO j = 1,ntve(i1)
131  k = nbve(i1,j)
132  tau_x = tau_x + wusurf2(k)
133  tau_y = tau_y + wvsurf2(k)
134  END DO
135 
136  tau_x = tau_x/real(ntve(i1),sp)
137  tau_y = tau_y/real(ntve(i1),sp)
138 
139  tau_x = tau_x * 1000.0_sp ! Approximate scale factor
140  tau_y = tau_y * 1000.0_sp ! Approximate scale factor
141 
142  mag_wnd = sqrt(tau_x**2+tau_y**2)
143 
144 
145  IF (mag_wnd .GT. 0.0_sp) THEN
146  ang_wnd=atan2(tau_y,tau_x) - wdf_ang(i)
147  ELSE
148  ang_wnd=0.0_sp
149  END IF
150 
151 
152  wndalong=sin(ang_wnd)*mag_wnd
153 
154  ! SUBTRACT THE COMPONET ALONG SHORE AND INTO THE DOMAIN FROM
155  ! THE SEA SURFACE HEIGHT
156 
157  elf(i1)=elf(i1) - wndalong*rbc_wdf(i)
158 
159 !!$ !=================|DEBUG|============================
160 !!$ THIS IS NOT PARALLEL SAFE!
161 !!$ if(.not. INIT)then
162 !!$ init =.true.
163 !!$ icount=0
164 !!$ end if
165 !!$
166 !!$ IF(I==1) THEN
167 !!$ write(ccount,'(I5.5)') icount
168 !!$
169 !!$ call FOPEN(157,"WDF_"//ccount,'ofr')
170 !!$ write(157,*) "WDF DEBUG: ",icount
171 !!$ write(157,*) "Node#, ANG, ELFGEO"
172 !!$ END IF
173 !!$
174 !!$ write(157,*) IBCLSF(I), WDF_ANG(I)/deg2rad, RBC_WDF(I),&
175 !!$ &-1.0_SP*WNDALONG*RBC_WDF(I), MAG_WND*SIN(ANG_WND)
176 !!$
177 !!$ IF(I==nobclsf) THEN
178 !!$ icount = icount +1
179 !!$
180 !!$ close(157)
181 !!$ END IF
182 !!$!=================|DEBUG|============================
183 
184  END DO
185 
186 
187 
188  ! NOW ADJUSTMENT ELF UNDER THERMAL WIND SUCH THAT THE BOTTOM
189  ! VELOCITY IS ZERO
190  allocate(eta_lcl(nobclsf)); eta_lcl=0.0_sp
191 ! DEBUG
192 ! allocate(temp_lcl(NOBCLSF)); temp_lcl=0.0_sp
193 
194  rhointcur= 0.0_sp
195  rhointnxt = 0.0_sp
196 
197  DO i=nobclsf,1,-1 ! COUNT BACKWARDS - The onshore direction
198  ndx = nbclsf(i)
199  cdx = ibclsf(i)
200 
201  !INTEGRATE RHO IN DEPTH, CONVERT TO MKS UNITS DAMIT
202  rhointcur=rhointnxt
203  rhointnxt=0.0_sp
204  DO k=1,kbm1
205  rhointnxt=rhointnxt+(1.0_sp+rho1(cdx,k))*1.0e3_sp*dz(cdx,k)
206  END DO
207 ! DEBUG
208 ! temp_lcl(I)=RHOINTNXT
209 
210 !ESTIMATE DENSITY GRADIENT, AND MODIFY BOUNDARY ELEVATION
211 !NOTE THE FACTOR OF 1000 AND 2 TO COMPENSATE FOR THE
212 !FACT THAT THE MODEL STORES RHO1 AS SIGMA, AND IN CGS.
213 
214 ! ADJUST THE SEA SURFACE HEIGHT FOR A MEAN FLOW DUE TO DENSITY GRADIENT
215 ! CALCULATE THE THERMAL WIND AND ADJUST THE SEA SURFACE HEIGHT SO THAT THE BOTTOM
216 ! BOUNDARY IS A LEVEL OF NO MOTION:
217 !
218 ! ETATAN=[ -1/(Rho_bar)*(del(h*rho)/del(s) - Rho_bot*(del(h)/del(s) ] *del(s)
219 !
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)) &
224  *(h(cdx)-h(ndx)))
225  END IF
226 
227  END DO
228 
229  cumel = 0.0_sp
230 
231  IF(serial) THEN
232  DO i=nobclsf,1,-1 ! COUNT BACKWARD FROM THE SHELF TOWARD SHORE
233  ndx=ibclsf(i)
234  cumel=cumel+eta_lcl(i)
235  elf(ndx)=elf(ndx)+ cumel *rbc_geo(i)
236 ! write(ipt,*) "NDX=",NDX,"ELF(NDX)=",ELF(NDX)
237  END DO
238  END IF
239 
240 ! DEBUG
241 ! deallocate(temp_lcl)
242  DEALLOCATE(eta_lcl)
243 
244  END IF
245 
246 
247 !==============================================================================|
248  CASE(2) !External Mode Velocity Boundary Conditions |
249 !==============================================================================|
250 
251  DO i=1,n
252 
253 !
254 !--2 SOLID BOUNDARY EDGES------------------------------------------------------|
255 !
256  IF(isbce(i) == 3) THEN
257  uaf(i)=0.0_sp
258  vaf(i)=0.0_sp
259  END IF
260 
261 ! GWC SPEED REPLACE ABOVE 4 LINES
262 ! UAF(LISBCE_3(1:NISBCE_3)) = 0.
263 ! VAF(LISBCE_3(1:NISBCE_3)) = 0.
264 
265 !
266 !--1 SOLID BOUNDARY EDGE-------------------------------------------------------|
267 !
268  IF(isbce(i) == 1) THEN
269  alpha1=alpha(i)
270  IF(numqbc > 0) THEN
271  IF(river_inflow_location == 'node') THEN
272  DO j=1,numqbc
273  i1=inodeq(j)
274  j1=nbve(i1,1)
275  j2=nbve(i1,ntve(i1))
276  IF((i == j1).OR.(i == j2)) THEN
277  untmp=uaf(i)*cos(angleq(j))+vaf(i)*sin(angleq(j))
278  vntmp=-uaf(i)*sin(angleq(j))+vaf(i)*cos(angleq(j))
279  untmp=max(untmp,0.0_sp)
280  uaf(i)=untmp*cos(angleq(j))-vntmp*sin(angleq(j))
281  vaf(i)=untmp*sin(angleq(j))+vntmp*cos(angleq(j))
282  GOTO 21
283  END IF
284  END DO
285  ELSE IF(river_inflow_location == 'edge') THEN
286  DO j=1,numqbc
287  j1=icellq(j)
288  IF(i == j1) THEN
289  untmp=uaf(i)*cos(angleq(j))+vaf(i)*sin(angleq(j))
290  vntmp=-uaf(i)*sin(angleq(j))+vaf(i)*cos(angleq(j))
291  untmp=max(untmp,0.0_sp)
292  uaf(i)=untmp*cos(angleq(j))-vntmp*sin(angleq(j))
293  vaf(i)=untmp*sin(angleq(j))+vntmp*cos(angleq(j))
294  GOTO 21
295  END IF
296  END DO
297  END IF
298 
299  END IF
300 
301 
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
304  uaf(i)=ui
305  vaf(i)=vi
306 
307 !!# if defined (1)
308 !! UI= UAS(I)*(SIN(ALPHA1))**2-VAS(I)*SIN(ALPHA1)*COS(ALPHA1)
309 !! VI=-UAS(I)*SIN(ALPHA1)*COS(ALPHA1)+VAS(I)*(COS(ALPHA1))**2
310 !! UAS(I)=UI
311 !! VAS(I)=VI
312 !!# endif
313 
314 
315 21 CONTINUE
316  END IF
317  END DO
318 
319 !!# if defined (THIN_DAM)
320 !! DO I=1,NT
321 !! IF(CLP_CELL(I)==1)THEN
322 !! ALPHA1=CLP_ALPHA(I)
323 !! UNTMP=-UAF(I)*COS(ALPHA1)-VAF(I)*SIN(ALPHA1)
324 !! VNTMP=UAF(I)*SIN(ALPHA1)-VAF(I)*COS(ALPHA1)
325 !! IF(CLP_KDAM(I,1)==1)KDAM_TMP=KDAM1(CLP_KDAM(I,2))
326 !! IF(CLP_KDAM(I,1)==2)KDAM_TMP=(KDAM1(CLP_KDAM(I,2))+KDAM1(CLP_KDAM(I,2)))/2
327 !! IF(KDAM_TMP<=KBM1/2)UNTMP=UNTMP*KDAM_TMP/KBM1
328 !! UAF(I)=-UNTMP*COS(ALPHA1)+VNTMP*SIN(ALPHA1)
329 !! VAF(I)=-UNTMP*SIN(ALPHA1)-VNTMP*COS(ALPHA1)
330 !! END IF
331 !! END DO
332 !!# endif
333 
334 !==============================================================================|
335  CASE(3) !3-D Velocity Boundary Conditions !
336 !==============================================================================|
337 
338 ! GWC SPEED REPLACE NEXT 4 LINES
339 ! UF(LISBCE_3(1:NISBCE_3),1:KBM1) = 0.
340 ! VF(LISBCE_3(1:NISBCE_3),1:KBM1) = 0.
341 
342  ! Suggest move the kbm1 loop inside 'if((i.eq.j1).or.(i.eq.j2)) then'
343 
344  ! THIS SHOULD BE SAFE FOR MORE THAN ONE RIVER AT THE SAME NODE
345  ! OR EDGE
346 
347  do i= 1, n
348  do k =1, kbm1
349  if(isbce(i).eq.3) then
350  uf(i,k)=0.0_sp
351  vf(i,k)=0.0_sp
352  end if
353 
354  if(isbce(i).eq.1) then
355  alpha1=alpha(i)
356  if(numqbc.ge.1) then
357  if(river_inflow_location.eq.'node') then
358  do j=1,numqbc
359  i1=inodeq(j)
360  j1=nbve(i1,1)
361  j2=nbve(i1,ntve(i1))
362  if((i.eq.j1).or.(i.eq.j2)) then
363  untmp=uf(i,k)*cos(angleq(j))+vf(i,k)*sin(angleq(j))
364  vntmp=-uf(i,k)*sin(angleq(j))+vf(i,k)*cos(angleq(j))
365  untmp=max(untmp,0.0_sp)
366  uf(i,k)=untmp*cos(angleq(j))-vntmp*sin(angleq(j))
367  vf(i,k)=untmp*sin(angleq(j))+vntmp*cos(angleq(j))
368  goto 31
369  end if
370  end do
371  else if(river_inflow_location.eq.'edge') then
372  do j=1,numqbc
373  j1=icellq(j)
374  if(i.eq.j1) then
375  untmp=uf(i,k)*cos(angleq(j))+vf(i,k)*sin(angleq(j))
376  vntmp=-uf(i,k)*sin(angleq(j))+vf(i,k)*cos(angleq(j))
377  untmp=max(untmp,0.0_sp)
378  uf(i,k)=untmp*cos(angleq(j))-vntmp*sin(angleq(j))
379  vf(i,k)=untmp*sin(angleq(j))+vntmp*cos(angleq(j))
380  goto 31
381  end if
382  end do
383  else
384  print*, 'river_inflow_location not correct'
385  call pstop
386  end if
387  end if
388 
389 
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
392  uf(i,k)=ui
393  vf(i,k)=vi
394 
395 !!# if defined (1)
396 !! ui= us(i,k)*(sin(alpha1))**2-vs(i,k)*sin(alpha1)*cos(alpha1)
397 !! vi=-us(i,k)*sin(alpha1)*cos(alpha1)+vs(i,k)*(cos(alpha1))**2
398 !! us(i,k)=ui
399 !! vs(i,k)=vi
400 !!# endif
401 
402 
403 31 continue
404  end if
405  end do
406  end do
407 
408 
409 
410 !==============================================================================|
411  CASE(4) !Blank !
412 !==============================================================================|
413 
414 !==============================================================================|
415  CASE(5) !!SOLID BOUNDARY CONDITIONS ON U AND V !
416 !==============================================================================|
417 
418 
419 ! GWC SPEED REPLACE NEXT 4 LINES
420 ! U(LISBCE_3(1:NISBCE_3),1:KBM1) = 0.
421 ! V(LISBCE_3(1:NISBCE_3),1:KBM1) = 0.
422 
423  do i= 1, n
424  do k =1, kbm1
425  if(isbce(i).eq.3) then
426  u(i,k)=0.0_sp
427  v(i,k)=0.0_sp
428  end if
429 
430  if(isbce(i).eq.1) then
431  alpha1=alpha(i)
432  if(numqbc.ge.1) then
433  if(river_inflow_location.eq.'node') then
434  do j=1,numqbc
435  i1=inodeq(j)
436  j1=nbve(i1,1)
437  j2=nbve(i1,ntve(i1))
438  if((i.eq.j1).or.(i.eq.j2)) then
439  untmp=u(i,k)*cos(angleq(j))+v(i,k)*sin(angleq(j))
440  vntmp=-u(i,k)*sin(angleq(j))+v(i,k)*cos(angleq(j))
441  untmp=max(untmp,0.0_sp)
442  u(i,k)=untmp*cos(angleq(j))-vntmp*sin(angleq(j))
443  v(i,k)=untmp*sin(angleq(j))+vntmp*cos(angleq(j))
444  goto 51
445  end if
446  end do
447  else if(river_inflow_location.eq.'edge') then
448  do j=1,numqbc
449  j1=icellq(j)
450  if(i.eq.j1) then
451  untmp=u(i,k)*cos(angleq(j))+v(i,k)*sin(angleq(j))
452  vntmp=-u(i,k)*sin(angleq(j))+v(i,k)*cos(angleq(j))
453  untmp=max(untmp,0.0_sp)
454  u(i,k)=untmp*cos(angleq(j))-vntmp*sin(angleq(j))
455  v(i,k)=untmp*sin(angleq(j))+vntmp*cos(angleq(j))
456  goto 51
457  end if
458  end do
459  else
460  print*, 'river_inflow_location not correct'
461  call pstop
462  end if
463  end if
464 
465 
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
468  u(i,k)=ui
469  v(i,k)=vi
470 
471 !!# if defined (1)
472 !! ui= us(i,k)*(sin(alpha1))**2-vs(i,k)*sin(alpha1)*cos(alpha1)
473 !! vi=-us(i,k)*sin(alpha1)*cos(alpha1)+vs(i,k)*(cos(alpha1))**2
474 !! us(i,k)=ui
475 !! vs(i,k)=vi
476 !!# endif
477 
478 
479 51 continue
480  end if
481  end do
482  end do
483 
484 
485 
486 !==============================================================================|
487  CASE(6) !Blank !
488 !==============================================================================|
489 
490 !==============================================================================|
491  CASE(7) !Blank !
492 !==============================================================================|
493 
494 !==============================================================================|
495  CASE(8) !!SURFACE FORCING FOR INTERNAL MODE !
496 !==============================================================================|
497 
498 !
499 !--Fresh Water Discharge-------------------------------------------------------|
500 !
501 
502  IF(numqbc_gl .GT. 0) THEN
503  CALL update_rivers(inttime,qdis,temp=tdis,salt=sdis)
504 
505  qdis = qdis*ramp
506 
507 !# if defined (WATER_QUALITY)
508 ! DO N1 = 1, NB
509 ! ! NOT YET OPERATIONAL!!!
510 ! WDIS(:,N1) = UFACT*DWDIS(:,N1,L1) + FACT*DWDIS(:,N1,L2)
511 ! END DO
512 !# endif
513 
514  END IF
515 
516 
517 
518  IF (wind_on) THEN
519  IF (wind_type == speed)THEN
520  CALL update_wind(inttime,uuwind,vvwind)
521 
523 
524  ELSEIF(wind_type == stress)THEN
525  CALL update_wind(inttime,wusurf,wvsurf)
526  END IF
527 
528 
529  ! For output only - don't divide by density
530  wusurf_save = wusurf * ramp
531  wvsurf_save = wvsurf * ramp
532 
533  ! Divide by density
534  wusurf = -wusurf * ramp *0.001_sp
535  wvsurf = -wvsurf * ramp *0.001_sp
536 
537  ! MAJOR MISTAKE: NEED THE NEGATIVE SIGN FOR THE INTERNAL
538  ! STEP WIND STRESS
539 
540  END IF
541 
542  IF (heating_on) THEN
543  CALL update_heat(inttime,swrad_watts,wtsurf_watts)
544 
545  ! LOAD INTO THES VARIABLE TO SAVE THE FORCING IN THE CORRECT UNITS
546  swrad_watts = swrad_watts * ramp
547  wtsurf_watts = wtsurf_watts * ramp
548 
549  spcp=4.2174e3_sp
550  rosea = 1.023e3_sp
551  spro = spcp*rosea
552 
553  wtsurf = -wtsurf_watts/spro
554  swrad = -swrad_watts/spro
555 
556 
557  END IF
558 
559 
560  IF (precipitation_on) THEN
561  CALL update_precipitation(inttime,qprec,qevap)
562  ! NO RAMP FOR PRECIP/EVAP
563  END IF
564 
565 
566 
567 
568 
569 
570 !
571 !-- Set Groundwater flux ------------------------------------------------------|
572 !
573 
574  IF (groundwater_on) THEN
575  CALL update_groundwater(inttime,bfwdis,gw_temp=bfwtmp,gw_salt=bfwslt)
576  bfwdis = ramp * bfwdis
577  ! DO NOT RAMP TEMP AND SALINITY
578  END IF
579 
580 !==============================================================================|
581  CASE(9) !External Mode Surface BCs (River Flux/Wind Stress/Heat/Moist) !
582 !==============================================================================|
583 !
584 !-Freshwater Flux: Set Based on Linear Interpolation Between Two Data Times---|
585 !
586 
587  IF(numqbc_gl .GT. 0) THEN
588  CALL update_rivers(exttime,qdis2)
589 
590  qdis2 = qdis2*ramp
591 
592  END IF
593 
594 !
595 !-- Set Precipitation/Evaporation/Surface Wind ---------------------------------|
596 !
597 
598  IF (precipitation_on) THEN
599  CALL update_precipitation(exttime,qprec2,qevap2)
600  ! NO RAMP FOR PRECIP/EVAP
601  END IF
602 
603  IF (wind_on) THEN
604 
605  IF (wind_type == speed)THEN
606  CALL update_wind(exttime,uuwind,vvwind)
607 
609 
610  ELSEIF(wind_type == stress)THEN
611  CALL update_wind(exttime,wusurf2,wvsurf2)
612  END IF
613 
614 
615  wusurf2 = wusurf2 * ramp *0.001_sp
616  wvsurf2 = wvsurf2 * ramp *0.001_sp
617 
618  END IF
619 
620 !
621 !-- Set Groundwater flux ------------------------------------------------------|
622 !
623 
624  IF (groundwater_on) THEN
625  CALL update_groundwater(exttime,bfwdis2)
626  bfwdis2 = ramp * bfwdis2
627  END IF
628  END SELECT
629 
630  if(dbg_set(dbg_sbr)) write(ipt,*)&
631  & "End: bcond_gcn"
632 
633  END SUBROUTINE bcond_gcn
634 !==============================================================================|
635 
636 
real(sp), dimension(:), allocatable, target alpha
Definition: mod_main.f90:1336
real(sp), dimension(:), allocatable, target qprec
Definition: mod_main.f90:1239
real(sp), dimension(:), allocatable, target h
Definition: mod_main.f90:1131
integer, dimension(:), allocatable, target ibclsf
Definition: mod_main.f90:1080
subroutine bcond_asl
Definition: mod_obcs.f90:262
real(sp), dimension(:,:), allocatable, target v
Definition: mod_main.f90:1269
real(sp), dimension(:), allocatable, target qevap2
Definition: mod_main.f90:1237
real(sp), dimension(:,:), allocatable, target rho1
Definition: mod_main.f90:1309
integer, dimension(:), allocatable, target nbclsf
Definition: mod_main.f90:1082
real(sp), dimension(:), allocatable, target qdis2
Definition: mod_main.f90:1222
real(sp), dimension(:), allocatable, target wtsurf_watts
Definition: mod_main.f90:1174
real(sp), dimension(:), allocatable, target qdis
Definition: mod_main.f90:1220
subroutine bcond_gcn(IDX, K_RK)
Definition: bcond_gcn.f90:58
real(sp), dimension(:,:), allocatable, target vf
Definition: mod_main.f90:1282
real(sp), dimension(:), allocatable, target wusurf_save
Definition: mod_main.f90:1193
real(sp), dimension(:), allocatable, target bfwdis2
Definition: mod_main.f90:1198
real(sp), dimension(:,:), allocatable, target u
Definition: mod_main.f90:1268
real(sp), dimension(:), allocatable, target angleq
Definition: mod_main.f90:1228
real(sp), dimension(:), allocatable, target sdis
Definition: mod_main.f90:1225
real(sp), dimension(:), allocatable, target bfwslt
Definition: mod_main.f90:1201
real(sp), dimension(:), allocatable, target swrad
Definition: mod_main.f90:1177
real(sp), dimension(:,:), allocatable, target uf
Definition: mod_main.f90:1281
real(sp), dimension(:), allocatable, target wvsurf2
Definition: mod_main.f90:1183
real(sp), dimension(:), allocatable, target vaf
Definition: mod_main.f90:1106
subroutine, public update_groundwater(NOW, GW_FLUX, GW_TEMP, GW_SALT)
Definition: mod_force.f90:6200
integer, dimension(:), allocatable, target ntve
Definition: mod_main.f90:1022
real(sp), dimension(:), allocatable, target elf
Definition: mod_main.f90:1140
real(sp), dimension(:), allocatable, target bfwdis
Definition: mod_main.f90:1196
real(sp), dimension(:), allocatable, target wusurf
Definition: mod_main.f90:1191
real(sp), dimension(:), allocatable, target bfwtmp
Definition: mod_main.f90:1200
subroutine bcond_ore
Definition: mod_obcs.f90:439
real(sp), dimension(:), allocatable, target wdf_ang
Definition: mod_main.f90:1078
real(sp), dimension(:), allocatable, target wusurf2
Definition: mod_main.f90:1182
real(sp), dimension(:), allocatable, target qevap
Definition: mod_main.f90:1240
subroutine, public update_precipitation(NOW, Qprec, Qevap)
Definition: mod_force.f90:6593
real(sp), dimension(:,:), allocatable, target dz
Definition: mod_main.f90:1092
real(sp), dimension(:), allocatable, target swrad_watts
Definition: mod_main.f90:1173
subroutine bcond_bki(K_RK)
Definition: mod_obcs.f90:404
integer, dimension(:), allocatable, target icellq
Definition: mod_main.f90:1215
subroutine, public update_wind(NOW, wstrx, wstry)
Definition: mod_force.f90:6449
subroutine asimple_drag(spdx, spdy, strx, stry)
Definition: mod_bulk.f90:49
integer, dimension(:,:), allocatable, target nbve
Definition: mod_main.f90:1034
real(sp), dimension(:), allocatable, target vvwind
Definition: mod_main.f90:1233
real(sp), dimension(:), allocatable, target uaf
Definition: mod_main.f90:1105
subroutine bcond_gwi(K_RK)
Definition: mod_obcs.f90:369
real(sp), dimension(:), allocatable, target qprec2
Definition: mod_main.f90:1236
integer, dimension(:), allocatable, target isbce
Definition: mod_main.f90:1027
real(sp), dimension(:), allocatable, target wvsurf_save
Definition: mod_main.f90:1194
subroutine bcond_asl_clp
Definition: mod_obcs.f90:344
subroutine, public update_rivers(NOW, FLUX, TEMP, SALT, WQM, SED, BIO)
Definition: mod_force.f90:6032
real(sp), dimension(:), allocatable, target rbc_geo
Definition: mod_main.f90:1083
subroutine, public update_heat(NOW, HEAT_SWV, HEAT_NET)
Definition: mod_force.f90:6330
real(sp), dimension(:), allocatable, target tdis
Definition: mod_main.f90:1224
real(sp), dimension(:), allocatable, target rbc_wdf
Definition: mod_main.f90:1084
real(sp), dimension(:), allocatable, target wtsurf
Definition: mod_main.f90:1178
integer, dimension(:), allocatable, target inodeq
Definition: mod_main.f90:1214
real(sp), dimension(:), allocatable, target wvsurf
Definition: mod_main.f90:1192
real(sp), dimension(:), allocatable, target uuwind
Definition: mod_main.f90:1232