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

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

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


Revision 1.3 - (hide annotations) (download)
Tue Oct 9 00:02:50 2007 UTC (16 years, 8 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint63p, checkpoint63q, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint63a, checkpoint63b, checkpoint63c, checkpoint60, checkpoint61, checkpoint62, checkpoint63, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59k, checkpoint59j, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.2: +2 -1 lines
add missing cvs $Header:$ or $Name:$

1 jmc 1.3 C $Header: $
2     C $Name: $
3 heimbach 1.1
4     #include "COST_CPPOPTIONS.h"
5    
6     subroutine cost_readgeoid(
7     I geoid_covariancefile, reclength, jrec,
8     O pinv,
9     I mythid
10     & )
11    
12     c ==================================================================
13 heimbach 1.2 c SUBROUTINE cost_readgeoid
14 heimbach 1.1 c ==================================================================
15     c
16     c o Evaluate the cost function of the geoid contribution.
17     c
18     c started: Christian Eckert eckert@mit.edu 30-Jun-1999
19     c
20     c changed: Christian Eckert eckert@mit.edu 25-Feb-2000
21     c - Restructured the code in order to create a package
22     c for the MITgcmUV.
23     c
24     c changed: Ralf Giering Ralf.Giering@FastOpt.de 12-Jun-2001
25     c - totally rewrite for parallel processing
26     c
27     c heimbach@mit.edu 05-May-2005
28     c - debugged and restructuted
29     c
30     c ==================================================================
31 heimbach 1.2 c SUBROUTINE cost_readgeoid
32 heimbach 1.1 c ==================================================================
33    
34     implicit none
35    
36     c == global variables ==
37    
38     #include "EEPARAMS.h"
39     #include "SIZE.h"
40     #include "PARAMS.h"
41     #ifdef ALLOW_SPHERE
42     # include "sphere.h"
43     #endif
44    
45     c == routine arguments ==
46    
47     character*(MAX_LEN_FNAM) geoid_covariancefile
48     integer reclength
49     integer jrec
50 heimbach 1.2 #ifndef ALLOW_SPHERE
51     c-- dummy declaration
52     integer ncshc
53     parameter ( ncshc = 1 )
54     #endif
55 heimbach 1.1 Real*8 pinv( ncshc )
56     integer mythid
57    
58     #ifdef ALLOW_EGM96_ERROR_COV
59    
60     c == local variables ==
61    
62     integer ilo,ihi
63     integer ireads
64     integer egmunit
65     character*(max_len_mbuf) msgbuf
66    
67     c == external functions ==
68     integer ilnblnk
69     external ilnblnk
70     integer ifnblnk
71     external ifnblnk
72    
73     c == end of interface ==
74    
75 heimbach 1.2 #ifndef ALLOW_SPHERE
76     print *, 'WARNING: this routine assumes package sphere'
77     print *, 'enable sphere in packages.conf when using '
78     print *, 'CPP option ALLOW_EGM96_ERROR_COV'
79     STOP 'in S/R cost_readgeoid'
80     #endif
81    
82 heimbach 1.1 c-- Only the master thread is doing I/O
83     _BEGIN_MASTER( mythid )
84    
85     c-- Open the geoid error covariance data file.
86     call mdsfindunit( egmunit, mythid )
87    
88     ilo = ifnblnk(geoid_covariancefile)
89     ihi = ilnblnk(geoid_covariancefile)
90    
91     write(msgbuf,'(2a)')
92     & 'opening geoid_covariancefile = ',
93     & geoid_covariancefile(ilo:ihi)
94     call print_message( msgbuf, standardmessageunit,
95     & SQUEEZE_RIGHT , mythid)
96    
97     open(egmunit, file = geoid_covariancefile(ilo:ihi),
98     & form = 'unformatted',
99     & access = 'direct',
100     & recl = reclength,
101     & status = 'old' )
102    
103     read(egmunit,rec=jrec) pinv
104    
105     c-- close geoid error covariance file
106     close(egmunit)
107    
108     _END_MASTER( mythid )
109    
110     #endif /* ALLOW_EGM96_ERROR_COV */
111    
112     end
113    
114    

  ViewVC Help
Powered by ViewVC 1.1.22