Skip to content

Make sure ocean turing angle is negative in the SH#610

Merged
docguibou merged 1 commit intodevelopfrom
issue608_SH_turningangle
Sep 16, 2022
Merged

Make sure ocean turing angle is negative in the SH#610
docguibou merged 1 commit intodevelopfrom
issue608_SH_turningangle

Conversation

@einola
Copy link
Copy Markdown
Member

@einola einola commented Sep 15, 2022

This is simply achieved by replacing sin_ocean_turning_angle with std::copysign(sin_ocean_turning_angle, lat[i]). This takes the absolute value of sin_ocean_turning_angle and applies the sign of lat[i] to it. Could be done more efficiently by changing sin_ocean_turning_angle only once ... but this was simpler and is probably fast enough.

This is simply achieved by replacing sin_ocean_turning_angle with
std::copysign(sin_ocean_turning_angle, lat[i]). This takes the absolute
value of sin_ocean_turning_angle and applies the sign of lat[i] to it.
Could be done more efficiently by changing sin_ocean_turning_angle only
once ... but this was simpler and is probably fast enough.
@einola einola requested a review from docguibou September 15, 2022 16:14
@einola
Copy link
Copy Markdown
Member Author

einola commented Sep 15, 2022

Closes issue #608

@docguibou
Copy link
Copy Markdown
Contributor

Yes ok, works for NH and SH.
Thanks!

@docguibou docguibou closed this Sep 16, 2022
@docguibou docguibou reopened this Sep 16, 2022
Copy link
Copy Markdown
Contributor

@docguibou docguibou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Checked!

@docguibou docguibou merged commit c802f27 into develop Sep 16, 2022
@einola einola deleted the issue608_SH_turningangle branch September 22, 2022 12:10
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

Successfully merging this pull request may close these issues.

2 participants