1 | function 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 | % |
---|
67 | global application; |
---|
68 | global application_version; |
---|
69 | |
---|
70 | global PROJECT_ID; |
---|
71 | global PROJECT_OD; |
---|
72 | % |
---|
73 | yyyymmdd_b=double(19890101); |
---|
74 | yyyymmdd_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' ]); |
---|
77 | fullfilename=([ '/Users/fplod/Downloads' '/' 'TropFlux_' 'q2m' '_' num2str(yyyymmdd_b,'%8.8d') '_' num2str(yyyymmdd_e,'%8.8d') '.nc' ]); |
---|
78 | file=netcdf(fullfilename,'nowrite'); |
---|
79 | disp(['iii : ouverture de ', fullfilename]); |
---|
80 | clear fullfilename; |
---|
81 | |
---|
82 | % read data |
---|
83 | lon=file{'longitude'}(:); |
---|
84 | lat=file{'latitude'}(:); |
---|
85 | time=file{'time'}(:); |
---|
86 | %++swr=file{'swr'}(:); |
---|
87 | q2m=file{'q2m'}(:); |
---|
88 | % |
---|
89 | % close NetCDF file |
---|
90 | ncclose(file); |
---|
91 | clear file; |
---|
92 | |
---|