cal-adapt / climakitae

A Python toolkit for retrieving, visualizing, and performing scientific analyses with data from the Cal-Adapt Analytics Engine.
https://climakitae.readthedocs.io
BSD 3-Clause "New" or "Revised" License
19 stars 2 forks source link

Retrieving relative humidity data in warming levels has too many simulations in "all_sims" dimension #397

Closed vicford closed 3 weeks ago

vicford commented 1 month ago

When calculating relative humidity with warming levels, the returned data has too many returned simulations in the "all_sims" dimension -- what I think is happening is that the the SSP2-4.5 and SSP5-8.5 are being "duplicated" for the 4 models that don't have those simulations on AE; only CESM2 actually has data in those SSPs. This should return "all_sims" length of 7 instead.

Min reproducible example:

import climakitae as ck
from climakitae.explore import warming_levels 

wl = warming_levels()
wl.wl_params.timescale = "hourly"
wl.wl_params.downscaling_method = "Dynamical"
wl.wl_params.resolution = '45 km'
wl.wl_params.area_subset = "states"
wl.wl_params.cached_area = ["CA"]
wl.wl_params.warming_levels = ["2.0"]
wl.wl_params.anom = "No"
wl.wl_params.variable = 'Relative humidity'
wl.wl_params.units = "[0 to 100]"

wl.calculate()
ds = wl.sliced_data["2.0"]

ds returned:

Screenshot 2024-07-10 at 5 40 17 PM Screenshot 2024-07-10 at 5 40 25 PM
vicford commented 1 month ago

RH is derived at hourly timescales, should check all of the other derived variables for this behavior as well.