xmitgcm icon indicating copy to clipboard operation
xmitgcm copied to clipboard

Add a function to get the full-size of xg and yg from input files

Open cspencerjones opened this issue 5 years ago • 8 comments

This function gets XG and YG from .mitgrid files. They are the full size (i.e. they include the points on the right hand side of the final gridpoint in both x and y directions. This is useful if you want to determine which tile and individual lat/lon point is on.

cspencerjones avatar Mar 12 '20 16:03 cspencerjones

what was wrong with get_grid_from_input ?

https://github.com/MITgcm/xmitgcm/blob/1fb9cc2520d0df1cf199b347d94c91853d22dddb/xmitgcm/utils.py#L1247

raphaeldussin avatar Mar 12 '20 16:03 raphaeldussin

It doesn't do what I want - it doesn't get the rightmost gridpoints.

Also it doesn't tile in the way that I want

cspencerjones avatar Mar 12 '20 16:03 cspencerjones

@cspencerjones - are you planning to continue to work on this?

rabernat avatar Apr 07 '20 21:04 rabernat

It's not my priority. If we think that these changes would be useful for other people then I can but I'm not sure that there is actually need for them right now. So probably no, I will just keep using my own branch. Do you have a strong opinion?

cspencerjones avatar Apr 07 '20 22:04 cspencerjones

Hi @cspencerjones, I could really use the outer grid points (xESMF needs outer grid points for conservative regridding). I would be happy if this PR could be somehow resumed :D I'd be happy to help.

AaronDavidSchneider avatar Jan 06 '21 14:01 AaronDavidSchneider

@AaronDavidSchneider I do not have time to work on this at the moment, since my project has moved away from this problem, at least temporarily. The code is quite dense and hard to follow, and as @rabernat mentions above my new code actually repeats a lot of what's in the original function. However you are welcome to take it and see how it works for you. If it does, then maybe you could contribute to this pull request as well?

cspencerjones avatar Jan 06 '21 14:01 cspencerjones

Yes it would be great if @AaronDavidSchneider would be able to pick up this PR! We will be happy to help you.

From a technical standpoint, it is probably easiest for you to check out @cspencerjones's branch and make a new PR from your own fork.

rabernat avatar Jan 06 '21 15:01 rabernat

From a technical standpoint, it is probably easiest for you to check out @cspencerjones's branch and make a new PR from your own fork.

That sounds good. I will try my best to get it working. I am not quite sure when I will have the time for it.

AaronDavidSchneider avatar Jan 06 '21 15:01 AaronDavidSchneider