lp:~fluidity-core/fluidity/freesurfacefromnetcdffix

Created by Adam Candy and last modified
Get this branch:
bzr branch lp:~fluidity-core/fluidity/freesurfacefromnetcdffix
Members of Fluidity Core Team can upload to this branch. Log in for directions.

Branch merges

Related bugs

Related blueprints

Branch information

Owner:
Fluidity Core Team
Project:
Fluidity
Status:
Merged

Recent revisions

3917. By Adam Candy

A new test case: netcdf_read_errors
This checks the errors reported when an attempt to read an invalid NetCDF file is made. Here 'invalid' refers to a file that is itself an invalid, non-conforming NetCDF file, or is of a format not supported by Fluidity.

Five types of NetCDF files are checked:
  - One which does not provide all the data requested,
  - One is missing a dimension (i.e. it provides only a 1d field),
  - One is missing the main variable,
  - One contains an incorrectly-labelled dimension (as 'lat', not 'x'), and
  - One has the variable incorrectly labelled (as 'height', not 'z').

3916. By Adam Candy

New test case: netcdf_read_free_surface
This creates a valid netCDF file containing a free surface height in the domain x,y in [-1.2,1.2]. This is read in by Fluidity as a free surface and applied as an initial condition on pressure. From this, Fluidity calculates the free surface as a diagnostic, which is provided in the outputted VTU file, alongside a field containing the analytic function used to create the netCDF file in the first place (here described in height.py). The test compares the difference between these two fields, which should be small, due to the interpolation of the netCDF file.

In summary this case tests:
  - NetCDF reader
  - Reading of a free surface and conversion into a pressure initial condition
  - Creation of the free surface diagnostic from the pressure field (including its extrapolation down from the top surface)
  - Creation of prescribed scalar fields from Python

3915. By Adam Candy

Merge from trunk (to pick up improved netcdf error reporting changes).

3914. By Adam Candy

Correct the typo highlighted by Jon (thanks) and a spelling.

3913. By Adam Candy

Merge in of the trunk.

3912. By Adam Candy

A new section in the manual describing how to initialise the pressure field by specifying the free surface height.
Removal of the description of the legacy method to achieve this.
Other corrections to nearby sections.

3911. By Adam Candy

Additional documentation on the format options.

3910. By Adam Candy

Fix to bug lp:922025. This tidies up the manner in which the pressure initial condition is set from a free-surface height field provided in a netCDF file.

Summary of changes:
 - The special case, legacy method has been removed.
 - If the input format is not recognised, the code will abort with an error detailing the problematic field and the schema path of the invalid format.
 - The 'standard' format is now named 'raw' (instead of 'other'). This is the case where no post-processing is performed on the source data, and the field is initialised by the raw data present in the netCDF file.
 - Included logging messages to indicate which field is being populated and the source netCDF file (logging level 1).
 - Logging of the post-processing applied (logging level 3).
 - For the pressure boundary condition set from a free-surface field in particular, logging level 3 will report the min and max values of the field before and after the conversion.

There are currently no tests, examples or longtests that are affected by the above change, but possibly user-generated initialisation flml files that do use the legacy implementation of the pressure initial condition set from free-surface netCDF. In this case, the additional logging added with this change should make it easy to identify the change required to adopt the improved version of this import.

In short, the following example highlights the change necessary:

The option path:
  /material_phase::Ocean/scalar_field::Pressure/prognostic/initial_condition::WholeMesh/from_netcdf/format/Free-surface height

should become:
  /material_phase::Ocean/scalar_field::Pressure/prognostic/initial_condition::WholeMesh/free_surface/from_netcdf/format/raw

(where the file location is specified under the 'from_netcdf' node in each case).

3909. By Tim Greaves

Commit purely in build system. A path error in the Makefile.in spotted by Simon
Mouradian means that the flml schema was being installed in ~/.schemata rather
than into ~/.diamond/schemata. This fix modifies the path to point to the
correct location.

3908. By Christian Jacobs

Merging fix-multiple-material-phase-python-diagnostic branch revisions r3897 to r3902 inclusive into trunk.

Summary of change:
==================
We now pass the whole states array to calculate_diagnostic_variable if a Python diagnostic algorithm is used to compute the VelocityAbsorption, VelocitySource or Viscosity diagnostic fields. Otherwise, we just pass the submaterials array. Brendan has created a test case for this (pydiag_material_phase_support_multiple_velocity_children).

This resolves bug lp:800126.

Branch metadata

Branch format:
Branch format 7
Repository format:
Bazaar repository format 2a (needs bzr 1.16 or later)
Stacked on:
lp:fluidity
This branch contains Public information 
Everyone can see this information.