Skip to content

Add zenith angle to sea ice albedo calculations - #161

Merged
James Bruten (james-bruten-mo) merged 23 commits into
MetOffice:mainfrom
DanCopsey:zenith_angle_seaice
Oct 22, 2026
Merged

James Bruten (james-bruten-mo) merged 23 commits into
MetOffice:mainfrom
DanCopsey:zenith_angle_seaice

Conversation

@DanCopsey

@DanCopsey Dan Copsey (DanCopsey) commented Sep 9, 2026 •

Copy link
Copy Markdown
Contributor

PR Summary

Sci/Tech Reviewer: John Edwards (@JMEdwardsXtr)
Code Reviewer: James Bruten (@james-bruten-mo)

Adds a zenith angle dependence to the calculation of albedo for bare sea ice, snow on sea ice and melt ponds. See issue #88 for more details.

Code Quality Checklist

(Some checks are automatically carried out via the CI pipeline)

  • I have performed a self-review of my own code
  • My code follows the project's style guidelines
  • Comments have been included that aid understanding and enhance the readability of the code
  • My changes generate no new warnings
  • If editing rose-meta/jules-shared then have you supplied a linked UM and LFRic Apps PR?

Testing

  • I have tested this change locally, using the JULES rose-stem suite
  • If shared files have been modified, I have run the UM and LFRic Apps rose stem suites
  • If any tests fail (rose-stem or CI) the reason is understood and acceptable (eg. kgo changes)
  • I have added tests to cover new functionality as appropriate (eg. system tests, unit tests, etc.)

trac.log

Test Suite Results - jules - jules_zenith_angle_seaice/run8

Suite Information

Item Value
Suite Name jules_zenith_angle_seaice/run8
Suite User dan.copsey
Workflow Start 2026-09-25T10:36:58
Groups Run all
Dependency Reference Main Like
jules dancopsey/jules@zenith_angle_seaice False
SimSys_Scripts MetOffice/SimSys_Scripts@2026.07.1 True

Task Information

❌ failed tasks - 1
Task State
nccmp_meto_ex1a_gfortran_imogen_layeredc_ch4 failed
✅ succeeded tasks - 673
⌛ waiting tasks - 1
Task State
housekeep_meto_ex1a_gfortran_imogen_layeredc_spinup waiting

Security Considerations

  • I have reviewed my changes for potential security issues
  • Sensitive data is properly handled (if applicable)
  • Authentication and authorisation are properly implemented (if applicable)

Performance Impact

  • Performance of the code has been considered and, if applicable, suitable performance measurements have been conducted

AI Assistance and Attribution

  • Some of the content of this change has been produced with the assistance of Generative AI tool name (e.g., Met Office Github Copilot Enterprise, Github Copilot Personal, ChatGPT GPT-4, etc) and I have followed the Simulation Systems AI policy (including attribution labels)

Documentation

  • Where appropriate I have updated documentation related to this change and confirmed that it builds correctly

Approvals

Please request all relevant approvals. See the CodeOwners.txt file for section owners.

Technical

  • JULES Code Owner
  • OpenMP
  • River Routing
  • Rose Stem
  • Rose Metadata
  • Upgrade Macros

Scientific

  • Surface
  • Hydrology
  • Vegetation
  • Veg3 RED Demography
  • Biogeochemistry
  • Biogenic fluxes
  • Fire
  • Lakes
  • Evaluation
  • Imogen

Sci/Tech Review

  • I understand this area of code and the changes being added
  • The proposed changes correspond to the pull request description
  • Documentation is sufficient (do documentation papers need updating)
  • Sufficient testing has been completed

Please alert the code reviewer via a tag when you have approved the SR

Code Review

  • All dependencies have been resolved
  • Related Issues have been properly linked and addressed
  • CLA compliance has been confirmed
  • Code quality standards have been met
  • Tests are adequate and have passed
  • Documentation is complete and accurate
  • Security considerations have been addressed
  • Performance impact is acceptable

@DanCopsey

Copy link
Copy Markdown
Contributor Author

