#!/usr/bin/ksh # # call_wget_antarctic_gmag.ksh - This script sets the arguments # to the script which downloads Antarctic gmag data # # March 2012 lphilpott@igpp.ucla.edu # Based heavily on: call_wget_green_gmag.ksh, call_wget_maccs_gmag.ksh, epo_ucla_rmd_mirror_batch.ksh # # NB: it is intended that this script be run on gaia2 as the wget log file formats differ between machines # and wget_antarctic_gmag relies on information within the log file. # ## Set the environment variables # if [[ -z $THMSOC ]] then THMSOC=/disks/socware/thmsoc_dp_current export THMSOC fi . /home/thmsoc/lphilpotts_stuff/antarctic_test/soc_it_to_me_test.config # ## Determine dates to check # thisYear=$(date -u '+%Y') thisMonth=$(date -u '+%m') integer ithisMonth=$thisMonth integer ilastMonth=$(( ithisMonth - 1 )) if (( $ilastMonth <= 0 )) then lastYear=$(( $thisYear - 1 )) for year in $thisYear $lastYear do for site in PG1 PG2 do wget_antarctic_gmag.ksh $site $year done done else for year in $thisYear do for site in PG1 PG2 do wget_antarctic_gmag.ksh $site $year done done fi ## Clean up # exit 0