Skip to content

Commit 2a1ffa7

Browse files
committed
commit version 2b
1 parent fc0adb8 commit 2a1ffa7

File tree

96 files changed

+19838
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+19838
-0
lines changed

APS_CONFIG.sh

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Copyright (C) 2015 Bekaert David - University of Leeds
2+
# Email: eedpsb@leeds.ac.uk or davidbekaert.com
3+
#
4+
# This program is free software; you can redistribute it and/or modify
5+
# it under the terms of the GNU General Public License as published by
6+
# the Free Software Foundation; either version 2 of the License, or
7+
# (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU General Public License along
15+
# with this program; if not, write to the Free Software Foundation, Inc.,
16+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17+
#
18+
19+
# Give the correct path to the APS toolbox
20+
export APS_toolbox="/nfs/see-fs-01_users/eedpsb/software/svn_aps"
21+
# export PYTHONPATH="${PYTHONPATH}:/nfs/see-fs-01_users/eedpsb/software/svn_aps/python_modules/"
22+
# full path to the get_modis.py file
23+
# export get_modis_filepath="/nfs/a1/software/python_packages/oscar-client-python/get_modis.py"
24+
25+
#####################################
26+
# shouldn't need to change below here
27+
#####################################
28+
29+
case ":${MATLABPATH}:" in
30+
::) export MATLABPATH="${APS_toolbox}/matlab";;
31+
*:${APS_toolbox}/matlab:*) : ;;
32+
*) export MATLABPATH="${APS_toolbox}/matlab:${MATLABPATH}";;
33+
esac
34+
35+
export APS_toolbox_scripts="${APS_toolbox}/scripts"
36+
export APS_toolbox_bin="${APS_toolbox}/bin"
37+
export PATH="${PATH}:${APS_toolbox_bin}:${PYTHONPATH}"

APS_CONFIG.tcsh

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Copyright (C) 2015 Bekaert David - University of Leeds
2+
# Email: eedpsb@leeds.ac.uk or davidbekaert.com
3+
#
4+
# This program is free software; you can redistribute it and/or modify
5+
# it under the terms of the GNU General Public License as published by
6+
# the Free Software Foundation; either version 2 of the License, or
7+
# (at your option) any later version.
8+
#
9+
# This program is distributed in the hope that it will be useful,
10+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
# GNU General Public License for more details.
13+
#
14+
# You should have received a copy of the GNU General Public License along
15+
# with this program; if not, write to the Free Software Foundation, Inc.,
16+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
17+
#
18+
19+
20+
# Give the correct path to the APS toolbox
21+
setenv APS_toolbox "/Users/dbekaert/Software/svn_aps/trunk/"
22+
setenv PYTHONPATH "/Users/dbekaert/Software/svn_aps/trunk/python_modules/"
23+
# full path to the get_modis.py file
24+
setenv get_modis_filepath "/Users/dbekaert/Software/oscar/get_modis.py"
25+
setenv get_ecmwf_filepath "/Users/dbekaert/Software/ecmwfapi/api.py"
26+
27+
# when matlab search for you shell.
28+
# if not found a default bash shell is used.
29+
# uncomment the next line and specify your shell when needed.
30+
setenv MATLAB_SHELL "/bin/csh"
31+
32+
#####################################
33+
# shouldn't need to change below here
34+
#####################################
35+
36+
if (! ${?MATLABPATH}) then
37+
setenv MATLABPATH "$APS_toolbox/matlab"
38+
else if (":${MATLABPATH}:" !~ *":$APS_toolbox/matlab:"*) then
39+
setenv MATLABPATH "$APS_toolbox/matlab:${MATLABPATH}"
40+
endif
41+
42+
setenv APS_toolbox_scripts "$APS_toolbox/scripts"
43+
setenv APS_toolbox_bin "$APS_toolbox/bin"
44+
setenv PATH "${PATH}:${APS_toolbox_bin}:${PYTHONPATH}"
45+
46+

CITATION.TXT

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
When using TRAIN cite as follows:
2+
Bekaert, D.P.S., Walters, R.J., Wright, T.J., Hooper, A.J., and Parker, D.J. (2015c), Statistical comparison of InSAR tropospheric correction techniques, Remote Sensing of Environment, doi: 10.1016/j.rse.2015.08.035
3+
4+
You can use the following bibtex entry:
5+
@article{Bekaert2015c,
6+
author = "D.P.S. Bekaert and R.J. Walters and T.J. Wright and A.J. Hooper and D.J. Parker",
7+
title = "Statistical comparison of InSAR tropospheric correction techniques",
8+
journal = "Remote Sensing of Environment ",
9+
year = "2015",
10+
issn = "0034-4257",
11+
doi = "http://dx.doi.org/10.1016/j.rse.2015.08.035",
12+
}

TOOLBOX_LICENSE

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
This toolbox is only intended for research and should not be used for commercial purposes. Parts of this toolbox have been modified from other established methods, which should also be cited accordingly.
2+
3+
You can post your questions to https://groups.google.com/forum/?hl=en#!forum/TRAIN_support
4+
5+
Any damage or data loss resulting from this toolbox is at your own risk.
6+
There are a few matlab script for which a copyright liscence is included in the matlab folder.

