/[MITgcm]/MITgcm/verification/advect_xz/code/ini_vel.F
ViewVC logotype

Annotation of /MITgcm/verification/advect_xz/code/ini_vel.F

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


Revision 1.1 - (hide annotations) (download)
Fri Sep 28 02:28:10 2001 UTC (22 years, 7 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint46b_post, checkpoint48f_post, checkpoint46k_post, checkpoint47j_post, checkpoint48d_pre, branch-exfmods-tag, checkpoint47e_post, checkpoint44h_pre, checkpoint47i_post, checkpoint48i_post, release1_p12, release1_p13, release1_p10, release1_p16, release1_p15, release1_p11, checkpoint47f_post, checkpoint48d_post, checkpoint46j_post, checkpoint47c_post, checkpoint50e_post, checkpoint50c_post, checkpoint47d_post, checkpoint44e_post, checkpoint44f_pre, checkpoint47a_post, checkpoint46c_post, checkpoint46f_post, checkpoint46l_pre, checkpoint46a_post, checkpoint48a_post, checkpoint46n_post, release1_beta1, checkpoint46d_pre, checkpoint48e_post, checkpoint46e_post, checkpoint48h_post, checkpoint50c_pre, release1-branch_tutorials, release1_p14, checkpoint44g_post, checkpoint46h_pre, checkpoint44h_post, checkpoint46l_post, checkpoint46e_pre, checkpoint43a-release1mods, checkpoint50d_pre, checkpoint45d_post, checkpoint46j_pre, checkpoint45b_post, checkpoint46b_pre, checkpoint47h_post, checkpoint48c_post, chkpt44a_pre, release1-branch-end, release1_final_v1, checkpoint46, checkpoint44, checkpoint45, checkpoint48, checkpoint49, checkpoint44f_post, checkpoint47b_post, checkpoint48g_post, release1_p17, release1_b1, checkpoint44b_post, chkpt44d_post, checkpoint50, release1_p8, release1_p9, checkpoint50d_post, checkpoint46m_post, checkpoint46g_pre, release1_p2, release1_p3, release1_p4, release1_p6, checkpoint47g_post, chkpt44a_post, checkpoint44b_pre, release1_p1, checkpoint46a_pre, checkpoint45c_post, release1_p5, checkpoint44e_pre, chkpt44c_pre, release1_p7, checkpoint46d_post, checkpoint48b_post, checkpoint50b_post, checkpoint46g_post, release1_p13_pre, release1_p12_pre, checkpoint45a_post, checkpoint50a_post, checkpoint46c_pre, checkpoint43, checkpoint47d_pre, checkpoint48c_pre, release1-branch_branchpoint, checkpoint46i_post, checkpoint47, chkpt44c_post, checkpoint46h_post, checkpoint50e_pre, release1_chkpt44d_post, checkpoint50b_pre
Branch point for: release1_coupled, release1_final, release1-branch, release1, release1_50yr, branch-exfmods-curt
Adding test of advection schemes with lopped cells. 2-D x-z

1 adcroft 1.1 C $Header: /u/gcmpack/models/MITgcmUV/model/src/Attic/ini_vel.F,v 1.1.2.2 2001/04/09 19:15:33 adcroft 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     _RL psi,Lfac,Rpi
27     psi(i,j,k,bi,bj)=Lfac*sin(XG(i,j,bi,bj)*Rpi/Lfac)
28     & *sin( max(RF(k),R_low(i,j,bi,bj))*Rpi*recip_Rcol(i,j,bi,bj))
29    
30     Rpi=3.14159265358979
31     Lfac=(DELX(1)*float(Nx))
32    
33    
34     C-- Initialise velocity fields to zero
35     C
36     C If you want to specify an analytic initial state for the flow
37     C field then customize the following section of code.
38     C It is, however, often easier to generate initial conditions
39     C off-line and read them from input files...
40     C
41     DO bj = myByLo(myThid), myByHi(myThid)
42     DO bi = myBxLo(myThid), myBxHi(myThid)
43     DO k=1,Nr
44     DO j=1-Oly,sNy+Oly
45     DO i=1-Olx,sNx+Olx
46     uVel (I,J,K,bi,bj) = 0. _d 0
47     & + (psi(I,J,K,bi,bj)-psi(I,J,K+1,bi,bj))*recip_dRF(k)
48     & *recip_hFacW(i,j,k,bi,bj)
49    
50     vVel(i,j,k,bi,bj)=0.
51     wVel(i,j,k,bi,bj)=0.
52     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     DO bj = myByLo(myThid), myByHi(myThid)
74     DO bi = myBxLo(myThid), myBxHi(myThid)
75     DO k=1,Nr
76     DO j=1-Oly,sNy+Oly
77     DO i=1-Olx,sNx+Olx
78     uVel(i,j,k,bi,bj)=uVel(i,j,k,bi,bj)*_maskW(i,j,k,bi,bj)
79     vVel(i,j,k,bi,bj)=vVel(i,j,k,bi,bj)*_maskS(i,j,k,bi,bj)
80     ENDDO
81     ENDDO
82     CALL INTEGRATE_FOR_W(
83     I bi, bj, k, uVel, vVel,
84     O wVel,
85     I myThid )
86     ENDDO
87     ENDDO
88     ENDDO
89    
90     c IF (uVelInitFile .NE. ' ' .OR. vVelInitFile .NE. ' ') THEN
91     CALL EXCH_UV_XYZ_RL(uVel,vVel,.TRUE.,myThid)
92     _EXCH_XYZ_R8(wVel,myThid)
93     c ENDIF
94    
95     RETURN
96     END

  ViewVC Help
Powered by ViewVC 1.1.22