Skip to content

Add support for fx.zfull#220

Open
rbeucher wants to merge 3 commits intomainfrom
fx_zfull_support
Open

Add support for fx.zfull#220
rbeucher wants to merge 3 commits intomainfrom
fx_zfull_support

Conversation

@rbeucher
Copy link
Member

@rbeucher rbeucher commented Mar 16, 2026

Add support for fx.zull using one off generated file.

will Fix #212

@codecov
Copy link

codecov bot commented Mar 16, 2026

Codecov Report

❌ Patch coverage is 27.27273% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 47.63%. Comparing base (7549b46) to head (dc18f9f).

Files with missing lines Patch % Lines
src/access_moppy/derivations/calc_atmos.py 27.27% 8 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #220      +/-   ##
==========================================
+ Coverage   47.47%   47.63%   +0.16%     
==========================================
  Files          22       22              
  Lines        4183     4194      +11     
==========================================
+ Hits         1986     1998      +12     
+ Misses       2197     2196       -1     

☔ 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.

@rbeucher rbeucher requested a review from rhaegar325 March 17, 2026 00:02
Copy link
Collaborator

@rhaegar325 rhaegar325 left a comment

Choose a reason for hiding this comment

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

While testing the PR, an issue has occured:

File [/g/data/tm70/yz9299/ARE/ACCESS-MOPPy/src/access_moppy/atmosphere.py:139](https://are.nci.org.au/g/data/tm70/yz9299/ARE/ACCESS-MOPPy/src/access_moppy/atmosphere.py#line=138), in Atmosphere_CMORiser.select_and_process_variables(self)
    137     # Ensure the CMOR variable exists
    138     if self.cmor_name not in self.ds:
--> 139         raise ValueError(
    140             f"Internal calculation function '{func_name}' did not generate variable '{self.cmor_name}'"
    141         )
    143     return
    145 # Original logic for other calculation types
    146 # Select input variables required for the CMOR variable

ValueError: Internal calculation function 'load_zfull_resource' did not generate variable 'zfull'

This is because the dataset we loaded is a raw data with following format:

ds <xarray.Dataset> Size: 4MB
Dimensions:                  (lev: 38, lat: 145, lon: 192, bnds: 2)
Coordinates:
  * lev                      (lev) float64 304B 20.0 80.0 ... 3.925e+04
    sigma_theta              (lev) float64 304B ...
  * lat                      (lat) float64 1kB -90.0 -88.75 -87.5 ... 88.75 90.0
  * lon                      (lon) float64 2kB 0.0 1.875 3.75 ... 356.2 358.1
Dimensions without coordinates: bnds
Data variables:
    fld_s15i101              (lev, lat, lon) float32 4MB ...
    latitude_longitude       int32 4B ...
    lat_bnds                 (lat, bnds) float64 2kB ...
    lon_bnds                 (lon, bnds) float64 3kB ...
    theta_level_height_bnds  (lev, bnds) float64 608B ...
    sigma_theta_bnds         (lev, bnds) float64 608B ...
Attributes:
    history:      File /scratch/tm70/sw6175/access-esm/archive/get-model-heig...
    Conventions:  CF-1.6
    source:       Data from Met Office Unified Model
    um_version:   7.3

which hasn't been cmorised yet and still have the stash code as it variable name.
Not sure if I make it right, I use following parameters when generate cmoriser:

cmoriser = ACCESS_ESM_CMORiser(
    input_data=None,
    compound_name="fx.zfull",
    experiment_id="piControl",
    source_id="ACCESS-ESM1-5",  
    variant_label="r1i1p1f1",
    grid_label="gn",
    activity_id="CMIP",
    output_path=OUTPUT_FOLDER,
    parent_info=parent_experiment_config,  
)

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.

Calculation of fx.Zfull

2 participants