Composition using wradlib

98 views
Skip to first unread message

Hajar El Youssoufi

unread,
Jun 13, 2022, 2:54:30 PM6/13/22
to wradlib-users
Hello everyone !
Hope you're doing well.
 I'm a master's degree student working on weather radar 
 I've been trying to find a script for composition (combine data from different radar locations on one common set of locations)
Can someone help please 


Thanks a lot 

jorma...@gmail.com

unread,
Jun 14, 2022, 11:17:11 AM6/14/22
to wradlib-users

Hey 

You can start with Recipe 1 as an example of how to calculate the common grid for multiple radars and composite the data.

Regards
Jorma Rahu

Hajar El Youssoufi

unread,
Jun 23, 2022, 5:43:14 AM6/23/22
to wradlib-users
Thank you it worked!! but please do you know how to do a composition for reflectivity. should I change thar part of accumulation !

Jorma Rahu

unread,
Jun 26, 2022, 1:00:10 PM6/26/22
to wradli...@googlegroups.com
Hey

Yes, you are on the right path here. At the beginning of Recipe 1, there is a function named process_polar_level_data(radarname), at the end, there is the part where reflectivity is converted to rain depths of 300 seconds (5 minutes). So just skip that part if you do not want it and composite only reflectivity data. But note, if you do not use the accum variable just replace the last line with "return data"  instead of "return accum", to still have the previous data filtering/processing done.
    # converting to precipitation depth
    R = wrl.zr.z_to_r(wrl.trafo.idecibel(data), a=256, b=1.4)
    depth = wrl.trafo.r_to_depth(R, 300.)
    # calculate hourly accumulation
    accum = depth.sum(axis=0)

    return accum

Regards
Jorma Rahu

--
You received this message because you are subscribed to a topic in the Google Groups "wradlib-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/wradlib-users/qC8fAVD66PU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to wradlib-user...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/wradlib-users/3ff78975-6b10-4b4e-89c1-ac32e91a17ddn%40googlegroups.com.

Hajar El Youssoufi

unread,
Jun 27, 2022, 6:16:54 AM6/27/22
to wradli...@googlegroups.com
Thanks a lot
Another question please, How can I apply this to an mvol file, in this script they worked with a DX

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.
To view this discussion on the web, visit https://groups.google.com/d/msgid/wradlib-users/CAHt8skbiWohEX-eKh6B9nn-y22uczZKXenk6GchXxP88yO28rw%40mail.gmail.com.

Kai Muehlbauer

unread,
Jul 14, 2022, 2:03:53 AM7/14/22
to wradli...@googlegroups.com
Hi Hajar,

it would be good to open a new thread for different questions. This just
slipped through the cracks now.

Regarding the "mvol"-file it depends on the subtype. If it is hdf5 based
wradlib can handle it. I'd recommend the following to open the data as
in this tutorial:

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

# open data
fname = "path/to/your/radar.mvol"
vol = wrl.io.open_gamic_dataset(fname)
# inspect
display(vol)

# use lowest elevation sweep
swp = vol[-1]
# inspect
display(swp)

# converting to precipitation depth
R = wrl.zr.z_to_r(wrl.trafo.idecibel(swp.DBZH), a=256, b=1.4)
depth = wrl.trafo.r_to_depth(R, 300.0)
# fix name and unit
depth.name = "RainSum"
depth.attrs["units"] = "mm"
# inspect
display(depth)

# plot
depth.pipe(wrl.georef.georeference_dataset).plot(x="x", y="y")

But beware, this is just one timestep. In the example a timeseries is
used. But you can create timeseries easily by providing a list of files
to the open-function.

It's clear that wradlib's tutorials need updating.

HTH,
Kai



Am 27.06.22 um 12:16 schrieb Hajar El Youssoufi:
> Thanks a lot
> Another question please, How can I apply this to an mvol file, in this
> script they worked with a DX
>
> Le dim. 26 juin 2022 à 18:00, Jorma Rahu <jorma...@gmail.com
> <mailto:jorma...@gmail.com>> a écrit :
>
> Hey
>
> Yes, you are on the right path here. At the beginning of Recipe 1,
> there is a function named process_polar_level_data(radarname), at
> the end, there is the part where reflectivity is converted to rain
> depths of 300 seconds (5 minutes). So just skip that part if you do
> not want it and composite only reflectivity data. But note, if you
> do not use the accum variable just replace the last line with
> "return data"  instead of "return accum", to still have the previous
> data filtering/processing done.
>
> # converting to precipitation depth
> R = wrl.zr.z_to_r(wrl.trafo.idecibel(data), a=256, b=1.4)
> depth = wrl.trafo.r_to_depth(R, 300.)
> # calculate hourly accumulation
> accum = depth.sum(axis=0)
>
> return accum
>
>
> Regards
>
> Jorma Rahu
>
>
> Kontakt Hajar El Youssoufi (<haja...@gmail.com
> <mailto:haja...@gmail.com>>) kirjutas kuupäeval N, 23. juuni 2022
> kell 12:43:
>
> Thank you it worked!! but please do you know how to do a
> composition for reflectivity. should I change thar part of
> accumulation !
>
> Le mardi 14 juin 2022 à 16:17:11 UTC+1, jorma...@gmail.com
> <mailto:jorma...@gmail.com> a écrit :
>
>
> Hey
>
> You can start with Recipe 1
> <https://docs.wradlib.org/en/stable/notebooks/workflow/recipe1.html>
> as an example of how to calculate the common grid for
> multiple radars and composite the data.
>
> Regards
> Jorma Rahu
> haja...@gmail.com kirjutas Esmaspäev, 13. juuni 2022 kl
> 21:54:30 UTC+3:
>
> Hello everyone !
> Hope you're doing well.
>  I'm a master's degree student working on weather radar
>  I've been trying to find a script for composition
> (combine data from different radar locations on one
> common set of locations)
> Can someone help please
>
>
> Thanks a lot
>
> --
> You received this message because you are subscribed to a topic
> in the Google Groups "wradlib-users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/wradlib-users/qC8fAVD66PU/unsubscribe
> <https://groups.google.com/d/topic/wradlib-users/qC8fAVD66PU/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email
> to wradlib-user...@googlegroups.com
> <mailto:wradlib-user...@googlegroups.com>.
> <https://groups.google.com/d/msgid/wradlib-users/3ff78975-6b10-4b4e-89c1-ac32e91a17ddn%40googlegroups.com?utm_medium=email&utm_source=footer>.
>
> --
> 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/CAHt8skbiWohEX-eKh6B9nn-y22uczZKXenk6GchXxP88yO28rw%40mail.gmail.com
> <https://groups.google.com/d/msgid/wradlib-users/CAHt8skbiWohEX-eKh6B9nn-y22uczZKXenk6GchXxP88yO28rw%40mail.gmail.com?utm_medium=email&utm_source=footer>.
>
> --
> 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/CANHoHuUYCYpNA_AxO_%2B1vMzDye7NT6ao%2BL2Yez-Ff%2BupMh2NOQ%40mail.gmail.com
> <https://groups.google.com/d/msgid/wradlib-users/CANHoHuUYCYpNA_AxO_%2B1vMzDye7NT6ao%2BL2Yez-Ff%2BupMh2NOQ%40mail.gmail.com?utm_medium=email&utm_source=footer>.


Reply all
Reply to author
Forward
0 new messages