/[MITgcm]/MITgcm_contrib/SOSE/code_ad/cost_readtopexmean.F
ViewVC logotype

Annotation of /MITgcm_contrib/SOSE/code_ad/cost_readtopexmean.F

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


Revision 1.1 - (hide annotations) (download)
Fri Apr 23 19:55:11 2010 UTC (15 years, 3 months ago) by mmazloff
Branch: MAIN
CVS Tags: HEAD
original files

1 mmazloff 1.1 C $Header: /u/gcmpack/MITgcm/pkg/ecco/cost_readtopexmean.F,v 1.4 2009/06/17 15:14:00 heimbach Exp $
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     CMM(
74     call mdsreadfield( 'DOT_Mean_Mask.bin', cost_iprec,cost_yftype
75     & ,1,tpmeanmask, 1, mythid )
76     CMM)
77     do bj = jtlo,jthi
78     do bi = itlo,ithi
79     k = 1
80     do j = jmin,jmax
81     do i = imin,imax
82     if (_hFacC(i,j,k,bi,bj) .eq. 0.) then
83     tpmeanmask(i,j,bi,bj) = 0. _d 0
84     else
85     CMM tpmeanmask(i,j,bi,bj) = 1. _d 0
86     endif
87     if (tpmean(i,j,bi,bj) .lt. spval) then
88     tpmeanmask(i,j,bi,bj) = 0. _d 0
89     endif
90     if (tpmean(i,j,bi,bj) .eq. 0. _d 0 ) then
91     tpmeanmask(i,j,bi,bj) = 0. _d 0
92     endif
93    
94     if ( R_low(i,j,bi,bj) .GT. -200. ) then
95     tpmeanmask(i,j,bi,bj) = 0. _d 0
96     endif
97    
98     tpmeanmask(i,j,bi,bj) = tpmeanmask(i,j,bi,bj)*frame(i,j)
99     tpmean(i,j,bi,bj) = tpmean(i,j,bi,bj)*
100     & tpmeanmask(i,j,bi,bj)*
101     & factor
102     enddo
103     enddo
104     enddo
105     enddo
106    
107     #endif /* ALLOW_SSH_MEAN_COST_CONTRIBUTION */
108    
109     end
110    

  ViewVC Help
Powered by ViewVC 1.1.22