Comments (5)
Oh no, what terrible timing to bring up this issue. @mraspaud just started his month long holiday and he has the most familiarity with this. It is possible some of this might get cleaned up with:
since there was confusion caused by the naming of the frequency/number of pixels when generating the lon/lat arrays.
The frequency should have been set to 50
by default if I'm reading the source code correctly. So that's side02_step = 50 / 2 - 1 = 24
. So then the index here would be 24 * 2 + 1 = 49
, so that makes sense. The geostationary methods for generating the lons/lats seem to use np.linspace
to generate the original bounding arrays so then the only reason for this to get cut down to 7 (as the error message says) is if this intersection produces that small result:
pyresample/pyresample/geometry.py
Lines 2785 to 2793 in 07382cc
So is it possible this intersection logic is not handling the anti-meridian or something? Oh but your example here is GOES East...that should be fine, right? You/we might need to add some prints to figure out why the geos boundary is so small (7 elements).
from pyresample.
Oh or is this a shapely or numpy change that is causing this?
from pyresample.
I saw #526 but did not read through it yet. From the code I was a little confused since frequency
did not really match up with the number of points I got which I guess is the reason for the mentioned PR. I don't think this is due to numpy or shapely since get_geostationary_bounding_box_in_lonlats
works fine. Additionally for a full disk AreaDefinition
there is no IndexError.
I think the reason is that for a non full disk AreaDefinition
the lat/lon arrays are calculated with the given frequency for the full disk but are later "cut" down due to the intersection but at the same time theboundary
method still uses the "full" frequency/number of points for the slicing.
from pyresample.
This might have to be a @mraspaud answer (and @pnuu if he's available). Basically I see two possible solutions:
- Do a
min
on the index used in the indexing operation shown in the original traceback. So it figures out the indexing it should used based on the frequency, but goes no further than the number of points in the array...is this possible? Maybe not because we don't know how to divide the polygon's coordinates into 4 sides which is what we're trying to do, right? Or...do we do min/max to get points that are on each half of the mid-lines (one horizontal midline, one vertical) to determine which points are left side, top side, etc. - Update the geostationary bounding box functions to not only use the number of points as a starting point for the full disk geostationary bounding polygon, but also make sure the subset results return that number of points.
from pyresample.
I think option 2. would be the cleaner one but might involve more refactoring. My first guess for just solving the problem was more on the line of option 1. if I understand it correctly.
from pyresample.
Related Issues (20)
- `get_neighbour_info` slows down significantly when working with large target rasters using many segments HOT 3
- `gradient_search` fails when resampling Himawari data HOT 7
- EWA resampling in 1.27 slows down four times than 1.26.1 HOT 69
- Refactor boundary creation logic
- area definition for a rotated pole coordinate system HOT 24
- Bug where boundary coordinates wrap around 180 degrees when geostationary AreaDefinition extends beyond 180 degrees HOT 7
- Upgrade to Cython 3.0 and check annotations
- Compatibility with libproj v9.3 HOT 23
- How should this warning be addressed? HOT 2
- Catch or fix pyproj UserWarning when loading an AreaDefinition from a netCDF/CF file HOT 1
- Make a Swath definition subclass for interpolated data HOT 4
- The finding of the optimal radius of influence makes assumption on the ordering of the dimensions in the longitude array HOT 4
- Wrong coordinates returned by `AreaDefintion.get_lonlats` for some projections in out-of-Earth locations HOT 6
- dump DynamicAreaDefinition to YAML
- errors in area definition should not be silently ignored HOT 1
- Resampling GOES mesoscale data to my area gives blank data HOT 10
- Remove Configobj as Dependency Due To Security Vulnerability and No Longer Maintaned HOT 3
- YAML area configuration does not allow to specify the dtype and dtype is ignored in equality comparisons HOT 6
- "resample_nearest" GEO swath to eqc has tiny periodic "glitch" in results HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pyresample.