Cell methods: Handle cell methods that apply to norm ancillary variables (CF-1.13)
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Start with the CF-1.13 anomalies and data model sections linked in the issue, then trace cfdm's CellMethod and field ancillary handling. The work is done when ancillary cell methods can be read, parsed, stored, and written, with the proposed norm[...] and key[...] distinction and the required ordering after anomaly_wrt.
Written by the indexing model from the issue text.
Description
The new CF conventions for anomalies, introduced at CF-1.13, allow an ancillary variable to have a standardised cell_methods attribute.
In the updated CF data model, the ancillary cell methods are "owned" by the parent field construct, rather than the field ancillary construct to which they directly apply. This is because when an ancillary variable has cell methods, they are really contributing to the physical definition of the parent data variable.
We need cfdm to be able to read, parse, store, and write ancillary variable cell methods.
All cell method constructs are stored on the field, but an individual cell method needs to know whether it applies to the field, or to one of the field ancillaries.
The order of cell methods is important. The field ancillary cell methods should come immediately after the field's anomaly_wrt cell method.
We need a syntax to make this distinction clear to the user. I propose:
>>>
Field: air_temperature (ncvar%ta)
---------------------------------
Data : air_temperature(atmosphere_hybrid_height_coordinate(1), latitude(10), longitude(9)) K
Cell methods : area: mean time(1): maximum area: anomaly_wrt ancillary(latitude(10), longitude(9)) norm[time: minimum]
Field ancils : air_temperature standard_error(latitude(10), longitude(9)) = [[0.76, ..., 0.32]] K
Dimension coords: atmosphere_hybrid_height_coordinate(1) = [20.0] m
: latitude(10) = [2.2, ..., -1.76] degrees
: longitude(9) = [-4.7, ..., -1.18] degrees
: time(1) = [2019-01-01 00:00:00]
>>> f.cell_method('method:anomaly_wrt')
<CellMethod: fieldancillary0[time: minimum]>
I.e. The cell methods that apply to an anomaly norm come directly after the anomaly_wrt cell method, and are contained in within norm[...]. When printed on its own (not in the context of the parent field), the ancillary cell method is contained in key[...] where key is the construct identifier for the field ancillary to which it applies.
PR to follow.
- Dominant language
- Python
- Stars
- 32
- Forks
- 14
- Avg merge
- 3d 20h
- Merged PRs (30d)
- 1
Getting set up
- No Dockerfile or Docker Compose file
- No pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from NCAS-CMS/cfdm
-
Convert to/from iris cubesPossibly taken @davidhassell claimed this 4 days ago. Openenhancement
Difficulty 5/5 Over a week Newbie friendliness 20/100
-
Convert from/to `xarray`Possibly taken @davidhassell claimed this 6 days ago. Opendataset read dataset write enhancement xarray
Difficulty 4/5 3-5 days Newbie friendliness 20/100
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 57/100
-
documentation
Difficulty 4/5 3-5 days Newbie friendliness 48/100
-
Conformance: UGRID check failure reporting missing attrMay be free again @sadielbartholomew claimed this 66 days ago, and no pull request is open. Openbug UGRID
Similar issues
-
eegprep-lean: set channel types from the Zarr group's channel_typePossibly taken @claude claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
sccn/eegprep#668 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
blacklanternsecurity/bbot#3679 ·
Maintainers usually reply within 2 days
-
Link Checker ReportOpenBot Type: Bug Type: Documentation
Difficulty 1/5 Under an hour Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
speakeasy-api/speakeasy#2159 ·
Maintainers usually reply within 1 day