updateLocalDataBase 598 Bytes
#!/bin/bash
    tgt=$1

    cd $TAOPATH && ./clean && chmod ug+w *_times.nc 
    touch LOCK
   
    rsync -p $REMOTEHOST:$REMOTEPATH/$tgt*.nc $TAOPATH/
    rename $tgt sw $tgt*.nc

    if [[ $sw_vi == "ace_swepam_real" ]]
        then
            $DDBIN/TimesUpdate -d sw_times.nc sw_[0-9]*.nc.gz
            $DDBIN/DDClearTimes sw_times.nc
            $DDBIN/TimesUpdate -r sw_times.nc sw_[0-9]*.nc
        else
            $DDBIN/TimesUpdate -u sw_times.nc sw_[0-9]*.nc
    fi

    php $DDBIN/UpdateInfo.php sw
    rm LOCK
    php $DECODERTOOLS/DataBaseLog/updateDataBaseLog.php $TAOPATH