News for hackers. Stuff that matters.
Re:Mathematics of Hurricane Modeling and Forecasting (2008, ... by plopz on Thursday September 14, 2023 @07:27AM (#37507508)
With a lot of weather data you end up with these large gridded files like grib, netcdf, hdf, etc. Does anyone know if theres a way to get this kind of data into a database or something where you can query it quickly? I've been wondering how people handle this kind of data for awhile.

The only idea I came up with was contouring the data into shapes and then storing those shapes in a db that can do spatial queries.

Re:Mathematics of Hurricane Modeling and Forecasting (2008, ... by dilivion on Thursday September 14, 2023 @08:18AM (#37507911)
There's CDO: a collection of command line Operators to manipulate and analyse Climate and NWP model Data. Supported data formats are GRIB 1/2, netCDF 3/4, SERVICE, EXTRA and IEG. There are more than 600 operators available: https://code.mpimet.mpg.de/projects/cdo
Re:Mathematics of Hurricane Modeling and Forecasting (2008, ... by zhdc1 on Thursday September 14, 2023 @08:54AM (#37508326)
> With a lot of weather data you end up with these large gridded files like grib, netcdf, hdf, etc. Does anyone know if theres a way to get this kind of data into a database or something where you can query it quickly? I've been wondering how people handle this kind of data for awhile.

GDAL has drivers for HDF4, HDF5, and netCDF.

I do a good amount of work with multispectral imagery data. My workflow for anything that doesn't immediately come as a geotiff or a jp2 is to either use gdal_translate via the command line to convert the datasets I'm interested in into a multi-band geotiff, or to open the product directly in either Python or Julia with the appropriate library.

That said, how much effort and what I do with the data depends a lot on where it comes from.

Re:Mathematics of Hurricane Modeling and Forecasting (2008, ... by ungawatkt on Thursday September 14, 2023 @08:58AM (#37508369)
Hurricanes specifically are pretty friendly to relatively simple 2 dimensional models, since for the most part people care about the wind impacting the surface. So for that I've used raster files - xy grid is lat/lon, and you can encode a values per rgba channel, usually windspeed and central pressure, storm surge value if you have one, maybe surface friction at a point as well, I just use windspeed in these files (0). And rasters over time gives you animations, similar to this NHC product(1).

GeoJSON and Shapefiles in something like PostGIS is also viable for relatively small and simple things, like tracks or single 2D events, but once you start covering enough area or need to model in 3 dimensional grid, those more specialized file formats become more powerful.

0: https://www.odinseye.cloud/hurricane/2016/matthew2016/ 1: https://www.nhc.noaa.gov/archive/2023/HILARY_graphics.php

Re:Mathematics of Hurricane Modeling and Forecasting (2008, ... by plopz on Thursday September 14, 2023 @09:41AM (#37508907)
When you say you encode different values in rgba channels, are you actually saving the rasters as image files then?
Re:Mathematics of Hurricane Modeling and Forecasting (2008, ... by zhdc1 on Thursday September 14, 2023 @09:58AM (#37509143)
The previous poster is likely referring to something like a GeoTIFF, which more or less accepts an arbitrary number of bands (matrices).
Re:Mathematics of Hurricane Modeling and Forecasting (2008, ... by ungawatkt on Thursday September 14, 2023 @10:05AM (#37509239)
Yep, for my purposes I tend to use pngs for simplicity, but the next step would be GeoTIFF
Re:Mathematics of Hurricane Modeling and Forecasting (2008, ... by autopilot23 on Thursday September 14, 2023 @09:57AM (#37509120)
Isn't modeling turbulence in two-dimensional completely different phenomena from (real-life) three-dimensional turbulence?

I thought this is why it's impossible to simplify turbulence models by 'ignoring a dimension'?

Re:Mathematics of Hurricane Modeling and Forecasting (2008, ... by ungawatkt on Thursday September 14, 2023 @10:17AM (#37509423)
for taking a computational fluids approach, I think yes, you're largely correct. Hurricanes have a class of models that are parametric, where you can get a 2 dimensional wind footprint based on some initial conditions; primarily central pressure, size (radius of max wind), and location. These models rely on empirical measurements to get simpler. NWS 23 (0) is an old model, it's the one I've implemented before. But there's been more refined parametric models that have come out, and updates to older ones, for example the work by Holland (1) and Wiloughby (2). Take this with a grain of salt, since I'm no expert in this field.

(0) https://library.oarcloud.noaa.gov/noaa_documents.lib/NWS/TR_... (1) https://opensky.ucar.edu/islandora/object/articles%3A17282/d... (2) https://journals.ametsoc.org/view/journals/mwre/141/6/mwr-d-...