source: trunk/src/ircaam_startup.m

Last change on this file was 86, checked in by pinsard, 14 years ago

fix some links in manuals

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