rigoudyg / climaf

CliMAF - a Climate Model Analysis Framework - doc at : http://climaf.readthedocs.org/
Other
18 stars 7 forks source link

Define an ensemble of files that cover the requested period #120

Open toudar opened 5 years ago

toudar commented 5 years ago

Hello,

I am trying to define an ensemble of files that all cover the requested period. However, in some CMIP6 experiments, there are multiple ensemble members and sometimes they do not cover the same period. That's the case for the abrupt-4xCO2 run for example. My idea is thus to search all the ensemble members available for an experiment that covers the requested period.

I tried this :


define dictionnary and climaf project

`d = dict(project='CMIP6',mip='CMIP', model='CNRM-CM6-1', experiment='abrupt-4xCO2', realization='*', variable='tas', table='Amon', period='1850-2349') tmp = ds(**d)

Get the members available

members = tmp.explore('choices')['realization']

if one member, then create a list

if type(members) is not list: members = [members]

update the dataset

d.update({'realization' : members}) var = eds(**d)

The issue is that climaf will return all ensemble members available for this experiment. However, some of them (in that particular case) does not respect the requested period.

Is there a way to fix this ? Thank you,

jservonnat commented 5 years ago

You are right that CliMAF should be improved on this area. We consider adding an argument to .explore() : allow_shorter_period = True/False If False, this would meet your initial need. If True, it would return an the largest possible ensemble with covers the periods intersection. In both cases, a warning should be issued to explain what occurred.

We will let you know when the feature will be available.