E3SM-Project / e3sm_diags

E3SM Diagnostics package
https://e3sm-project.github.io/e3sm_diags
BSD 3-Clause "New" or "Revised" License
38 stars 31 forks source link

CDAT Migration Phase 2: Refactor `zonal_mean_2d()` and `zonal_mean_2d_stratosphere()` sets #774

Closed tomvothecoder closed 6 months ago

tomvothecoder commented 7 months ago

Description

Summary of Changes

Drivers and Parameters

Plotting

Misc.

Checklist

If applicable:

tomvothecoder commented 6 months ago

Thanks for the PR. I just have some minor comments and clarification questions. Other then that, maybe to have another regression test for zonal_mean_2d_stratosphere() just in case..

I performed a regression test using zonal_mean_2d_stratosphere(). All variables except two are within the accepted relative tolerance: MERRA2-U-SON and MERRA-U-JJA. Only 16/3610 and 15/3610 elements are mismatched.

Comparing:
/global/cfs/projectdirs/e3sm/e3sm_diags_cdat_test/655-zonal-mean-2d-stratosphere/zonal_mean_2d_stratosphere/MERRA2/MERRA2-U-SON-global_ref.nc
 /global/cfs/projectdirs/e3sm/e3sm_diags_cdat_test/main/zonal_mean_2d_stratosphere/MERRA2/MERRA2-U-SON-global_ref.nc

Not equal to tolerance rtol=1e-05, atol=0

Mismatched elements: 16 / 3610 (0.443%)
Max absolute difference: 1.12679693e-07
Max relative difference: 0.06101062
 x: array([[ 6.962348e-07,  8.762654e-01,  1.605988e+00, ...,  2.470426e+00,
         1.311890e+00,  1.454603e-06],
       [ 1.235800e-06,  1.004880e+00,  1.845646e+00, ...,  2.164340e+00,...
 y: array([[ 6.962348e-07,  8.762654e-01,  1.605988e+00, ...,  2.470426e+00,
         1.311890e+00,  1.454603e-06],
       [ 1.227703e-06,  1.004880e+00,  1.845646e+00, ...,  2.164340e+00,...
Comparing:
/global/cfs/projectdirs/e3sm/e3sm_diags_cdat_test/655-zonal-mean-2d-stratosphere/zonal_mean_2d_stratosphere/MERRA2/MERRA2-U-JJA-global_ref.nc
 /global/cfs/projectdirs/e3sm/e3sm_diags_cdat_test/main/zonal_mean_2d_stratosphere/MERRA2/MERRA2-U-JJA-global_ref.nc

Not equal to tolerance rtol=1e-05, atol=0

Mismatched elements: 15 / 3610 (0.416%)
Max absolute difference: 2.09578261e-07
Max relative difference: 0.00898989
 x: array([[-9.994902e-07,  1.855954e+00,  3.415055e+00, ..., -1.025078e+00,
        -5.548744e-01, -9.440600e-07],
       [-9.595097e-07,  1.685548e+00,  3.103145e+00, ..., -8.308557e-01,...
 y: array([[-9.994902e-07,  1.855954e+00,  3.415055e+00, ..., -1.025078e+00,
        -5.548744e-01, -9.440600e-07],
       [-9.595177e-07,  1.685548e+00,  3.103145e+00, ..., -8.308557e-01,...

I opened a GitHub issue to debug these variables later. I will merge this PR once the build passes.