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

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

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


Revision 1.1.2.1 - (hide annotations) (download)
Fri Mar 16 16:48:34 2001 UTC (23 years, 2 months ago) by adcroft
Branch: pre38
Changes since 1.1: +80 -0 lines
Grouped initialization of G's into one routine and joined
ini_uvel and ini_vvel into ini_vel (which sets U,V,W).

1 adcroft 1.1.2.1 C $Header: /u/gcmpack/models/MITgcmUV/model/src/ini_uvel.F,v 1.11 2001/02/04 14:38:48 cnh Exp $
2     C $Name: $
3    
4     #include "CPP_OPTIONS.h"
5    
6     SUBROUTINE INI_VEL( myThid )
7     IMPLICIT NONE
8    
9     C Initialize 3D flow field (either to zero or from input files)
10    
11     C === Global variables ===
12     #include "SIZE.h"
13     #include "EEPARAMS.h"
14     #include "PARAMS.h"
15     #include "GRID.h"
16     #include "DYNVARS.h"
17    
18     C == Routine arguments ==
19     C myThid - Number of this instance of INI_UVEL
20     INTEGER myThid
21    
22     C == Local variables ==
23     C bi,bj,i,j,k - Loop counters
24     INTEGER bi,bj,i,j,k
25    
26     C-- Initialise velocity fields to zero
27     C
28     C If you want to specify an analytic initial state for the flow
29     C field then customize the following section of code.
30     C It is, however, often easier to generate initial conditions
31     C off-line and read them from input files...
32     C
33     DO bj = myByLo(myThid), myByHi(myThid)
34     DO bi = myBxLo(myThid), myBxHi(myThid)
35     DO k=1,Nr
36     DO j=1-Oly,sNy+Oly
37     DO i=1-Olx,sNx+Olx
38     uVel(i,j,k,bi,bj)=0.
39     vVel(i,j,k,bi,bj)=0.
40     wVel(i,j,k,bi,bj)=0.
41     ENDDO
42     ENDDO
43     ENDDO
44     ENDDO
45     ENDDO
46    
47     C Read an initial state for each component if required
48     IF (uVelInitFile .NE. ' ') THEN
49     _BEGIN_MASTER( myThid )
50     CALL READ_FLD_XYZ_RL( uVelInitFile, ' ', uVel, 0, myThid )
51     _END_MASTER(myThid)
52     _EXCH_XYZ_R8(uVel , myThid )
53     ENDIF
54    
55     IF (vVelInitFile .NE. ' ') THEN
56     _BEGIN_MASTER( myThid )
57     CALL READ_FLD_XYZ_RL( vVelInitFile, ' ', vVel, 0, myThid )
58     _END_MASTER(myThid)
59     _EXCH_XYZ_R8(vVel , myThid )
60     ENDIF
61    
62     DO bj = myByLo(myThid), myByHi(myThid)
63     DO bi = myBxLo(myThid), myBxHi(myThid)
64     DO k=1,Nr
65     DO j=1-Oly,sNy+Oly
66     DO i=1-Olx,sNx+Olx
67     uVel(i,j,k,bi,bj)=uVel(i,j,k,bi,bj)*_maskW(i,j,k,bi,bj)
68     vVel(i,j,k,bi,bj)=vVel(i,j,k,bi,bj)*_maskS(i,j,k,bi,bj)
69     ENDDO
70     ENDDO
71     CALL INTEGRATE_FOR_W(
72     I bi, bj, k, uVel, vVel,
73     O wVel,
74     I myThid )
75     ENDDO
76     ENDDO
77     ENDDO
78    
79     RETURN
80     END

  ViewVC Help
Powered by ViewVC 1.1.22