cosima-recipes icon indicating copy to clipboard operation
cosima-recipes copied to clipboard

Intake is not picking up grid related variables

Open julia-neme opened this issue 7 months ago • 3 comments

As discussed yesterday with @charles-turner-1 , intake does not always recognise/load geolon_t and geolat_t. You have to do it in specific ways depending on the experiment.

I have a minimal working example here, but in essence if I use this:

ds = catalog['01deg_jra55v140_iaf_cycle3'].search(variable=['area_t', 'geolat_t', 'yt_ocean'], frequency='fx').to_dask()

The only variable that loads is area_t. If you open them separately, one by one, they are loaded successfully. The Cartopy tutorial uses the following to open these variables:

var_search = catalog['025deg_jra55_iaf_omip2_cycle6'].search(variable="area_t")
ds = var_search.search(path=var_search.df["path"][0]).to_dask()
geolon_t = ds.geolon_t
geolat_t = ds.geolat_t

because geolon_t and geolat_t are included in the area_t diagnostic for this experiment. @elizabeth-ellison mentioned she had a similar problem.

julia-neme avatar Sep 10 '25 01:09 julia-neme

Does loading them one by one always work for all exps? Shall we update the map tutorial to do that instead?

adele-morrison avatar Sep 10 '25 01:09 adele-morrison

It was my understanding its a bug (?) in intake - not sure though. Feel free to correct me @charles-turner-1 and in that case, yes! We should add an explainer on the intake tutorial "grid related variables need to be opened one by one"

julia-neme avatar Sep 10 '25 01:09 julia-neme

Yeah, I'm a little confused by exactly what's causing it, but I think once I track it down it should probably be a relatively easy fix. Will update when I find out more

charles-turner-1 avatar Sep 10 '25 01:09 charles-turner-1