/[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.10 - (hide annotations) (download)
Wed Jun 17 21:07:02 1998 UTC (25 years, 11 months ago) by adcroft
Branch: MAIN
Changes since 1.9: +14 -41 lines
Introduced time-dependant forcing, loaded and interpolated in
load_external_fields.F in a subroutine load_interpolate_forcing().
Control is by one logical and two real variables in PARAMS.h:
periodicExternalForcing, externForcingCycle and externForcingPeriod.
The code in load_external_fields.F is "customized" so needs to
be edited for non-global type runs. We'll tidy it up later.

1 adcroft 1.10 C $Header: /u/gcmpack/models/MITgcmUV/model/src/ini_forcing.F,v 1.9 1998/06/15 05:13:56 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 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 cnh 1.6 fu(4,4,1,1) = fu(4,4,1,1)*0.917d0
74     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

  ViewVC Help
Powered by ViewVC 1.1.22