Skip to content

Conversation

@AgnieszkaMakulska
Copy link
Contributor

Tests for lagrangian ice microphysics

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds comprehensive support for lagrangian ice microphysics testing by refactoring the scheme selection mechanism and introducing new test cases. The changes replace the hardcoded scheme types (blk_1m, blk_1m_ice) with a more flexible approach using an ice_switch parameter combined with the base scheme name.

  • Refactored scheme selection to use ice_switch parameter instead of separate scheme names
  • Added new test files for lagrangian ice microphysics with reference data
  • Extended ice nucleation options including time-dependent ice nucleation and customizable seeds

Reviewed changes

Copilot reviewed 9 out of 11 changed files in this pull request and generated 22 comments.

Show a summary per file
File Description
parcel_common.py Updated argument checking to use ice_switch parameter instead of scheme-specific validation
parcel.py Added ice-related parameters (ice_switch, ice_nucl, time_dep_ice_nucl, rng_seed, rd_insol) and refactored scheme selection logic throughout
micro_lgrngn.py Extended initialization to support ice options and added ice diagnostics in step function
long_test/test_plot_schemes.py Updated to handle ice_switch parameter and added cleanup of output files
long_test/test_plot_ice_SD.py New test file for plotting ice microphysics profiles with heterogeneous and homogeneous nucleation cases
long_test/test_ice_SD.py New test file for validating ice microphysics results against reference data with multiple random seeds
long_test/test_compare_schemes.py Updated to handle ice_switch parameter and added total water comparison assertion
long_test/test_bulk_ice.py Updated to use ice_switch parameter and added cleanup of output file
long_test/refdata/ice_ref_timedep.nc New reference data for time-dependent ice nucleation tests
long_test/refdata/ice_ref_sing.nc New reference data for singular ice nucleation tests
io_output.py Added ice_mix_ratio variable output when ice is enabled
Comments suppressed due to low confidence (1)

long_test/test_bulk_ice.py:30

  • The explicit file close operation is unnecessary when using a context manager (with statement). The context manager automatically closes the file when exiting the block, so this line is redundant.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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.

1 participant