NetCDF file handling in Fluidity

Registered by Jon Hill

Based on the comments on bug 930706 https://bugs.launchpad.net/fluidity/+bug/930706 there appear to be several instances of separate NetCDF reading code that should be rationalised into a single reader.

This blueprint is for Fluidity users to define which NetCDF files are used and to describe their characteristics (e.g. equi-spaced points, unstructured data, one variable, multiple variable, on a lat/long grid, etc, etc).

From this we can define what the reader should be able to handle and create a single interface for reading NetCDF files.

Currently NetCDF files are used for:
 - reading in forcing data (ERA40) for surface fluxes
 - Initialising free surface
 - For the bathymetry when extruding
 - As boundary condition input from the NEMO ocean model

Blueprint information

Status:
Started
Approver:
None
Priority:
High
Drafter:
Jon Hill
Direction:
Needs approval
Assignee:
Jon Hill
Definition:
Drafting
Series goal:
None
Implementation:
Slow progress
Milestone target:
None
Started by
Jon Hill

Sprints

Whiteboard

=======================================
 Features required

 - equispaced data (I can't think of anything that doesn't have this requirement and if it does, GMT can be used to make it equispaced)
 - On a lat/long grid (I can't think of anything that uses other coordinates, and again GMT can be used to transform data)
 - Contains multiple variables (ERA40 should contain 8-9 for example)
 - Need to be interpolated in space and time, handling real world dates. What about NEMO data? Is that in real dates?
 - Needs to handle wrapping around globe
 - Ability to create a mesh that matches the topology of the NetCDF file

=====================
Notes:

GMT has c and c++ interfaces. Python and fortran are planned/in development. GMT 5 which includes the API is considered "not safe" for day-to-day work. It would also need packaging in our PPA (more work for Tim!)

Found an interpolation package called: SOSIE (http://sosie.sourceforge.net/) which looks promising, but there's no licence! It's small and could just be added to our repo.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.