Changeset 10


Ignore:
Timestamp:
08/13/09 17:55:25 (15 years ago)
Author:
pinsard
Message:

octave 3.0.2 can't read HDF4

Location:
trunk/private
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/private/make_base_image.m

    r9 r10  
    2828% tp_mlp_aerosols_startup.m_ 
    2929% 
    30 % .. _tp_mlp_aerosols_startup.m : eof_df.m.html 
     30% .. _tp_mlp_aerosols_startup.m : tp_mlp_aerosols_startup.m.html 
    3131% 
    3232% TODO 
  • trunk/private/make_image_sw.m

    r4 r10  
     1%MAKE_IMAGE_SW save ++ 
     2 
     3%+ 
     4% module 
     5% ====== 
     6% 
     7% ++ 
     8% 
     9% DESCRIPTION 
     10% =========== 
     11% 
     12% From ../Images/S1999251.L3m_DAY_T865_9 (HDF4 file) 
     13% and ../Images/Valid_Pixels_251.dat (ASCII), 
     14% ``make_image_sw.m`` produce an ASCII data file Tau_standard.dat 
     15% containing ++ 
     16% 
     17% EXAMPLES 
     18% ======== 
     19% 
     20% :: 
     21% 
     22% >> addpath('../toolbox') 
     23% >> tp_mlp_aerosols_startup 
     24% >> make_image_sw 
     25% 
     26% SEE ALSO 
     27% ======== 
     28% 
     29% tp_mlp_aerosols_startup.m_ 
     30% 
     31% .. _tp_mlp_aerosols_startup.m : tp_mlp_aerosols_startup.m.html 
     32% 
     33% TODO 
     34% ==== 
     35% 
     36% improve description 
     37% 
     38% avoid overriding existing output file 
     39% 
     40% make it launchable from everywhere (path and IO directories) 
     41% 
     42% Find a way to read HDF4 file using octave or an equivalent of 
     43% ../Images/S1999251.L3m_DAY_T865_9 in an other format (HDF5 or NetCDF) 
     44% 
     45% EVOLUTIONS 
     46% ========== 
     47% 
     48% $Id$ 
     49% 
     50% - fplod 2009-08-13T10:57:39Z aedon.locean-ipsl.upmc.fr (Darwin) 
     51% 
     52%    * add header 
     53%    * add octave save instruction (useless because for now HDF4 file 
     54%      is not readable by octave) 
     55% 
     56%- 
     57 
    158indir='../Images/'; 
    259cfile='S1999251.L3m_DAY_T865_9'; 
    3 info=hdfinfo([indir cfile]); 
     60if (run_octave == 0) 
     61 info=hdfinfo([indir cfile]); 
     62else 
     63 error(' eee : octave can not read HDF4 file'); 
     64end 
     65 
    466Tau=hdfread([indir cfile],'l3m_data'); 
    567 
     
    1880Tau_1d=double(Tau_interp(Valid_Pixels_251)); 
    1981 
    20 save([indir 'Tau_standard.dat'],'Tau_1d','-ascii'); 
     82if (run_octave == 0) 
     83 save([indir 'Tau_standard.dat'],'Tau_1d','-ascii'); 
     84else 
     85 save('-ascii',[indir 'Tau_standard.dat'],'Tau_1d'); 
     86end 
Note: See TracChangeset for help on using the changeset viewer.