-
Notifications
You must be signed in to change notification settings - Fork 0
/
GetWarmStartIC.csh
executable file
·42 lines (36 loc) · 1.36 KB
/
GetWarmStartIC.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
#!/bin/csh -f
source config/filestructure.csh
source config/modeldata.csh
source config/experiment.csh
set thisCycleDate = $FirstCycleDate
set thisValidDate = $thisCycleDate
source ./getCycleVars.csh
set member = 1
while ( $member <= ${nEnsDAMembers} )
echo ""
echo ""
find $CyclingFCDirs[$member] -mindepth 0 -maxdepth 0 > /dev/null
if ($? == 0) then
rm -r $CyclingFCDirs[$member]
endif
mkdir -p $CyclingFCDirs[$member]
# Outer loop mesh
set fcFile = $CyclingFCDirs[$member]/${FCFilePrefix}.${nextFirstFileDate}.nc
set InitialMemberFC = "$firstFCDirOuter"`${memberDir} ens $member "${firstFCMemFmt}"`
ln -sfv ${InitialMemberFC}/${FCFilePrefix}.${nextFirstFileDate}.nc ${fcFile}${OrigFileSuffix}
# rm ${fcFile}
cp ${fcFile}${OrigFileSuffix} ${fcFile}
# Inner loop mesh
if ($MPASnCellsOuter != $MPASnCellsInner) then
echo ""
set innerFCDir = $CyclingFCDirs[$member]/Inner
mkdir -p ${innerFCDir}
set fcFile = $innerFCDir/${FCFilePrefix}.${nextFirstFileDate}.nc
set InitialMemberFC = "$firstFCDirInner"`${memberDir} ens $member "${firstFCMemFmt}"`
ln -sfv ${InitialMemberFC}/${firstFCFilePrefix}.${nextFirstFileDate}.nc ${fcFile}${OrigFileSuffix}
# rm ${fcFile}
cp ${fcFile}${OrigFileSuffix} ${fcFile}
endif
@ member++
end
exit 0