1 |
C $Header: /u/gcmpack/models/MITgcmUV/model/src/ini_forcing.F,v 1.4 1998/05/25 16:17:36 cnh Exp $ |
2 |
|
3 |
#include "CPP_EEOPTIONS.h" |
4 |
|
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 |
C-- Initialise surface bc arrays |
40 |
C In cartesian yc, delY and ly are meters. |
41 |
C In spherical polar yc, delY and ly are degrees |
42 |
tauMax = 0.1 _d 0 |
43 |
lY = 0. _d 0 |
44 |
DO j=1,nY-1 |
45 |
lY = lY + delY(j) |
46 |
ENDDO |
47 |
DO bj = myByLo(myThid), myByHi(myThid) |
48 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
49 |
DO j=1-OLy,sNy+OLy |
50 |
DO i=1-OLx,sNx+OLx |
51 |
fu(i,j,bi,bj) = 0. _d 0 |
52 |
fv(i,j,bi,bj) = 0. _d 0 |
53 |
ENDDO |
54 |
ENDDO |
55 |
ENDDO |
56 |
ENDDO |
57 |
DO bj = myByLo(myThid), myByHi(myThid) |
58 |
DO bi = myBxLo(myThid), myBxHi(myThid) |
59 |
DO j=1,sNy |
60 |
DO i=1,sNx |
61 |
distY = (yC(i,j,bi,bj)-yC0)/lY |
62 |
tauX = -tauMax*cos(2. _d 0*PI*distY) |
63 |
tauX = tauMax*sin(PI*distY) |
64 |
fu(i,j,bi,bj) = tauX/(delZ(1)*rhonil) |
65 |
C fu(i,j,bi,bj) = -tauMax |
66 |
ENDDO |
67 |
ENDDO |
68 |
ENDDO |
69 |
ENDDO |
70 |
fu(4,4,1,1) = fu(4,4,1,1)*0.917d0 |
71 |
C |
72 |
_EXCH_XY_R4(fu , myThid ) |
73 |
_EXCH_XY_R4(fv , myThid ) |
74 |
|
75 |
CcnhDebugStarts |
76 |
Cdbg WRITE(0,*) ' distY = ', distY |
77 |
Cdbg WRITE(0,*) ' ly = ', lY |
78 |
Cdbg WRITE(0,*) ' tauMax= ', tauMax |
79 |
Cdbg CALL PLOT_FIELD_XYR8( fu, 'INI_FORCING FU',1,myThid) |
80 |
Cdbg STOP 'INI_FORCING' |
81 |
CcnhDebugEnds |
82 |
|
83 |
RETURN |
84 |
END |