Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid values when submesoscale variables are masked #5459

Closed
cbegeman opened this issue Feb 17, 2023 · 3 comments · Fixed by #5458
Closed

Invalid values when submesoscale variables are masked #5459

cbegeman opened this issue Feb 17, 2023 · 3 comments · Fixed by #5458
Assignees

Comments

@cbegeman
Copy link
Contributor

Fill value masking of the submesoscale variable normalMLEVelocity resulted in bad values in vertMLEBolusVelocityTop (Inf) that affected timeMonthly_avg_mocStreamvalLatAndDepth. The issue arises when (a) the masking array for normalMLEVelocity is specified in the Registry and (b) the normalMLEVelocity variable is included in a timeSeriesStats stream (regardless of whether masking is turned on via useMissingValMask). In MPAS-Ocean standalone, this bug manifests as state validation errors.

@cbegeman
Copy link
Contributor Author

The underlying issue may be due to inadequate initialization of normalMLEVelocity. However, when I attempted to initialize the array to zeros, the QU240 simulation crashed at runtime.

@xylar
Copy link
Contributor

xylar commented Feb 17, 2023

We are seeing -Infinity values in both timeMonthly_avg_vertMLEBolusVelocityTop and timeMonthly_avg_mocStreamvalLatAndDepth in monthly output (already visible in the first month):

$ pwd
/lcrc/group/acme/ac.jwolfe/scratch/anvil/230131.PR5254base.anvil/run
(mpas_dev) [ac.xasay-davis@chrlogin1 run]$ ncdump -v timeMonthly_avg_mocStreamvalLatAndDepth 230131.PR5254base.anvil.mpaso.hist.am.timeSeriesStatsMonthly.0010-12-01.nc | tail
    Infinityf, Infinityf, Infinityf, Infinityf, Infinityf, Infinityf, 
    Infinityf, Infinityf, Infinityf, Infinityf, Infinityf, Infinityf, 
    Infinityf, Infinityf, Infinityf, Infinityf, Infinityf, Infinityf, 
    Infinityf, Infinityf, Infinityf, Infinityf, Infinityf, Infinityf, 
    Infinityf, Infinityf, Infinityf, Infinityf, Infinityf, Infinityf, 
    Infinityf, Infinityf, Infinityf, Infinityf, Infinityf, Infinityf, 
    Infinityf, Infinityf, Infinityf, Infinityf, Infinityf, Infinityf, 
    Infinityf, Infinityf, Infinityf, Infinityf, Infinityf, Infinityf, 
    Infinityf ;
}

and

$ ncdump -v timeMonthly_avg_vertMLEBolusVelocityTop 230131.PR5254base.anvil.mpaso.hist.am.timeSeriesStatsMonthly.0010-12-01.nc | tail
  -Infinityf, -Infinityf, -Infinityf, -Infinityf, -Infinityf, -Infinityf, 
    -Infinityf, -Infinityf, -Infinityf, -Infinityf, -Infinityf, -Infinityf, 
    -Infinityf, -Infinityf, -Infinityf, -Infinityf, -Infinityf, -Infinityf, 
    -Infinityf, -Infinityf, -Infinityf, -Infinityf, -Infinityf, -Infinityf, 
    -Infinityf, -Infinityf, -Infinityf, -Infinityf, -Infinityf, -Infinityf, 
    -Infinityf, -Infinityf, -Infinityf, -Infinityf, -Infinityf, -Infinityf, 
    -Infinityf, -Infinityf, -Infinityf, -Infinityf, -Infinityf, -Infinityf, 
    -Infinityf, -Infinityf, -Infinityf, -Infinityf, -Infinityf, -Infinityf, 
    -Infinityf, -Infinityf, -Infinityf, -Infinityf, 0, 0, 0, 0, 0, 0, 0, 0, 0 ;
}

We are seeing -0 values in timeMonthly_avg_normalMLEvelocity:

$ ncdump -v timeMonthly_avg_normalMLEvelocity 230131.PR5254base.anvil.mpaso.hist.am.timeSeriesStatsMonthly.0010-12-01.nc | tail
  -0.009481622, 0.001539794, 0.006025193, 0.001916643, -0, -0, -0, -0, -0, 
    -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, 
    -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, 
    -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, 0,
  0.006610637, 0.001642826, -0.0005252801, -0.002020832, -0.002636817, 
    -0.002759336, -0.000311133, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, 
    -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, 
    -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, -0, 0, _, _, 
    _, _, _, _, _ ;
}

As a result, the MOC cannot be plotted, and it can also not be computed in post-processing.

@jonbob has traced this to #5325.

@xylar
Copy link
Contributor

xylar commented Feb 17, 2023

It appears this went untested because these fields are not part of any E3SM or compass tests at this point. We will attempt to remedy this and report back here.

jonbob added a commit that referenced this issue Feb 22, 2023
Bugfix for ocean submesoscale feature

Fill value masking of the submesoscale variable normalMLEVelocity
resulted in bad values in vertMLEBolusVelocityTop that affected
timeMonthly_avg_mocStreamvalLatAndDepth. This bugfix removes masking of
normalMLEVelocity.

Fixes #5459

[BFB]
@jonbob jonbob closed this as completed in a3f887c Feb 23, 2023
jonbob added a commit that referenced this issue Feb 23, 2023
….1 (PR #5461)

Bugfix for ocean submesoscale feature

Fill value masking of the submesoscale variable normalMLEVelocity
resulted in bad values in vertMLEBolusVelocityTop that affected
timeMonthly_avg_mocStreamvalLatAndDepth. This bugfix removes masking of
normalMLEVelocity.

Fixes #5459 on maint-2.1

[BFB]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants