Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cf aggregation not working properly: cf-python issue or metadata issue? #9

Open
bnlawrence opened this issue Nov 4, 2022 · 0 comments

Comments

@bnlawrence
Copy link
Contributor

bnlawrence commented Nov 4, 2022

TIcket #3 describes a problem with some field metadata, but it also describes an aggregation problem: There are eight hourly monthly mean at a particular time of the day, and one all month average, and three 10 day 24h averages, there ought to be three aggregations ...
HORIZON-CL5-2023-D1-01-01: Further climate knowledge through advanced science and technologies for analysing Earth Observation and Earth System Model dataΩ

$files = index['surface_temperature:OPEN SEA SURFACE TEMP AFTER TIMESTEP']
$print(files)
['1m_0h__m01s00i507_2_195001-195001.nc', '1m_12h__m01s00i507_6_195001-195001.nc', 
   '1m_15h__m01s00i507_7_195001-195001.nc', '1m_18h__m01s00i507_8_195001-195001.nc', 
   '1m_21h__m01s00i507_9_195001-195001.nc', '1m_3h__m01s00i507_3_195001-195001.nc', 
   '1m_6h__m01s00i507_4_195001-195001.nc', '1m_9h__m01s00i507_5_195001-195001.nc', 
   '1m__m01s00i507_195001-195001.nc', '3h__m01s00i507_10_19500101-19500110.nc', 
   '3h__m01s00i507_10_19500111-19500120.nc', '3h__m01s00i507_10_19500121-19500130.nc']
$flds = index.get_fields('surface_temperature:OPEN SEA SURFACE TEMP AFTER TIMESTEP',
    'u-cn134-1fpf/19500101T0000Z/')
It then does the aggregation to the two CF-fields that are really in play:

$print(flds)
[<CF Field: surface_temperature(time(241), latitude(324), longitude(432)) K>,
 <CF Field: surface_temperature(time(8), latitude(324), longitude(432)) K>]

It appears that the one month average has been aggregated into the 3h fields. Is this a metadata problem or a cf-python aggregation problem?

(Kudos for @jeff-cole for spotting this, I missed it, and even after he pointed it out, needed to be spoonfed as to what teh actual problem was.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant