scitools-incubator / iris-ugrid Goto Github PK
View Code? Open in Web Editor NEWUnstructured mesh library for Iris
License: BSD 3-Clause "New" or "Revised" License
Unstructured mesh library for Iris
License: BSD 3-Clause "New" or "Revised" License
#4 is re-implementing some prototype code for Iris, but has left out some specialised handling for the slightly different format output by XIOS, which is recorded below should the knowledge prove useful in future.
There is a definite difference in XIOS structure vs 'normal' UGRID files, and specialised handling therefore seemed necessary, but it was found that just using the 'standard' code still achieved the desired values in exclude_vars
(probably a happy accident!).
temp_xios_fix = kwargs.pop("temp_xios_fix", False)
if not temp_xios_fix:
# This way *ought* to work, but maybe problems with the test file ?
for mesh in meshes.values():
mesh_var = dataset.variables[mesh.mesh_name]
for attr in mesh_var.ncattrs():
if attr in _UGRID_LINK_PROPERTIES:
exclude_vars.extend(mesh_var.getncattr(attr).split())
else:
# A crude and XIOS-specific alternative ..
exclude_vars += [
name
for name in dataset.variables.keys()
if any(name.startswith(meshname) for meshname in meshes.keys())
]
With a hook in the repo for testing on a PR.
Implement via pytest.
See e.g. https://github.com/SciTools/tephi
As noted in the code comments, the use of the mdtol
argument is slightly misleading :
It only labels output cells as missing where there is insufficient overlap with the boundary of the source grid,
- it does not support masked source points.
This can definitely be done, but maybe at a computational cost.
There is a crude implementation in Iris here.
Populate README.md in line with other SciTools and SciTools-incubator projects.
Suggest that PEP440 versioning is used.
Base on other SciTools repos (tephi as usual being the flagship example).
Known requirements introduced by #4:
Not sure how to reconcile the fact that we need special commit hashes for iris and iris-test-data (see #7 for details). I notice Iris doesn't actually mention iris-test-data in its test requirements.
Some retrospective ideas following #10
Probably not worth pursuing now : until this progresses to be a stable, supported public API (which might never happen).
All possible, to be considered/investigated :
crs
option to the regrid.MeshInfo()
constructor, to match regrid.GridInfo
regrid.GridInfo()
args 'lats', 'lons' etc to 'x'/ 'y', to suit the generality of the crs
usageMeshInfo.size
and GridInfo.size
private, as purpose to the user is not really clear
Replicate the labels used in the tephi repo - colours and names.
Like #19 , this may not be needed yet.
However, unlike that, this will be needed at some point, if the regrid code becomes part of a stable release.
Basically, bring testing into line with a #17.
At present, we are lacking some specific aspects ..
MeshInfo().__init__
:
node_start_index
, elem_start_index
, areas
GridInfo().__init__
:
crs
, actual behaviour/results testing is neededcircular
/ areas
, previous note applies : just check properties of created objectRegridder.regrid
needs test for mdtol
argument.
Need a fix to keep Cirrus working, see SciTools-incubator/iris-esmf-regrid#29 for details.
Base on those included in other SciTools repos (tephi as usual being the flagship example).
Enforce the following coding standard:
While we have currently replicated many popular repositories by having the source code in a first level directory (/iris_ugrid/
), it is actually considered better practice to contain source code within an extra directory layer, e.g. /lib/iris_ugrid/
- the structure already used in Iris and Cartopy.
See #4 (comment) and pypa/sampleproject#104 for specifics, and the full discussion on #4 may also be of interest.
The iris-ugrid
is missing its LICENSE
file.
I think this is a general oversight, but I'd vote for this repo to be BSD-3 Clause, rather than LGPL
.
Note that, we are in the process of moving iris
away from LGPL
to BSD-3 Clause
.
This would invalidate any source code preamble headers.
Other SciTools projects as template (note that only some of them currently use RTD).
We'll want a "standard arrangement" structure + some rules, to organise our tests.
Can be analagous to the Iris ones.
In-particular // at-least :
In addition/alternative to Iris practices, I suggest :
str
or repr
forms, or iris.tests.assertCML()
TODOs
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.