downloading multiple radolan data

20 views
Skip to first unread message

Shiva Mirdar

unread,
May 6, 2020, 10:50:54 AM5/6/20
to wradlib-users
Hello

Last year I used these codes to retrieve data from FTP database, today I noticed the database changed to HTTP. Now I don't know how to retrieve data.

ftp=ftplib.FTP ('ftp-cdc.dwd.de')
ftp.login ('anonymous' , '1234')
#ftp directory
ftp.cwd('pub/CDC/grids_germany/hourly/radolan/recent/bin/')
fnbase ='raa01-rw_10000-'
fnend ='-dwd---bin.gz'

#!!!!!!!!!!!!!!!!!!!!!!!!!
# insert the date and time
start = "2019-05-20 11:50:00"
end = "2019-05-22 11:50:00"
#!!!!!!!!!!!!!!!!!!!!!!!!!

dtimes = wrl.util.from_to(start, end, 60*60 )

for dtime in dtimes:
date=dtime.strftime("%y%m%d%H%M")
fn = fnbase + str (date) + fnend
with open(fn ,'wb') as fhandle:
ftp.retrbinary('RETR %s' % fn, fhandle.write)

print (str(date), 'rw downloaded')



I want to download multiple data, then turn them to TIF file and at the end make a sum of daily/monthly TIF fil.

Thank you
Shiva



Kai Muehlbauer

unread,
May 13, 2020, 1:31:48 AM5/13/20
to wradli...@googlegroups.com
Hi Shiva,

you might look at this example on how to retrieve data from the opendata
server of the german met service (DWD):

https://docs.wradlib.org/en/stable/notebooks/fileio/wradlib_load_DWD_opendata_volumes.html

Sure you would need to adapt it to your specific data (naming etc).

Cheers,
Kai
Am 06.05.20 um 16:50 schrieb Shiva Mirdar:
> --
> You received this message because you are subscribed to the Google
> Groups "wradlib-users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to wradlib-user...@googlegroups.com
> <mailto:wradlib-user...@googlegroups.com>.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/wradlib-users/73546280-8397-4e33-9a69-57bcf80ec9c1%40googlegroups.com
> <https://groups.google.com/d/msgid/wradlib-users/73546280-8397-4e33-9a69-57bcf80ec9c1%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
Kai Muehlbauer
Institute of Geosciences, Meteorology Section, University of Bonn
Auf dem Huegel 20 | +49 228 739083
D-53121 Bonn | kai.mue...@uni-bonn.de
Reply all
Reply to author
Forward
0 new messages