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

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

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


Revision 1.1 - (hide annotations) (download)
Thu Nov 6 22:10:07 2003 UTC (20 years, 7 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint52l_pre, checkpoint52e_pre, hrcube4, checkpoint52n_post, checkpoint52j_post, checkpoint53d_post, checkpoint54a_pre, checkpoint55c_post, checkpoint54e_post, checkpoint52e_post, checkpoint53c_post, checkpoint55d_pre, checkpoint52j_pre, checkpoint54a_post, branch-netcdf, checkpoint52d_pre, checkpoint52l_post, checkpoint52k_post, checkpoint52b_pre, checkpoint54b_post, checkpoint53b_pre, checkpoint55b_post, checkpoint54d_post, checkpoint53f_post, hrcube_1, checkpoint52m_post, checkpoint55, checkpoint53a_post, checkpoint54, checkpoint54f_post, checkpoint53b_post, checkpoint53, checkpoint52, checkpoint52d_post, checkpoint52a_post, checkpoint52b_post, checkpoint53g_post, checkpoint52f_post, checkpoint52c_post, ecco_c52_e35, hrcube5, checkpoint52a_pre, checkpoint52i_post, checkpoint55a_post, checkpoint53d_pre, checkpoint54c_post, checkpoint52i_pre, checkpoint51u_post, checkpoint52h_pre, checkpoint52f_pre, hrcube_2, hrcube_3
Branch point for: netcdf-sm0
o merging from ecco-branch
o pkg/ecco now containes ecco-specific part of cost function
o top level routines the_main_loop, forward_step
  supersede those in model/src/
  previous input data.cost now in data.ecco
  (new namelist ecco_cost_nml)

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    

  ViewVC Help
Powered by ViewVC 1.1.22