aukkola / FluxnetLSM

A toolbox for processing, quality controlling and gap-filling FLUXNET2015 dataset for use in land surface modelling
38 stars 22 forks source link

QC dimensions don't match data variables #53

Closed naught101 closed 5 years ago

naught101 commented 6 years ago

Here's some output form FluxnetLSM

                time:long_name = "time" ;
        float Tair(time, z, y, x) ;
                Tair:units = "K" ;
                Tair:_FillValue = -9999.f ;
                Tair:long_name = "Near surface air temperature" ;
                Tair:Fluxnet_name = "TA_F_MDS" ;
                Tair:Standard_name = "air_temperature" ;
                Tair:ERA-Interim\ variable\ used\ in\ gapfilling = "TA_ERA" ;
                Tair:Missing_\% = 0. ;
                Tair:Gap-filled_\% = 58.6 ;
                Tair:Gapfilling_method = "ERA-Interim" ;
        float Tair_qc(time, y, x) ;
                Tair_qc:units = "-" ;
                Tair_qc:_FillValue = -9999.f ;
                Tair_qc:long_name = "Tair quality control flag" ;
                Tair_qc:Fluxnet_name = "TA_F_MDS_QC" ;
                Tair_qc:Standard_name = "NULL" ;
                Tair_qc:Missing_\% = 0. ;
                Tair_qc:Gap-filled_\% = 0. ;
        float SWdown(time, y, x) ;

The Tair_qc flag has different dimensions to the Tair variable. I don't know how I've managed to avoid noticing thing until now, but some of my existing code just started not working after upgrading xarray, and I think the previous version was flattening dimensions on the array that is now not working..

aukkola commented 6 years ago

Do you mean the z-dimension? I think that was added because CABLE uses the extra z-dim for air temperature and a couple of other variables (air pressure?). It should always be set to 1. It is somewhat redundant so can be removed from the package.

naught101 commented 6 years ago

I guess it should be optional, but either way, the QC flag dimensions should match the variable dimensions. I'm not likely to find time to deal with this any time soon, as I can work around it fairly easily right now.

aukkola commented 5 years ago

Fixed. Some variables left as 3D following previous PLUMBER experiment