-
Notifications
You must be signed in to change notification settings - Fork 38
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
Roadmap for ROMS/CROCO analysis using xarray/xgcm #27
Comments
Thanks for tagging me @jaard. I would like to take the opportunity to introduce the new grid_ufunc functionality of xgcm. This makes it significantly easier to implement customized computations (as might be required for certain models) and makes the operations much more performant when using dask. I think it would be amazing if we could consolidate some ROMS specific functionality into a collection of grid ufuncs (from a quick check of the code, many functions should not require too much reworking?). cc @TomNicholas |
@jaard and @jbusecke as perhaps was predictable, things have been really busy. Sorry for my delay. I'm taking a few hours today to give xroms a little love and respond to people! @jaard I hadn't heard of CROCO before, but it looks good and seems like code would equally apply between the two models — or are there important differences in the output format or grid setup of CROCO?
I don't know! I would have said no, but I have gotten a number of issues pulled up by people I don't know, and now and then hear about people actually using it but without opening issues. So, I think there is a small user base. I think most people probably use pyroms if they are using Python, though it doesn't use xarray and associated tools, and really most people are using Matlab tools I think.
This sounds great to me if you are still interested! I hope to get some thing spruced up today, especially packaging. I have also put quite a bit of effort into a more general ocean model package that I think xroms should rely on to do the things that can be more generalized: https://github.com/axiom-data-science/extract_model |
@jbusecke What are the obvious places in the code to incorporate xgcm's |
Hi @kthyng @jaard. Thanks for the ping. I wonder if @TomNicholas (who actually wrote the implementation of the grid_ufuncs) has some ideas on this particular example. Tom, what do you think about the section interpolation in @jaard s notebook. Could we accomodate somethign like that with grid_ufuncs? |
Hi @kthyng, thanks for the reply!
It should be mostly the same, but some variables may have different names depending on the exact version (e.g. "ocean_time" vs. "time").
I have briefly scanned your code and realized that we solved pretty much the same problems in similar ways, just that your toolbox seems to be much more complete ;-) So I'm not sure how much I can really add, I guess I just have to accept that my package is a bit redundant now. Do you have exact vertical integration in xroms? That's something that's still missing from xcroco as well, which I'm about to add. |
Hi @jbusecke
No problem. But yeah, both xroms and xcroco are basically a wrapper around xarray for calculating depth of sigma-levels etc. which then makes use of xgcm.
I agree that sections would be useful to have in xgcm. My sections in xcroco are pretty "dumb" unfortunately, as it works only on a rectilinear lat/lon grid or in the xi_rho/eta_rho model coordinates. In xroms @kthyng makes use of xESMF to handle curvilinear grids, which is great I think. But its another dependency, and I'm not sure it is appropriate to require that for xgcm. Would it be possible to support curvilinear grids natively in xgcm somehow, or is something like that always too slow compared to xESMF and doomed to fail? |
Ah it is coming back to me — interpolation in the usage of |
I'll close this issue for now but happy to discuss more in the future! |
I think the more common usecase is vertical locations. For horizontal curvilinear stuff Id use xesmf. |
Hi!
I just found your code by scanning through the PANGEO forum and I am impressed by the scope of functions that seem to be implemented. I have written a package called xcroco which I started many years ago when nothing else was available. I've had brief discussions with @jbusecke from PANGEO and came to use xgcm upon his recommendation. xcroco is what I use to load and analyse my own CROCO model output. I haven't promoted it really and not many people other than myself have used it.
So i was wondering if you could fill me in on the current developments regarding analysis of ROMS / CROCO output with xarray and xgcm. Is xroms what most people working with those outputs seem to be using in 2022? If so, I would be happy to join the effort, contribute some of my code etc. if there is interest. I'm not sure what functionality may be missing that I could help with. You could check out my xcroco example notebook to get an idea of what my package contains so far.
Hope to collaborate in the future!
I feel like the ROMS / CROCO community is in need of some standardization... a lot of people seem to still be using their own tools, written in Matlab (!) or Python.
Cheers,
Jaard
The text was updated successfully, but these errors were encountered: