iiasa / rime

Rapid Impact Model Emulator
GNU General Public License v3.0
7 stars 1 forks source link

map_transform_gwl handle multiple input temperature variables #12

Open byersiiasa opened 8 months ago

byersiiasa commented 8 months ago

Currently the function map_transform_gwl only handles 1 temperature variable. Although more than 1 can be provided, this results in multiple gwl points, which breaks the function in the updated_data section at the line:

updated_data = updated_data.assign_coords(
            coords={"lon": updated_data.lon, "lat": updated_data.lat, "year": years}
        )

because the length of years is shorter than the number of gwls in the data.

Workaround is to loop the map_transform_gwl function for each variable. More sophisticated implementation to handle multiple temperature variables, e.g. percentiles of warming trajectories, would be desirable.