pacificclimate / plan2adapt-v2

Plan2Adapt in React, driven by CMIP5/6 backend
0 stars 0 forks source link

Implement "Graphs" Tab #138

Closed jameshiebert closed 4 years ago

rod-glover commented 4 years ago

Content of graphs in P2A Classic

Text:

This figure shows the range of projected Annual [variable]* change (Degrees C), for the British Columbia region over three time periods (2020s, 2050s, and 2080s), according to a PCIC-standard set of GCM projections (see 'Notes' tab for more information). The range of change based on this set of projections is indicated as follows:

  • The black line indicates the mid-point (median) in the set.
  • The blue line indicates the model used for display purposes (CGCM3 A2 run 4).
  • The dark grey shading shows the middle 50% (25th to 75th percentiles), representing half of the projections in the set.
  • The light grey shading shows the range according to 80% of the climate change projections used (10th to 90th percentiles).

Notes:

Implications for P2A v2

Notes:

Requirements:

Suggestions:

rod-glover commented 4 years ago

Relationship to existing Climate Explorer graphs

Summary:

corviday commented 4 years ago

This graph presents the average value only (not even the median, if I understand correctly). But its basic orientation, data vs. time period, is what we are after.

The "average" referred to here is both 1.) the chronological averaging done to make a climatology and 2) the spatial averaging over the area selected by the user. The mean is used for both of those operations, by the /data API, and implicitly by the /percentileanomaly API, which relies on canned /data queries. If we don't want spatial and temporal means for the p2a graphs, we may need a new API as well.

The Long Term Average graph displays the results for a single call to the /data API - all points that correspond to a specific variable, model, time resolution, time index, selected area, and emissions scenario. So there's one point per climatology. The Model Context graph displays the exact same thing, but for all available models (it makes a separate call to /data for each model but holds all other parameters the same).

rod-glover commented 4 years ago

I think /percentileanomaly would do the job here, except that it lacks 25th and 75th percentiles. Can you verify my understanding? :

corviday commented 4 years ago

Returns temporal (over 30 year period) and spatial (over selected region) average values, which is what we want in for the graphs as well.

Yes.

The spatial and temporal averages are formed first, then the ensemble stats.

Yes, per-model spatial and temporal averages are formed first, then percentiles calculated from the per-model results.

We would only have to extend the canned results by adding 25th and 75th percentiles.

No additional canning would be needed. The canned results are the per-model results for each of the PCIC12 models. Percentiles are calculated from them on the fly when requested, so any percentile may be requested.

We have, or could add, a query param for the requested sets of percentiles. (OTOH, it might be better just to get them all, and let both Summary and Graphs share the exact same datasets, i.e., the same requests. Caching, etc.)

Yes, we have a query parameter for specifying which percentiles are requested.

TL;DR: your understanding is correct on all counts.