pacificclimate / pydap.handlers.pcic

A custom Pydap handler for PCIC's in-situ observational database
GNU General Public License v3.0
0 stars 0 forks source link

Database queries use incorrect method to discriminate climatological variables #7

Open rod-glover opened 1 year ago

rod-glover commented 1 year ago

The test (roughly rendered) cell_methods ~ '(within|over)' no longer gives correct results. Instead we must use (rendered as SQL)

ARRAY['climatology'::text] <@ variable_tags(meta_vars.*)

or its complement

ARRAY['observation'::text] <@ variable_tags(meta_vars.*)

Problematic queries:

https://github.com/pacificclimate/pydap.handlers.pcic/blob/master/pydap/handlers/pcic/__init__.py#L199 https://github.com/pacificclimate/pydap.handlers.pcic/blob/master/pydap/handlers/pcic/__init__.py#L224