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

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

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


Revision 1.6 - (show annotations) (download)
Thu Oct 29 13:39:54 2015 UTC (8 years, 6 months ago) by gforget
Branch: MAIN
CVS Tags: HEAD
Changes since 1.5: +1 -1 lines
FILE REMOVED
- remove codes that have been replaced with generic function calls.

1 C $Header: /u/gcmpack/MITgcm/pkg/ecco/cost_readargot.F,v 1.5 2014/10/18 18:15:44 gforget Exp $
2 C $Name: $
3
4 #include "ECCO_OPTIONS.h"
5
6
7 subroutine cost_Readargot(
8 I irec,
9 I mythid
10 & )
11
12 c ==================================================================
13 c SUBROUTINE cost_Readargot
14 c ==================================================================
15 c
16 c o Read a given record of the
17 c
18 c started:Armin Koehl akoehl@ucsd.edu
19 c - Restructured the code in order to create a package
20 c for the MITgcmUV.
21 c
22 c ==================================================================
23 c SUBROUTINE cost_Readargot
24 c ==================================================================
25
26 implicit none
27
28 c == global variables ==
29
30 #ifdef ALLOW_ARGO_THETA_COST_CONTRIBUTION
31 #include "EEPARAMS.h"
32 #include "SIZE.h"
33 #include "PARAMS.h"
34 #include "GRID.h"
35
36 #include "cal.h"
37 #include "ecco_cost.h"
38 #endif
39
40 c == routine arguments ==
41
42 integer irec
43 integer mythid
44
45 #ifdef ALLOW_ARGO_THETA_COST_CONTRIBUTION
46
47 c == local variables ==
48
49 integer bi,bj
50 integer i,j,k
51 integer itlo,ithi
52 integer jtlo,jthi
53 integer jmin,jmax
54 integer imin,imax
55 integer nobs
56 integer argotrec
57 integer beginargot
58 integer beginrun
59
60 _RL spval
61 _RL vartile
62
63 c == end of interface ==
64
65 parameter (spval = -9999. )
66 ce --> there is certainly a better place for this.
67
68 jtlo = mybylo(mythid)
69 jthi = mybyhi(mythid)
70 itlo = mybxlo(mythid)
71 ithi = mybxhi(mythid)
72 jmin = 1
73 jmax = sny
74 imin = 1
75 imax = snx
76
77 beginargot = argotstartdate(1)/10000
78 beginrun = modelstartdate(1)/10000
79 if ( beginargot .eq. beginrun ) then
80 argotrec = mod(modelstartdate(1)/100,100) -
81 & mod(argotstartdate(1)/100,100) + irec
82 else
83 argotrec = ( beginrun - beginargot - 1)*nmonthyear +
84 & (nmonthyear - mod(argotstartdate(1)/100,100) +
85 & 1) + mod(modelstartdate(1)/100,100) - 1 + irec
86 endif
87 if (argotrec.gt.0) then
88 call mdsreadfield( argotfile, cost_iprec, cost_yftype, nr,
89 & argotobs,argotrec, mythid )
90 else
91 do bj = jtlo,jthi
92 do bi = itlo,ithi
93 do k = 1,nr
94 do j = jmin,jmax
95 do i = imin,imax
96 argotobs(i,j,k,bi,bj)=spval
97 enddo
98 enddo
99 enddo
100 enddo
101 enddo
102 endif
103
104 #endif /* ALLOW_ARGO_THETA_COST_CONTRIBUTION */
105
106 return
107 end
108

  ViewVC Help
Powered by ViewVC 1.1.22