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

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

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


Revision 1.5 - (show annotations) (download)
Wed Sep 26 18:09:16 2001 UTC (22 years, 8 months ago) by cnh
Branch: MAIN
CVS Tags: checkpoint44e_post, checkpoint46g_pre, release1_p13_pre, checkpoint46f_post, checkpoint44f_post, checkpoint46b_post, checkpoint43a-release1mods, release1_p13, chkpt44d_post, release1_p8, release1_p9, release1_p1, release1_p2, release1_p3, release1_p4, release1_p5, release1_p6, release1_p7, checkpoint44e_pre, release1_b1, checkpoint43, release1_chkpt44d_post, release1_p11, icebear5, icebear4, icebear3, icebear2, checkpoint46d_pre, release1-branch_tutorials, checkpoint45d_post, checkpoint46j_pre, chkpt44a_post, checkpoint44h_pre, checkpoint46a_post, chkpt44c_pre, checkpoint45a_post, ecco_c44_e19, ecco_c44_e18, ecco_c44_e17, ecco_c44_e16, release1_p12, release1_p10, release1_p16, release1_p17, release1_p14, release1_p15, checkpoint44g_post, checkpoint46e_pre, checkpoint45b_post, checkpoint46b_pre, release1-branch-end, release1_final_v1, checkpoint46c_pre, checkpoint46, checkpoint44b_post, checkpoint46h_pre, checkpoint46a_pre, checkpoint45c_post, ecco_ice2, ecco_ice1, checkpoint44h_post, checkpoint46g_post, release1_p12_pre, ecco_c44_e22, ecco_c44_e25, chkpt44a_pre, checkpoint46i_post, ecco_c44_e23, ecco_c44_e20, ecco_c44_e21, ecco_c44_e26, ecco_c44_e27, ecco_c44_e24, checkpoint46c_post, ecco-branch-mod1, ecco-branch-mod2, ecco-branch-mod3, ecco-branch-mod4, ecco-branch-mod5, checkpoint46e_post, release1_beta1, checkpoint44b_pre, checkpoint42, checkpoint41, checkpoint44, checkpoint45, checkpoint46h_post, chkpt44c_post, checkpoint44f_pre, checkpoint46d_post, release1-branch_branchpoint
Branch point for: c24_e25_ice, release1_final, release1-branch, release1, ecco-branch, release1_50yr, icebear, release1_coupled
Changes since 1.4: +15 -3 lines
Bringing comments up to data and formatting for document extraction.

1 C $Header: /u/gcmpack/models/MITgcmUV/model/src/ini_vel.F,v 1.4 2001/08/28 12:58:10 adcroft Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: INI_VEL
8 C !INTERFACE:
9 SUBROUTINE INI_VEL( myThid )
10
11 C !DESCRIPTION: \bv
12 C *=================================================================
13 C | SUBROUTINE INI_VEL
14 C | o Initialize 3D flow field (either to zero or from input files)
15 C *=================================================================
16 C \ev
17
18 C !USES:
19 IMPLICIT NONE
20 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 C !INPUT/OUTPUT PARAMETERS:
28 C == Routine arguments ==
29 C myThid - Number of this instance of INI_UVEL
30 INTEGER myThid
31
32 C !LOCAL VARIABLES:
33 C == Local variables ==
34 C bi,bj,i,j,k - Loop counters
35 INTEGER bi,bj,i,j,k
36 CEOP
37
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 uVel(i,j,k,bi,bj)=0. _d 0
51 vVel(i,j,k,bi,bj)=0. _d 0
52 wVel(i,j,k,bi,bj)=0. _d 0
53 ENDDO
54 ENDDO
55 ENDDO
56 ENDDO
57 ENDDO
58
59 C Read an initial state for each component if required
60 IF (uVelInitFile .NE. ' ') THEN
61 _BEGIN_MASTER( myThid )
62 CALL READ_FLD_XYZ_RL( uVelInitFile, ' ', uVel, 0, myThid )
63 _END_MASTER(myThid)
64 c _EXCH_XYZ_R8(uVel , myThid )
65 ENDIF
66
67 IF (vVelInitFile .NE. ' ') THEN
68 _BEGIN_MASTER( myThid )
69 CALL READ_FLD_XYZ_RL( vVelInitFile, ' ', vVel, 0, myThid )
70 _END_MASTER(myThid)
71 c _EXCH_XYZ_R8(vVel , myThid )
72 ENDIF
73
74 c IF (uVelInitFile .NE. ' ' .OR. vVelInitFile .NE. ' ') THEN
75 CALL EXCH_UV_XYZ_RL(uVel,vVel,.TRUE.,myThid)
76 _EXCH_XYZ_R8(wVel,myThid)
77 c ENDIF
78
79 DO bj = myByLo(myThid), myByHi(myThid)
80 DO bi = myBxLo(myThid), myBxHi(myThid)
81 DO k=1,Nr
82 DO j=1-Oly,sNy+Oly
83 DO i=1-Olx,sNx+Olx
84 uVel(i,j,k,bi,bj)=uVel(i,j,k,bi,bj)*_maskW(i,j,k,bi,bj)
85 vVel(i,j,k,bi,bj)=vVel(i,j,k,bi,bj)*_maskS(i,j,k,bi,bj)
86 ENDDO
87 ENDDO
88 CALL INTEGRATE_FOR_W(
89 I bi, bj, k, uVel, vVel,
90 O wVel,
91 I myThid )
92 ENDDO
93 ENDDO
94 ENDDO
95
96 RETURN
97 END

  ViewVC Help
Powered by ViewVC 1.1.22