CICE-Consortium / Icepack

Development repository for sea-ice column physics
Other
25 stars 131 forks source link

Deprecate zsalinity #448

Closed apcraig closed 1 year ago

apcraig commented 1 year ago

PR checklist

eclare108213 commented 1 year ago

@njeffery - Can the brine height tracer be run without zsalinity, i.e. with mushy thermo? My plan has been to deprecate zsalinity but not hbrine, and I'm wondering whether that make sense. Our tests only have them both turned on, not hbrine by itself.

njeffery commented 1 year ago

Definitely. The brine height tracer is needed for the biogeochemistry and doesn't depend on the specific halodynamics.

[edited to remove email signature info]

eclare108213 commented 1 year ago

Excellent. Correction: we do have tests with brine tracer on and zsalinity off in both icepack and cice. They are both on only for the zsal test.

apcraig commented 1 year ago

Good questions about the deprecation. I kept the zsalinity public interfaces and arguments for the time being for backwards compatibility. They are not needed for the Icepack driver or a future version of CICE, but other users might need them. If a user has an older version of CICE or uses Icepack in their ice model (MPASSI), then an upgrade to this version of Icepack should not break anything. They can compile and run (with zsalinity off) without having to change any of their code. If they turn on zsalinity, the code should abort. If we remove the public interfaces and arguments, then an Icepack upgrade could/will immediately fail to build and the user will have to modify calls into Icepack to get things working again, even if they are not using zsalinity.

So we can take either approach. Provide full backwards compatibility by maintaining zsalinity arguments/interfaces that have no impact on the code. Or remove that code and possibly force all users to update their "driver" when they bring in a new version of Icepack, with no real benefit. There are pros and cons to both approaches.

I tested the updated version of Icepack (the one in this PR) with the baseline version of CICE (with all the zsalinity code/calls) to make sure it truly is backwards compatible and bit-for-bit. Of coarse, CICE only works in that mode if zsalinity is off.

apcraig commented 1 year ago

If you feel we should fully deprecate the Icepack interfaces for zsalinity, I can certainly do that easily.

apcraig commented 1 year ago

I think hbrine is tested with bgc. Do we need to add a test to Icepack and/or CICE with just hbrine without bgc? Is that possible? If so, what other options should be turned on with it?

apcraig commented 1 year ago

Is there anything else to do with the PR, is it ready to merge? Please see also https://github.com/CICE-Consortium/CICE/pull/851, that also needs a review.

apcraig commented 1 year ago

I just rebased this, should be ready for review and merge.

apcraig commented 1 year ago

I'm pretty sure the brine tracer is preserved with these changes. The full test suite runs and is basically bit-for-bit. Maybe we need to add a new brine tracer test at some point.