Changeset 12158


Ignore:
Timestamp:
05/01/12 07:35:08 (13 years ago)
Author:
Mathieu Morlighem
Message:

Changing ISSM_TIER to ISSM_DIR

Location:
issm/trunk-jpl
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/startup.m

    r11879 r12158  
    1111lastwarn('');
    1212
    13 %Recover ISSM_TIER , or if on a Windows machine, ISSM_TIER_WIN
     13%Recover ISSM_DIR , or if on a Windows machine, ISSM_DIR_WIN
    1414if ~ispc,
    15         ISSM_TIER=getenv('ISSM_TIER');
     15        ISSM_DIR=getenv('ISSM_DIR');
    1616else
    17         ISSM_TIER=getenv('ISSM_TIER_WIN');
    18         %ISSM_TIER='';
     17        ISSM_DIR=getenv('ISSM_DIR_WIN');
     18        %ISSM_DIR='';
    1919end
    20 if (isempty(ISSM_TIER)),
    21         error('''ISSM_TIER'' environment variable is empty! You should define ISSM_TIER in your .cshrc or .bashrc!');
     20if (isempty(ISSM_DIR)),
     21        error('''ISSM_DIR'' environment variable is empty! You should define ISSM_DIR in your .cshrc or .bashrc!');
    2222end
    2323
    2424%Now add all issm code paths necessary to run issm smoothly.
    2525%We capture the error output, so that we can warn the user to update
    26 %the variable ISSM_TIER in this file, in case it is not correctly setup.
     26%the variable ISSM_DIR in this file, in case it is not correctly setup.
    2727
    2828%ISSM path
    29 addpath([ISSM_TIER '/src/m/utils/']); %loads recursivepath
    30 addpath([ISSM_TIER '/bin']);
    31 addpath(recursivepath([ISSM_TIER '/src/m']));
    32 addpath(recursivepath([ISSM_TIER '/externalpackages/scotch']));
    33 addpath(recursivepath([ISSM_TIER '/externalpackages/canos']));
    34 addpath(recursivepath([ISSM_TIER '/externalpackages/kml']));
    35 addpath(recursivepath([ISSM_TIER '/externalpackages/export_fig']));
    36 addpath(recursivepath([ISSM_TIER '/externalpackages/googleearthtoolbox']));
    37 addpath(recursivepath([ISSM_TIER '/externalpackages/cm_and_cb_utilities']));
     29addpath([ISSM_DIR '/src/m/utils/']); %loads recursivepath
     30addpath([ISSM_DIR '/bin']);
     31addpath(recursivepath([ISSM_DIR '/src/m']));
     32addpath(recursivepath([ISSM_DIR '/externalpackages/scotch']));
     33addpath(recursivepath([ISSM_DIR '/externalpackages/canos']));
     34addpath(recursivepath([ISSM_DIR '/externalpackages/kml']));
     35addpath(recursivepath([ISSM_DIR '/externalpackages/export_fig']));
     36addpath(recursivepath([ISSM_DIR '/externalpackages/googleearthtoolbox']));
     37addpath(recursivepath([ISSM_DIR '/externalpackages/cm_and_cb_utilities']));
    3838
    39 clear ISSM_TIER;
     39clear ISSM_DIR;
    4040
    4141%Check on any warning messages that might indicate that the paths were not correct.
    4242if ~isempty(lastwarn),
    43         fprintf('\n  Error trying to setup ''ISSM'' code paths. Try and update the ISSM_TIER variable in your .cshrc or .bashrc!\n');
     43        fprintf('\n  Error trying to setup ''ISSM'' code paths. Try and update the ISSM_DIR variable in your .cshrc or .bashrc!\n');
    4444        fprintf('  ''ISSM'' will not  work at all until this is resolved\n\n');
    4545else
  • issm/trunk-jpl/startup.py

    r12112 r12158  
    55#  before handing over the prompt to the user if the environment variable
    66#  PYTHONSTARTUP is defined:
    7 #  export PYTHONSTARTUP=$ISSM_TIER/startup.py
     7#  export PYTHONSTARTUP=$ISSM_DIR/startup.py
    88#  This startup script should be run by users before trying to use ISSM.
    99
    1010import os,sys
    1111
    12 #Recover ISSM_TIER, ISSM_DIR and USERNAME
    13 ISSM_TIER=os.getenv('ISSM_TIER')
     12#Recover ISSM_DIR and USERNAME
     13ISSM_DIR=os.getenv('ISSM_DIR')
    1414USERNAME =os.getenv('USER')
    15 if(ISSM_TIER==None):
    16         raise NameError('"ISSM_TIER" environment variable is empty! You should define ISSM_TIER in your .cshrc or .bashrc!')
     15if(ISSM_DIR==None):
     16        raise NameError('"ISSM_DIR" environment variable is empty! You should define ISSM_DIR in your .cshrc or .bashrc!')
    1717
    1818#Now add all issm code paths necessary to run issm smoothly.
    1919#We capture the error output, so that we can warn the user to update
    20 #the variable ISSM_TIER in this file, in case it is not correctly setup.
     20#the variable ISSM_DIR in this file, in case it is not correctly setup.
    2121
    2222#ISSM path. Go through src/py and load everything we find  that looks like a python file
    23 for root,dirs,files in os.walk(ISSM_TIER+ '/src/py'):
     23for root,dirs,files in os.walk(ISSM_DIR+ '/src/py'):
    2424        for file in files:
    2525                if file.find(".py") != -1:
     
    3030                                #__import__(file)
    3131
    32 for root,dirs,files in os.walk(ISSM_TIER+ '/src/m'):
     32for root,dirs,files in os.walk(ISSM_DIR+ '/src/m'):
    3333        for file in files:
    3434                if file.find(".py") != -1:
     
    3939                                #__import__(file)
    4040                               
    41 sys.path.append(ISSM_TIER + '/src/modules/python')
     41sys.path.append(ISSM_DIR + '/src/modules/python')
    4242
    4343#Deal with scipy import:
Note: See TracChangeset for help on using the changeset viewer.