Skip to content

Right levels used regridding 265 Area cloud fraction with lfric2um - #697

Open
Steve Mullerworth (stevemullerworth) wants to merge 3 commits into
MetOffice:mainfrom
stevemullerworth:right_levels
Open

Right levels used regridding 265 Area cloud fraction with lfric2um#697
Steve Mullerworth (stevemullerworth) wants to merge 3 commits into
MetOffice:mainfrom
stevemullerworth:right_levels

Conversation

@stevemullerworth

@stevemullerworth Steve Mullerworth (stevemullerworth) commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

PR Summary

Sci/Tech Reviewer:
Code Reviewer:

Closes #694 where the technical issue is described in depth.

This branch ensures the correct number of layers is used for gathering LFRic data. Previously, it was assumed to be the same as the UM number of layers, which is incorrect for STASH code 265 (area cloud fraction), as can be seen by noting the corruption of the data as compared with the very similar 266 STASH code.

Where an LFRic field has more layers than the UM field, one must decide what to do. In the above case, ignoring level 1 of the LFRic field looks correct as the first two levels of the field (the two Wtheta dofs in the lowest cell) are identical. This was further checked by reviewing the input data to the um2lfric aquaplanet task that generated the input data for the lfric2um aquaplanet task: the first two levels in the field in this file are not identical and look more like the regridded data of levels 2 and 3 of the LFRic field, respectively.

Finally, um2lfric code was examined. um2lfric creates an LFRic-like array used for regridding UM data into which. It then calls a post_process routine which, for LFRic field area_cf (which matches STASH code 265), it adds an extra level to the start of the array which is a duplicate of the first level.

The KGOs for the lfric2um aquaplanet tests are changed by this branch as expected. Just the area cloud fraction is affected, as expected. The cloud fraction plots are now similar to the bulk cloud fraction plots, and the change avoids the use of the duplicated level 0 layer of the LFRic data.

Code Quality Checklist

  • 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
  • All automated checks in the CI pipeline have completed successfully

Testing

  • I have tested this change locally, using the LFRic Apps rose-stem suite
  • If any tests fail (rose-stem or CI) the reason is understood and acceptable (e.g. kgo changes)
  • I have added tests to cover new functionality as appropriate (e.g. system tests, unit tests, etc.)
  • Any new tests have been assigned an appropriate amount of compute resource and have been allocated to an appropriate testing group (i.e. the developer tests are for jobs which use a small amount of compute resource and complete in a matter of minutes)

trac.log

Several non-lfricinputs builds ran out of time due to ongoing file-system issues. As the changes are fully isolated to lfricinputs it doesn't seem worth rerunning right now.

Three lfricinputs rose-ana tasks fail, all expected and relate to the corrected STASHcode 265. There are no other differences.

Test Suite Results - lfric_apps - pr697_lfric2um_right_levels/run1

Suite Information

Item Value
Suite Name pr697_lfric2um_right_levels/run1
Suite User steve.mullerworth
Workflow Start 2026-08-06T17:02:04
Groups Run developer
Dependency Reference Main Like
casim MetOffice/casim@2026.07.1 True
jules MetOffice/jules@2026.07.1 True
lfric_apps stevemullerworth/lfric_apps@right_levels False
lfric_core MetOffice/lfric_core@60fc29a True
moci MetOffice/moci@2026.07.1 True
SimSys_Scripts MetOffice/SimSys_Scripts@77a5166 True
socrates MetOffice/socrates@2026.07.1 True
socrates-spectral MetOffice/socrates-spectral@2026.07.1 True
ukca MetOffice/ukca@9fc2b6d True

Task Information

