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

Remove resolution from _update_scenarios param trigger #391

Closed elehmer closed 1 month ago

elehmer commented 2 months ago

Description of PR

This PR removes "resolution" param from _update_scenarios param trigger. Historical Reconstruction (reanalysis) is available for all resolutions of WRF according to intake query:

activity_id                                                        [WRF]
institution_id                                                    [UCLA]
source_id                                                         [ERA5]
experiment_id                                               [reanalysis]
member_id                                                             []
table_id                                                 [1hr, day, mon]
variable_id            [lwdnbc, lwdnb, lwupbc, lwupb, prec, psfc, q2,...
grid_label                                               [d01, d02, d03]
path                   [s3://cadcat/wrf/ucla/era5/historical/1hr/lwdn...
derived_variable_id                                                   []
dtype: object

Summary of changes and related issue

Removing "resolution" from trigger will keep Historical selections from resetting when resolution is changed. It will still reset when switched to Statistical or Station.

Relevant motivation and context

Dependencies required for this change?

Fixes # (issue), delete if not necessary

Type of change

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce.

Checklist:

elehmer commented 2 months ago

@vicford @claalmve Please do a quick run of the Select widget on the HUB to confirm this is the wanted behavior. Thx.

claalmve commented 1 month ago

Works for me! Thanks @elehmer for responding so quickly to this issue.

elehmer commented 1 month ago

I discovered why "resolution" is part of the _update_scenarios trigger. The 3km WRF only has SSP 3-7.0 so the other 2 are removed from the list when the resolution widget is set to 3km....

What really needs to be cleaned up is _update_scenarios is resetting "Historical Reconstruction" to "Historical Climate" when this routine runs. So need to figure out why that is happening and fix it. Going to close this PR.