-
Notifications
You must be signed in to change notification settings - Fork 0
/
UngribColdStartIC.csh
executable file
·58 lines (47 loc) · 1.39 KB
/
UngribColdStartIC.csh
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
#!/bin/csh -f
date
# Setup environment
# =================
source config/environment.csh
source config/filestructure.csh
source config/modeldata.csh
source config/builds.csh
set yymmdd = `echo ${CYLC_TASK_CYCLE_POINT} | cut -c 1-8`
set yy = `echo ${CYLC_TASK_CYCLE_POINT} | cut -c 1-4`
set hh = `echo ${CYLC_TASK_CYCLE_POINT} | cut -c 10-11`
set thisCycleDate = ${yymmdd}${hh}
set thisValidDate = ${thisCycleDate}
source ./getCycleVars.csh
# static work directory
echo "WorkDir = ${InitICDir}"
mkdir -p ${InitICDir}
cd ${InitICDir}
# ================================================================================================
## link ungribbed GFS
set fhour = 000
set Vtable = Vtable.GFS_FV3
set linkWPS = link_grib.csh
set GFSprefix = gfs.0p25
rm -rf GRIBFILE.*
ln -sfv ${WPSBuildDir}/${linkWPS} .
./${linkWPS} ${GFSgribdirRDA}/${yy}/${yymmdd}/${GFSprefix}.${yymmdd}${hh}.f${fhour}.grib2
## copy Vtable
ln -sfv ${VtableDir}/${Vtable} Vtable
## copy/modify dynamic namelist
rm ${NamelistFileWPS}
cp -v ${initModelConfigDir}/${NamelistFileWPS} .
sed -i 's@startTime@'${NMLDate}'@' $NamelistFileWPS
# Run the executable
# ==================
rm ./${ungribEXE}
ln -sfv ${WPSBuildDir}/${ungribEXE} ./
./${ungribEXE}
# Check status
# ============
grep "Successful completion of program ${ungribEXE}" ungrib.log
if ( $status != 0 ) then
echo "ERROR in $0 : Ungrib failed" > ./FAIL
exit 1
endif
date
exit 0