1 |
C $Header: /u/gcmpack/MITgcm/pkg/gridalt/gridalt_update.F,v 1.9 2005/07/07 23:18:51 molod Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
subroutine gridalt_update(myThid) |
5 |
c*********************************************************************** |
6 |
c subroutine gridalt_update |
7 |
c |
8 |
c Purpose: Update the pressure thicknesses of the layers of the |
9 |
c alternative vertical grid (used now for atmospheric physics). |
10 |
c |
11 |
c Calculate: dpphys - new delta r (p*) edge-to-edge of physics grid |
12 |
c using dpphys0 (initial value) and rstarfacC |
13 |
c |
14 |
c*********************************************************************** |
15 |
implicit none |
16 |
c |
17 |
#include "PACKAGES_CONFIG.h" |
18 |
#include "CPP_OPTIONS.h" |
19 |
#include "SIZE.h" |
20 |
#include "EEPARAMS.h" |
21 |
#include "PARAMS.h" |
22 |
#include "GRID.h" |
23 |
#include "fizhi_SIZE.h" |
24 |
#include "gridalt_mapping.h" |
25 |
#include "SURFACE.h" |
26 |
|
27 |
integer myThid |
28 |
|
29 |
integer im1,im2,jm1,jm2 |
30 |
integer i1,i2,j1,j2,bi,bj |
31 |
integer i,j,L |
32 |
logical diagnostics_is_on |
33 |
external diagnostics_is_on |
34 |
_RL temparr(1-OLx:sNx+OLx,1-OLy:sNy+OLy,Nrphys,nSx,nSy) |
35 |
|
36 |
im1 = 1-OLx |
37 |
im2 = sNx+OLx |
38 |
jm1 = 1-OLy |
39 |
jm2 = sNy+OLy |
40 |
i1 = 1 |
41 |
i2 = sNx |
42 |
j1 = 1 |
43 |
j2 = sNy |
44 |
|
45 |
#ifdef ALLOW_FIZHI |
46 |
#ifdef NONLIN_FRSURF |
47 |
|
48 |
if(usefizhi .and. (select_rStar.GT.0) )then |
49 |
do bj = myByLo(myThid), myByHi(myThid) |
50 |
do bi = myBxLo(myThid), myBxHi(myThid) |
51 |
c |
52 |
do L = 1,Nrphys |
53 |
do j = j1,j2 |
54 |
do i = i1,i2 |
55 |
dpphys(i,j,L,bi,bj) = dpphys0(i,j,L,bi,bj) * |
56 |
. rstarfacC(i,j,bi,bj) |
57 |
enddo |
58 |
enddo |
59 |
enddo |
60 |
c |
61 |
enddo |
62 |
enddo |
63 |
|
64 |
endif |
65 |
|
66 |
#endif |
67 |
|
68 |
#ifdef ALLOW_DIAGNOSTICS |
69 |
if(useDiagnostics) then |
70 |
IF ( DIAGNOSTICS_IS_ON('DPPHYS ',myThid) ) THEN |
71 |
do bj = myByLo(myThid), myByHi(myThid) |
72 |
do bi = myBxLo(myThid), myBxHi(myThid) |
73 |
do L = 1,Nrphys |
74 |
do j = j1,j2 |
75 |
do i = i1,i2 |
76 |
temparr(i,j,L,bi,bj) = dpphys(i,j,L,bi,bj) * 1. _d -2 |
77 |
enddo |
78 |
enddo |
79 |
enddo |
80 |
enddo |
81 |
enddo |
82 |
CALL DIAGNOSTICS_FILL(temparr,'DPPHYS ',-1,Nrphys,0,1,1,myThid) |
83 |
ENDIF |
84 |
endif |
85 |
#endif |
86 |
|
87 |
#endif |
88 |
return |
89 |
end |