/[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.14 - (hide annotations) (download)
Wed Dec 9 16:11:52 1998 UTC (25 years, 5 months ago) by adcroft
Branch: MAIN
Changes since 1.13: +2 -1 lines
Added IMPLICIT NONE in a lot of subroutines.
Also corrected the recip_Rhonil bug: we didn't set it in ini_parms.F

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

  ViewVC Help
Powered by ViewVC 1.1.22