/[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.4 - (hide annotations) (download)
Mon May 25 16:17:36 1998 UTC (25 years, 11 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint5, checkpoint4, checkpoint3
Changes since 1.3: +3 -3 lines
Added changes to support implicit free-surface.
 - included gBaro a "barotropic" gravity that can
   be set differently to the g.rhoprime gravity.
 - discovered and fixed coding error in dynamics
   loop. Per tile temporaries that needed correct
   initial values were not being reset for each tile.

1 cnh 1.4 C $Header: /u/gcmpack/models/MITgcmUV/model/src/ini_forcing.F,v 1.3 1998/05/20 19:59:13 adcroft 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     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)/lY
62 adcroft 1.3 tauX = -tauMax*cos(2. _d 0*PI*distY)
63 cnh 1.4 tauX = tauMax*sin(PI*distY)
64 cnh 1.1 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 cnh 1.4 fu(4,4,1,1) = fu(4,4,1,1)*0.917d0
71 cnh 1.1 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

  ViewVC Help
Powered by ViewVC 1.1.22