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

[Bug]: CDAT Migration: 2 variables below accepted relative tolerance for `zonal_mean_2d_stratosphere` #787

Closed tomvothecoder closed 6 months ago

tomvothecoder commented 6 months ago

What happened?

Related to #774 and this specific comment.

There are two variables that are above the accepted max relative tolerance for zonal_mean_2d_stratosphere: MERRA-U-SON and MERRA-U-JJA. Refer to the log output for the diffs.

What did you expect to happen? Are there are possible answers you came across?

No response

Minimal Complete Verifiable Example (MVCE)

Using the template run script

Relevant log output

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

Anything else we need to know?

No response

Environment

cdat-migration-fy24 branch

tomvothecoder commented 6 months ago

I actually think the mismatching elements have really small absolute values (>=1e-7), hence the large relative difference (~6% and 0.089%). Practically speaking, these differences should not appear when plotting because there are other values that are much larger than 1e-7.