lp:~fluidity-core/fluidity/freesurfacefromnetcdffix
- Get this branch:
- bzr branch lp:~fluidity-core/fluidity/freesurfacefromnetcdffix
Branch merges
- Jon Hill: Pending requested
- Fluidity Core Team: Pending requested
-
Diff: 1259 lines (+1052/-37)15 files modifiedmanual/configuring_fluidity.tex (+15/-3)
ocean_forcing/load_netcdf.F90 (+20/-12)
preprocessor/Initialise_Fields.F90 (+2/-0)
schemas/input_output.rnc (+13/-7)
schemas/input_output.rng (+15/-15)
tests/netcdf_read_errors/Makefile (+18/-0)
tests/netcdf_read_errors/createnetcdf.py (+86/-0)
tests/netcdf_read_errors/missingdata.err.sample (+44/-0)
tests/netcdf_read_errors/netcdf_read_errors.xml (+130/-0)
tests/netcdf_read_errors/valid.flml (+292/-0)
tests/netcdf_read_free_surface/Makefile (+13/-0)
tests/netcdf_read_free_surface/createnetcdf.py (+33/-0)
tests/netcdf_read_free_surface/height.py (+13/-0)
tests/netcdf_read_free_surface/netcdf_read_free_surface.flml (+309/-0)
tests/netcdf_read_free_surface/netcdf_read_free_surface.xml (+49/-0)
Related bugs
Related blueprints
Branch information
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 - 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. - 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