-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathloop_mm5_to_netcdf.csh
executable file
·52 lines (39 loc) · 1.56 KB
/
loop_mm5_to_netcdf.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
# "infilename" is the input file to the MM5tonetCDF program
# (include full path if file is not in current directory)
#
# "outfilename" is the name of the output from the MM5tonetCDF program
# (include full path if you do not want the files to be placed in
# current directory)
# outfilename will be used for both the .ctl and .dat file
# In the case below the files test.ctl and test.dat will be created
files=`ls MMOUT*`
for archivo in $files ; do
#file=/disk/CLIMA/MM5-CORDEX-AFRICA/SALIDAS.435421/MMOUT_DOMAIN1.1999.part${year}
file=$archivo
infilename=$file
outfilename=${file}.nc
echo 'Input: '$infilename ' Output '$outfilename
###############################################################
###############################################################
##### #####
##### END OF USER MODIFICATIONS #####
##### #####
###############################################################
###############################################################
#------------------ SET THE SYMBOLIC LINKS -----------------#
echo ....setting links to data....
rm -f fort.10
rm -f fort.80
rm -f fort.81
ln -s ${infilename} fort.10
#------------------ RUN THE PROGRAM ------------------------#
echo ....running....
/home/jimenez/MM5toNETCDF/mm5tonetcdf.exe
mv output.nc ${outfilename}
#----------------- CLEAN UP --------------------------------#
rm -f fort.10
rm -f fort.80
rm -f fort.81
done
cd /home/jimenez/MM5toNETCDF
echo ....Program finished....