This changes answers in the meto_ex1a_gfortran_imogen_layeredc_ch4 rose-stem task even though this task does not have any ocean or sea ice points and does not even load the jules_sea_seaice namelist. I have been investigating for days to try and figure out how my changes could even slightly effect this task and could come up with no answer. I therefore conclude that there is a bug in the meto_ex1a_gfortran_imogen_layeredc_ch4 rose-stem task and that it is somehow picking up some random out of bounds data that my new code is changing. I therefore have no fix for this and can I ask the code reviewer what do I do now?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This looks fine overall. The comments I have made are largely stylistic. I'm keen to try to avoid unnecessarily compromising bit-reproducibility at this stage.

= (from albpondv_cice and albpondi_cice) which is linearly
= ramped to with melt pond depth. No zenith angle dependence is
= included.
=malinka: Use the Malinka et al melt pond albedo scheme which uses

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Add 2018 to the reference for completeness.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I have done this.

Comment thread rose-meta/jules-shared/jules-sea-seaice/HEAD/rose-meta.conf
Comment thread rose-meta/jules-shared/jules-sea-seaice/HEAD/rose-meta.conf Outdated
Comment thread src/science/radiation/albpond_mod.F90 Outdated
Comment thread src/science/radiation/albpond_mod.F90 Outdated
Comment thread src/science/radiation/albpond_mod.F90 Outdated
Comment thread src/science/radiation/albpond_mod.F90
Comment thread src/science/radiation/albpond_mod.F90 Outdated
Comment thread src/science/radiation/albpond_mod.F90 Outdated
Comment thread src/science/radiation/albpond_mod.F90
@DanCopsey

Copy link
Copy Markdown
Contributor Author

Hi John. I have applied all your corrections. Passing back to you.

@DanCopsey Dan Copsey (DanCopsey) added help wanted Extra attention is needed Linked UM This PR is linked to a MetOffice/um PR Linked Apps This PR is linked to a MetOffice/lfric_apps PR KGO This PR contains changes to KGO enhancement New feature or request and removed cla-modified The CLA has been modified as part of this PR - added by GA labels Sep 18, 2026
@JMEdwardsXtr

Copy link
Copy Markdown

I am happy with these changes and will pass them on to Erica Neininger (@ericaneininger) for CR.

@maggiehendry Maggie (maggiehendry) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This will need updating to the head of main. I recently migrated all of the JULES namelists to the JULES repository to keep all the metadata together and to share namelists where possible. I moved jules_sea_seaice from um-atmos to jules-um in the JULES repository.

See recently updated Sharing JULES metadata.

jules_sea_seaice is one of the namelists that were really disparate between jules-lfric and um-atmos. The pragmatic decision was made in MOSRS:jules:#1588 to migrate jules-lfric to jules-shared without consolidating the UM metadata. It would be good to move in the direction of consolidation and add the triggers that exist in the UM metadata where appropriate as developments are made and keep the namelist items named in the same way so that they could be shared e.g. [namelist:jules_sea_seaice=meltpond_alb_vn] has been added to jules-shared, but [namelist:jules_sea_seaice=i_meltpond_alb_vn] to um-atmos.

Comment thread rose-meta/jules-shared/jules-sea-seaice/HEAD/rose-meta.conf
=is covered by snow.
!kind=default
ns=namelist/Science/JULES Surface/Sea and sea-ice
sort-key=Panel-C15c

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is the range field correct in um-atmos? If so, could it be included in jules-shared

range=0:1
sort-key=Panel-C15c

Also suggests that it is triggered by the switch with Panel-C15. There aren't any triggers under l_zenith_albedo. Can the triggers be added please. See sort-keysconvention.

It would be useful too if the in jules-um please be kept consistent too. This branch will need updating to main to include the um-atmos changes.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Partly resolved as the range is added.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is snowpatch directly related to Panel-C15 l_zenith_albedo? The sort-key convention introduced would suggest that this is triggered by l_zenith_albedo. See sort-keys convention.

If it isn't it'd be better to rename the sort-key.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The last part of the comment wasn't clear in my original comment. What I mean was it would be useful too if the help= and description= in jules-um please be kept consistent too with jules-shared.

Comment thread rose-meta/jules-shared/jules-sea-seaice/HEAD/rose-meta.conf
Comment thread src/control/shared/jules_sea_seaice_mod.F90 Outdated
Comment thread src/control/shared/jules_sea_seaice_mod.F90
@github-actions github-actions Bot added the cla-modified The CLA has been modified as part of this PR - added by GA label Sep 22, 2026
@DanCopsey

Copy link
Copy Markdown
Contributor Author

Hi Maggie (@maggiehendry) ,

I have merged in main and then applied all your suggested changes. To see what I have done click here:

c41c473...4e45be9

These changes are:

  • Added a range (10 to 500) for snow_grain_size_max and snow_grain_size_min. You shouldn't ever get snow grains outside this range. This range has been added to both the meta data and to subroutine check_jules_sea_seaice (in jules_sea_seaice_mod.F90) so that incorrect values (or rmdi values) should cause a failure. I have initialied snow_grain_size_min and snow_grain_size_max as rmdi to make sure it is always set if it is used.
  • Added a range (0 to 1) for snowpatch in the jules-shared meta data (matching what we have for um-atmos).
  • Moved the new meta data variables from um-atmos to jules-um.
  • Added some more trigger dependencies to this meta data (so l_zenith_albedo triggers the two snow_grain variables and l_cice_alb triggers l_zenith_albedo). Unfortunately I can't put i_meltpond_alb_vn under a trigger as it is needed by the coupling code regardless of the other settings.

Maggie - are you happy that I have addressed all your issues?

Dan.

@maggiehendry Maggie (maggiehendry) left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

There's quite a few differences in the metadata between jules-um and jules-shared and questions about sort-keys and triggers from the last review which haven't been responded to. Can you take another look please. I'll be in the office Friday until lunchtime if you need to chat. Thanks.

Comment thread rose-meta/jules-shared/jules-sea-seaice/HEAD/rose-meta.conf
Comment thread rose-meta/jules-shared/jules-sea-seaice/HEAD/rose-meta.conf
Comment thread rose-meta/jules-shared/jules-sea-seaice/HEAD/rose-meta.conf Outdated
Comment thread rose-meta/jules-shared/jules-sea-seaice/HEAD/rose-meta.conf Outdated
Comment thread rose-meta/jules-shared/jules-sea-seaice/HEAD/rose-meta.conf Outdated
Comment thread src/control/shared/jules_sea_seaice_mod.F90
Comment thread rose-meta/jules-shared/jules-sea-seaice/HEAD/rose-meta.conf Outdated
=is covered by snow.
!kind=default
ns=namelist/Science/JULES Surface/Sea and sea-ice
sort-key=Panel-C15c

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Partly resolved as the range is added.

=is covered by snow.
!kind=default
ns=namelist/Science/JULES Surface/Sea and sea-ice
sort-key=Panel-C15c

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Is snowpatch directly related to Panel-C15 l_zenith_albedo? The sort-key convention introduced would suggest that this is triggered by l_zenith_albedo. See sort-keys convention.

If it isn't it'd be better to rename the sort-key.

=is covered by snow.
!kind=default
ns=namelist/Science/JULES Surface/Sea and sea-ice
sort-key=Panel-C15c

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The last part of the comment wasn't clear in my original comment. What I mean was it would be useful too if the help= and description= in jules-um please be kept consistent too with jules-shared.

@maggiehendry

Copy link
Copy Markdown
Collaborator

Approved, but you should update your testing as there are been a lot of code changes since 2026-08-28 when the trac.log was last updated.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

This looks good to me

@github-actions github-actions Bot removed the cla-modified The CLA has been modified as part of this PR - added by GA label Oct 22, 2026
@james-bruten-mo
James Bruten (james-bruten-mo) merged commit e34bc36 into MetOffice:main Oct 22, 2026
3 checks passed
@james-bruten-mo

Copy link
Copy Markdown
Collaborator

The kgo change here is showing a race condition in the imogen code, and the kgo produced is inconsistent. For now, switching the imogen build to noomp fixes this and reverts the kgo back to the previous values.
We'll do that in the short term in #184 and investigate the race condition going forward.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request help wanted Extra attention is needed KGO This PR contains changes to KGO Linked Apps This PR is linked to a MetOffice/lfric_apps PR Linked UM This PR is linked to a MetOffice/um PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add zenith angle dependence to sea ice albedo calculations

5 participants