# DMJ forecasting methodology

Research and implementation review date 2026-11-23, Pacific time.

This extension targets Del Mar Jetties on Camp Pendleton, immediately north of Oceanside Harbor. Its target coordinate is 33.217696° N, 117.406919° W. The supplied DMJ_SCIENTIFIC_FORECAST_RESEARCH.md was read completely and is retained alongside this file. The earlier pasted redesign proposal is background material. This implementation follows the request to preserve the current design.

## Implemented scientific scope

The app combines an existing forward offshore/wind forecast with independent offshore instrument observations, a location-checked CDIP nearshore nowcast, spectral energy, a regional tide reference, measured historical geometry and a local field log. It does not presently produce a calibrated DMJ breaking-face prediction. The available evidence supports nearshore context and more appropriate wind interpretation.

The sources are kept separate. Offshore Open-Meteo values continue to populate the primary forecast. Observations and the CDIP nowcast are shown in the DMJ panel, with valid times and retrieval times. There is no numerical blend, arbitrary offshore-to-surf multiplier, fitted buoy correction, or extension of a nowcast into future days.

## NOAA shoreline measurement

NOAA NGS CA0808, geographic cell GC10965, contains a mapped Natural.Mean High Water beach line and a closed Breakwater.Bare outline. The delivered shapefiles use NAD83 geographic coordinates, EPSG 4269. Imagery date is 2008-05-19 and the attribute HOR_ACC is 1.2 m. CA1206 / GC11089 has 2012-04-28 imagery and 0.6 m metadata accuracy, but its partial change set does not include the required open beach and North Breakwater outline.

The complete source ZIP files, hashes, feature IDs, coordinate arrays and derived measurements are retained. Natural beach record 462 and breakwater record 129 in CA0808 are selected by mapped feature type and position. No angle was measured from an unrectified screenshot.

The beach polyline is transformed to a local east/north metric approximation centered on the supplied target, resampled every 2 m, and fitted by orthogonal least squares around the nearest shoreline location. The 500 m full-window seaward normal is approximately 243° true. Full windows of 100, 250, 500 and 1,000 m give approximately 244.2°, 243.8°, 243.0° and 241.9°. This spread is a spatial-scale sensitivity assessment, not a statistical confidence interval. The local projection and nominal target coordinate introduce additional small uncertainty. The mapped MHW line is historical and does not identify today's takeoff peak.

The breakwater outline is a broad, bent structure. Midpoints of paired outline vertices provide explicitly recorded anchor, bend and tip estimates. Separating the bent attachment from the straight trunk gives approximate seaward chord bearings of 218° for the attachment, 182° for the main trunk, and 147° for the outer arm. The overall anchor-to-bend chord is 191° because it combines the attachment and trunk. The shoulder midpoint uses outline vertices 11 and 28, in addition to the anchor pair 20/21, bend pair 32/56 and tip pair 44/45. These explicitly selected points provide reproducible geometric approximations. They are not a single uniform jetty azimuth or a wave-shadow coefficient.

Wind arrival direction is compared with the historical beach normal, independently of the jetty alignment. The onshore component in mph is U cos(direction_from - 243°). A negative value is offshore. The existing broad onshore/cross-shore/offshore labels are qualitative sector classifications. For DMJ the displayed numerical surf-quality score is replaced by wind conditions, and the highlighted daylight hour minimizes forecast sustained wind. It is explicitly a wind-only choice. It does not imply favorable tides, swell exposure or safe surf.

Sources
- https://www.fisheries.noaa.gov/inport/item/61336
- https://www.fisheries.noaa.gov/inport/item/61345
- https://nsde.ngs.noaa.gov/downloads/CA0808.zip
- https://nsde.ngs.noaa.gov/downloads/CA1206.zip

## CDIP nearshore selection and transformations

The MOP transect database locates D0944–D0955 along the beach north of the structure. D0946 has backbeach coordinates 33.21780° N, 117.40460° W and an offshore prediction point at 33.21625° N, 117.41573° W, nominally 10 m deep. This makes it a geographically appropriate candidate reference for the supplied target.

D0944–D0950 share the same prediction point. They cannot provide seven independent descriptions of adjacent surf peaks. D0946's 260.55° model transect angle joins its backbeach coordinate to the prediction site. It differs from the independently measured historical beach tangent normal and is not substituted for it. The shore-type flag is 2, complex bathymetry. The next upcoast planar-bathymetry classification is D0956, farther from the target.

The implementation uses D0946 only and rejects a response with another point, depth or transect angle. D0929 is the harbor entrance and D0906 is Oceanside Pier. Neither is substituted for DMJ.

The live model dataset exposes Hs, Tp, Dp, spectral density, bin widths and two QC flags. Only records with primary flag 1 and secondary flag 0 are displayed. Invalid/absent numeric data are rejected. Dp is peak arrival direction. The offshore NDBC product exposes mean arrival direction, so those direction fields are named separately. A model is still a model when buoy observations drive it.

CDIP provides the existing spectral-refraction transformation from offshore to the nearshore point. The app uses that output rather than rebuilding propagation from incomplete local inputs. CDIP's documented transformation coefficients are marked reference-only with incomplete metadata. They were not reapplied to bulk Open-Meteo Hs. Refraction, shoaling, propagation lag and regional exposure belong to CDIP's model treatment. The app does not claim an independently resolved jetty diffraction, reflection, current, wave breaking or bar model.

The verified machine dataset is a nowcast history. The website also links forecast plots, but a corresponding forward machine-readable D0946 forecast dataset was not verified. Forward forecast days therefore retain their original Open-Meteo offshore interpretation. Recent nearshore model hours can be inspected independently.

Sources
- https://cdip.ucsd.edu/mops/transect_db.cdip
- https://cdip.ucsd.edu/MOP_v1.1/CA_v1.1_transect_definitions.txt
- https://cdip.ucsd.edu/MOP_v1.1/MOP_netCDF.txt
- https://cdip.ucsd.edu/MOP_v1.1/R_CA_transformation_coeffs.txt
- https://thredds.cdip.ucsd.edu/thredds/dodsC/cdip/model/MOP_alongshore/D0946_nowcast.nc
- https://cdip.ucsd.edu/a/documents/models.html

## Observations and energy

NDBC 46224 distributes CDIP 045 Oceanside Offshore buoy observations. In the verified response WVHT is metres, DPD and APD seconds, and MWD degrees true. Missing MM fields remain missing. NDBC's station table currently reports approximately 33.178° N, 117.472° W. This slightly differs from the research brief's deployment location. Coordinates can change with deployments. This instrument is offshore and does not measure DMJ breaking faces.

CDIP 043 / NDBC 46242 is retained only as a historical validation candidate, identified as decommissioned in the supplied research. The current client never fetches it as a live sensor. No transfer coefficients have been fitted from its 2008–2019 historical record.

For the newest QC-accepted MOP hour, the client integrates the full returned frequency-bin variance spectrum. It displays energy only when the spectral valid time equals that accepted hour.

m0 = sum(S(f_i) * delta_f_i), in m²
Hm0 = 4 sqrt(m0), in metres
E = rho g m0, in J/m², using rho = 1025 kg/m³ and g = 9.80665 m/s²

This is linear-wave mean total energy per sea-surface area derived from a modeled variance spectrum. It is not power per wave crest, a count of waves, or breaking-wave impact energy. A regression test checks spectral Hm0 against the associated CDIP Hs. Mean frequency-bin directions do not resolve a complete bimodal directional distribution. The app does not fabricate a quantitative set-consistency score or directional transfer ratio.

Sources
- https://www.ndbc.noaa.gov/data/realtime2/46224.txt
- https://www.ndbc.noaa.gov/data/stations/station_table.txt
- https://www.cdip.ucsd.edu/m/documents/data_access.html

## Historical bathymetry

NOAA NCEI's georeferenced DEM_global_mosaic getSamples endpoint was sampled at five coordinates from DMJ toward the model point and farther offshore. The full response, resolution, datum and contributing DEM metadata are retained in bathy-profile.json.

For the San Diego DEM, DEM_ID 3542, nominal resolution is 1/3 arc-second, roughly 9–10 m locally. The service records completion on 2012-03-07. Underlying surveys may be older. Values at the five sampled coordinates are approximately -0.39, -5.34, -8.08, -10.37 and -13.78 m NAVD88. These are historical elevations, not tide-adjusted present depths. Multiple overlapping DEMs are returned and the nearshore elevations differ. The chosen values are specifically from DEM 3542, not an uncontrolled mixture of raster sources.

These samples confirm historical offshore depth context and a broadly plausible nominal 10 m MOP location. They do not establish current sandbar position, a surveyed present-day DMJ beach slope, or the vertical reference of CDIP's nominal depth. No coefficient is calculated from the broader Camp Pendleton 0.03 regional slope. NOAA tidal MLLW and DEM NAVD88 are not added without a site-specific verified datum transformation.

Source
- https://gis.ngdc.noaa.gov/arcgis/rest/services/DEM_mosaics/DEM_global_mosaic/ImageServer
- https://www.ncei.noaa.gov/maps/bathymetry/

## Tides

NOAA station 9410396 Oceanside Harbor has station metadata and historic datums. Actual requests for hourly and high/low predictions in MLLW returned HTTP 200 with an API-level No Predictions data was found error. The client does not infer support from a station's navigation menu.

NOAA 9410230 La Jolla returned a valid hourly prediction series. The panel labels it as a regional reference, shows station and MLLW datum, and retains the GMT source times while formatting in America/Los_Angeles. The displayed level is the preceding hourly prediction with its explicit time, not an interpolated or observed DMJ water level. Rising/falling compares consecutive hourly predictions. No local tidal-stage surf-quality preference is applied.

Sources
- https://api.tidesandcurrents.noaa.gov/api/prod/
- https://api.tidesandcurrents.noaa.gov/mdapi/prod/webapi/stations/9410396.json
- https://tidesandcurrents.noaa.gov/datums.html?id=9410396
- https://tidesandcurrents.noaa.gov/inventory.html?id=9410396

## Field observations and validation

The app supports on-device observations with Pacific-display timestamps, device-local input time, DMJ sub-location, representative breaking-face height range in feet, optional largest set, surface texture, observer alias, confidence and notes. Face height means trough to crest. These are subjective surf observations and remain separate from buoy Hs and modeled Hs. Imports validate every record before any write, deduplicate identical IDs and reject conflicting IDs. The log can be exported and merged manually among friends without a database.

No records were supplied for calibration. Adding a record does not automatically fit or validate a surf-height model. Browser storage can be cleared or evicted and each browser/device has its own log, so exports are necessary to preserve observations.

A defensible future calibration requires timestamp-matched offshore spectra and nearshore nowcasts, datum-consistent tide inputs, archived issued forecasts, and repeated face-height observations at defined peaks. Divide sessions chronologically before fitting, retaining the newest independent swell events for validation and separating correlated reports from the same session. Fit on training events only. Compare against simple persistence or climatological baselines on the same held-out observations. Report MAE for a consistently defined continuous face-height target, or ordinal bin error and coverage for predeclared height bins. Stratify results by direction, period, tide, season and observer. Nowcast agreement is a different experiment from validating a forecast issued before a session. This implementation reports no accuracy percentage, calibrated interval or model skill.

## Runtime and outage behavior

Netlify reverse-proxy routes are fixed to the public NDBC file and the D0946 DDS/ASCII files because these sources lack browser CORS headers. NOAA predictions support direct browser requests. The proxy uses no function, database or scheduled process. netlify.toml must accompany manual deploys.

Only two CDIP requests are needed for each hourly source refresh, one dimension query and one bounded 48-hour subset with the latest spectrum. Results and failures are cached on device. Repeated app opens reuse the source cache, and failures back off. No automatic immediate retry is made on challenges or rate limits. CDIP terms specify 10 requests per 10 minutes per IP and polling no faster than updates. Four normal clients require eight requests on simultaneous hourly refresh. Clearing storage or many separate clients can still exceed a shared-IP limit. A descriptive project User-Agent and project contact URL are configured in the proxy.

An accepted valid time more than three hours old is labeled stale even after a successful retrieval. A failed refresh remains visibly marked. Future-dated observations/nowcasts beyond a five-minute tolerance are excluded from the current panel. The regular forecast cycle still rolls at 05:00 America/Los_Angeles. It does not alter buoy/model valid times or force an upstream model run.

The offline shell caches the interface and methodology. External API responses are outside the service-worker cache. Source caches preserve timestamps and failure labels. The DMJ additions are hidden when another surf spot is selected.

CDIP terms
- https://cdip.ucsd.edu/a/documents/terms.html

## Verification record

- NOAA CA0808 and CA1206 ZIPs downloaded and read as georeferenced vectors.
- Beach and structural measurements reproduced from those coordinates.
- CDIP D0946 live DDS, attributes and bounded ASCII subset retrieved.
- Spectral Hm0 agreed with the QC-accepted bulk Hs to within 0.001 m in the captured sample.
- NDBC 46224 actual observation file parsed with missing values preserved.
- NOAA 9410396 hourly and high/low prediction failures recorded.
- NOAA 9410230 actual hourly predictions parsed with explicit UTC/MLLW.
- NOAA historical DEM metadata and point samples retained.
- Unit/regression tests cover source identity, units, QC, stale/future values, DST, window selection and observation import consistency.
- Local browser checks and any remaining release limitations are recorded in TEST_RESULTS.md.


## V2 forward dashboard addition — 2026-11-23

The V2 dashboard supersedes the old seven-day card interface. Forward forecasts remain Open-Meteo offshore model values; no CDIP observation is multiplied into a breaking-face forecast. Dates follow America/Los_Angeles and span up to 16 atmospheric days, with missing marine/wind fields retained as null and extended lead times labeled. Actual supported horizons vary by provider run; a successful 16-day response does not imply 16 days of wave predictions. Wind selection requests separate Best Match, GFS seamless and ECMWF IFS 0.25° arrays. All stations now use a transparent minimum-daylight-wind window, without an inferred numeric surfability score. Legacy rating helpers remain in the utility module for compatibility tests but are not used by the V2 interface.

The forward wave-energy curve derives E = 1025*9.80665*Hs²/16 from hourly modeled offshore Hs converted to meters. It is distinct from the D0946 nowcast spectrum integral. Neither estimates set frequency, breaking impact or surf-face height. Secondary and tertiary swell fields retain their own period/direction where returned; all-null tertiary responses are displayed unavailable.

Regional NOAA predictions are requested at six-minute resolution plus explicit high/low events. La Jolla 9410230 covers the North County reference; Newport Beach, Newport Bay Entrance 9410580 covers the Trestles reference. Heights use MLLW, source timestamps use UTC and labels display Pacific time. Interpolation is confined to adjacent available source rows within one hour, with no extrapolation across missing coverage. Negative predicted elevations are retained. No regional-to-DMJ datum or phase transfer has been calibrated.

Civil twilight and sunrise/sunset are derived from NOAA fractional-year solar equations at the selected station coordinates, including atmospheric-refraction convention 90.833° for sunrise and 96° for civil twilight. Times assume an unobstructed horizon; these are calculations, not local light observations. Hourly temperature, cloud and precipitation are atmospheric forecasts.

Discussion regeneration follows every selected-day or source/model update. It describes numerical conditions, wind changes and local limitations using deterministic templates. A light-wind window is not a verified optimal surf window. Retrieval timestamps are labeled as retrieval, not source model initialization or publication. The 05:00 cycle is a client display boundary, not an upstream issuance schedule.

No current bathymetry, shoreline survey, local tide measurement, calibrated face-height target or held-out skill validation has been added by the interface work. The original scientific limitations continue to apply.
