forked from NCAR/MPAS-Workflow
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CleanVariational.csh
executable file
·44 lines (35 loc) · 1.11 KB
/
CleanVariational.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
#!/bin/csh -f
date
# Setup environment
# =================
source config/experiment.csh
source config/filestructure.csh
source config/tools.csh
source config/mpas/${MPASGridDescriptor}/mesh.csh
set yymmdd = `echo ${CYLC_TASK_CYCLE_POINT} | cut -c 1-8`
set hh = `echo ${CYLC_TASK_CYCLE_POINT} | cut -c 10-11`
set thisCycleDate = ${yymmdd}${hh}
set thisValidDate = ${thisCycleDate}
source ./getCycleVars.csh
# static work directory
set self_WorkDir = $CyclingDADirs[1]
echo "WorkDir = ${self_WorkDir}"
cd ${self_WorkDir}
# ================================================================================================
# Remove obs-database output files
# ================================
set member = 1
while ( $member <= ${nEnsDAMembers} )
set memDir = `${memberDir} $DAType $member`
rm ${self_WorkDir}/${OutDBDir}${memDir}/${obsPrefix}*.h5
rm ${self_WorkDir}/${OutDBDir}${memDir}/${geoPrefix}*.nc4
rm ${self_WorkDir}/${OutDBDir}${memDir}/${diagPrefix}*.nc4
@ member++
end
# Remove netcdf lock files
rm *.nc*.lock
if ($MPASnCellsOuter != $MPASnCellsInner) then
rm ${TemplateFieldsFileInner}*
endif
date
exit 0