Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix error caused by pyproj >= 2.2 #29

Open
deeplycloudy opened this issue Apr 28, 2020 · 0 comments
Open

Fix error caused by pyproj >= 2.2 #29

deeplycloudy opened this issue Apr 28, 2020 · 0 comments

Comments

@deeplycloudy
Copy link
Owner

First seen in glmtools#31, an API change in pyproj results in a crash due to a check for a mysterious 'time' dimension. I reproduced it today when testing flash sorting on a simple file, as seen below.

Traceback (most recent call last):
  File "flash_sort_and_grid.py", line 187, in <module>
    ctr_lat=params['ctr_lat'], ctr_lon=params['ctr_lon'], center_ID=center_ID)
  File "flash_sort_and_grid.py", line 129, in grid_and_plot
    output_filename_prefix=center_ID, spatial_scale_factor=1.0
  File "/Users/ebruning/code/lmatools/lmatools/grid/make_grids.py", line 631, in grid_h5flashfiles
    gridder.process_flashes(h5_filenames, **process_flash_kwargs)
  File "/Users/ebruning/code/lmatools/lmatools/grid/make_grids.py", line 608, in process_flashes
    read_flashes( h5_filenames, self.framer, base_date=self.t_ref, min_points=min_points_per_flash)
  File "/Users/ebruning/code/lmatools/lmatools/io/LMA_h5_file.py", line 253, in read_flashes
    target.send(push_out)
  File "/Users/ebruning/code/lmatools/lmatools/grid/density_to_files.py", line 215, in flashes_to_frames
    target.send((these_events, these_flashes))
  File "/Users/ebruning/code/lmatools/lmatools/grid/density_to_files.py", line 247, in extract_events_for_flashes
    target.send((events, fls))
  File "/Users/ebruning/code/lmatools/lmatools/stream/subset.py", line 83, in broadcast
    target.send(stuff)
  File "/Users/ebruning/code/lmatools/lmatools/grid/density_to_files.py", line 291, in project
    points[x_coord], points[y_coord], points[z_coord]))
  File "/Users/ebruning/code/lmatools/lmatools/coordinateSystems.py", line 74, in toECEF
    projectedData = array(proj4.transform(self.ERSlla, self.ERSxyz, lon, lat, alt ))
  File "/Users/ebruning/miniconda3/envs/glmval/lib/python3.6/site-packages/pyproj/transformer.py", line 759, in transform
    ).transform(xx=x, yy=y, zz=z, tt=tt, radians=radians, errcheck=errcheck)
  File "/Users/ebruning/miniconda3/envs/glmval/lib/python3.6/site-packages/pyproj/transformer.py", line 445, in transform
    errcheck=errcheck,
  File "pyproj/_transformer.pyx", line 432, in pyproj._transformer._Transformer._transform
pyproj.exceptions.ProjError: x,y,z, and time must be same size
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant