1 |
cnh |
1.12 |
C $Header: /u/gcmpack/models/MITgcmUV/model/src/ini_forcing.F,v 1.11 1998/06/22 15:26:25 adcroft Exp $ |
2 |
cnh |
1.1 |
|
3 |
cnh |
1.12 |
#include "CPP_OPTIONS.h" |
4 |
cnh |
1.1 |
|
5 |
|
|
CStartOfInterface |
6 |
|
|
SUBROUTINE INI_FORCING( myThid ) |
7 |
|
|
C /==========================================================\ |
8 |
|
|
C | SUBROUTINE INI_FORCING | |
9 |
|
|
C | o Set model initial forcing fields. | |
10 |
|
|
C \==========================================================/ |
11 |
|
|
|
12 |
|
|
C === Global variables === |
13 |
|
|
#include "SIZE.h" |
14 |
|
|
#include "EEPARAMS.h" |
15 |
|
|
#include "PARAMS.h" |
16 |
|
|
#include "GRID.h" |
17 |
|
|
#include "FFIELDS.h" |
18 |
|
|
|
19 |
|
|
C == Routine arguments == |
20 |
|
|
C myThid - Number of this instance of INI_FORCING |
21 |
|
|
INTEGER myThid |
22 |
|
|
CEndOfInterface |
23 |
|
|
|
24 |
|
|
C == Local variables == |
25 |
|
|
C iG, jG - Global coordinate index |
26 |
|
|
C bi,bj - Loop counters |
27 |
|
|
C I,J,K |
28 |
|
|
C distY - Distance accross domain of point j |
29 |
|
|
C lY - Width of the basin ( last point is land ) |
30 |
|
|
C tauMax - Peak zonal wind stress ( N/m^2 ) |
31 |
|
|
C tauX - Local zonal wind stress |
32 |
|
|
INTEGER iG, jG |
33 |
|
|
INTEGER bi, bj |
34 |
|
|
INTEGER I, J, K |
35 |
|
|
_RL distY |
36 |
|
|
_RL lY |
37 |
|
|
_RL tauX, tauMax |
38 |
|
|
|
39 |
cnh |
1.6 |
_BARRIER |
40 |
|
|
|
41 |
adcroft |
1.10 |
DO bj = myByLo(myThid), myByHi(myThid) |
42 |
|
|
DO bi = myBxLo(myThid), myBxHi(myThid) |
43 |
|
|
DO j=1-OLy,sNy+OLy |
44 |
|
|
DO i=1-OLx,sNx+OLx |
45 |
|
|
fu(i,j,bi,bj) = 0. _d 0 |
46 |
|
|
fv(i,j,bi,bj) = 0. _d 0 |
47 |
|
|
ENDDO |
48 |
|
|
ENDDO |
49 |
|
|
ENDDO |
50 |
|
|
ENDDO |
51 |
|
|
|
52 |
cnh |
1.1 |
C-- Initialise surface bc arrays |
53 |
cnh |
1.6 |
IF ( zonalWindFile .EQ. ' ' ) THEN |
54 |
|
|
C In cartesian yc, delY and ly are meters. |
55 |
|
|
C In spherical polar yc, delY and ly are degrees |
56 |
|
|
tauMax = 0.1 _d 0 |
57 |
|
|
lY = 0. _d 0 |
58 |
|
|
DO j=1,nY-1 |
59 |
|
|
lY = lY + delY(j) |
60 |
|
|
ENDDO |
61 |
|
|
DO bj = myByLo(myThid), myByHi(myThid) |
62 |
|
|
DO bi = myBxLo(myThid), myBxHi(myThid) |
63 |
|
|
DO j=1,sNy |
64 |
|
|
DO i=1,sNx |
65 |
|
|
distY = (yC(i,j,bi,bj)-yC0)/lY |
66 |
adcroft |
1.10 |
C tauX = -tauMax*cos(2. _d 0*PI*distY) |
67 |
cnh |
1.6 |
tauX = tauMax*sin(PI*distY) |
68 |
|
|
fu(i,j,bi,bj) = tauX/(delZ(1)*rhonil) |
69 |
|
|
ENDDO |
70 |
cnh |
1.1 |
ENDDO |
71 |
|
|
ENDDO |
72 |
|
|
ENDDO |
73 |
adcroft |
1.11 |
C fu(4,4,1,1) = fu(4,4,1,1)*0.917d0 |
74 |
cnh |
1.6 |
ENDIF |
75 |
|
|
C |
76 |
|
|
_BARRIER |
77 |
|
|
|
78 |
|
|
IF ( meridWindFile .EQ. ' ' ) THEN |
79 |
|
|
DO bj = myByLo(myThid), myByHi(myThid) |
80 |
|
|
DO bi = myBxLo(myThid), myBxHi(myThid) |
81 |
|
|
DO j=1-OLy,sNy+OLy |
82 |
|
|
DO i=1-OLx,sNx+OLx |
83 |
adcroft |
1.10 |
fv(i,j,bi,bj) = 0./(delZ(1)*rhonil) |
84 |
cnh |
1.7 |
ENDDO |
85 |
|
|
ENDDO |
86 |
|
|
ENDDO |
87 |
|
|
ENDDO |
88 |
cnh |
1.6 |
ENDIF |
89 |
cnh |
1.1 |
C |
90 |
|
|
_EXCH_XY_R4(fu , myThid ) |
91 |
|
|
_EXCH_XY_R4(fv , myThid ) |
92 |
|
|
|
93 |
cnh |
1.9 |
CALL PLOT_FIELD_XYRS( fu, 'S/R INI_FORCING FU',1,myThid) |
94 |
|
|
CALL PLOT_FIELD_XYRS( fv, 'S/R INI_FORCING FV',1,myThid) |
95 |
cnh |
1.1 |
|
96 |
|
|
RETURN |
97 |
|
|
END |