os-climate / hazard

Onboarding, creation and transformation of climate hazard models for OS-Climate
Apache License 2.0
8 stars 12 forks source link

Enhance .cwl file and UKCP18 additions #118

Closed ciaransweet closed 2 months ago

ciaransweet commented 2 months ago

What this PR is

Syncing up DevSeed changes we've been working on!

Primarily:

Thanks!

joemoorhouse commented 2 months ago

Hi @ciaransweet,

Thanks for this! A question about one of the latest commits that separates out the source data info from the definition of the indicator. (I might be missing something but) I don't see where the source data is added back into the inventory item description. Also I think the info about the averaging periods being used is removed, but I'm not sure that is added back in (e.g. programmatically)?

Thanks, Joe

ciaransweet commented 2 months ago

Hey @joemoorhouse - truth be told those commits probably jumped the gun. Joys of GitHub and forks, I'd rather have kept this PR the commits when I hit the button but I guess our other changes into main have come in.

We do indeed plan on moving the source data info it's own property, just so we aren't relying on the combination being hardcoded. Indeed we could probably just have the description be combination of the two separate values.

As to the averaging periods, let me get back to you on that. I suppose it's something we can generate programmatically from the indicators parameters..

Sorry it turned into a big PR, I'll specifically raise a branch to merge into here next time, to save the growing Pr scenario

ciaransweet commented 2 months ago

@joemoorhouse again, sorry for the big PR, this is it for this one 🤞

https://github.com/os-climate/hazard/pull/118/commits/a202d11d9b192366d187f3799319c5512613b77d this commit re-jigs the descriptions for days_tas_above and degree_days (The indicators we've been dealing with up to this point)

I've undone some of the other indicator description edits as we've not dealt with them and there's probably chances to improve those later.

For the ones I have changed, they now generate their description from 3 components:

This gives us something like:

image

This frontend pulls the description hazard generates and renders it

Thanks again for taking a look!