Variable_Tables/readme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
This can be the location to put your WRF variable tables.

bin/WPS_clean

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
#!/bin/tcsh -f
2+
3+
#
4+
# Copyright (C) 2015 Bekaert David - University of Leeds
5+
# Email: eedpsb@leeds.ac.uk or davidbekaert.com
6+
#
7+
# This program is free software; you can redistribute it and/or modify
8+
# it under the terms of the GNU General Public License as published by
9+
# the Free Software Foundation; either version 2 of the License, or
10+
# (at your option) any later version.
11+
#
12+
# This program is distributed in the hope that it will be useful,
13+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
# GNU General Public License for more details.
16+
#
17+
# You should have received a copy of the GNU General Public License along
18+
# with this program; if not, write to the Free Software Foundation, Inc.,
19+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20+
#
21+
22+
23+
# datapath
24+
rm -rf Vtable : > .tmp
25+
rm -rf FILE:* >> .tmp
26+
rm -rf PFILE:* >> .tmp
27+
rm -rf SFC:* >> .tmp
28+
rm -rf PRESS:* >> .tmp
29+
rm -rf met_em.d0* >> .tmp
30+
rm -rf geo*.log >> .tmp
31+
rm -rf log.* >> .tmp
32+
rm -rf GRIBFILE.AA* >> .tmp
33+
rm -rf geo*.nc >> .tmp
34+
rm -rf metgrid.log >> .tmp

bin/WRF_clean

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#!/bin/tcsh -f
2+
3+
#
4+
# Copyright (C) 2015 Bekaert David - University of Leeds
5+
# Email: eedpsb@leeds.ac.uk or davidbekaert.com
6+
#
7+
# This program is free software; you can redistribute it and/or modify
8+
# it under the terms of the GNU General Public License as published by
9+
# the Free Software Foundation; either version 2 of the License, or
10+
# (at your option) any later version.
11+
#
12+
# This program is distributed in the hope that it will be useful,
13+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
14+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15+
# GNU General Public License for more details.
16+
#
17+
# You should have received a copy of the GNU General Public License along
18+
# with this program; if not, write to the Free Software Foundation, Inc.,
19+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20+
#
21+
22+
23+
# datapath
24+
rm -rf met_em.d0*
25+
rm -rf wrfi* wrfbdy*
26+

