...
 
Commits (4)
...@@ -47,7 +47,7 @@ do ...@@ -47,7 +47,7 @@ do
case $i in case $i in
--clean) clean=1 --clean) clean=1
;; ;;
--conf) install="install-data" --conf) conf_only=1
;; ;;
--destdir=*) destdir="${i#*=}" --destdir=*) destdir="${i#*=}"
;; ;;
...@@ -128,7 +128,9 @@ fi ...@@ -128,7 +128,9 @@ fi
# make install # make install
if [ $purify ]; then if [ $conf_only ]; then
install="install-data"
elif [ $purify ]; then
export CC="purify -cache-dir=$HOME/.purecache -windows=no gcc" export CC="purify -cache-dir=$HOME/.purecache -windows=no gcc"
install="-e $install" install="-e $install"
echo "------------------------------------------------------------------" echo "------------------------------------------------------------------"
...@@ -142,4 +144,107 @@ else ...@@ -142,4 +144,107 @@ else
run "make $install" run "make $install"
fi fi
exit # If only building conf files, exit before IDL compilation
if [ $conf_only ]; then
exit 0
fi
cd ..
# BUILD IDL *sav files
proctype='vap'
process='langley'
execname="${process}_batch"
idl_dir=/apps/base/idl/idl86
if [ -z "$ADI_HOME" ]; then
ADI_HOME=/apps/ds
fi
if [ -z "$APPS_DS" ]; then
APPS_DS=/apps/ds
fi
# Get IDL version number from IDL installation directory
idl_version=$(echo $idl_dir | grep -Eo '[0-9]+$')
idlnn=idl$idl_version
IDLnn=IDL$idl_version
# Install IDL .sav file
echo "------------------------------------------------------------------"
bindir="$destdir$prefix/bin"
objdir="$destdir$prefix/bytecode"
sav_file="${execname}.sav"
echo "bindir: $bindir"
echo "objdir: $objdir"
if [ ! -d $bindir ]; then
run "mkdir -p $bindir"
fi
if [ ! -d $objdir ]; then
run "mkdir -p $objdir"
fi
# Set IDL_DLM_PATH for ADI bindings
ADI_DLM="${ADI_HOME}/lib64"
if [ "$idlnn" != "idl82" ]; then
ADI_DLM="${ADI_DLM}/${idlnn}"
fi
export IDL_DLM_PATH="${ADI_DLM}:<IDL_DEFAULT>"
# Set IDL environment
export IDL_DIR=$idl_dir
export IDL_PATH="+${IDL_DIR}/lib"
export IDL_PATH="+${APPS_DS}/lib:${IDL_PATH}"
export IDL_PATH="+${ADI_DLM}:${IDL_PATH}"
echo "IDL_DIR: $IDL_DIR"
echo "IDL_PATH: $IDL_PATH"
echo "IDL_DLM_PATH: $IDL_DLM_PATH"
# Build resolve statements
cd src
resolve=("resolve_routine, '${execname}'")
resolve+=("resolve_all")
# Build the build command
join_by()
{
local d=$1; shift
echo -n "$1"; shift;
printf "%s" "${@/#/$d}"
}
idl_buffer="buffer=['BUF_PNNL_RTD_LIC_99781','${IDL_DIR}/../license/license-BUF_PNNL_RTD_LIC_99781.bin']"
if (( $idl_version < 86 )); then
idl_buffer="/embedded"
fi
resolve=$(join_by ' & ' "${resolve[@]}")
save="save, file='$objdir/$sav_file', $idl_buffer, /routines, variables=0"
# Build the .sav file
run "rm -f $objdir/$sav_file"
echo "$resolve & $save & exit" | ${IDL_DIR}/bin/idl
if [ -e "$objdir/$sav_file" ]; then
echo "Installed $objdir/$sav_file"
else
echo "Could not create sav file: $sav_file"
exit 1
fi
exit 0
...@@ -620,8 +620,9 @@ void create_quicklooks (void) ...@@ -620,8 +620,9 @@ void create_quicklooks (void)
* Create the name of the batch file, as well as the command * Create the name of the batch file, as well as the command
* Note that the output from IDL will go to stdout. * Note that the output from IDL will go to stdout.
*/ */
sprintf (command, "%s/bin/idl", getenv ("IDL_DIR")); // sprintf (command, "%s/bin/idl", getenv ("IDL_DIR"));
sprintf (argument, "-em=%s/%s_batch.sav", getenv ("IDL_SAV_DIR"), sprintf (command, "/apps/base/rsi/idl86/bin/idl");
sprintf (argument, "-rt=%s/bytecode/%s_batch.sav", getenv("VAP_HOME"),
vapname); vapname);
/* /*
* Execute the IDL command. If successful, the exit of the * Execute the IDL command. If successful, the exit of the
...@@ -902,9 +903,20 @@ void getWavelengthAttr (DATA *D) ...@@ -902,9 +903,20 @@ void getWavelengthAttr (DATA *D)
B1, B1,
0, 0,
IN_CHN1 + r, IN_CHN1 + r,
"actual_wavelength", "centroid_wavelength",
NULL, NULL,
NULL); NULL);
if (foo == NULL) {
foo = (char *)bw_GetAttrValue (D,
B1,
0,
IN_CHN1 + r,
"actual_wavelength",
NULL,
NULL);
}
if (foo != NULL) if (foo != NULL)
{ {
channels[r + 1] = atof (foo); channels[r + 1] = atof (foo);
......
...@@ -196,7 +196,7 @@ pro langley, ch, to = to, date = td, $ ...@@ -196,7 +196,7 @@ pro langley, ch, to = to, date = td, $
; plots themselves. ; plots themselves.
;idlVersion = '8.0' ;idlVersion = '8.0'
idlVersion = '8.0' idlVersion = '8.6'
qlDate = '$Date: 2012-01-09 16:02:40 $' qlDate = '$Date: 2012-01-09 16:02:40 $'
first = strpos (qlDate, ' ') + 1 first = strpos (qlDate, ' ') + 1
......
...@@ -23,7 +23,7 @@ pro langley_batch ...@@ -23,7 +23,7 @@ pro langley_batch
algorithm = getenv ("ALGORITHM") algorithm = getenv ("ALGORITHM")
resolve_routine, 'langley' resolve_routine, 'langley'
resolve_all ; resolve_all
langley, 1, to=6, date = date, platform = platform, site=site, $ langley, 1, to=6, date = date, platform = platform, site=site, $
facility=facility, algorithm = 'barnard', $ facility=facility, algorithm = 'barnard', $
......