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
RevLine 
[16]1% IRCAAM_STARTUP initialisation of matlab/octave environment for IRCAAM project
2
[12]3%+
4%
[86]5%
6% .. _ircaam_startup.m:
7%
[75]8% ================
9% ircaam_startup.m
10% ================
[12]11%
[75]12% --------------------------------------------------------------
[12]13% initialisation of matlab/octave environment for IRCAAM project
[75]14% --------------------------------------------------------------
[12]15%
16% DESCRIPTION
17% ===========
18%
19% Define :
20%  - path for matlab/octave commands used in IRCAAM project
[31]21%  - IO directories in global variables
[12]22%
[75]23% This file can be either run classicaly when current directory
[12]24% is ${IRCAAM} :
25% ..
26%
27%  >> ircaam_startup
28%
29%
[24]30% If linked or copy to ./startup.m, it will be automaticaly
[12]31% run by matlab at start.
32%
[14]33% If linked or copy to ${HOME}/.octaverc, it will be automaticaly
34% run by octave at start.
35%
[12]36% SEE ALSO
37% ========
38%
[82]39% :ref:`ircaam_profile.sh`
[12]40%
41% EVOLUTIONS
42% ==========
43%
44% $Id$
45%
[31]46% - fplod 2009-01-27T11:25:50Z aedon.locean-ipsl.upmc.fr (Darwin)
47%
48%   * define global variables
49%
[24]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%
[14]56% - fplod 2008-12-22T13:24:38Z aedon.locean-ipsl.upmc.fr (Darwin)
57%
58%   * add detection of either matlab or octave running
59%
[12]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%
[15]71disp('iii : adding path to IRCAAM matlab tools')
[12]72%
73% test if IRCAAM environment set
[31]74global IRCAAM;
75IRCAAM=getenv('IRCAAM');
76if ( isempty(IRCAAM) )
[12]77 error('eee : IRCAAM environment not set');
78else
[31]79 disp(['iii : IRCAAM =' IRCAAM])
[12]80end
81%
82% add path
[31]83addpath(IRCAAM);
84addpath([IRCAAM '/mode_sahelien/']);
85addpath([IRCAAM '/SIMULS_IRCAAM/']);
86addpath([IRCAAM '/indice_flore/']);
[12]87%
88% IO directories
89% test if IRCAAM_ID environment set
[31]90
91global IRCAAM_ID;
92IRCAAM_ID=getenv('IRCAAM_ID');
93if ( isempty(IRCAAM_ID) )
[12]94 error('eee : IRCAAM_ID environment not set');
95end
96%
97% test if IRCAAM_OD environment set
[31]98global IRCAAM_OD;
99IRCAAM_OD=getenv('IRCAAM_OD');
100if ( isempty(IRCAAM_OD) )
[12]101 error('eee : IRCAAM_OD environment not set');
102end
103%
[14]104% detect if either octave or matlab running
[24]105if ~ exist('OCTAVE_VERSION')
106 run_octave=0;
107else
[14]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%
[12]116more on
Note: See TracBrowser for help on using the repository browser.