Skip to content
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

Question of thickness in the boundary files #6

Open
favorliao opened this issue Feb 5, 2020 · 2 comments
Open

Question of thickness in the boundary files #6

favorliao opened this issue Feb 5, 2020 · 2 comments

Comments

@favorliao
Copy link

favorliao commented Feb 5, 2020

The current PyCNAL uses the interface height of each grid cell to compute the layer thickness. However, the examples only use the cell center depth instead of cell interface height as input for the PyCNAL to computer layer thickness. This may cause issues to layer thickness in boundary files.

In the PyCNAL, depth is computed using interface height
lib_ioncdf.py, line 348: dz[:-1, :, :] = vc[1:, :, :] - vc[:-1, :, :]

In the PyCNAL examples, only cell center depth is provided:
Creating_Initial_and_Boundary_conditions_from_SODA3.py, line 59:
salt_domain.interpolate_from(sodaic,'salt',frame=0,depthname='st_ocean',coord_names=['xt_ocean','yt_ocean'],

@raphaeldussin
Copy link
Contributor

good catch! Do we have s_w ocean in the files?

A more comprehensive fix would be (and I think we should move towards this) to operate on xarray datasets and not on files, and that would make it much easier to use. Wish I knew xarray back then :(

@favorliao
Copy link
Author

favorliao commented Feb 5, 2020

There is st_ocean in the files (SODA files). I wrote a raw one for my own case using XESMF and xarray. If you want to take a look, https://github.com/favorliao/Reginal-MOM6/blob/master/obc_initial_mking/make_obc_mom_z.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants