AustralianAntarcticDivision / angstroms

Tools for model grid data (with raster in R)
http://australianantarcticdivision.github.io/angstroms/
4 stars 1 forks source link

3D extraction across times at given depth #8

Open raymondben opened 6 years ago

raymondben commented 6 years ago

Probably related to https://github.com/hypertidy/angstroms/issues/5. romsdata3d will extract xyz data (2D at all depths for a given time index). There is an equivalent extraction (2D data at all times for a given depth index) for which angstroms doesn't have a convenience wrapper, but which would be handy.

mdsumner commented 6 years ago

Huh, good point - it only needs lvar = 3L to be available as an option, can you experiment with lvar-3 branch?

https://github.com/hypertidy/angstroms/blob/lvar-3/R/romsdata.R#L113

(brick doesn't handle the more general case, so lvar can't be 1 or 2 ... so doing this properly needs some attention)

raymondben commented 6 years ago

That works a treat.

mdsumner commented 6 years ago

Now in master c0f450d98e8e40f4e975b92b8a3c8c644bdc9e8e

😨 ... should the first layer be the surface or the bottom? ...

I've set it up to match what I had before, i.e. layer 1 is the surface, and this matches the other conventions for slicing.