bin/get_CFSR.csh

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
#! /bin/csh -f
2+
#
3+
# c-shell script to download selected files from rda.ucar.edu using Wget
4+
# NOTE: if you want to run under a different shell, make sure you change
5+
# the 'set' commands according to your shell's syntax
6+
# after you save the file, don't forget to make it executable
7+
# i.e. - "chmod 755 <name_of_script>"
8+
#
9+
# Experienced Wget Users: add additional command-line flags here
10+
# Use the -r (--recursive) option with care
11+
# Do NOT use the -b (--background) option - simultaneous file downloads
12+
# can cause your data access to be blocked
13+
set opts = "-N"
14+
#
15+
# Replace "xxxxxx" with your password
16+
# IMPORTANT NOTE: If your password uses a special character that has special
17+
# meaning to csh, you should escape it with a backslash
18+
# Example: set passwd = "my\!password"
19+
20+
# Copyright (C) 2015 Bekaert David - University of Leeds
21+
# Email: eedpsb@leeds.ac.uk or davidbekaert.com
22+
# script generated from UCAR webpage
23+
#
24+
# This program is free software; you can redistribute it and/or modify
25+
# it under the terms of the GNU General Public License as published by
26+
# the Free Software Foundation; either version 2 of the License, or
27+
# (at your option) any later version.
28+
#
29+
# This program is distributed in the hope that it will be useful,
30+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
31+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32+
# GNU General Public License for more details.
33+
#
34+
# You should have received a copy of the GNU General Public License along
35+
# with this program; if not, write to the Free Software Foundation, Inc.,
36+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
37+
#
38+
39+
if ($#argv != 3) then # DB
40+
echo "get_GFS.csh passwd email filelist"
41+
endif
42+
43+
set passwd = $argv[1]
44+
set email = $argv[2]
45+
set filelist = $argv[3]
46+
47+
48+
set num_chars = `echo "$passwd" |awk '{print length($0)}'`
49+
if ($num_chars == 0) then
50+
echo "You need to set your password before you can continue"
51+
echo " see the documentation in the script"
52+
exit
53+
endif
54+
@ num = 1
55+
set newpass = ""
56+
while ($num <= $num_chars)
57+
set c = `echo "$passwd" |cut -b{$num}-{$num}`
58+
if ("$c" == "&") then
59+
set c = "%26";
60+
else
61+
if ("$c" == "?") then
62+
set c = "%3F"
63+
else
64+
if ("$c" == "=") then
65+
set c = "%3D"
66+
endif
67+
endif
68+
endif
69+
set newpass = "$newpass$c"
70+
@ num ++
71+
end
72+
set passwd = "$newpass"
73+
#
74+
set cert_opt = ""
75+
# If you get a certificate verification error (version 1.10 or higher),
76+
# uncomment the following line:
77+
#set cert_opt = "--no-check-certificate"
78+
#
79+
# authenticate - NOTE: You should only execute this command ONE TIME.
80+
# Executing this command for every data file you download may cause
81+
# your download privileges to be suspended.
82+
if ("$passwd" == "xxxxxx") then
83+
echo "You need to set your password before you can continue"
84+
echo " see the documentation in the script"
85+
exit
86+
endif
87+
wget $cert_opt -O /dev/null --save-cookies auth.rda.ucar.edu --post-data="email=$email&passwd=$passwd&action=login" https://rda.ucar.edu/cgi-bin/login
88+
#
89+
# download the file(s)
90+
foreach file(`cat $filelist`)
91+
echo $file
92+
wget $cert_opt $opts --load-cookies auth.rda.ucar.edu http://rda.ucar.edu/data/ds093.0/$file
93+
end
94+
95+
#
96+
# clean up
97+
#rm auth.rda.ucar.edu
98+
99+

bin/get_GFS.csh

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
#! /bin/csh -f
2+
#
3+
# c-shell script to download selected files from rda.ucar.edu using Wget
4+
# NOTE: if you want to run under a different shell, make sure you change
5+
# the 'set' commands according to your shell's syntax
6+
# after you save the file, don't forget to make it executable
7+
# i.e. - "chmod 755 <name_of_script>"
8+
#
9+
# Experienced Wget Users: add additional command-line flags here
10+
# Use the -r (--recursive) option with care
11+
# Do NOT use the -b (--background) option - simultaneous file downloads
12+
# can cause your data access to be blocked
13+
set opts = "-N"
14+
#
15+
# Replace "xxxxxx" with your password
16+
# IMPORTANT NOTE: If your password uses a special character that has special
17+
# meaning to csh, you should escape it with a backslash
18+
# Example: set passwd = "my\!password"
19+
#
20+
# Copyright (C) 2015 Bekaert David - University of Leeds
21+
# Email: eedpsb@leeds.ac.uk or davidbekaert.com
22+
# script generated from UCAR webpage
23+
#
24+
# This program is free software; you can redistribute it and/or modify
25+
# it under the terms of the GNU General Public License as published by
26+
# the Free Software Foundation; either version 2 of the License, or
27+
# (at your option) any later version.
28+
#
29+
# This program is distributed in the hope that it will be useful,
30+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
31+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
32+
# GNU General Public License for more details.
33+
#
34+
# You should have received a copy of the GNU General Public License along
35+
# with this program; if not, write to the Free Software Foundation, Inc.,
36+
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
37+
#
38+
39+
40+
if ($#argv != 3) then # DB
41+
echo "get_GFS.csh passwd email filelist"
42+
endif
43+
44+
set passwd = $argv[1]
45+
set email = $argv[2]
46+
set filelist = $argv[3]
47+
48+
49+
set num_chars = `echo "$passwd" |awk '{print length($0)}'`
50+
if ($num_chars == 0) then
51+
echo "You need to set your password before you can continue"
52+
echo " see the documentation in the script"
53+
exit
54+
endif
55+
@ num = 1
56+
set newpass = ""
57+
while ($num <= $num_chars)
58+
set c = `echo "$passwd" |cut -b{$num}-{$num}`
59+
if ("$c" == "&") then
60+
set c = "%26";
61+
else
62+
if ("$c" == "?") then
63+
set c = "%3F"
64+
else
65+
if ("$c" == "=") then
66+
set c = "%3D"
67+
endif
68+
endif
69+
endif
70+
set newpass = "$newpass$c"
71+
@ num ++
72+
end
73+
set passwd = "$newpass"
74+
#
75+
set cert_opt = ""
76+
# If you get a certificate verification error (version 1.10 or higher),
77+
# uncomment the following line:
78+
#set cert_opt = "--no-check-certificate"
79+
#
80+
# authenticate - NOTE: You should only execute this command ONE TIME.
81+
# Executing this command for every data file you download may cause
82+
# your download privileges to be suspended.
83+
if ("$passwd" == "xxxxxx") then
84+
echo "You need to set your password before you can continue"
85+
echo " see the documentation in the script"
86+
exit
87+
endif
88+
wget $cert_opt -O /dev/null --save-cookies auth.rda.ucar.edu --post-data="email=$email&passwd=$passwd&action=login" https://rda.ucar.edu/cgi-bin/login
89+
#
90+
# download the file(s)
91+
foreach file(`cat $filelist`)
92+
echo $file
93+
wget $cert_opt $opts --load-cookies auth.rda.ucar.edu http://rda.ucar.edu/data/ds335.0/GFS0p5/$file
94+
end
95+
96+
#
97+
# clean up
98+
rm auth.rda.ucar.edu
99+
100+

0 commit comments

Comments
 (0)