#! /bin/sh # #+ # # NAME # ==== # # step2_diff.sh - launch step2_diff.pro with year argument # # # SYNOPSYS # ======== # # :: # # $ step2_diff.sh -y year # # EXAMPLES # ======== # # For test on year 1994: # :: # # $ ./step2_diff.sh -y 1994 # # FILES # ===== # # original location # ~~~~~~~~~~~~~~~~~ # # /usr/home/fplod/incas/geomag/geomag_ws/step2_diff.sh sur aedon.locean-ipsl.upmc.fr # # EVOLUTIONS # ========== # # $Id$ # # - fplod 2007-08-22T08:50:02Z aedon.locean-ipsl.upmc.fr (Darwin) # # * creation to avoid retall and redefinition of file1 and file2 # #- # system=$(uname) case "${system}" in AIX|IRIX64) echo " www : no specific posix checking" ;; *) set -o posix ;; esac # command=$(basename ${0}) # usage=" Usage : ${command} -y year" # while [ ! -z "${1}" ] # ++ pb bash do case ${1} in -y) # year year=${2} shift ;; *) # other choice echo "${usage}" exit 1 ;; esac shift # next flag done # # ++ check year validity # # remove previous output file rm Sigma_5d_${year}_grid_T_ORCA2_diff.nc # # build IDL sequence of commands cat < /tmp/${command}${$}.pro year=getenv('year') file1= '/usr/work/sur/fvi/OPA/ORCA2/' + '/Sigma_5d_'+year+'_grid_T.nc' file2=getenv('GEOMAG_OD') + '/Sigma_5d_'+year+'_grid_T_ORCA2.nc' step2_diff, file1, file2, 'Sigma_5d_'+year+'_grid_T_ORCA2_diff.nc' EOF # # launch IDL with the sequence ${IDL_DIR}/bin/idl < /tmp/${command}${$}.pro # # cleanning #++rm /tmp/${command}${$}.pro # # end exit 0