/[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.1 - (hide annotations) (download)
Thu May 5 23:47:57 2005 UTC (19 years, 2 months ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint57h_done, checkpoint57h_pre, checkpoint57h_post
o debugged and taffed geoid/sphere code for single CPU

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

  ViewVC Help
Powered by ViewVC 1.1.22