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

Annotation of /MITgcm/verification/advect_cs/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:30:09 2001 UTC (22 years, 7 months ago) by adcroft
Branch: MAIN
CVS Tags: checkpoint46n_post, checkpoint47e_post, checkpoint46l_post, checkpoint46g_pre, checkpoint47c_post, release1_p13_pre, checkpoint46f_post, checkpoint44f_post, checkpoint46b_post, checkpoint43a-release1mods, release1_p13, checkpoint46l_pre, chkpt44d_post, release1_p8, release1_p9, release1_p1, release1_p2, release1_p3, release1_p4, release1_p5, release1_p6, release1_p7, checkpoint44e_pre, release1_b1, checkpoint48b_post, checkpoint43, checkpoint48c_pre, checkpoint47d_pre, release1_chkpt44d_post, checkpoint47a_post, checkpoint48d_pre, checkpoint47i_post, checkpoint47d_post, checkpoint46d_pre, checkpoint48d_post, release1-branch_tutorials, checkpoint45d_post, checkpoint46j_pre, chkpt44a_post, checkpoint44h_pre, checkpoint46a_post, checkpoint47g_post, checkpoint46j_post, checkpoint46k_post, checkpoint46b_pre, chkpt44c_pre, checkpoint48a_post, checkpoint45a_post, checkpoint44e_post, release1_p12, release1_p10, release1_p11, release1_p16, release1_p17, release1_p14, release1_p15, checkpoint47j_post, branch-exfmods-tag, checkpoint44g_post, checkpoint46e_pre, checkpoint48c_post, checkpoint45b_post, release1-branch-end, release1_final_v1, release1_p12_pre, checkpoint46c_pre, checkpoint46, checkpoint47b_post, checkpoint44b_post, checkpoint46h_pre, checkpoint46m_post, checkpoint46a_pre, checkpoint45c_post, checkpoint44h_post, checkpoint46g_post, checkpoint47f_post, chkpt44a_pre, checkpoint46i_post, checkpoint46c_post, checkpoint46e_post, release1_beta1, checkpoint44b_pre, checkpoint47, checkpoint44, checkpoint45, checkpoint48, checkpoint46h_post, chkpt44c_post, checkpoint47h_post, checkpoint44f_pre, checkpoint46d_post, release1-branch_branchpoint
Branch point for: branch-exfmods-curt, release1_final, release1-branch, release1, release1_50yr, release1_coupled
Adding Williamson test 1. CFL~1, dt=3600s with 40m/s winds. Cool!
 - I've been runing this for a while but it never got broken until now
   so I'm adding it to repositoryi to avoid that happening again.

1 adcroft 1.1 C $Header: /u/gcmpack/models/MITgcmUV/verification/solid-body.cs-32x32x1/code/ini_vel.F,v 1.1 2001/07/31 18:30:55 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     _RL psi,omegaprime,fac
26    
27     psi(i,j,bi,bj)=fac*fCoriG(i,j,bi,bj)
28    
29     C-- Initialise velocity fields to zero
30     C
31     C If you want to specify an analytic initial state for the flow
32     C field then customize the following section of code.
33     C It is, however, often easier to generate initial conditions
34     C off-line and read them from input files...
35     C
36     omegaprime=38.60328935834681d0/rSphere
37     fac=-(rSphere**2)*omegaprime/(2.d0*Omega)
38     DO bj = myByLo(myThid), myByHi(myThid)
39     DO bi = myBxLo(myThid), myBxHi(myThid)
40     DO k=1,Nr
41     DO j=1-Oly,sNy+Oly
42     DO i=1-Olx,sNx+Olx
43     uVel(i,j,k,bi,bj)=0.
44     & +(psi(i,j,bi,bj)-psi(i,j+1,bi,bj))*recip_dyg(i,j,bi,bj)
45     vVel(i,j,k,bi,bj)=0.
46     & +(psi(i+1,j,bi,bj)-psi(i,j,bi,bj))*recip_dxg(i,j,bi,bj)
47     wVel(i,j,k,bi,bj)=0.
48     ENDDO
49     ENDDO
50     ENDDO
51     ENDDO
52     ENDDO
53    
54     C Read an initial state for each component if required
55     IF (uVelInitFile .NE. ' ') THEN
56     _BEGIN_MASTER( myThid )
57     CALL READ_FLD_XYZ_RL( uVelInitFile, ' ', uVel, 0, myThid )
58     _END_MASTER(myThid)
59     c _EXCH_XYZ_R8(uVel , myThid )
60     ENDIF
61    
62     IF (vVelInitFile .NE. ' ') THEN
63     _BEGIN_MASTER( myThid )
64     CALL READ_FLD_XYZ_RL( vVelInitFile, ' ', vVel, 0, myThid )
65     _END_MASTER(myThid)
66     c _EXCH_XYZ_R8(vVel , myThid )
67     ENDIF
68    
69     DO bj = myByLo(myThid), myByHi(myThid)
70     DO bi = myBxLo(myThid), myBxHi(myThid)
71     DO k=1,Nr
72     DO j=1-Oly,sNy+Oly
73     DO i=1-Olx,sNx+Olx
74     uVel(i,j,k,bi,bj)=uVel(i,j,k,bi,bj)*_maskW(i,j,k,bi,bj)
75     vVel(i,j,k,bi,bj)=vVel(i,j,k,bi,bj)*_maskS(i,j,k,bi,bj)
76     ENDDO
77     ENDDO
78     CALL INTEGRATE_FOR_W(
79     I bi, bj, k, uVel, vVel,
80     O wVel,
81     I myThid )
82     ENDDO
83     ENDDO
84     ENDDO
85    
86     c IF (uVelInitFile .NE. ' ' .OR. vVelInitFile .NE. ' ') THEN
87     CALL EXCH_UV_XYZ_RL(uVel,vVel,.TRUE.,myThid)
88     _EXCH_XYZ_R8(wVel,myThid)
89     c ENDIF
90    
91     RETURN
92     END

  ViewVC Help
Powered by ViewVC 1.1.22