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