You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of the scripts in the old cct repo have the following code block for dealing with a cdscan xml file:
# Check if input is an XML file
inbase=`basename $infile`
extn=`expr match "${inbase}" '.*\.\(.*\)'`
if [ $extn = 'xml' ] ; then
tmp_in=$TMPDIR/xml_concat.$$.nc
python ${CWSL_CTOOLS}/utils/xml_to_nc.py None $infile $tmp_in
infile=$tmp_in
fi
As you can see I've inserted ${CWSL_CTOOLS} to make it compatible with the CWSL plugin, but I'm wondering what to do with $TMPDIR? The nino34.sh script uses $temp_dir which is defined as follows:
I like that method of using a temp directory and then trapping the exit to remove it
As for the XML checking, I don't really like it as I would prefer not to use the xml catalogues, but if we must I think that method works.
The only change I would make is a switch from using backticks to using the $() - i.e. using:
Most of the scripts in the old cct repo have the following code block for dealing with a cdscan xml file:
As you can see I've inserted
${CWSL_CTOOLS}
to make it compatible with the CWSL plugin, but I'm wondering what to do with$TMPDIR
? Thenino34.sh
script uses$temp_dir
which is defined as follows:Should I do the same?
The text was updated successfully, but these errors were encountered: