Skip to content

Instantly share code, notes, and snippets.

View ryancoughlin's full-sized avatar

Ryan Coughlin ryancoughlin

View GitHub Profile
import SwiftUI
import MapboxMaps
/// Generic contour layer - minimal, self-contained, renders from ContourLayerState
/// Works for SST, Chlorophyll, Salinity, Water Clarity, and other dataset types
struct SSTContourLayer: MapContent {
let state: ContourLayerState
var body: some MapContent {
let _ = print("🌊 [ContourLayer] Creating \(state.datasetType.rawValue) layer")
import SwiftUI
import MapboxMaps
import Turf
struct MapLayersView: MapContent {
@Bindable var appViewModel: AppViewModel
@Bindable var stationsViewModel: StationsViewModel
@Bindable var globalLayerManager: GlobalLayerManager
var overlayManager: OverlayManager?
var toolsManager: MapToolsManager?
https://tiler.saltyoffshore.com/cog/preview.png?url=https%3A%2F%2Fdata.saltyoffshore.com%2Fne_canyons%2Foc_composite%2F20250722T142829Z_cog.tif&expression=where%28where%28b1%3C0.01%2C0.01%2Cwhere%28b1%3E8%2C8%2Cb1%29%29%3C%3D0.1%2C%28%28where%28b1%3C0.01%2C0.01%2Cwhere%28b1%3E8%2C8%2Cb1%29%29-0.01%29%2F0.09%29*0.18%2Cwhere%28where%28b1%3C0.01%2C0.01%2Cwhere%28b1%3E8%2C8%2Cb1%29%29%3C%3D0.3%2C0.18%2B%28%28where%28b1%3C0.01%2C0.01%2Cwhere%28b1%3E8%2C8%2Cb1%29%29-0.1%29%2F0.2%29*0.15%2Cwhere%28where%28b1%3C0.01%2C0.01%2Cwhere%28b1%3E8%2C8%2Cb1%29%29%3C%3D1%2C0.33%2B%28%28log10%28where%28b1%3C0.01%2C0.01%2Cwhere%28b1%3E8%2C8%2Cb1%29%29%29-(-0.5228787453%29%29%2F%280-(-0.5228787453%29%29%29*0.25%2Cwhere%28where%28b1%3C0.01%2C0.01%2Cwhere%28b1%3E8%2C8%2Cb1%29%29%3C%3D3%2C0.58%2B%28%28log10%28where%28b1%3C0.01%2C0.01%2Cwhere%28b1%3E8%2C8%2Cb1%29%29%29-0%29%2F%280.4771212547-0%29%29*0.18%2C0.76%2B%28%28log10%28where%28b1%3C0.01%2C0.01%2Cwhere%28b1%3E8%2C8%2Cb1%29%29%29-0.4771212547%29%2F%280.90309-0.4771212547%29%29*
# Configure for sea-surface-temperature
# points to data.saltyoffshore.com - works!
# a record from IP to data.saltyoffshore.com is created in Cloudflare
# Error log configuration
error_log /var/log/nginx/error.log debug;
access_log /var/log/nginx/access.log combined;
# Cloudflare IPs for real IP forwarding
set_real_ip_from 103.21.244.0/22;
ryan:salty-data-processor (ssh) ➜ python main.py --dataset MODIS_T-JPL-L2P-v2019.0 [8:13:28]
12:13:31 | INFO | Processing 1 datasets for 13 regions
12:13:31 | INFO | Processing data for today's local date: 2025-03-29
12:13:31 | INFO | Getting hourly data for MODIS_T-JPL-L2P-v2019.0 in maine_cape_cod
12:13:31 | INFO | 🛰️ MODIS: Checking for swath data at 08:13:31 for maine_cape_cod
12:13:31 | INFO | ============================== MODIS DOWNLOAD: maine_cape_cod ==============================
12:13:31 | INFO | 📂 DIRECTORY: /Users/ryan/Documents/repos/salty-data-processor/downloaded_data/modis_hourly/MODIS_T-JPL-L2P-v2019.0/maine_cape_cod/20250329
12:13:31 | INFO | 🚀 DOWNLOAD: Running podaac-data-downloader for MODIS MODIS_T-JPL-L2P-v2019.0 (Swath: N)
################################################################################
import UIKit
import MapboxMaps
class SSTColorUtil {
private static let colors = DatasetType.sst.config.colorScale
static func getContourLineExpression(min minTemp: Double, max maxTemp: Double) -> Exp {
let range = maxTemp - minTemp
var stops: [Exp.Argument] = []
@ryancoughlin
ryancoughlin / cloudSettings
Last active February 20, 2020 00:02
VSCode Settings
{"lastUpload":"2020-02-20T00:02:06.489Z","extensionVersion":"v3.4.3"}
import React, { Component } from 'react';
import {
VictoryLine,
VictoryChart,
VictoryContainer,
VictoryClipContainer,
VictoryZoomContainer,
VictoryAxis,
VictoryScatter,
} from 'victory';