❌ failed tasks - 17
Task State
build_jedi_lfric_tests_azspice_gnu_fast-debug-64bit-rsolver64 failed
build_jedi_lfric_tests_azspice_gnu_full-debug-64bit failed
build_jules_azspice_gnu_fast-debug-64bit failed
build_lfric2lfric_azspice_gnu_fast-debug-64bit failed
build_lfric_atm_azspice_gnu_fast-debug-32bit failed
build_lfric_atm_azspice_gnu_fast-debug-64bit failed
build_lfric_atm_azspice_gnu_full-debug-32bit failed
build_name_transport_azspice_gnu_fast-debug-64bit failed
build_name_transport_unit_tests_azspice_gnu_64bit failed
build_physics_schemes_interface_unit_tests_azspice_gnu_64bit failed
build_science_shared_unit_tests_azspice_gnu_64bit failed
build_shallow_water_azspice_gnu_fast-debug-64bit failed
build_shallow_water_unit_tests_azspice_gnu_64bit failed
build_solver_azspice_gnu_fast-debug-64bit failed
rose_ana_lfricinputs_lfric2um-aquaplanet-C48L38_N48L38_azspice_gnu_fast-debug-64bit failed
rose_ana_lfricinputs_lfric2um-aquaplanet-C48L38_N48L38_azspice_gnu_full-debug-64bit failed
rose_ana_lfricinputs_lfric2um-aquaplanet-C48L38_N48L38_ex1a_gnu_fast-debug-64bit failed
✅ succeeded tasks - 1005
⌛ waiting tasks - 68
Task State
run_jedi_lfric_tests_forecast_nwp_gal9-C12_azspice_gnu_full-debug-64bit waiting
run_jedi_lfric_tests_forecast_nwp_gal9-C48_MG_azspice_gnu_full-debug-64bit waiting
run_jedi_lfric_tests_forecast_nwp_gal9_da-C12_azspice_gnu_full-debug-64bit waiting
run_jedi_lfric_tests_forecast_pseudo_pseudomodel-C12_azspice_gnu_full-debug-64bit waiting
run_jedi_lfric_tests_runge-kutta-C12_azspice_gnu_full-debug-64bit waiting
run_jedi_lfric_tests_tlm_tests_nwp_gal9-strict_solver-4OMP-C12_MG_azspice_gnu_fast-debug-64bit-rsolver64 waiting
run_jules_dice2-BiP2x2-50000x50000_azspice_gnu_fast-debug-64bit waiting
run_lfric2lfric_clim_gal9-C24_C12_1cpu_azspice_gnu_fast-debug-64bit waiting
run_lfric2lfric_oasis_clim_gal9-C24_C12_1cpu_azspice_gnu_fast-debug-64bit waiting
run_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam-lbc_1cpu_azspice_gnu_fast-debug-64bit waiting
run_lfric2lfric_oasis_clim_gal9_C12-ral_seuk_C16_lam_1cpu_azspice_gnu_fast-debug-64bit waiting
run_lfric2lfric_oasis_ral_seuk-C32_lam_MG_1cpu_azspice_gnu_fast-debug-64bit waiting
run_lfric2lfric_ral3-seuk_azspice_gnu_fast-debug-64bit waiting
run_lfric2lfric_ral_seuk-C32_lam_MG_1cpu_azspice_gnu_fast-debug-64bit waiting
run_lfric_atm_clim_gal9-C12_azspice_gnu_fast-debug-32bit-crun0 waiting
run_lfric_atm_clim_gal9_short-C12_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_clim_gal9_short-C12_azspice_gnu_fast-debug-32bit-crun0 waiting
run_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-32bit-crun0 waiting
run_lfric_atm_nwp_gal9-C12_azspice_gnu_fast-debug-64bit-crun0 waiting
run_lfric_atm_nwp_gal9_debug-C12_azspice_gnu_full-debug-32bit waiting
run_lfric_atm_nwp_gal9_short-C12_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_nwp_gal9_short-C12_azspice_gnu_fast-debug-32bit-crun0 waiting
run_lfric_atm_ral3-seuk_MG_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_ral3-seuk_MG_azspice_gnu_fast-debug-32bit-crun0 waiting
run_lfric_atm_ral3_ens-seuk_MG_azspice_gnu_fast-debug-32bit-crun0 waiting
run_lfric_atm_ral3_mixmol-seuk_MG_azspice_gnu_fast-debug-32bit-crun0 waiting
run_lfric_atm_rce-BiP64x64-1500x1500_MG_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_scm_coma9_bomex-BiP2x2-50000x50000_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_scm_coma9_toga-BiP2x2-50000x50000_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_scm_comorph_dev_bomex-BiP2x2-50000x50000_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_scm_comorph_dev_toga-BiP2x2-50000x50000_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_scm_gal9_bomex-BiP2x2-50000x50000_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_scm_gal9_cbl_dry-BiP2x2-50000x50000_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_scm_gal9_comp_tran_ref-BiP2x2-50000x50000_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_scm_gal9_dice2-BiP2x2-50000x50000_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_scm_gal9_gabls4-BiP2x2-50000x50000_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_scm_gal9_sahara-BiP2x2-50000x50000_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_scm_gal9_seaice-BiP2x2-50000x50000_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_scm_gal9_snow-BiP2x2-50000x50000_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_scm_gal9_toga-BiP2x2-50000x50000_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_scm_hd209458b-BiP2x2-50000x50000_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_scm_llcs-BiP2x2-50000x50000_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_scm_rad_gas-BiP2x2-50000x50000_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_scm_ral3_constrain-BiP2x2-50000x50000_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_scm_ral3_moruses-BiP2x2-50000x50000_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_scm_ral3_urban2t-BiP2x2-50000x50000_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_scm_ukca_land-BiP2x2-50000x50000_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_scm_ukca_land-BiP2x2-50000x50000_azspice_gnu_fast-debug-32bit-crun0 waiting
run_lfric_atm_scm_ukca_sea-BiP2x2-50000x50000_azspice_gnu_fast-debug-32bit waiting
run_lfric_atm_scm_ukca_sea-BiP2x2-50000x50000_azspice_gnu_fast-debug-32bit-crun0 waiting
run_name_transport_cylinder_xz-BiP100x10-20x20_azspice_gnu_fast-debug-64bit waiting
run_name_transport_hadley_dcmip-C24_azspice_gnu_fast-debug-64bit waiting
run_name_transport_sbr_hori_lam-n96_lam_azspice_gnu_fast-debug-64bit waiting
run_shallow_water_galewsky-C24_azspice_gnu_fast-debug-64bit waiting
run_shallow_water_galewsky_vi-C24_azspice_gnu_fast-debug-64bit waiting
run_shallow_water_gaussian-BiP32x32-1x1_azspice_gnu_fast-debug-64bit-crun0 waiting
run_shallow_water_gaussian_ex-BiP32x32-1x1_azspice_gnu_fast-debug-64bit waiting
run_shallow_water_gaussian_vi-BiP32x32-1x1_azspice_gnu_fast-debug-64bit waiting
run_shallow_water_thermal_vi-BiP32x32-1x1_azspice_gnu_fast-debug-64bit waiting
run_shallow_water_williamson2_vi-C24_azspice_gnu_fast-debug-64bit waiting
run_shallow_water_williamson5_vi-C24_azspice_gnu_fast-debug-64bit waiting
run_solver_bicgstab-C24_azspice_gnu_fast-debug-64bit waiting
run_solver_cg-C24_azspice_gnu_fast-debug-64bit waiting
run_solver_fgmres-C24_azspice_gnu_fast-debug-64bit waiting
run_solver_gcr-C24_azspice_gnu_fast-debug-64bit waiting
run_solver_gmres-C24_azspice_gnu_fast-debug-64bit waiting
run_solver_jacobi-C24_azspice_gnu_fast-debug-64bit waiting
run_solver_prec_only-C24_azspice_gnu_fast-debug-64bit 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

PSyclone Approval

  • If you have edited any PSyclone-related code (e.g. PSyKAl-lite, Kernel interface, optimisation scripts, LFRic data structure code) then please contact the TCD Team

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

@stevemullerworth
Steve Mullerworth (stevemullerworth) marked this pull request as ready for review August 7, 2026 13:03
@stevemullerworth Steve Mullerworth (stevemullerworth) changed the title Right levels Right levels used regridding 265 Area cloud fraction with lfric2um Aug 7, 2026
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.

lfric2um levels mismatch between lfric and um for area cloud fraction

2 participants