30 |
|
|
31 |
#ifdef ALLOW_COST_TEST |
#ifdef ALLOW_COST_TEST |
32 |
C == Local variables |
C == Local variables |
|
_RS maskC (1-OLx:sNx+OLx,1-OLy:sNy+OLy) |
|
33 |
_RL thetaRef |
_RL thetaRef |
34 |
|
|
35 |
integer i, j, k |
integer i, j, k |
42 |
itlo = mybxlo(mythid) |
itlo = mybxlo(mythid) |
43 |
ithi = mybxhi(mythid) |
ithi = mybxhi(mythid) |
44 |
|
|
45 |
iLocOut = 6 |
if ( useCubedSphereExchange) then |
46 |
jLocOut = 35 |
iLocOut = 7 |
47 |
kLocOut = 1 |
jLocOut = 28 |
48 |
|
kLocOut = 1 |
49 |
|
else |
50 |
|
iLocOut = 80 |
51 |
|
jLocOut = 30 |
52 |
|
kLocOut = 1 |
53 |
|
endif |
54 |
|
|
55 |
ce some reference temperature |
ce some reference temperature |
56 |
thetaRef = 24.0D0 |
thetaRef = 24.0D0 |
58 |
C-- Calculate mask for tracer cells (0 => land, 1 => water) |
C-- Calculate mask for tracer cells (0 => land, 1 => water) |
59 |
k=1 |
k=1 |
60 |
|
|
|
do bj = jtlo,jthi |
|
|
do bi = itlo,ithi |
|
|
do j=1,sNy |
|
|
do i=1,sNx |
|
|
maskC(i,j) = 1. |
|
|
if (_hFacC(i,j,k,bi,bj) .eq. 0.) maskC(i,j)=0. |
|
|
end do |
|
|
end do |
|
|
end do |
|
|
end do |
|
|
|
|
61 |
C-- Calculate cost function on tile of this instance |
C-- Calculate cost function on tile of this instance |
62 |
do bj = jtlo,jthi |
do bj = jtlo,jthi |
63 |
do bi = itlo,ithi |
do bi = itlo,ithi |
70 |
write(*,'(a,3(x,i4),a,4(x,i4))') |
write(*,'(a,3(x,i4),a,4(x,i4))') |
71 |
& 'COST ',ig,jg,kLocOut,' TILE ',i,j,bi,bj |
& 'COST ',ig,jg,kLocOut,' TILE ',i,j,bi,bj |
72 |
objf_test(bi,bj) = theta(i,j,kLocOut,bi,bj) |
objf_test(bi,bj) = theta(i,j,kLocOut,bi,bj) |
73 |
|
cph( |
74 |
|
print *, 'ph-cost ', ig, jg, kLocOut, |
75 |
|
& theta(i,j,kLocOut,bi,bj) |
76 |
|
cph) |
77 |
endif |
endif |
78 |
|
|
79 |
end do |
end do |