scollis / pymdv

Python code for reading in MDV radar files
8 stars 2 forks source link

pymdv installation #3

Open xueke-li opened 3 years ago

xueke-li commented 3 years ago

Hello,

Thank you for assembling this awesome tool to read weather radar. Could you please provide some guidance on how to install the module on python3 (or jupyter notebook)?

Regards, Xueke

scollis commented 3 years ago

Hey! This is very old code and is now part of Py-ART https://github.com/ARM-DOE/pyart

xueke-li commented 3 years ago

Thanks for your prompt response! Will try the latest version and let you know if I have any questions.

Regards, Xueke

On Fri, Oct 22, 2021 at 12:13 PM Scott @.***> wrote:

Hey! This is very old code and is now part of Py-ART https://github.com/ARM-DOE/pyart

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/scollis/pymdv/issues/3#issuecomment-949771779, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOSUUV7XYK6EFFNM6QDFTV3UIGET7ANCNFSM5GQ42TZQ .

xueke-li commented 3 years ago

Dear Scott Collins,

Thank you so much for updating me with the new code of processing the radar data that is within the Py-ART family. After installing the Py-ART, it turned out there were some problems with mapping the .mdv file. To be frank, I'm relatively new to reading and processing files in mdv format (Usually, I deal with data in nc format). If that doesn't bother you too much, would you mind taking a look at my script below (which is very basic procedures)? I have also attached the data in this email. Thanks!

import pyart import matplotlib.pyplot as plt

mdv_fname = '../../path_to_folder/000358.mdv' radar = pyart.io.read_grid_mdv(mdv_fname) print (radar.fields.keys()) # not sure why it has no fields print (radar.time['units']) print (radar.x['data'],radar.y['data']) print (radar.metadata)

fig = plt.figure(figsize=[8, 8]) display = pyart.graph.RadarMapDisplay(radar) ## problem occurs for this line as seen below display.plot_ppi_map('reflectivity', 0, vmin=-8, vmax=64)

---------------------------------------------------------------------------AttributeError Traceback (most recent call last) in 1 fig = plt.figure(figsize=[8, 8])----> 2 display = pyart.graph.RadarMapDisplay(radar) 3 display.plot_ppi_map('reflectivity', 0, vmin=-8, vmax=64) 4 5 # display = pyart.graph.RadarMapDisplay(radar) ~/anaconda/rain/lib/python3.8/site-packages/pyart/graph/radarmapdisplay.py in init(self, radar, shift, grid_projection) 82 83

initalize the base class---> 84 RadarDisplay.init(self,

radar, shift=shift) 85 86 # additional attributes needed for plotting on a cartopy map. ~/anaconda/rain/lib/python3.8/site-packages/pyart/graph/radardisplay.py in init(self, radar, shift) 71 # populate attributes from radar object 72 self.fields = radar.fields---> 73 self.scan_type = radar.scan_type 74 self.ranges = radar.range['data'] 75 self.azimuths = radar.azimuth['data'] AttributeError: 'Grid' object has no attribute 'scan_type'

Regards, Xueke

On Fri, Oct 22, 2021 at 12:16 PM Li, Xueke @.***> wrote:

Thanks for your prompt response! Will try the latest version and let you know if I have any questions.

Regards, Xueke

On Fri, Oct 22, 2021 at 12:13 PM Scott @.***> wrote:

Hey! This is very old code and is now part of Py-ART https://github.com/ARM-DOE/pyart

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/scollis/pymdv/issues/3#issuecomment-949771779, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOSUUV7XYK6EFFNM6QDFTV3UIGET7ANCNFSM5GQ42TZQ .

scollis commented 3 years ago

Looks like you are trying to read a gridded object. Please go over and submit this issue to Py-ART’s GH

PyMDV is not longer supported

From: Xueke Li @.> Reply-To: scollis/pymdv @.> Date: Wednesday, November 17, 2021 at 12:01 PM To: scollis/pymdv @.> Cc: Scott @.>, Comment @.***> Subject: Re: [scollis/pymdv] pymdv installation (Issue #3)

Dear Scott Collins,

Thank you so much for updating me with the new code of processing the radar data that is within the Py-ART family. After installing the Py-ART, it turned out there were some problems with mapping the .mdv file. To be frank, I'm relatively new to reading and processing files in mdv format (Usually, I deal with data in nc format). If that doesn't bother you too much, would you mind taking a look at my script below (which is very basic procedures)? I have also attached the data in this email. Thanks!

import pyart import matplotlib.pyplot as plt

mdv_fname = '../../path_to_folder/000358.mdv' radar = pyart.io.read_grid_mdv(mdv_fname) print (radar.fields.keys()) # not sure why it has no fields print (radar.time['units']) print (radar.x['data'],radar.y['data']) print (radar.metadata)

fig = plt.figure(figsize=[8, 8]) display = pyart.graph.RadarMapDisplay(radar) ## problem occurs for this line as seen below display.plot_ppi_map('reflectivity', 0, vmin=-8, vmax=64)

---------------------------------------------------------------------------AttributeError Traceback (most recent call last) in 1 fig = plt.figure(figsize=[8, 8])----> 2 display = pyart.graph.RadarMapDisplay(radar) 3 display.plot_ppi_map('reflectivity', 0, vmin=-8, vmax=64) 4 5 # display = pyart.graph.RadarMapDisplay(radar) ~/anaconda/rain/lib/python3.8/site-packages/pyart/graph/radarmapdisplay.py in init(self, radar, shift, grid_projection) 82 83

initalize the base class---> 84 RadarDisplay.init(self,

radar, shift=shift) 85 86 # additional attributes needed for plotting on a cartopy map. ~/anaconda/rain/lib/python3.8/site-packages/pyart/graph/radardisplay.py in init(self, radar, shift) 71 # populate attributes from radar object 72 self.fields = radar.fields---> 73 self.scan_type = radar.scan_type 74 self.ranges = radar.range['data'] 75 self.azimuths = radar.azimuth['data'] AttributeError: 'Grid' object has no attribute 'scan_type'

Regards, Xueke

On Fri, Oct 22, 2021 at 12:16 PM Li, Xueke @.***> wrote:

Thanks for your prompt response! Will try the latest version and let you know if I have any questions.

Regards, Xueke

On Fri, Oct 22, 2021 at 12:13 PM Scott @.***> wrote:

Hey! This is very old code and is now part of Py-ART https://github.com/ARM-DOE/pyart

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/scollis/pymdv/issues/3#issuecomment-949771779, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOSUUV7XYK6EFFNM6QDFTV3UIGET7ANCNFSM5GQ42TZQ .

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or unsubscribe. Triage notifications on the go with GitHub Mobile for iOS or Android.