1 |
C $Header: $ |
2 |
C $Name: $ |
3 |
|
4 |
#include "COST_CPPOPTIONS.h" |
5 |
|
6 |
|
7 |
subroutine cost_ReadTopexMean( |
8 |
I mythid |
9 |
& ) |
10 |
|
11 |
c ================================================================== |
12 |
c SUBROUTINE cost_ReadTopexMean |
13 |
c ================================================================== |
14 |
c |
15 |
c o Read the time mean TOPEX SSH field. |
16 |
c |
17 |
c started: Christian Eckert eckert@mit.edu 25-May-1999 |
18 |
c |
19 |
c changed: Christian Eckert eckert@mit.edu 25-Feb-2000 |
20 |
c |
21 |
c - Restructured the code in order to create a package |
22 |
c for the MITgcmUV. |
23 |
c |
24 |
c ================================================================== |
25 |
c SUBROUTINE cost_ReadTopexMean |
26 |
c ================================================================== |
27 |
|
28 |
implicit none |
29 |
|
30 |
c == global variables == |
31 |
|
32 |
#include "EEPARAMS.h" |
33 |
#include "SIZE.h" |
34 |
#include "PARAMS.h" |
35 |
#include "GRID.h" |
36 |
|
37 |
#include "ecco_cost.h" |
38 |
|
39 |
c == routine arguments == |
40 |
|
41 |
integer mythid |
42 |
|
43 |
#ifdef ALLOW_SSH_MEAN_COST_CONTRIBUTION |
44 |
c == local variables == |
45 |
|
46 |
integer i,j,k |
47 |
integer bi,bj |
48 |
integer itlo,ithi |
49 |
integer jtlo,jthi |
50 |
integer jmin,jmax |
51 |
integer imin,imax |
52 |
_RL spval |
53 |
_RL factor |
54 |
|
55 |
c == end of interface == |
56 |
|
57 |
jtlo = mybylo(mythid) |
58 |
jthi = mybyhi(mythid) |
59 |
itlo = mybxlo(mythid) |
60 |
ithi = mybxhi(mythid) |
61 |
jmin = 1 |
62 |
jmax = sny |
63 |
imin = 1 |
64 |
imax = snx |
65 |
|
66 |
c-- Convert mean ssh from cm to m |
67 |
factor = 0.01 |
68 |
spval = -9990. |
69 |
|
70 |
call mdsreadfield( topexmeanfile, cost_iprec, cost_yftype, 1, |
71 |
& tpmean, 1, mythid ) |
72 |
|
73 |
do bj = jtlo,jthi |
74 |
do bi = itlo,ithi |
75 |
k = 1 |
76 |
do j = jmin,jmax |
77 |
do i = imin,imax |
78 |
if (_hFacC(i,j,k,bi,bj) .eq. 0.) then |
79 |
tpmeanmask(i,j,bi,bj) = 0. _d 0 |
80 |
else |
81 |
tpmeanmask(i,j,bi,bj) = 1. _d 0 |
82 |
endif |
83 |
if (tpmean(i,j,bi,bj) .lt. spval) then |
84 |
tpmeanmask(i,j,bi,bj) = 0. _d 0 |
85 |
endif |
86 |
if (tpmean(i,j,bi,bj) .eq. 0. _d 0 ) then |
87 |
tpmeanmask(i,j,bi,bj) = 0. _d 0 |
88 |
endif |
89 |
|
90 |
cph( |
91 |
cph print *, 'WARNING: SPECIFIC SETUP FOR ECCO' |
92 |
cph below statement could be replaced by following |
93 |
cph to make it independnet of Nr: |
94 |
cph |
95 |
cph if ( rC(K) .GT. -1000. ) then |
96 |
cph) |
97 |
c set tpmask=0 in areas shallower than 1000m |
98 |
if (_hFacC(i,j,13,bi,bj) .eq. 0.) then |
99 |
tpmeanmask(i,j,bi,bj) = 0. _d 0 |
100 |
endif |
101 |
|
102 |
tpmeanmask(i,j,bi,bj) = tpmeanmask(i,j,bi,bj)*frame(i,j) |
103 |
tpmean(i,j,bi,bj) = tpmean(i,j,bi,bj)* |
104 |
& tpmeanmask(i,j,bi,bj)* |
105 |
& factor |
106 |
enddo |
107 |
enddo |
108 |
enddo |
109 |
enddo |
110 |
|
111 |
#endif /* ALLOW_SSH_MEAN_COST_CONTRIBUTION */ |
112 |
|
113 |
end |
114 |
|