/[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.3 - (hide annotations) (download)
Fri Jul 13 14:26:57 2001 UTC (22 years, 10 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint40pre3, checkpoint40pre7, checkpoint40pre6, checkpoint40pre8, checkpoint40pre2, checkpoint40pre4, checkpoint40pre5
Changes since 1.2: +5 -5 lines
o Added grdchk package handling
o Added passive tracer handling

1 heimbach 1.3 C $Header: /u/gcmpack/models/MITgcmUV/model/src/ini_vel.F,v 1.2 2001/05/29 14:01:37 adcroft Exp $
2     C $Name: checkpoint40pre1 $
3 adcroft 1.2
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 heimbach 1.3 uVel(i,j,k,bi,bj)=0. _d 0
39     vVel(i,j,k,bi,bj)=0. _d 0
40     wVel(i,j,k,bi,bj)=0. _d 0
41 adcroft 1.2 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     c _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     c _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     c IF (uVelInitFile .NE. ' ' .OR. vVelInitFile .NE. ' ') THEN
80     CALL EXCH_UV_XYZ_RL(uVel,vVel,.TRUE.,myThid)
81     _EXCH_XYZ_R8(wVel,myThid)
82     c ENDIF
83    
84     RETURN
85     END

  ViewVC Help
Powered by ViewVC 1.1.22