coecms / clef

https://clef.readthedocs.io
7 stars 3 forks source link

problem with matching query #158

Closed paolap closed 1 year ago

paolap commented 1 year ago

The code below should return some results, the command line correspondent does, but it's not working. Also, if using the same constraints to run a simple query it will complain about variables names

from clef.code import *
db = connect() s = Session() constraints = {'variable_id': ['tasmax','tasmin','pr','uas','vas'], 'table_id': ['Amon'], 'experiment_id':['ssp585','ssp245'], 'member_id':'r1i1p1f1'} allvalues = ['variable_id', 'experiment_id'] fixed = ['source_id','member_id']

results, selection = matching(s, allvalues, fixed, **constraints, project='CMIP6')

paolap commented 1 year ago

turns out it's just that 'member_id':'r1i1p1f1' should be 'member_id':['r1i1p1f1']