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

Fixes temperature interpolation in landice tool conversion_exodus_init_to_mpasli_mesh.py #306

Conversation

trhille
Copy link
Collaborator

@trhille trhille commented Mar 31, 2020

Fixes several bugs that were leading to errors in some cases and incorrect 3D temperature interpolation in all cases.

…ript

Fix several bugs in the temperature interpolation: 1) define albanyTemperaure
array size using nCells instead of np.max(cellID_array), which was causing
an error in some cases; 2) remove if-statement that separates temperature
from velocities based on number of vertical levels/interfaces (no longer needed
with current interpolation scheme, and was not working anyway); 3) stagger
albany and mpas temperature layers for interpolation by subtracting 0.5 from
MPAS_layers.
@trhille trhille force-pushed the landice/fix_conversion_script_temp_interp branch from 0103103 to b4ceef6 Compare March 31, 2020 16:43
@matthewhoffman matthewhoffman self-assigned this Mar 31, 2020
Equally-spaced temperature layers works in general because
MPAS temperature layers are always halfway between Albany temp
layers, and we use linear interpolation. Add a comment to explain
that to the user.
@matthewhoffman matthewhoffman merged commit 61aff5e into MPAS-Dev:master Apr 1, 2020
@trhille trhille deleted the landice/fix_conversion_script_temp_interp branch April 1, 2020 16:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants