-
Notifications
You must be signed in to change notification settings - Fork 13
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
the problem with the default extent parameter in gplately.grids.write_netcdf_grid #279
Comments
I agree. And have a default of Also, I don't know if |
just in case NW might like to know the existence of this discussion. |
Hi @michaelchin , I'd like the grid extent to be whatever the grid actually is rather than me specifying it. I've just had a quick look at the actual |
@GPlates/gplately-dev Any ideas about this? |
I think having And if we're worried about backward compatibility then could add an argument to I hope that wasn't confusing. I think I just confused myself 😉
I'm not sure the internal details, but could have an extra argument (to |
Hi team, a lot to unpack here. I'm going to use bold font to try and structure my thoughts on this. I think the The pcolormesh([X, Y,] C, **kwargs) So perhaps we can do something similar here, write_netcdf_grid(filename, [lons, lats], grid, extent=None, significant_digits=None, fill_value=None) If lons, lats are not provided, then it looks for an extent, if no extent is provided then it either assumes a global extent or fails. Grid or pixel registration can be an extra argument (or maybe this can be determined from the size of lon, lat arrays? Not sure.) How does that sound? |
That all sounds good to me 👍. I like your symmetry between I think I was trying to make the default case have the lons/lats passed from Interesting trick they do with |
Please @ me if this needs my attention. I am overwhelmed by other things right now. And people may get furious if I missed anything. I don't want to upset anyone... I am a nice guy...(well, this is another joke attempt while wind is blowing in the east. ) |
@nickywright |
Hi @michaelchin. I don't read in the grids using the For reference, I've been doing something like:
So I think this fairly similar, I would just specify the lat/lon arrays directly (which is safer than the min/max in the extent IMO). |
Thanks @nickywright This is very helpful. I agree with you that the GPlately should be able to get the grid extent from aaa.nc and use this extent to save the new grid file. |
follow up the AuScope meeting yesterday(2024-09-24)
I may misunderstood the requirements. I just wrote down what I believed was the issue.
I believed that NW would like to preserve the grid extent info from reading in the grid file, and then when writing out the output grid file, the preserved extent info should be applied automatically.
Alternatively, the easy and dirty solution will be just remove the default value [-180,180,-90,90] and force the clients to pay attention.
This matter needs to be thoroughly discussed before coming up with an acceptable solution for our clients.
https://gplates.github.io/gplately/v1.3.0/grids.html#gplately.grids.write_netcdf_grid
The text was updated successfully, but these errors were encountered: