Skip to content

Rescale 6 ice shelf variables#805

Merged
Hallberg-NOAA merged 1 commit into
NOAA-GFDL:dev/gfdlfrom
Hallberg-NOAA:more_ice_shelf_rescaling
Jan 24, 2025
Merged

Rescale 6 ice shelf variables#805
Hallberg-NOAA merged 1 commit into
NOAA-GFDL:dev/gfdlfrom
Hallberg-NOAA:more_ice_shelf_rescaling

Conversation

@Hallberg-NOAA
Copy link
Copy Markdown
Member

Changed the rescaling of 6 ice shelf variables to cancel out common conversion factors that appear in several expressions.

The C_basal_friction argument to initialize_ice_C_basal_friction() is now in partially rescaled units, reflecting the portion that does not cancel out fractional-power units from a power law fit with an arbitrary power. The C_basal_friction array in ice_shelf_dyn_CS and the C_friction variable in initialize_ice_C_basal_friction() were similarly rescaled. There are new scale factors in a get_param() call and a MOM_read_data() call and a conversion factor in a register_restart_field() call that reflect these changes.

The KE_tot and mass_tot variables in write_ice_shelf_energy(), are kept in scaled units until they are written.

The internal variable fN in calc_shelf_taub()is kept in scaled units, but there is now a scaling factor ofUS%Z_to_Lin the expression forfB. This latter could be folded into the CF_Maxelement ofice_shelf_dyn_CS`, but I am unsure whether this would be physically sensible.

All answers should be bitwise identical and no output should change, but this has not been extensively tested yet.

@Hallberg-NOAA Hallberg-NOAA added the refactor Code cleanup with no changes in functionality or results label Jan 17, 2025
Comment thread src/ice_shelf/MOM_ice_shelf_dynamics.F90 Outdated
Comment thread src/ice_shelf/MOM_ice_shelf_dynamics.F90 Outdated
Comment thread src/ice_shelf/MOM_ice_shelf_initialize.F90 Outdated
Comment thread src/ice_shelf/MOM_ice_shelf_initialize.F90 Outdated
@alex-huth
Copy link
Copy Markdown

alex-huth commented Jan 22, 2025

I also identified a few units/scaling issues with min_h_shelf, if you can add the following changes into the PR:
L171: Units should be [Z ~> m]
L515: Scaling should be US%m_to_Z
L3946: Units should be [Z ~> m]

With all of the above changes, the commit passes rescaling tests

  Changed the rescaling of 7 ice shelf variables to cancel out common
conversion factors that appear in several expressions.

  The C_basal_friction argument to initialize_ice_C_basal_friction is now in
partially rescaled units, reflecting the portion that does not cancel out
fractional-power units from a power law fit with an arbitrary power.  The
C_basal_friction array in ice_shelf_dyn_CS and the C_friction variable in
initialize_ice_C_basal_friction were similarly rescaled.  There are new
scale factors in a get_param_call and a MOM_read_data call and a conversion
factor in register_restart_field call that reflect these changes.

  The KE_tot and mass_tot variables in write_ice_shelf_energy,
are kept in scaled units until they are written.

  The internal variable fN in calc_shelf_taub is kept in scaled units, but there
is now a scaling factor of US%L_to_N in the expression for fB.  This latter
could be folded into the CF_Max element of ice_shelf_dyn_CS, but I am unsure
whether this would be physically sensible.

  All answers should be bitwise identical and no output should change, but this
has not been extensively tested yet.
@Hallberg-NOAA Hallberg-NOAA force-pushed the more_ice_shelf_rescaling branch from d308d24 to 29642ad Compare January 23, 2025 16:43
@Hallberg-NOAA
Copy link
Copy Markdown
Member Author

Thank you for the detailed review @alex-huth . This PR has now been updated in line with all of the suggestions.

Copy link
Copy Markdown

@alex-huth alex-huth left a comment

Choose a reason for hiding this comment

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

These changes are correct. Thank you

@Hallberg-NOAA
Copy link
Copy Markdown
Member Author

This PR has passed pipeline testing at https://gitlab.gfdl.noaa.gov/ogrp/mom6ci/MOM6/-/pipelines/26171.

@Hallberg-NOAA Hallberg-NOAA merged commit 93227b3 into NOAA-GFDL:dev/gfdl Jan 24, 2025
@Hallberg-NOAA Hallberg-NOAA deleted the more_ice_shelf_rescaling branch January 25, 2025 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor Code cleanup with no changes in functionality or results

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants