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

variable drag coefficients are computed on T-cell centers, need to be moved to velocity locations #737

Closed
Tracked by #660
eclare108213 opened this issue Jul 29, 2022 · 4 comments

Comments

@eclare108213
Copy link
Contributor

No description provided.

@apcraig
Copy link
Contributor

apcraig commented Sep 22, 2022

I'm happy to help implement this. Can someone provide a little guidance about what needs to change and where in the code. thanks.

@eclare108213
Copy link
Contributor Author

Search for cdn_atm and cdn_ocn, which are (neutral) drag coefficients calculated in icepack_atmo.F90, called from step_therm1. Basically, all of the thermodynamic calculations that use them should be done at cell centers, and they (or variables derived from them) only need to be shifted for the momentum equation. E.g. cdn_atm is used for the atmo turbulent boundary layer calculations, from which we get atmo surface stress. I think the stress calculations are done in T cells then shifted to the velocity points before being used for solving the dynamics equations, so they should be okay as-is (but check). cdn_atm also appears in init_coupler_flux, for RASM -- I'm not sure what's needed there. This github issue is probably mainly about cdn_ocn in the ice_dyn_*.F90 modules, for which an equivalent shifting procedure should be done as for the atmo stresses. It is more complicated, though, because the ocean stress term is split up in the code, which will require a some care to get right.

@apcraig
Copy link
Contributor

apcraig commented Oct 11, 2022

I had a look thru the code and think the above assessment is correct. It looks like all the cdn variables are defined on the T-grid. They are computed in icepack_atmo, including the cdn_ocn terms. And all the air/ice stresses are also computed in icepack on the T grid. Those are mapped to the U, E, and N grid as needed.

Only cdn_ocn is used directly in the dynamics in dyn_finish, stepu and similar. It is passed into subroutines with related variables already on the U, E, or N grid. So I think we need to create cdn_ocn[U,E,N] at the start of the dynamics and then instead of using cdn_ocn, use cdn_ocn[U,E,N]. I assume an appropriate mapping would be "S" which is a masked area-weighted average. The ocean stress terms are computed separately on the U, E, or N grid, I think there is no complication with passing in the appropriate cdn_ocn and using it.

Unless there is any disagreement, I'll make the modifications and create a PR. @JFLemieux73. This will also changes answers for the B grid.

@apcraig
Copy link
Contributor

apcraig commented Oct 21, 2022

This was fixed in #771.

@apcraig apcraig closed this as completed Oct 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants