source: trunk/src/test/read.m @ 67

Last change on this file since 67 was 67, checked in by pinsard, 13 years ago

fix for doc

File size: 2.1 KB
Line 
1function result = read()
2
3%READ read TROPFLUX file
4
5%+
6%
7% .. _read.m:
8%
9% ======
10% read.m
11% ======
12%
13% DESCRIPTION
14% ===========
15%
16% read TROPFLUX file :file:`${PROJECT_D}/TropFlux_19890101_20091231.nc`
17%
18% plot ++
19%
20% EXAMPLES
21% ========
22%
23% ::
24%
25%  octave> clear all
26%  octave> project_startup
27%  octave> more off
28%  octave> read
29%
30% SEE ALSO
31% ========
32%
33% :ref:`project_startup.m`
34%
35% TODO
36% ====
37%
38%
39% ++ see http://www.esrl.noaa.gov/psd/data/gridded/tools.html
40%
41% make it usable for real end-user
42%
43% not yet ok using TropFlux_19890101_20091231.nc (20110105)::
44%
45%   octave-3.2.3(26478) malloc: *** mmap(size=1288560640) failed (error code=12)
46%   *** error: can't allocate region
47%   *** set a breakpoint in malloc_error_break to debug
48%   error: memory exhausted or requested size too large for range of Octave's index type -- trying to return to prompt
49%
50% same problem with TropFlux_q2m19890101_20091231.nc (20110105)::
51%
52%   iii : ouverture de /Users/fplod/Downloads/TropFlux_q2m_19890101_20091231.nc
53%   octave-3.2.3(26675) malloc: *** mmap(size=1288560640) failed (error code=12)
54%   *** error: can't allocate region
55%   *** set a breakpoint in malloc_error_break to debug
56%
57% EVOLUTIONS
58% ==========
59%
60% - fplod 20110105T163640Z aedon.locean-ipsl.upmc.fr (Darwin)
61%
62%   * creation to prevent Netcdf problem on TROPFLUX dataset
63%     draft
64%
65%-
66%
67global application;
68global application_version;
69
70global PROJECT_ID;
71global PROJECT_OD;
72%
73yyyymmdd_b=double(19890101);
74yyyymmdd_e=double(20091231);
75%++fullfilename=([PROJECT_ID  '/' 'TropFlux_' num2str(yyyymmdd_b,'%8.8d') '_' num2str(yyyymmdd_e,'%8.8d') '.nc']);
76% ++ Pb memoire fullfilename=([ '/Users/fplod/Downloads'  '/'  'TropFlux_' num2str(yyyymmdd_b,'%8.8d') '_' num2str(yyyymmdd_e,'%8.8d') '.nc' ]);
77fullfilename=([ '/Users/fplod/Downloads'  '/'  'TropFlux_' 'q2m' '_' num2str(yyyymmdd_b,'%8.8d') '_' num2str(yyyymmdd_e,'%8.8d') '.nc' ]);
78file=netcdf(fullfilename,'nowrite');
79disp(['iii : ouverture de ', fullfilename]);
80clear fullfilename;
81
82% read data
83lon=file{'longitude'}(:);
84lat=file{'latitude'}(:);
85time=file{'time'}(:);
86%++swr=file{'swr'}(:);
87q2m=file{'q2m'}(:);
88%
89% close NetCDF file
90ncclose(file);
91clear file;
92
Note: See TracBrowser for help on using the repository browser.