/[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.5.6.2 - (hide annotations) (download)
Tue Jun 24 23:05:29 2003 UTC (20 years, 10 months ago) by heimbach
Branch: ecco-branch
CVS Tags: ecco_c51_e34d, ecco_c51_e34e, ecco_c51_e34f, ecco_c51_e34g, ecco_c51_e34a, ecco_c51_e34b, ecco_c51_e34c, ecco_c51_e34
Changes since 1.5.6.1: +0 -0 lines
Merging from c51

1 heimbach 1.5.6.1 C $Header: /u/gcmpack/MITgcm/model/src/ini_vel.F,v 1.6 2002/10/07 16:24:45 jmc Exp $
2 adcroft 1.4 C $Name: $
3 adcroft 1.2
4     #include "CPP_OPTIONS.h"
5    
6 cnh 1.5 CBOP
7     C !ROUTINE: INI_VEL
8     C !INTERFACE:
9 adcroft 1.2 SUBROUTINE INI_VEL( myThid )
10    
11 cnh 1.5 C !DESCRIPTION: \bv
12     C *=================================================================
13     C | SUBROUTINE INI_VEL
14 heimbach 1.5.6.1 C | o Initialize flow field (either to zero or from input files)
15 cnh 1.5 C *=================================================================
16     C \ev
17 adcroft 1.2
18 cnh 1.5 C !USES:
19     IMPLICIT NONE
20 adcroft 1.2 C === Global variables ===
21     #include "SIZE.h"
22     #include "EEPARAMS.h"
23     #include "PARAMS.h"
24     #include "GRID.h"
25     #include "DYNVARS.h"
26    
27 cnh 1.5 C !INPUT/OUTPUT PARAMETERS:
28 adcroft 1.2 C == Routine arguments ==
29 heimbach 1.5.6.1 C myThid - Number of this instance of INI_VEL
30 adcroft 1.2 INTEGER myThid
31    
32 cnh 1.5 C !LOCAL VARIABLES:
33 adcroft 1.2 C == Local variables ==
34     C bi,bj,i,j,k - Loop counters
35     INTEGER bi,bj,i,j,k
36 cnh 1.5 CEOP
37 adcroft 1.2
38     C-- Initialise velocity fields to zero
39     C
40     C If you want to specify an analytic initial state for the flow
41     C field then customize the following section of code.
42     C It is, however, often easier to generate initial conditions
43     C off-line and read them from input files...
44     C
45     DO bj = myByLo(myThid), myByHi(myThid)
46     DO bi = myBxLo(myThid), myBxHi(myThid)
47     DO k=1,Nr
48     DO j=1-Oly,sNy+Oly
49     DO i=1-Olx,sNx+Olx
50 heimbach 1.3 uVel(i,j,k,bi,bj)=0. _d 0
51     vVel(i,j,k,bi,bj)=0. _d 0
52 adcroft 1.2 ENDDO
53     ENDDO
54     ENDDO
55     ENDDO
56     ENDDO
57    
58     C Read an initial state for each component if required
59     IF (uVelInitFile .NE. ' ') THEN
60     _BEGIN_MASTER( myThid )
61     CALL READ_FLD_XYZ_RL( uVelInitFile, ' ', uVel, 0, myThid )
62     _END_MASTER(myThid)
63     c _EXCH_XYZ_R8(uVel , myThid )
64     ENDIF
65    
66     IF (vVelInitFile .NE. ' ') THEN
67     _BEGIN_MASTER( myThid )
68     CALL READ_FLD_XYZ_RL( vVelInitFile, ' ', vVel, 0, myThid )
69     _END_MASTER(myThid)
70     c _EXCH_XYZ_R8(vVel , myThid )
71     ENDIF
72    
73 adcroft 1.4 c IF (uVelInitFile .NE. ' ' .OR. vVelInitFile .NE. ' ') THEN
74     CALL EXCH_UV_XYZ_RL(uVel,vVel,.TRUE.,myThid)
75     c ENDIF
76    
77 adcroft 1.2 DO bj = myByLo(myThid), myByHi(myThid)
78     DO bi = myBxLo(myThid), myBxHi(myThid)
79     DO k=1,Nr
80     DO j=1-Oly,sNy+Oly
81     DO i=1-Olx,sNx+Olx
82     uVel(i,j,k,bi,bj)=uVel(i,j,k,bi,bj)*_maskW(i,j,k,bi,bj)
83     vVel(i,j,k,bi,bj)=vVel(i,j,k,bi,bj)*_maskS(i,j,k,bi,bj)
84     ENDDO
85     ENDDO
86     ENDDO
87     ENDDO
88     ENDDO
89    
90     RETURN
91     END

  ViewVC Help
Powered by ViewVC 1.1.22