/[MITgcm]/MITgcm/model/src/ini_forcing.F
ViewVC logotype

Annotation of /MITgcm/model/src/ini_forcing.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.9 - (hide annotations) (download)
Mon Jun 15 05:13:56 1998 UTC (25 years, 11 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint7
Branch point for: checkpoint7-4degree-ref
Changes since 1.8: +5 -10 lines
Fairly coplete 4 degree global intercomparison
setup.
 Includes changes to make convective adjustment and hydrostatic
pressure correct as well as IO for climatological datasets

1 cnh 1.9 C $Header: /u/gcmpack/models/MITgcmUV/model/src/ini_forcing.F,v 1.8 1998/06/12 19:33:33 cnh Exp $
2 cnh 1.1
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 cnh 1.6 _BARRIER
40    
41 cnh 1.1 C-- Initialise surface bc arrays
42 cnh 1.6 IF ( zonalWindFile .EQ. ' ' ) THEN
43     C In cartesian yc, delY and ly are meters.
44     C In spherical polar yc, delY and ly are degrees
45     tauMax = 0.1 _d 0
46     lY = 0. _d 0
47     DO j=1,nY-1
48     lY = lY + delY(j)
49     ENDDO
50     DO bj = myByLo(myThid), myByHi(myThid)
51     DO bi = myBxLo(myThid), myBxHi(myThid)
52     DO j=1-OLy,sNy+OLy
53     DO i=1-OLx,sNx+OLx
54     fu(i,j,bi,bj) = 0. _d 0
55     fv(i,j,bi,bj) = 0. _d 0
56     ENDDO
57     ENDDO
58     ENDDO
59     ENDDO
60     DO bj = myByLo(myThid), myByHi(myThid)
61     DO bi = myBxLo(myThid), myBxHi(myThid)
62     DO j=1,sNy
63     DO i=1,sNx
64     distY = (yC(i,j,bi,bj)-yC0)/lY
65     tauX = -tauMax*cos(2. _d 0*PI*distY)
66     tauX = tauMax*sin(PI*distY)
67     fu(i,j,bi,bj) = tauX/(delZ(1)*rhonil)
68     C fu(i,j,bi,bj) = -tauMax
69     ENDDO
70 cnh 1.1 ENDDO
71     ENDDO
72     ENDDO
73 cnh 1.6 fu(4,4,1,1) = fu(4,4,1,1)*0.917d0
74     ELSE
75     _BEGIN_MASTER(myThid)
76     CALL READ_FLD_XY_RS( zonalWindFile, ' ', fu, 0, myThid )
77 cnh 1.7 DO bj = myByLo(myThid), myByHi(myThid)
78     DO bi = myBxLo(myThid), myBxHi(myThid)
79     DO j=1,sNy
80     DO i=1,sNx
81 cnh 1.8 fu(i,j,bi,bj) = fu(i,j,bi,bj)/(delZ(1)*rhonil)*0.1
82 cnh 1.9 fu(i,j,bi,bj) = 0.1/(delZ(1)*rhonil)
83 cnh 1.7 ENDDO
84     ENDDO
85     ENDDO
86     ENDDO
87 cnh 1.6 _END_MASTER(myThid)
88     ENDIF
89     C
90     _BARRIER
91    
92     IF ( meridWindFile .EQ. ' ' ) THEN
93     DO bj = myByLo(myThid), myByHi(myThid)
94     DO bi = myBxLo(myThid), myBxHi(myThid)
95     DO j=1-OLy,sNy+OLy
96     DO i=1-OLx,sNx+OLx
97     fv(i,j,bi,bj) = 0. _d 0
98     ENDDO
99 cnh 1.1 ENDDO
100     ENDDO
101     ENDDO
102 cnh 1.6 ELSE
103     _BEGIN_MASTER(myThid)
104     CALL READ_FLD_XY_RS( meridWindFile, ' ', fv, 0, myThid )
105 cnh 1.7 DO bj = myByLo(myThid), myByHi(myThid)
106     DO bi = myBxLo(myThid), myBxHi(myThid)
107     DO j=1,sNy
108     DO i=1,sNx
109 cnh 1.9 fv(i,j,bi,bj) = fv(i,j,bi,bj)/(delZ(1)*rhonil)*0.
110 cnh 1.7 ENDDO
111     ENDDO
112     ENDDO
113     ENDDO
114 cnh 1.6 _END_MASTER(myThid)
115     ENDIF
116 cnh 1.1 C
117     _EXCH_XY_R4(fu , myThid )
118     _EXCH_XY_R4(fv , myThid )
119    
120 cnh 1.9 CALL PLOT_FIELD_XYRS( fu, 'S/R INI_FORCING FU',1,myThid)
121     CALL PLOT_FIELD_XYRS( fv, 'S/R INI_FORCING FV',1,myThid)
122 cnh 1.1
123     RETURN
124     END

  ViewVC Help
Powered by ViewVC 1.1.22