From 9efb63c87190f2197e4f7d36254728caeccfa769 Mon Sep 17 00:00:00 2001 From: SURVEY Team Datamanager <das@noc.ac.uk> Date: Wed, 26 Aug 2020 17:09:01 +0100 Subject: [PATCH] Changes made during JC192 --- backup_core_local | 2 +- commands/mstar_dotcshrc | 2 +- ctd_linkscript | 42 ++++++++++++++++++++++++----------------- keep_akeake_in_sync | 6 +++--- rapid_backup | 6 +++--- rapid_get_weather | 31 ++++++++++++++++++++++++++++++ 6 files changed, 64 insertions(+), 25 deletions(-) create mode 100755 rapid_get_weather diff --git a/backup_core_local b/backup_core_local index 047df4c..5b41c92 100755 --- a/backup_core_local +++ b/backup_core_local @@ -42,7 +42,7 @@ echo ------------- >> $backuplog echo Syncing $root_path to $sync_dir >> $backuplog echo Start `date` >> $backuplog -rsync -v -a --delete -b --backup-dir=$back_dir $root_path $sync_dir +rsync -v -a --delete --exclude '._*' --exclude '.DS_Store' -b --backup-dir=$back_dir $root_path $sync_dir set how_much1 = `du -sm $sync_dir` set how_much2 = `du -sm $back_dir` diff --git a/commands/mstar_dotcshrc b/commands/mstar_dotcshrc index c8d62a4..e683f2a 100755 --- a/commands/mstar_dotcshrc +++ b/commands/mstar_dotcshrc @@ -24,4 +24,4 @@ set dhome = /local/users/pstar/cruise if (! $?cdpath )set cdpath set cdpath = (. $dhome/data $dhome $cdpath) -set prompt="$user@`hostname` %/ > " +set prompt="$user@`hostname` %c3 > " diff --git a/ctd_linkscript b/ctd_linkscript index e395a3b..e2d09bf 100755 --- a/ctd_linkscript +++ b/ctd_linkscript @@ -2,25 +2,24 @@ # #copy the raw and SBE-processed CTD files from the ship machine #then make links to the files to be ingested by mexec using the expected name format - cd /local/users/pstar/cruise/data - -set cpre = 'CTD_JC191' -set cruise = jc191 -#set ctdloc = /local/users/pstar/mounts/mnt_cruise_data/Specific_Equipment/CTD/ -set ctdloc = /local/users/pstar/mounts/mnt_cruise_data/Specific_Equipment/CTD/CTD # jc191 CTD appears twice in the directory name - +# May need to edit the following lines on a new cruise +#set cpre = 'CTD_JC192' +set cpre = 'JC192_CTD' +set cruise = jc192 +set ctdloc = /local/users/pstar/mounts/mnt_cruise_data/Specific_Equipment/CTD/ +#set ctdloc = /local/users/pstar/mounts/mnt_cruise_data/Specific_Equipment/CTD/CTD # jc191 CTD appears twice in the directory name #bak jc191 we don't want all the cnvs with derived quantities, so explicitly pick up the raw and align_ctm -rsync -av ${ctdloc}/Processed\ Data/${cpre}_???.cnv ctd/ASCII_FILES/ +rsync -av ${ctdloc}/Processed\ data/${cpre}_???.cnv ctd/ASCII_FILES/ #rsync -av ${ctdloc}/Processed\ Data/${cpre}_???_Align.cnv ctd/ASCII_FILES/ -rsync -av ${ctdloc}/Processed\ Data/${cpre}_???_Align_CTM.cnv ctd/ASCII_FILES/ -rsync -av ${ctdloc}/Raw\ Data/*.bl ctd/ASCII_FILES/ -rsync -av ${ctdloc}/Processed\ Data/${cpre}*.ros ctd/ASCII_FILES/ -rsync -av ${ctdloc}/Raw\ Data/*.hex ctd/RAW_CTD_FILES/ -rsync -av ${ctdloc}/Raw\ Data/*.XMLCON ctd/RAW_CTD_FILES/ -rsync -av ${ctdloc}/Raw\ Data/*.hdr ctd/RAW_CTD_FILES/ -rsync -av ${ctdloc}/Processed\ Data/${cpre}*.btl ctd/ASCII_FILES/ - +rsync -av ${ctdloc}/Processed\ data/${cpre}_???_Align_CTM.cnv ctd/ASCII_FILES/ +rsync -av ${ctdloc}/Raw\ data/*.bl ctd/ASCII_FILES/ +rsync -av ${ctdloc}/Processed\ data/${cpre}*.ros ctd/ASCII_FILES/ +rsync -av ${ctdloc}/Raw\ data/*.hex ctd/RAW_CTD_FILES/ +rsync -av ${ctdloc}/Raw\ data/*.XMLCON ctd/RAW_CTD_FILES/ +rsync -av ${ctdloc}/Raw\ data/*.hdr ctd/RAW_CTD_FILES/ +rsync -av ${ctdloc}/Processed\ data/${cpre}*.btl ctd/ASCII_FILES/ +rsync -av ${ctdloc}/SBE35\ data/SBE35_???.cap ctd/ASCII_FILES/SBE35 cd ctd/ASCII_FILES foreach i (`ls ${cpre}_???_Align_CTM.cnv`) @@ -53,4 +52,13 @@ foreach i (`ls ${cpre}_???.cnv`) endif end -cd ../.. +cd SBE35 +foreach i (`ls SBE35_???.cap`) + set num = `awk -v nm="$i" 'BEGIN {print substr(nm,index(nm,".cap")-3,3)}'` + set linkfile = sbe35_${cruise}_${num}.asc + #echo $linkfile + if (! -e $linkfile) then + echo Making link $linkfile for raw file $i + ln -s $i $linkfile + endif +end diff --git a/keep_akeake_in_sync b/keep_akeake_in_sync index 13be668..51860fd 100755 --- a/keep_akeake_in_sync +++ b/keep_akeake_in_sync @@ -4,7 +4,7 @@ # # The directores to sync -set dir_list = 'jc174 rapid users' +set dir_list = 'jc192 rapid users' set local_path = /local/users/pstar/rpdmoc/ set remote_fs = 'pstar@akeake:' set remote_path = /local/users/pstar/rpdmoc/ @@ -15,7 +15,7 @@ foreach dd ($dir_list) echo Going to sync: $local_path$dd echo to: $remote_fs$remote_path echo Start `date` - rsync -v -a --delete $local_path$dd $remote_fs$remote_path + rsync -v -a --exclude '._*' --exclude '.DS_Store' --delete $local_path$dd $remote_fs$remote_path end # Sync all of the programs directory @@ -28,5 +28,5 @@ echo ' -------------- ' echo Going to sync: $local_path echo to: $remote_fs$remote_path echo Start `date` -rsync -v -a --delete $local_path $remote_fs$remote_path +rsync -v -a --exclude '._*' --exclude '.DS_Store' --delete $local_path $remote_fs$remote_path diff --git a/rapid_backup b/rapid_backup index 0f60828..e095917 100755 --- a/rapid_backup +++ b/rapid_backup @@ -14,14 +14,14 @@ # - $cru # Variables for pathnames -set cru = jc174 -set CRU = JC174 +set cru = jc192 +set CRU = JC192 set root = /local/users/pstar/ set rapiddir = 'rapid' # Could be osnap set usersdir = 'users' set progdir = 'programs' set deskdir = 'Desktop' -set exec_loc = ${root}cruise/data/exec/rapid/ +set exec_loc = ${root}programs/mexec-exec/ # Which drive are we using and is it there? echo ' ' diff --git a/rapid_get_weather b/rapid_get_weather new file mode 100755 index 0000000..8c0b38f --- /dev/null +++ b/rapid_get_weather @@ -0,0 +1,31 @@ +# Get some weather forecasts +#!/bin/csh +# +# Map choices are +# - "canaries" - for the easetern boundary +# - "arc" - from EB1 to WB6 +# - "Florida" - for the western boundary +# Other options are +# "azores", "biscay", .... +set mapc = 'biscay' +cd /local/users/pstar/Public/jc192_weather +set now = `date +%Y`-`date +%m`-`date +%d`-`date +%H` +echo $now +mkdir $now +cd $now +# Whole North Atlantic Pressure +wget https://www.passageweather.com/maps/natlantic/press/pressure.zip +# Then our chosen area +wget https://www.passageweather.com/maps/$mapc/wind/wind.zip +wget https://www.passageweather.com/maps/$mapc/waves/waves.zip + +# Now organsie the plots +mkdir pressure +unzip pressure.zip +mv *.png pressure +mkdir wind +unzip wind.zip +mv *.png wind +mkdir waves +unzip waves.zip +mv *.png waves -- GitLab