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

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

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


Revision 1.2 - (show annotations) (download)
Mon May 23 16:11:38 2005 UTC (19 years ago) by heimbach
Branch: MAIN
CVS Tags: checkpoint58l_post, checkpoint57t_post, checkpoint57o_post, checkpoint58e_post, checkpoint57v_post, checkpoint58u_post, checkpoint57s_post, checkpoint57k_post, checkpoint58r_post, checkpoint57i_post, checkpoint57y_post, checkpoint58g_post, checkpoint57x_post, checkpoint57m_post, checkpoint58n_post, checkpoint58x_post, checkpoint58t_post, checkpoint58h_post, checkpoint58w_post, checkpoint57y_pre, checkpoint58q_post, checkpoint58j_post, checkpoint59e, checkpoint59d, checkpoint59g, checkpoint59f, checkpoint59a, checkpoint59c, checkpoint59b, checkpoint59h, checkpoint57r_post, checkpoint59, checkpoint58, checkpoint58f_post, checkpoint57n_post, checkpoint58d_post, checkpoint58c_post, checkpoint57w_post, checkpoint57p_post, checkpint57u_post, checkpoint58a_post, checkpoint58i_post, checkpoint57q_post, checkpoint58o_post, checkpoint57z_post, checkpoint58y_post, checkpoint58k_post, checkpoint58v_post, checkpoint58s_post, checkpoint58p_post, checkpoint57j_post, checkpoint58b_post, checkpoint58m_post, checkpoint57l_post
Changes since 1.1: +15 -3 lines
Need one dummy declaration for ncshc.

1 C $Header: /u/gcmpack/MITgcm/pkg/ecco/cost_readgeoid.F,v 1.1 2005/05/05 23:47:57 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_readgeoid
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_readgeoid
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 #ifndef ALLOW_SPHERE
50 c-- dummy declaration
51 integer ncshc
52 parameter ( ncshc = 1 )
53 #endif
54 Real*8 pinv( ncshc )
55 integer mythid
56
57 #ifdef ALLOW_EGM96_ERROR_COV
58
59 c == local variables ==
60
61 integer ilo,ihi
62 integer ireads
63 integer egmunit
64 character*(max_len_mbuf) msgbuf
65
66 c == external functions ==
67 integer ilnblnk
68 external ilnblnk
69 integer ifnblnk
70 external ifnblnk
71
72 c == end of interface ==
73
74 #ifndef ALLOW_SPHERE
75 print *, 'WARNING: this routine assumes package sphere'
76 print *, 'enable sphere in packages.conf when using '
77 print *, 'CPP option ALLOW_EGM96_ERROR_COV'
78 STOP 'in S/R cost_readgeoid'
79 #endif
80
81 c-- Only the master thread is doing I/O
82 _BEGIN_MASTER( mythid )
83
84 c-- Open the geoid error covariance data file.
85 call mdsfindunit( egmunit, mythid )
86
87 ilo = ifnblnk(geoid_covariancefile)
88 ihi = ilnblnk(geoid_covariancefile)
89
90 write(msgbuf,'(2a)')
91 & 'opening geoid_covariancefile = ',
92 & geoid_covariancefile(ilo:ihi)
93 call print_message( msgbuf, standardmessageunit,
94 & SQUEEZE_RIGHT , mythid)
95
96 open(egmunit, file = geoid_covariancefile(ilo:ihi),
97 & form = 'unformatted',
98 & access = 'direct',
99 & recl = reclength,
100 & status = 'old' )
101
102 read(egmunit,rec=jrec) pinv
103
104 c-- close geoid error covariance file
105 close(egmunit)
106
107 _END_MASTER( mythid )
108
109 #endif /* ALLOW_EGM96_ERROR_COV */
110
111 end
112
113

  ViewVC Help
Powered by ViewVC 1.1.22