source: trunk/src/ircaam_startup.m @ 24

Last change on this file since 24 was 24, checked in by pinsard, 16 years ago

correction of usage of print function, fix side effect of load function

  • Property svn:keywords set to Id
File size: 2.1 KB
Line 
1% IRCAAM_STARTUP initialisation of matlab/octave environment for IRCAAM project
2
3%+
4%
5% module
6% ======
7%
8% initialisation of matlab/octave environment for IRCAAM project
9%
10% DESCRIPTION
11% ===========
12%
13% Define :
14%  - path for matlab/octave commands used in IRCAAM project
15%  - IO directories
16%
17% This file can be either run classicaly when currect directory
18% is ${IRCAAM} :
19% ..
20%
21%  >> ircaam_startup
22%
23%
24% If linked or copy to ./startup.m, it will be automaticaly
25% run by matlab at start.
26%
27% If linked or copy to ${HOME}/.octaverc, it will be automaticaly
28% run by octave at start.
29%
30% SEE ALSO
31% ========
32%
33% ircaam_profile.sh_
34%
35% .. _ircaam_profile.sh : ircaam_profile.sh.html
36%
37% EVOLUTIONS
38% ==========
39%
40% $Id$
41%
42% - fplod 2009-01-07T11:12:31Z aedon.locean-ipsl.upmc.fr (Darwin)
43%
44%   * add indice_flore directory to path
45%   * more elegant way to know if eithe octave or matlab is running
46%     thanks to http://enacit1.epfl.ch/cours_matlab/mfiles.html#scripts
47%
48% - fplod 2008-12-22T13:24:38Z aedon.locean-ipsl.upmc.fr (Darwin)
49%
50%   * add detection of either matlab or octave running
51%
52% - fplod 2008-12-22T09:38:20Z zeus.locean-ipsl.upmc.fr (Linux)
53%
54%   * creation
55%
56% TODO
57% ====
58%
59%-
60%
61clear all
62%
63disp('iii : adding path to IRCAAM matlab tools')
64%
65% test if IRCAAM environment set
66ircaam=getenv('IRCAAM');
67if ( isempty(ircaam) )
68 error('eee : IRCAAM environment not set');
69else
70 disp(['iii : IRCAAM =' ircaam])
71end
72%
73% add path
74addpath(ircaam);
75addpath([ircaam '/mode_sahelien/']);
76addpath([ircaam '/SIMULS_IRCAAM/']);
77addpath([ircaam '/indice_flore/']);
78%
79% IO directories
80% test if IRCAAM_ID environment set
81ircaam_id=getenv('IRCAAM_ID');
82if ( isempty(ircaam_id) )
83 error('eee : IRCAAM_ID environment not set');
84end
85%
86% test if IRCAAM_OD environment set
87ircaam_od=getenv('IRCAAM_OD');
88if ( isempty(ircaam_od) )
89 error('eee : IRCAAM_OD environment not set');
90end
91%
92% detect if either octave or matlab running
93if ~ exist('OCTAVE_VERSION')
94 run_octave=0;
95else
96 run_octave=1;
97end
98%
99if (run_octave == 0)
100 % to display help written in ISO-LATIN
101 slCharacterEncoding('ISO-8859-1');
102end
103%
104more on
Note: See TracBrowser for help on using the repository browser.