/[MITgcm]/MITgcm_contrib/netcdf_matlab_examples/WOCE_climatology/mine.f
ViewVC logotype

Contents of /MITgcm_contrib/netcdf_matlab_examples/WOCE_climatology/mine.f

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


Revision 1.1 - (show annotations) (download)
Tue Feb 10 14:35:30 2004 UTC (20 years, 2 months ago) by edhill
Branch: MAIN
CVS Tags: HEAD
 o initial check-in of WOCE netcdf example

1 c 26_JANUARY_2004
2 c
3 c AUTHOR: Viktor Gouretski
4 c BSH, Hamburg
5
6 c program read_allpar_climatology
7
8 c this program reads gridded file of the WOCE GLOBAL HYDROGRAPHIC CLIMATOLOGY
9
10
11
12
13 character*80 filein
14
15 real*4 par(13,100),error(5,100)
16
17 real*4 var(6,100)
18
19 integer*4 levels(6,100)
20 ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
21 parameter( xmin=0.,xmax=359.5,ymin=-80.,ymax=90.,dxy=.5)
22 real t(720,341,50)
23
24 c/ nbrlev - number of gridded levels
25 c/ radbub - radius of the influence bubble (km)
26 c/ radcor - decorrelation length scale (km)
27 c/ depthml - mixed layer depth (m)
28
29
30 write(6,*)'input grid-file'
31 read(5,80)filein
32 open(20,file=filein,status='old')
33
34
35
36 80 format(a80)
37
38 3033 format(i2,1x,3f6.0)
39
40 5030 format(2f6.1,3f6.0,3f10.6,
41 *f8.3,f8.2,2f8.3,
42 *5f5.2,5i4,
43 *6f8.3,4f10.6)
44
45
46 do 1 i=1,720 ! start longitude loop
47
48 do 11 j=1,341 ! start latitude loop
49
50 read(20,3033,end=2,err=2)
51 *nbrlev,radbub,radcor,depthml
52
53
54 do k=1,nbrlev ! start standard level loop
55
56 read(20,5030)xgrid,ygrid,etdep,
57 *(par(ipa,k),ipa=1,9),
58 *(error(ipa,k),ipa=1,5),
59 *(levels(ipa,k),ipa=1,5),
60 *(var(ipa,k),ipa=1,6),
61 *(par(ipa,k),ipa=10,13)
62
63 ipos=(xgrid-xmin)/dxy +1
64 jpos=(ygrid-ymin)/dxy +1
65 write(6,*)i,j,k,xgrid,ygrid,etdep,par(1,k)
66
67 end do
68
69
70 c xgrid - grid-node longitude (from 0 to 359.5E)
71 c ygrid - grid-node latitude (from -80S to 90N)
72 c etdep - grid-node ETOPO5 depth (m)
73
74 c par(1,k) - depth (m) of the k-th level
75 c par(2,k) - pressure (dbar)
76 c par(3,k) - t_in-situ
77 c par(4,k) - theta
78 c par(5,k) - salinity
79 c par(6,k) - oxygen (ml/l)
80 c par(7,k) - silicate (umol/kg)
81 c par(8,k) - nitrate (umol/kg)
82 c par(9,k) - phosphate (umol/kg)
83 c par(10,k) - gamma-n
84 c par(11,k) - sig-0
85 c par(12,k) - sig-2
86 c par(13,k) - sig-4
87
88 c error(1,k) - relative optimum interpolation error for T, Theta & S
89 c error(2,k) - relative optimum interpolation error for Oxygen
90 c error(3,k) - relative optimum interpolation error for Silicate
91 c error(4,k) - relative optimum interpolation error for Nitrate
92 c error(5,k) - relative optimum interpolation error for Phosphate
93
94 c levels(1,k) - actual number of observations used for the optimal interpolation of T, Theta & S
95 c levels(2,k) - actual number of observations used for the optimal interpolation of Oxygen
96 c levels(3,k) - actual number of observations used for the optimal interpolation of Silicate
97 c levels(4,k) - actual number of observations used for the optimal interpolation of Nitarte
98 c levels(5,k) - actual number of observations used for the optimal interpolation of Phosphate
99
100 c var(1,k) - temperature standard deviation from the mean (within the influence radius = radcor)
101 c var(2,k) - salinity standard deviation from the mean (within the influence radius = radcor)
102 c var(3,k) - oxygen standard deviation from the mean (within the influence radius = radcor)
103 c var(4,k) - silicate standard deviation from the mean (within the influence radius = radcor)
104 c var(5,k) - nitrate standard deviation from the mean (within the influence radius = radcor)
105 c var(6,k) - phosphate standard deviation from the mean (within the influence radius = radcor)
106
107 11 continue !j-loop
108
109 write(6,*) 'meridian has been read: i=',i,' xgrid=',xgrid
110
111 1 continue !i-loop
112
113 2 stop
114
115 end
116
117
118
119
120

  ViewVC Help
Powered by ViewVC 1.1.22