Skip to content
Snippets Groups Projects
Unverified Commit fe1eae32 authored by Hernán Asorey's avatar Hernán Asorey
Browse files

Minor typo in extractor. New script to download averaged atmospheric profiles from github

parent b1c63439
No related branches found
No related tags found
No related merge requests found
File added
......@@ -196,7 +196,7 @@ def main(argv):
]
if verbose:
print("Extracting data from sites google sheet...", end='')
credentials = ServiceAccountCredentials.from_json_keyfile_name('access-data-64a03ecb59d0.json', scope)
credentials = ServiceAccountCredentials.from_json_keyfile_name('<insert json access data here.json', scope)
client = gspread.authorize(credentials)
sheet = client.open("DatosRC").sheet1
data = sheet.get_all_records()
......
......@@ -55,8 +55,21 @@ if [ "$2" -lt 0 ] || [ $2 -gt 99 ]; then
fi
site=$1
year=$(printf "%02d" $2)
n=0
for m in $(seq -w 1 12); do
url_file="$url_base/${site}/atmprof${site}${year}${m}.dat"
wget $url_file
file="atmprof${site}${year}${m}.dat"
url_file="$url_base/${site}/${file}"
if $(wget -q $url_file); then
echo "File $file retrived"
n=$(( n + 1 ))
else
echo "Failed to retrieve $file"
fi
done
if [ "$n" -eq 12 ]; then
echo "Success retrieving site:${site} for year:$year"
else
echo "Failed to retrieve some files. $n files extracted"
echo "Perhaps files does not be already produced. Please check at https://github.com/lagoproject/atmospheres/"
exit 99
fi
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment