23 lines
693 B
Python
23 lines
693 B
Python
"""Constants and schema for trajectory ETL (NC → Arrow)."""
|
|
|
|
BLOCK_SIZE = 24 # steps per block (same as frontend)
|
|
|
|
# Default variable names to look for in NetCDF (first match wins)
|
|
LON_NAMES = ("lon", "longitude", "x", "Lon")
|
|
LAT_NAMES = ("lat", "latitude", "y", "Lat")
|
|
U_NAMES = ("u", "u_vel", "velocity_x", "U")
|
|
V_NAMES = ("v", "v_vel", "velocity_y", "V")
|
|
BEACHED_NAMES = ("beached", "status", "mask", "beach")
|
|
TIME_NAMES = ("time", "obs", "step", "t")
|
|
|
|
# Arrow table schema for one block (frontend expects this)
|
|
ARROW_SCHEMA = {
|
|
"step": "int32",
|
|
"particle_id": "int32",
|
|
"lon": "float32",
|
|
"lat": "float32",
|
|
"u": "float32",
|
|
"v": "float32",
|
|
"beached": "int8",
|
|
}
|