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

Optional vertical interpolation #17

Open
jdha opened this issue May 29, 2019 · 2 comments · May be fixed by #91
Open

Optional vertical interpolation #17

jdha opened this issue May 29, 2019 · 2 comments · May be fixed by #91
Assignees
Labels
enhancement New feature or request

Comments

@jdha
Copy link
Collaborator

jdha commented May 29, 2019

Need to have option to switch on/off vertical interpolation i.e. keep boundary conditions on the native grid or interpolate onto the destination grid

@jdha jdha added the enhancement New feature or request label May 29, 2019
@jdha jdha linked a pull request Mar 17, 2022 that will close this issue
2 tasks
@jdha jdha self-assigned this Jul 17, 2023
@jdha
Copy link
Collaborator Author

jdha commented Jul 17, 2023

@anwiseNOCL looks like I opened this 4 years ago!

@jdha
Copy link
Collaborator Author

jdha commented Jul 17, 2023

# TODO: put conditional here as we may want to keep data on paren
#              vertical grid

    DstCoord.depths = {"t": {}, "u": {}, "v": {}}

    for grd in ["t", "u", "v"]:
        DstCoord.depths[grd]["bdy_H"] = np.nanmax(z.zpoints["w" + grd], axis=0)
        DstCoord.depths[grd]["bdy_dz"] = np.diff(z.zpoints["w" + grd], axis=0)
        DstCoord.depths[grd]["bdy_dz"] = np.vstack(
            [DstCoord.depths[grd]["bdy_dz"], np.zeros((1, nbdy[grd]))]
        )
        DstCoord.depths[grd]["bdy_z"] = z.zpoints[grd]
    logger.info("Depths defined")

see profiler.py

A conditional can be placed here to pass the parent vertical gird to the child if interpolation isn't required.

NB in NEMO 4.2 deptht -> gdept likewise for u and v

e3[t/u/v] also need to be output into the BDY files

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

Successfully merging a pull request may close this issue.

1 participant