Skip to content

Fix problems seen in production - #215

Merged
MBARIMike merged 2 commits into
mbari-org:mainfrom
MBARIMike:main
Nov 25, 2026
Merged

MBARIMike merged 2 commits into
mbari-org:mainfrom
MBARIMike:main

Conversation

@MBARIMike

Copy link
Copy Markdown
Collaborator

No description provided.

MBARIMike and others added 2 commits November 25, 2026 14:11
A corrupt universals_longitude sample (~1e27 degrees) in a triton log
propagated through nudged_longitude into the 1S file as 8 bad seconds.
In create_products._grid_dims() the mean longitude, and so the UTM
zone, became enormous and pyproj raised CRSError, which aborted all
plots for the deployment in lrauv_deployment_plots.py.

combine.py: add Combine_NetCDF._physical_coordinate_qc(), run at the
start of _initial_coordinate_qc() for every log. It removes samples
outside -180..180 longitude and -90..90 latitude from the universals
and nal9602 position variables by reusing _range_qc_combined_nc(), and
logs a warning with the counts. Instruments with no out-of-range
values are left untouched. The regional check for the two special logs
is unchanged.

create_products.py: in _grid_dims(), treat positions outside the valid
range as missing (with a warning) so they cannot corrupt the UTM zone
or distance along track, and return the existing empty result if no
valid longitude remains.

Add tests for both.

Existing 1S files built from affected logs (e.g. triton
20261104T095000) need reprocessing.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
lrauv_deployment_plots.py --last_n_days N selected deployments only
when their YYYYMMDD_YYYYMMDD date range overlapped the window. When a
log in an older deployment was reprocessed (e.g. daphne 20261001_20261005
on 2026-11-25), the deployment was never considered, so its freshness
check never ran and its deployment-level plots stayed out of date.

_dlist_list() now also returns a deployment that ended before the
window if any of its *_{FREQ}.nc files was modified since the window
start, via the new _nc_modified_since(). plot_deployment()'s existing
freshness check still decides whether anything needs replotting. Such
deployments are looked for in the start year and the year before.

Add TestDlistList covering overlapping, recently modified, stale,
no-nc, previous-year, future and missing-dlist deployments.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@MBARIMike
MBARIMike merged commit 0f6f00f into mbari-org:main Nov 25, 2026
2 checks passed
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.

1 participant