Netcdf

11 Oct 2023

*ugrid* ADCIRC vectors in QGIS with MDAL

use nco cli to make compliant files

10 Oct 2023

NWS12 to NWS13

tool to convert OWI’s NWS12 formatted ascii files (fort.22{1,2}) to OWI’s NWS13 NetCDF4

29 Mar 2023

MDAL

MDAL Logo

The Mesh Data Abstraction Library (MDAL) out of OSGeo is a “translator library” for many common conventions found in meteorology and hydrology. The library supports data found in Grib and NetCDF encoded as NetCDF Climate and Forecast Metadata Conventions (CF) or Unstructured Grid Conventions (CF/UGRID) and represented as geospatial mesh data. In addition to supporting mature and well-defined spatial data encodings in self-describing files, the library also supports numerous model-specific formats including Telemac, HEC-RAS, and TUFLOW.

8 Nov 2022

fort.15 configuration for NWS13

required changes

8 Nov 2022

Interpolation Implementation for NWS13

supporting moving wind and pressure inputs

8 Nov 2022

NWS13

Flexible (NetCDF) Metocean Inputs for ADCIRC

7 Jun 2022

Build ADCIRC using CMake

Gone are the days of having to use config.guess and sed replcements to customize the cmplrflags.mk for a particular HPC environment.

Here is the process to build the ADCIRC hydrodynamic model using CMake from the command line on a GNU/Linux host. The CMake infrastructure has only been available in the last few releases of ADCIRC, and this example uses v55.00 from the compressed tar archive of the code. The options specified below enable serial adcirc, distributed parallel padcirc, coupled serial adcswan (ADCIRC+SWAN), and the parallel coupled padcswan model. Standalone parallel SWAN and unstructured SWAN models are also configured, along with the adcprep ADCIRC pre-processor and other utilities.

17 Feb 2021

Dependency Hell

I started my Python package management journey years ago using pip, then more recently I embraced Anaconda and conda more fully (particularly with the “conda-forge” repository) to resolve complex dependencies along with system/binary dependencies. Recently, when attempting to update our team’s standard Python docker image with the latest versions of the packages we use, and include some new ones, it appears that relying on conda and conda-forge is untenable: I have been unable to resolve the appropriate set of versions for the scientific Python packages our team require for our work. I have moved back to pip for packages which are not provided in the default Anaconda repository. pip has and continues to make a number of improvements, and had no problem providing our extra dependencies.

17 Mar 2018

Installing NetCDF Python Packages

I was trying to remember how I have installed netCDF4 and related libraries for Python, and what I need to do differently for Windows systems vs. the Linux systems I usually use.

On Linux, sometimes I use the system netCDF C libaries, but often I compile and install specific versions of HDF5 and netCDF4 from scratch. Here is how I have built netCDF for various Docker container images.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# Build HDF5
cd hdf5-x.y.x
./configure --prefix=/usr/local --enable-shared --enable-hl
make
make install
cd ..

# Built NetCDF4
cd netcdf-x.y.z
LDFLAGS=-L/usr/local/lib
CPPFLAGS=-I/usr/local/include
./configure --enable-netcdf-4 --enable-dap --enable-shared --prefix=/usr/local --disable-doxygen
make
make install
cd ..

# NetCDF4 Fortran
cd netcdf-fortran-x.y.z
./configure --enable-shared --prefix=/usr/local
make
make install
cd ..

netcdf4-python #

I typically try to use pip to install Python libraries if I can. Use pip if you need to, but I am using conda and conda-forge as much as possible now, in fact by using conda, the above compilation steps are usually not necessary as far as I know. See below.

1 Jan 2012

ugrid

Conventions Documentation #

The conventions can be found here:

https://ugrid-conventions.github.io/ugrid-conventions/

Which is maintained though the following git repository:

https://github.com/ugrid-conventions/ugrid-conventions

Check Compliance #

pyugrid can be used to parse and validate CF-UGRID metadata. Its documentation is located here:

https://pyugrid.github.io/pyugrid/

1 Jan 0001

LarvaMap

LarvaMap is a distributed parallel lagrangian transport model for larvae that includes customizable biological behavior.

https://slides.com/alexandercrosby/larvamap

The idea behind LarvaMap was to make it easy for researchers everywhere to use sophisticated larval transport models to explore and test hypotheses about the early life of marine organisms.

LarvaMap integrates four components: an ocean circulation model, a larval behavior library, a python Lagrangian particle model, and a web-system for running the transport models.