rigoudyg / climaf

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

Documentation says that some operators can work on ONLY ONE dataset, when they can work on ensembles #223

Open jypeter opened 2 years ago

jypeter commented 2 years ago

I have followed the documentation links from the Standard operators and functions page, and the current documentation for some operators says that they can have only one input. The way I understand this is that they can be applied to a dataset, but not to an ensemble:

Doc says: Inputs [...] any dataset (but only one)

Examples:

Either the documentation is slightly out of date, or the ambiguity could be clarified

I have checked below that time_average could be successfully applied to an ensemble

# My test ensemble
>>> all_ens_dic['exp_ens'].keys()
dict_keys(['AWI-ESM-1-1-LR_AWI', 'CESM2_NCAR', 'FGOALS-f3-L_CAS', 'GISS-E2-1-G_NASA-GISS', 'HadGEM3-GC31-LL_NERC', 'INM-CM4-8_INM', 'IPSL-CM6A-LR_IPSL', 'MIROC-ES2L_MIROC', 'MPI-ESM1-2-LR_MPI-M', 'MRI-ESM2-0_MRI', 'NESM3_NUIST', 'NorESM1-F_NCC'])

# A member
>>> all_ens_dic['exp_ens']['FGOALS-f3-L_CAS']
ds('CMIP6%%pr%1120-1219%global%/bdd%FGOALS-f3-L%CAS%PMIP%Amon%midHolocene%r1i1p1f1%gr%latest')

# The member crs I get after applying time_average to the ensemble
>>> tt = time_average(all_ens_dic['exp_ens'])
>>> tt['FGOALS-f3-L_CAS']
time_average(ds('CMIP6%%pr%1120-1219%global%/bdd%FGOALS-f3-L%CAS%PMIP%Amon%midHolocene%r1i1p1f1%gr%latest'))
senesis commented 2 years ago

Yes. The wow feature that allows to automatically loop on ensemble members when operators accepts only a member should be quoted in the doc, there

jypeter commented 2 years ago

cscalar has no magic feature yet (#222)