-
Notifications
You must be signed in to change notification settings - Fork 3
/
ygefsobs
executable file
·90 lines (78 loc) · 4.05 KB
/
ygefsobs
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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
#!/bin/sh -l
echo 'into'
#Script to create text files of surface obs at various stations
module load gnu/4.8.5
module load ips/18.0.1.163
module load ips/18.0.5.274
module load metplus/2.1
module load gempak/7.3.3
mkdir -p /gpfs/dell1/stmp/Alicia.Bentley/obsgefs
cd /gpfs/dell1/stmp/Alicia.Bentley/obsgefs
rm -rf *txt
/bin/date --date="2 days ago" +%Y%m%d00 > yholddate.txt
year=`cut -c 1-4 yholddate.txt`
month=`cut -c 5-6 yholddate.txt`
day=`cut -c 7-8 yholddate.txt`
hour=`cut -c 9-10 yholddate.txt`
cyc=`cut -c 9-10 yholddate.txt`
ymdh=${year}${month}${day}${hour}
ymd=`cut -c 1-8 yholddate.txt`
echo $ymdh
echo $ymd
k=0
stations="724030"
stations="DEN"
stations="GJT"
stations="DEN GJT PUB ORD \
DEC IND FWA DVN \
DSM DDC GLD TOP ICT \
JKL SDF PAH DET GLR GRR \
SAW DLH MSP MCI SGF STL \
HSI LBF OMA BIS GFK ABR \
RAP FSD GRB LSE MKE CYS \
RIW CAR LEW BOS PHL ALB \
BGM BUF LGA NKT RDU ILM \
CLE ILN PIT UNV CHS CAE \
GSP BTV IAD BCB RIC CRW \
BHM HSV MOB LIT JAX EYW \
MLB MIA TLH TPA ATL LCH \
NEW SHV JAN ABQ OUN TUL \
MEM TYS BNA AMA SAT BRO \
CRP ELP DAL HOU LBB MAF \
SJT FLG PHX TUS ACV LAX \
SAC SAN SFO SCK BOI PIH \
BIL GGW GTF MSO EKO LAS \
RNO MFR PDT PDX SLC SEA GEG"
stations="LIT PHX LAX SFO DEN JAX MIA ATL BOI ORD DDC MSY BOS CAR ANJ MSP MCI STL GTF ILM BIS ABQ TPH BUF MFR DFW BRO LBB SLC IAD SEA DTW INL HSE FAR VTN LGA EUG CHS GEG SHR TUS FLG FAT MRY SAC SAN GJT EYW MCO DSM IND ACK DLH GGW WEY RDU GFK OMA LAS RNO OKC PDX PDT PIT RAP FSD MEM BNA CRP DRT ELP IAH UIL RIW EET MOB FSM PGA YUM EDW PSP RDD VBG PUB TLH TPA MCN DVN SUX PIH FWA GLD ICT LOU PAH LCH SHV BGR PWM GLR GRR AXN JAN HVR MSO NKT GSO LBF EKO ELY WMC ALB SYR CLE ILN TUL DLS PHL UNV CAE GSP ABR PIR AMA AUS CDS LRD ROA ORF BTV YKM GRB MKE HTS CYS COD HSV GCN INW NID AKO ASE CAG DRO GXY LAA LIC HFD GNV MLB VRB AHN AGS SAV CID DBQ ALO COE DEC PIA RFD EVV GYY LAF SBN GCK HYS LBL MHK BWG LEX BTR POE SBY AUG APN FNT LAN MKG MQT BRD PKD COU STJ GWO TUP BZN CTB HLN MLS AVL CLT FAY ACY CVS HMN ROW POU UCA CMH DAY ADM END AST ERI TRI CHA TYS ABI CLL GGG TYR SPS CDC ENV RIC MPV HQM EAU MSN EKN MRB PANC PANT PABR PABE PACD PASY PAFA PAKN PADQ PAOT PAMC PAOM PASN PAYA PHTO PHLI PHMO JKL SGF MAF SJT PABT PALU PAEH PACZ PACV PASC PABI PADL PAGA PAGK PAHN PAHO PAIL PAIM PAOR PAPG PASI PATK PATA PATC PAUN PADU OZR ELD JBR TXK DUG SAD SOW ACV BFL BYS BIH BLH NJK MOD EED PRB STS ALS VPS RSW PAM ABY AMG CSG VLD PHKO BRL FOD OTM SPW BYI SUN LWS MYL SMN CNU MLU EPM RWF RST RRT IRK POF SZL NMM PIB BIL DLN GDV GPI LWT DIK JMS MIB ISN CDR GRI MCK ONL BFF CON GUP CNM DMN HOB TCS LOL GTB MSS FDY GAG HBR MLC BKE BNO LKV OTH RDM REO AVP BFD JST MDT FLO HON MBG ATY CSV DYR DHT FST JCT LFK MRF PSX ACT LGU VEL CHO BLI EPH HYR LSE CWA BKW PKB BPI CPR GCC JAC RWL RKS WRL AAA TNB ORE ISP ASD 2C2 BWI BDR PVD HUL BLV FYV TOP LNK CVG BGM DAB MWL HIB STC COS DPG SLE SMP SAF LVS PRC ONT PAJN PBI MGW SAT MGM PHNL TJSJ PGUA NSTU BLU NHK CBE 2WX PAKP PAFM PFYU PAWD"
hours="24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 09 08 07 06 05 04 03 02 01"
hours="23"
porp=$( cat /etc/dev )
if [[ $porp -eq "venus" ]]
then
for s in $stations; do
for h in $hours; do
/gpfs/dell2/emc/verification/save/Alicia.Bentley/gefs/advtime $ymdh 0 -1 1 0 > currentday.txt
ymdcurrent=`cut -c 1-8 currentday.txt`
fmdl1=/gpfs/dell1/nco/ops/dcom/prod/ldmdata/gempak/hrly/${ymd}.hrly
((k=k+1))
sflist << EOF
SFFILE = $fmdl1
AREA = @${s}
DATTIM = `/gpfs/dell2/emc/verification/save/Alicia.Bentley/gefs/advtime $ymdh 0 -1 0`-`/gpfs/dell2/emc/verification/save/Alicia.Bentley/gefs/advtime $ymdh $h -1 0`
SFPARM = tmpc;dwpc;sknt;drct;tclo;pmsl;P01I
OUTPUT = f/pancobs${h}.txt
IDNTYP = STID
l
r
ex
EOF
gpend
cat pancobs${h}.txt >> pancobs.txt
done
sed '/^\s*$/d' pancobs.txt | sed '/STN/d' | sed '/PARM/d' | sed '/P01I/d' > rtmp.txt && mv rtmp.txt pancobs.txt
mv pancobs.txt ${s}_${ymd}obs.txt
rm -rf *pancobs*txt
done
scp *${ymd}*.txt abentley@emcrzdm:/home/www/emc/htdocs/users/meg/plumes/
fi
exit