Ignore:
Timestamp:
04/29/11 11:09:12 (13 years ago)
Author:
pinsard
Message:

replace TROPFLUX by PROJECT

File:
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/src/project_profile.sh

    r47 r50  
    1 #! /bin/sh -x 
     1#! /bin/sh 
    22#+ 
    33# 
    4 # .. program:: tropflux_profile.sh 
    5 # 
    6 # .. _tropflux_profile.sh: 
     4# .. program:: project_profile.sh 
     5# 
     6# .. _project_profile.sh: 
    77# 
    88# ================================================== 
    9 # tropflux_profile.sh -- define TROPFLUX environment 
     9# project_profile.sh -- define PROJECT environment 
    1010# ================================================== 
    1111# 
     
    1515# Online usage:: 
    1616# 
    17 #  $ . ./tropflux_profile.sh -d directory -i indir -o outdir -t tempdir -s saxo_dir 
     17#  $ . ./project_profile.sh -d directory -i indir -o outdir -t tempdir -s saxo_dir 
    1818# 
    1919# In ${HOME}/.profile, add the following line:: 
    2020# 
    21 #  . tropflux_profile.sh -d directory  -i indir -o outdir -t tempdir -s saxo_dir 
     21#  . project_profile.sh -d directory  -i indir -o outdir -t tempdir -s saxo_dir 
    2222# 
    2323# DESCRIPTION 
     
    3030# .. option:: -s  <saxo_dir> 
    3131# 
    32 # define TROPFLUX environment 
    33 # 
    34 # ${TROPFLUX} is the base directory of tools. 
    35 # 
    36 # ${TROPFLUX_LOG} is the directory where log files will be written. 
    37 # 
    38 # ${TROPFLUX_ID} is the directory where input files must be. 
    39 # 
    40 # ${TROPFLUX_OD} is the directory where output files will be written. 
     32# define PROJECT environment 
     33# 
     34# ${PROJECT} is the base directory of tools. 
     35# 
     36# ${PROJECT_LOG} is the directory where log files will be written. 
     37# 
     38# ${PROJECT_ID} is the directory where input files must be. 
     39# 
     40# ${PROJECT_OD} is the directory where output files will be written. 
    4141# 
    4242# ${SAXO_DIR} is the base directory of SAXO tools 
    4343# 
    44 # PATH is completed with ${TROPFLUX}. 
     44# IDL_STARTUP is set to tell IDL where find tools. 
     45# 
     46# PATH is completed with ${PROJECT}. 
    4547# 
    4648# SEE ALSO 
    4749# ======== 
    4850# 
    49 # :ref:`tropflux_init.pro` 
    50 # 
    51 # :ref:`cm_tropflux.pro` 
     51# for IDL/gdl and SAXO environment : 
     52# 
     53# :ref:`project_init.pro` 
     54# :ref:`cm_project.pro` 
    5255# 
    5356# EXAMPLES 
     
    5760# 
    5861#  $ cd /usr/home/fplod/incas/tropflux/tropflux_ws/ 
    59 #  $ . ./src/tropflux_profile.sh \ 
     62#  $ . ./src/project_profile.sh \ 
    6063#    -d $(pwd) \ 
    6164#    -i /usr/temp/${LOGNAME}/tropflux_d/ \ 
     
    6770# 
    6871#  $ cd ${HOME}/incas/tropflux/tropflux_ws/ 
    69 #  $ . ./src/tropflux_profile.sh \ 
     72#  $ . ./src/project_profile.sh \ 
    7073#    -d $(pwd) \ 
    7174#    -i /usr/temp/${LOGNAME}/tropflux_d/ \ 
     
    7780# 
    7881#  $ cd ${HOME}/tropflux/ 
    79 #  $ . ./src/tropflux_profile.sh \ 
     82#  $ . ./src/project_profile.sh \ 
    8083#   -d $(pwd) \ 
    8184#   -i /homedata/${LOGNAME}/tropflux_d/ \ 
     
    97100# EVOLUTIONS 
    98101# ========== 
     102# 
     103# - fplod 20110429T090524Z aedon.locean-ipsl.upmc.fr (Darwin) 
     104# 
     105#   * set IDL_STARTUP 
    99106# 
    100107# - fplod 20110413T151541Z cratos.locean-ipsl.upmc.fr (Linux) 
     
    121128# 
    122129# as this script might be launch in .profile, command is forced. 
    123 command=tropflux_profile.sh 
     130command=project_profile.sh 
    124131# 
    125132usage=" Usage : ${command} -d directory -i indir -o outdir -t tempdir -s saxo_dir" 
     
    180187fi 
    181188# 
    182 TROPFLUX=${directory} 
    183 export TROPFLUX 
     189PROJECT=${directory} 
     190export PROJECT 
    184191unset drectory 
    185192# 
    186 # add TROPFLUX tools to PATH 
     193# add PROJECT tools to PATH 
    187194# if not already done 
    188 suppath=$(echo ${TROPFLUX}/src | tr -s "/") 
     195suppath=$(echo ${PROJECT}/src | tr -s "/") 
    189196echo ${PATH} | grep -q "${suppath}:" 
    190197test_path=${?} 
     
    199206unset test_path 
    200207# 
    201 # add TROPFLUX manuals to MANPATH 
     208# add PROJECT manuals to MANPATH 
    202209# if not already done 
    203 suppath=$(echo ${TROPFLUX}/doc/man | tr -s "/") 
     210suppath=$(echo ${PROJECT}/doc/man | tr -s "/") 
    204211echo ${MANPATH} | grep -q "${suppath}:" 
    205212test_manpath=${?} 
     
    215222unset suppath 
    216223# 
    217 TROPFLUX_LOG=${tempdir} 
    218 export TROPFLUX_LOG 
     224PROJECT_LOG=${tempdir} 
     225export PROJECT_LOG 
    219226unset tempdir 
    220 if [ ! -d ${TROPFLUX_LOG} ] 
    221 then 
    222    mkdir -p ${TROPFLUX_LOG} 
     227if [ ! -d ${PROJECT_LOG} ] 
     228then 
     229   mkdir -p ${PROJECT_LOG} 
    223230   status=${?} 
    224231   if [ ${status} -ne 0 ] 
    225232   then 
    226       echo "${command} : eee : can not create \${TROPFLUX_LOG}" 
     233      echo "${command} : eee : can not create \${PROJECT_LOG}" 
    227234      # nb : no exit because this file should be launched by login process 
    228235   else 
    229       echo "${command} : iii : creation of \${TROPFLUX_LOG}" 
     236      echo "${command} : iii : creation of \${PROJECT_LOG}" 
    230237   fi 
    231238   unset status 
    232239fi 
    233 # check for permission on TROPFLUX_LOG 
    234 if [ ! -x ${TROPFLUX_LOG} ] 
    235 then 
    236    echo " eee : ${TROPFLUX_LOG} not reachable" 
    237    # nb : no exit because this file should be launched by login process 
    238 fi 
    239 # 
    240 # check for permission on TROPFLUX_LOG 
    241 if [ ! -w ${TROPFLUX_LOG} ] 
    242 then 
    243    echo " eee : ${TROPFLUX_LOG} not writable" 
     240# check for permission on PROJECT_LOG 
     241if [ ! -x ${PROJECT_LOG} ] 
     242then 
     243   echo " eee : ${PROJECT_LOG} not reachable" 
     244   # nb : no exit because this file should be launched by login process 
     245fi 
     246# 
     247# check for permission on PROJECT_LOG 
     248if [ ! -w ${PROJECT_LOG} ] 
     249then 
     250   echo " eee : ${PROJECT_LOG} not writable" 
    244251   # nb : no exit because this file shouldreachable be launched by login process 
    245252fi 
     
    249256# 
    250257# io directories 
    251 TROPFLUX_ID=${indir} 
    252 export TROPFLUX_ID 
     258PROJECT_ID=${indir} 
     259export PROJECT_ID 
    253260unset indir 
    254 if [ ! -d ${TROPFLUX_ID} ] 
    255 then 
    256    mkdir -p ${TROPFLUX_ID} 
    257    echo "${command} : iii : creation of \${TROPFLUX_ID}" 
    258 fi 
    259 # check for permission on TROPFLUX_ID 
    260 if [ ! -x ${TROPFLUX_ID} ] 
    261 then 
    262    echo " eee : ${TROPFLUX_ID} not reachable" 
    263    # nb : no exit because this file should be launched by login process 
    264 fi 
    265 # 
    266 TROPFLUX_OD=${outdir} 
    267 export TROPFLUX_OD 
     261if [ ! -d ${PROJECT_ID} ] 
     262then 
     263   mkdir -p ${PROJECT_ID} 
     264   echo "${command} : iii : creation of \${PROJECT_ID}" 
     265fi 
     266# check for permission on PROJECT_ID 
     267if [ ! -x ${PROJECT_ID} ] 
     268then 
     269   echo " eee : ${PROJECT_ID} not reachable" 
     270   # nb : no exit because this file should be launched by login process 
     271fi 
     272# 
     273PROJECT_OD=${outdir} 
     274export PROJECT_OD 
    268275unset outdir 
    269 if [ ! -d ${TROPFLUX_OD} ] 
    270 then 
    271     mkdir -p ${TROPFLUX_OD} 
    272     echo "${command} : iii : creation of \${TROPFLUX_OD}" 
    273 fi 
    274 # check for permission on TROPFLUX_OD 
    275 if [ ! -x ${TROPFLUX_OD} ] 
    276 then 
    277    echo " eee : ${TROPFLUX_OD} not reachable" 
    278    # nb : no exit because this file should be launched by login process 
    279 fi 
    280 if [ ! -w ${TROPFLUX_OD} ] 
    281 then 
    282    echo " eee : ${TROPFLUX_OD} not writable" 
     276if [ ! -d ${PROJECT_OD} ] 
     277then 
     278    mkdir -p ${PROJECT_OD} 
     279    echo "${command} : iii : creation of \${PROJECT_OD}" 
     280fi 
     281# check for permission on PROJECT_OD 
     282if [ ! -x ${PROJECT_OD} ] 
     283then 
     284   echo " eee : ${PROJECT_OD} not reachable" 
     285   # nb : no exit because this file should be launched by login process 
     286fi 
     287if [ ! -w ${PROJECT_OD} ] 
     288then 
     289   echo " eee : ${PROJECT_OD} not writable" 
    283290   # nb : no exit because this file should be launched by login process 
    284291fi 
     
    288295unset saxo_dir 
    289296# 
     297# IDL startup 
     298IDL_STARTUP=${PROJECT}/src/project_init.pro 
     299export IDL_STARTUP 
     300# 
    290301# end 
    291302unset command 
Note: See TracChangeset for help on using the changeset viewer.