1 |
C $Header: /u/gcmpack/MITgcm/pkg/fizhi/step_fizhi_fg.F,v 1.10 2004/08/05 17:06:40 molod Exp $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "FIZHI_OPTIONS.h" |
5 |
subroutine step_fizhi_fg (myTime, myIter, myThid, dt) |
6 |
c----------------------------------------------------------------------- |
7 |
c Subroutine step_fizhi_fg - 'Wrapper' routine to advance |
8 |
c the physics state and make a 'first guess' at the new |
9 |
c value. At this point, increment with the physics |
10 |
c tendency only. |
11 |
c Also: Set up "bi, bj loop" and some timers and clocks here. |
12 |
c Call: step_physics |
13 |
c----------------------------------------------------------------------- |
14 |
implicit none |
15 |
#include "SIZE.h" |
16 |
#include "fizhi_SIZE.h" |
17 |
#include "fizhi_land_SIZE.h" |
18 |
#include "fizhi_coms.h" |
19 |
#include "gridalt_mapping.h" |
20 |
#include "EEPARAMS.h" |
21 |
#include "DYNVARS.h" |
22 |
#include "GRID.h" |
23 |
|
24 |
integer myIter, myThid |
25 |
_RL myTime |
26 |
|
27 |
integer bi, bj |
28 |
integer im1, im2, jm1, jm2, idim1, idim2, jdim1, jdim2 |
29 |
_RL dt |
30 |
|
31 |
_RL tempij(sNx,sNy) |
32 |
integer i,j,L |
33 |
|
34 |
idim1 = 1-OLx |
35 |
idim2 = sNx+OLx |
36 |
jdim1 = 1-OLy |
37 |
jdim2 = sNy+OLy |
38 |
im1 = 1 |
39 |
im2 = sNx |
40 |
jm1 = 1 |
41 |
jm2 = sNy |
42 |
|
43 |
do bj = myByLo(myThid), myByHi(myThid) |
44 |
do bi = myBxLo(myThid), myBxHi(myThid) |
45 |
|
46 |
c Step forward the physics state using physics tendencies |
47 |
call step_physics(uphy,vphy,thphy,sphy,dt,idim1,idim2, |
48 |
. jdim1,jdim2, |
49 |
. Nrphys,Nsx,Nsy,1,sNx,1,sNy,bi,bj,duphy,dvphy,dthphy,dsphy) |
50 |
|
51 |
if(2.eq.1 )then |
52 |
print *,' In step fizhi fg, new fizhi fields ',bi,' dt= ',dt |
53 |
do L = 1,Nrphys |
54 |
do j = jm1,jm2 |
55 |
do i = im1,im2 |
56 |
tempij(i,j) = uphy(i,j,L,bi,bj) |
57 |
enddo |
58 |
enddo |
59 |
c print *,' uphy at level ',l,' ',tempij |
60 |
enddo |
61 |
do L = 1,Nrphys |
62 |
do j = jm1,jm2 |
63 |
do i = im1,im2 |
64 |
tempij(i,j) = vphy(i,j,L,bi,bj) |
65 |
enddo |
66 |
enddo |
67 |
c print *,' vphy at level ',l,' ',tempij |
68 |
enddo |
69 |
do L = 1,Nrphys |
70 |
do j = jm1,jm2 |
71 |
do i = im1,im2 |
72 |
tempij(i,j) = thphy(i,j,L,bi,bj) |
73 |
enddo |
74 |
enddo |
75 |
print *,' thphy at level ',l,' ',tempij |
76 |
enddo |
77 |
do L = 1,Nrphys |
78 |
do j = jm1,jm2 |
79 |
do i = im1,im2 |
80 |
tempij(i,j) = sphy(i,j,L,bi,bj) |
81 |
enddo |
82 |
enddo |
83 |
print *,' sphy at level ',l,' ',tempij |
84 |
enddo |
85 |
endif |
86 |
|
87 |
call qcheck (idim1,idim2,jdim1,jdim2,Nrphys,Nsx,Nsy,im1,im2, |
88 |
. jm1,jm2,bi,bj,dpphys,sphy) |
89 |
|
90 |
if(2.eq.1 )then |
91 |
print *,' In step fizhi fg after qcheck ',bi |
92 |
do L = 1,Nrphys |
93 |
do j = jm1,jm2 |
94 |
do i = im1,im2 |
95 |
tempij(i,j) = sphy(i,j,L,bi,bj) |
96 |
enddo |
97 |
enddo |
98 |
print *,' sphy after qcheck at level ',l,' ',tempij |
99 |
enddo |
100 |
endif |
101 |
|
102 |
enddo |
103 |
enddo |
104 |
|
105 |
return |
106 |
end |