-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmirror_rrfs.sh
53 lines (40 loc) · 1.49 KB
/
mirror_rrfs.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
#PBS -A RRFS-DEV
#PBS -q dev_transfer
#PBS -l select=1:ncpus=1:mem=8G
#PBS -l walltime=0:02:00
#PBS -j oe -o /lfs/h2/emc/ptmp/emc.lam/mirror/rrfs_mirror.out
#PBS -N RRFS_mirror
module purge
module load envvar/1.0
set -x
# mirror RRFSUPP files from prod to dev
PDY=20230309
cyc=08
mysite=$(cat /etc/cluster_name)
primary=$(head -1 /lfs/h1/ops/prod/config/prodmachinefile | cut -d ":" -f2-)
backup=$(head -2 /lfs/h1/ops/prod/config/prodmachinefile | tail -1 | cut -d ":" -f2-)
for minsback in 60 120 180 240 300 360 420
do
YYYYMMDDHH=`date +"%Y%m%d%H" -d "${CURRENTDATE} ${minsback} minute ago"`
currentdate=`date +"%Y%m%d %H"`
PDY=`echo ${YYYYMMDDHH} | cut -c1-8`
cyc=`echo ${YYYYMMDDHH} | cut -c9-10`
fcstlength=18
if [ $cyc -eq 00 -o $cyc -eq 12 -o $cyc -eq 06 -o $cyc -eq 18 ] ; then
export fcstlength="60"
fi
echo $fcstlength
done
source=/lfs/h2/emc/ptmp/emc.lam/rrfs/conus/prod/rrfs_a.${PDY}/${cyc}
destination==/lfs/h2/emc/ptmp/emc.lam/rrfs/v0.3.8_dogwood/prod/rrfs_a.${PDY}/${cyc}
mkdir -p $destination
rsync -arv $sourcemachine:$source $destination
exit
devdir=/lfs/h2/emc/ptmp/emc.lam/rrfs/v0.3.8_dogwood
#rsync -arv cdxfer.wcoss2.ncep.noaa.gov:/lfs/h2/emc/lam/noscrub/emc.lam/FIX_RRFS/smoke_dust /lfs/h2/emc/ptmp/emc.lam/mirror
rsync -arv /lfs/h2/emc/ptmp/emc.lam/rrfs/v0.3.8/logs/rrfs_a.20230308/16.tar cdxfer.wcoss2.ncep.noaa.gov:/lfs/h2/emc/ptmp/emc.lam/mirror
exit
exit