/[MITgcm]/MITgcm/pkg/ecco/cost_readtopexmean.F
ViewVC logotype

Contents of /MITgcm/pkg/ecco/cost_readtopexmean.F

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph


Revision 1.3 - (show annotations) (download)
Tue Oct 9 00:02:50 2007 UTC (16 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint60, checkpoint61, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59k, checkpoint59j, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61p
Changes since 1.2: +4 -3 lines
add missing cvs $Header:$ or $Name:$

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

  ViewVC Help
Powered by ViewVC 1.1.22