source: trunk/src/ircaam_startup.m @ 85

Last change on this file since 85 was 82, checked in by pinsard, 14 years ago

modif. of headers for manuals hyperlinks improvements

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