/[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.12 - (show annotations) (download)
Thu Oct 29 13:39:54 2015 UTC (8 years, 6 months ago) by gforget
Branch: MAIN
CVS Tags: HEAD
Changes since 1.11: +1 -1 lines
FILE REMOVED
- remove codes that have been replaced with generic function calls.

1 C $Header: /u/gcmpack/MITgcm/pkg/ecco/cost_readtopexmean.F,v 1.11 2014/10/18 18:15:44 gforget Exp $
2 C $Name: $
3
4 #include "ECCO_OPTIONS.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 #ifdef ALLOW_SSH_MEAN_COST_CONTRIBUTION
33 #include "EEPARAMS.h"
34 #include "SIZE.h"
35 #include "PARAMS.h"
36 #include "GRID.h"
37
38 #include "ecco_cost.h"
39 #endif
40
41 c == routine arguments ==
42
43 integer mythid
44
45 #ifdef ALLOW_SSH_MEAN_COST_CONTRIBUTION
46 c == local variables ==
47
48 integer i,j,k
49 integer bi,bj
50 integer itlo,ithi
51 integer jtlo,jthi
52 integer jmin,jmax
53 integer imin,imax
54 _RL spval
55 _RL factor
56
57 c == end of interface ==
58
59 jtlo = mybylo(mythid)
60 jthi = mybyhi(mythid)
61 itlo = mybxlo(mythid)
62 ithi = mybxhi(mythid)
63 jmin = 1
64 jmax = sny
65 imin = 1
66 imax = snx
67
68 c-- Convert mean ssh from cm to m
69 factor = 0.01 _d 0
70 spval = -9990. _d 0
71
72 call mdsreadfield( mdtdatfile, cost_iprec, cost_yftype, 1,
73 & mdt, 1, mythid )
74
75 do bj = jtlo,jthi
76 do bi = itlo,ithi
77 k = 1
78 do j = jmin,jmax
79 do i = imin,imax
80 if (_hFacC(i,j,k,bi,bj) .eq. 0.) then
81 mdtmask(i,j,bi,bj) = 0. _d 0
82 else
83 mdtmask(i,j,bi,bj) = 1. _d 0
84 endif
85 if (mdt(i,j,bi,bj) .lt. spval) then
86 mdtmask(i,j,bi,bj) = 0. _d 0
87 endif
88 if (mdt(i,j,bi,bj) .eq. 0. _d 0 ) then
89 mdtmask(i,j,bi,bj) = 0. _d 0
90 endif
91
92 #ifndef ALLOW_SHALLOW_ALTIMETRY
93 if ( R_low(i,j,bi,bj) .GT. -200. ) then
94 mdtmask(i,j,bi,bj) = 0. _d 0
95 endif
96 #endif
97 #ifdef OMIT_HIGHLAT_MDT
98 if ( abs(YC(i,j,bi,bj)) .GT. 66. ) then
99 mdtmask(i,j,bi,bj) = 0. _d 0
100 endif
101 #endif
102
103 mdtmask(i,j,bi,bj) = mdtmask(i,j,bi,bj)*frame(i,j)
104 mdt(i,j,bi,bj) = mdt(i,j,bi,bj)*
105 & mdtmask(i,j,bi,bj)*
106 & factor
107 enddo
108 enddo
109 enddo
110 enddo
111
112 #endif /* ALLOW_SSH_MEAN_COST_CONTRIBUTION */
113
114 return
115 end

  ViewVC Help
Powered by ViewVC 1.1.22