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

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

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


Revision 1.2 - (show annotations) (download)
Tue Dec 8 21:50:35 2009 UTC (14 years, 5 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint64, checkpoint65, checkpoint62, checkpoint63, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, HEAD
Changes since 1.1: +4 -4 lines
remove unused variables

1 C $Header: /u/gcmpack/MITgcm/model/src/set_grid_factors.F,v 1.1 2008/09/05 20:15:28 jmc Exp $
2 C $Name: $
3
4 #include "CPP_OPTIONS.h"
5
6 CBOP
7 C !ROUTINE: SET_GRID_FACTORS
8 C !INTERFACE:
9 SUBROUTINE SET_GRID_FACTORS( myThid )
10
11 C !DESCRIPTION: \bv
12 C *==========================================================*
13 C | SUBROUTINE SET_GRID_FACTORS
14 C | o Initialise vertical gridding arrays
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
26 C !INPUT/OUTPUT PARAMETERS:
27 C == Routine arguments ==
28 C myThid :: my Thread Id number
29 INTEGER myThid
30
31 C !LOCAL VARIABLES:
32 C == Local variables ==
33 C k :: loop index
34 C msgBuf :: Informational/error message buffer
35 INTEGER k
36 c _RL tmpRatio, checkRatio1, checkRatio2
37 c CHARACTER*(MAX_LEN_MBUF) msgBuf
38 CEOP
39
40 _BEGIN_MASTER(myThid)
41
42 c WRITE(msgBuf,'(A,2(A,L5))') 'Enter SET_GRID_FACTORS:',
43 c & ' setInterFDr=', setInterFDr,
44 c & ' ; setCenterDr=', setCenterDr
45 c CALL PRINT_MESSAGE( msgBuf, standardMessageUnit,
46 c & SQUEEZE_RIGHT, myThid )
47
48 C-- Calculate horizontal grid factor for the deep model (<=> dropping the
49 C shallow atmosphere approximation): only function of the vertical index
50 C- first: initialise deep-model grid factor:
51 DO k=1,Nr
52 deepFacC(k) = 1. _d 0
53 deepFac2C(k)= 1. _d 0
54 recip_deepFacC(k) = 1. _d 0
55 recip_deepFac2C(k)= 1. _d 0
56 ENDDO
57 DO k=1,Nr+1
58 deepFacF(k) = 1. _d 0
59 deepFac2F(k)= 1. _d 0
60 recip_deepFacF(k) = 1. _d 0
61 recip_deepFac2F(k)= 1. _d 0
62 ENDDO
63 IF ( deepAtmosphere ) THEN
64 C- set deep-model grid factor:
65 IF ( usingZCoords ) THEN
66 DO k=1,Nr
67 deepFacC(k) = (rSphere+rC(k))*recip_rSphere
68 deepFac2C(k) = deepFacC(k)*deepFacC(k)
69 ENDDO
70 DO k=1,Nr+1
71 deepFacF(k) = (rSphere+rF(k))*recip_rSphere
72 deepFac2F(k) = deepFacF(k)*deepFacF(k)
73 ENDDO
74 ELSE
75 DO k=1,Nr
76 deepFacC(k) = ( rSphere + phiRef(2*k)*recip_gravity
77 & )*recip_rSphere
78 deepFac2C(k) = deepFacC(k)*deepFacC(k)
79 ENDDO
80 DO k=1,Nr+1
81 deepFacF(k) = ( rSphere + phiRef(2*k-1)*recip_gravity
82 & )*recip_rSphere
83 deepFac2F(k) = deepFacF(k)*deepFacF(k)
84 ENDDO
85 ENDIF
86 C- set reciprocal of deep-model grid factor:
87 DO k=1,Nr
88 recip_deepFacC(k) = 1. _d 0/deepFacC(k)
89 recip_deepFac2C(k)= 1. _d 0/deepFac2C(k)
90 ENDDO
91 DO k=1,Nr+1
92 recip_deepFacF(k) = 1. _d 0/deepFacF(k)
93 recip_deepFac2F(k)= 1. _d 0/deepFac2F(k)
94 ENDDO
95 ENDIF
96
97 _END_MASTER(myThid)
98 _BARRIER
99
100 RETURN
101 END

  ViewVC Help
Powered by ViewVC 1.1.22