Skip to content

Conversation

@rbeucher
Copy link
Member

@rbeucher rbeucher commented Jan 7, 2026

This pull request introduces several improvements and new features to the land and vegetation fraction calculations in the access_moppy derivations module. The changes enhance support for CMIP compliance by converting outputs to percentages, add new generalized mass pool calculations, and improve documentation and usability for vegetation-type handling. The most important changes are grouped below:

Land and vegetation fraction calculations:

  • The extract_tilefrac function now outputs tile fractions as percentages (0-100%), supports an optional vegetation type dimension for CMOR character-type variables, and provides improved documentation, error handling, and vegetation type mapping. [1] [2]
  • The calc_landcover function has been updated to output land cover fractions as percentages and to include descriptive vegetation type labels for both CABLE and CMIP6 models, with expanded documentation and examples. [1] [2]

Generalized mass pool calculations:

  • Added new functions: calc_mass_pool_kg_m2, calc_carbon_pool_kg_m2, and calc_nitrogen_pool_kg_m2 for generalized calculation of mass pools (carbon, nitrogen, etc.) with tile weighting, spatial integration, and unit conversion to kg m-2. [1] [2] [3]
  • Added calc_cland_with_wood_products for calculating total land carbon including wood products with proper weighting and conversion. [1] [2] [3]

API and naming changes:

  • Deprecated average_tile in favor of the new weighted_tile_sum function, which provides clearer semantics for tile-weighted calculations. [1] [2] [3]

@rbeucher rbeucher marked this pull request as draft January 7, 2026 23:50
@codecov
Copy link

codecov bot commented Jan 7, 2026

Codecov Report

❌ Patch coverage is 14.20613% with 308 lines in your changes missing coverage. Please review.
✅ Project coverage is 52.17%. Comparing base (bc36128) to head (ec6dbef).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
src/access_moppy/utilities.py 4.93% 212 Missing ⚠️
src/access_moppy/base.py 27.63% 55 Missing ⚠️
src/access_moppy/derivations/calc_land.py 27.27% 16 Missing ⚠️
src/access_moppy/atmosphere.py 22.22% 14 Missing ⚠️
src/access_moppy/driver.py 42.10% 11 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #161      +/-   ##
==========================================
- Coverage   57.55%   52.17%   -5.39%     
==========================================
  Files          18       18              
  Lines        2403     2739     +336     
==========================================
+ Hits         1383     1429      +46     
- Misses       1020     1310     +290     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

…pdate lev parameter to use literal values in ACCESS-ESM1.6 mappings
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.

2 participants