My Project
adcor.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 SUBROUTINE adcor
40 
41  USE all_vars
42  USE mod_spherical
43  USE mod_northpole
44  USE mod_wd
45 
46 
47  IMPLICIT NONE
48  REAL(SP) :: UFC(0:NT,KB),VFC(0:NT,KB)
49  REAL(SP),PARAMETER :: BETA0=0.5_sp
50  REAL(SP) ::CURCOR,PRECOR
51  INTEGER :: I,K
52  REAL(SP) :: U_TMP,V_TMP,UF_TMP,VF_TMP
53 
54 
55  ufc=0.0_sp
56  vfc=0.0_sp
57 
58  DO i = 1, n
59 
60  DO k = 1, kbm1
61  curcor=beta0*cor(i)*vf(i,k)
62  precor=(1._sp-beta0)*cor(i)*v(i,k)
63  ufc(i,k)=ubeta(i,k)-(curcor+precor)*dt1(i)*dz1(i,k)*art(i)*epor(i)
64  END DO
65 
66  END DO
67 
68  DO i = 1, n
69 
70  DO k = 1, kbm1
71  curcor=beta0*cor(i)*uf(i,k)
72  precor=(1._sp-beta0)*cor(i)*u(i,k)
73  vfc(i,k)=vbeta(i,k)+(curcor+precor)*dt1(i)*dz1(i,k)*art(i)*epor(i)
74  END DO
75 
76  END DO
77 
78  DO i=1,n
79  DO k=1,kbm1
80  uf(i,k)=u(i,k)*dt1(i)/d1(i)-dti*ufc(i,k)/art(i)/(d1(i)*dz1(i,k))
81  vf(i,k)=v(i,k)*dt1(i)/d1(i)-dti*vfc(i,k)/art(i)/(d1(i)*dz1(i,k))
82  END DO
83  END DO
84 
85  DO i =1,n
86  IF(iswetct(i)*iswetc(i) .NE. 1)THEN
87  DO k=1,kbm1
88  uf(i,k)=0.0_sp
89  vf(i,k)=0.0_sp
90  END DO
91  END IF
92  END DO
93 
94  RETURN
95  END SUBROUTINE adcor
real(sp), dimension(:), allocatable, target epor
Definition: mod_main.f90:1056
real(sp), dimension(:), allocatable, target cor
Definition: mod_main.f90:1113
real(sp), dimension(:), allocatable, target d1
Definition: mod_main.f90:1116
real(sp), dimension(:), allocatable, target art
Definition: mod_main.f90:1009
real(sp), dimension(:,:), allocatable, target v
Definition: mod_main.f90:1269
integer, dimension(:), allocatable iswetct
Definition: mod_wd.f90:54
real(sp), dimension(:,:), allocatable, target vf
Definition: mod_main.f90:1282
real(sp), dimension(:,:), allocatable, target u
Definition: mod_main.f90:1268
real(sp), dimension(:,:), allocatable, target vbeta
Definition: mod_main.f90:1272
real(sp), dimension(:,:), allocatable, target uf
Definition: mod_main.f90:1281
real(sp), dimension(:,:), allocatable, target ubeta
Definition: mod_main.f90:1271
subroutine adcor
Definition: adcor.f90:40
integer, dimension(:), allocatable iswetc
Definition: mod_wd.f90:52
real(sp), dimension(:), allocatable, target dt1
Definition: mod_main.f90:1117
real(sp), dimension(:,:), allocatable, target dz1
Definition: mod_main.f90:1096