ncsco / pinemap-dss-help

Issue tracker for PINEMAP DSS
0 stars 0 forks source link

Add the summer dryness tool #70

Closed daviswx closed 8 years ago

daviswx commented 8 years ago

Data is ready so add this tool to the DSS.

What should the tool be called?

We need two descriptions for this tool:

We also need color ramps.

What units does summer dryness index use?

daviswx commented 8 years ago

@hadinon will check notes from Evan for explanations

daviswx commented 8 years ago

The Summer Dryness Index tool is now in place on the development DSS site.

Custom color ramps have been created for the average and change maps.

We still need tool descriptions for the menu matrix and the topmost FAQ box. @hadinon has emailed Harold Burkhart (VT) about applications of this data.

The maps may need to be clipped to remove some of the crazy values from Texas westward, which may be outside of the geographic range for which this index was intended. We're also awaiting guidance from Harold about that.

hadinon commented 8 years ago

Here are a few updates on this:

hadinon commented 8 years ago

Also, should we link to the paper Harold mentioned above in the "Other Resources" section? http://www.sciencedirect.com/science/article/pii/S0378112714002588 Note: the paper did not contain color maps so I will email Harold about a recommended color ramp

hadinon commented 8 years ago

Update from conversation with Harold and discussion at our PINEMAP meeting today:

daviswx commented 8 years ago

The shapefile mask is in place. Here are some other things we do/may need to update on this tool:

daviswx commented 8 years ago

Updates from today's meeting:

daviswx commented 8 years ago

The new color ramps and values are in place. I ended up making the Average maps go from 0 to 36 and the Change maps from -16 to +16 because those ranges split up evenly among the number of colors I had specified.

I think the new values definitely show some more of the variations, especially in the Historical map and the short-term ranges.

hadinon commented 8 years ago

The new color ramps look good!

One thing I just remembered is that I haven't calculated historical variability maps yet. This would be quite the undertaking since this variable has lots of calculation steps and thus, it wouldn't be ready today. Are we OK to push this tool to production without the historical side maps?

When you mention description for the main menu, do you mean the text that currently says, "View projected changes in average Summer Dryness Index"? If so, I'm good with what that says but am open to other suggestions.

Here's my attempt at a FAQ box description: "Summer dryness index is useful in predicting loblolly pine site index from biophysical variables. Summer droughts affect stand productivity. The impact of a summer drought depends on the soil type and the stage of development of the stand. (insert line break here?) Future projections of summer dryness should provide useful guidance for selecting genetic material to plant and prescribing silvicultural treatments at the time of loblolly pine plantation establishment, as well as informing stand management decisions over the rotation."

Lastly, can you add a link to Harold's paper within the "Other Resources" section of this tool? http://www.sciencedirect.com/science/article/pii/S0378112714002588

daviswx commented 8 years ago

OK I have added that FAQ box description and a link to the paper.

No problem that the other historical maps aren't ready. It's fine to push to production with only the Historical Average map.

Should we change the description in the main menu? Currently, it says "View projected changes in average Summer Dryness Index", which may not mean much to people if they don't know what Summer Dryness Index is. I'm thinking we could change "average Summer Dryness Index" to a short summary that may be more meaningful.

hadinon commented 8 years ago

Hmmm good point about the main menu description. Maybe we could say, "View projected changes in the ratio of summer growing degree days (5C base) to summer precipitation."?

Also, the Sabatia and Burkhart paper appears to be linking to the USDA Plant Hardiness Zone map. I even cleared my cache!

daviswx commented 8 years ago

Oops, that would be because I copied the Plant Hardiness Zone resource link but forgot to change the URL! It's fixed now.

The new title is also in place. I just dropped the 5C base part so it would fit on two lines.

hadinon commented 8 years ago

Sounds good. The only remaining action items here (although not required before pushing to production) are:

hadinon commented 8 years ago

OK whoops I didn't mean to unassign you! I thought two people could be assigned a task. Well, I'll switch it back to you and just mention that the final action items are assigned to me. :smile:

hadinon commented 8 years ago

So, there's been lots of extension workshops this week and I'm hearing that people are confused! As suggested by Tim, can we add this to the summer dryness index tool's "What can this tool be used for?" FAQ box? "Summer dryness index is calculated as growing degree days divided by precipitation. If temps stay the same and precip goes down, the index will go up. If precip stays the same and temps go up, the index will go up. In any particular location a change in the index should be a useful measure of relative drought stress."

Maybe something like this.... "Summer Dryness Index -- calculated as growing degree days divided by precipitation -- is useful in predicting loblolly pine site index from biophysical variables. If temperatures stay the same and precipitation goes down, the index will go up. If precipitation stays the same and temperatures go up, the index will go up.

In any particular location, a change in the index should be a useful measure of relative drought stress and summer droughts affect stand productivity. The impact of a summer drought depends on the soil type and the stage of development of the stand.

Future projections of summer dryness should provide useful guidance for selecting genetic material to plant and prescribing silvicultural treatments at the time of loblolly pine plantation establishment, as well as informing stand management decisions over the rotation."

hadinon commented 8 years ago

P.S. it is kind of long and I'm in favor of short but if folks are reading these and are still confused then we may need to rethink which is what I was trying to do here. I hope that makes sense!

daviswx commented 8 years ago

It's definitely a bit lengthy, but I'm fine with it if it helps clarify things better. Maybe there are some ways we can trim it just a bit. I'll try to think about that later.

I am slightly confused by the first sentence of the second paragraph. Particularly, the part "... a useful measure of relative drought stress and summer droughts affect stand productivity" doesn't really make sense to me; it seems like two separate thoughts that are strung together.

daviswx commented 8 years ago

Task: Look into why the Summer Dryness Tool is returning 0 values for points outside the clipped area.

daviswx commented 8 years ago

Once the projected data layers are also clipped to the PINEMAP region, this issue with 0 values should go away (or at least be easier to diagnose).

Also, any thoughts about the wording above regarding the text for the FAQ box? Just wanted to get clarification on that before adding it in.

daviswx commented 8 years ago

After digging a bit deeper in my code, I have made an update that fixes this. Previously, if a value was less than 0 (like -9999.0), I was setting it to 0. I have commented out that section so these invalid/missing values will be treated as such.

I suppose we still need to clip the future maps to the PINEMAP region, but for the moment, clicking points outside this region on the historical map will show the "Historical data is unavailable" message rather than a 0.0 value.

hadinon commented 8 years ago

Awesome, thanks for the update. I will let you know when the clipped projection files have been generated.

As far as the FAQ box, we can break the 1st sentence of the 2nd paragraph into two such that it reads, "In any particular location, a change in the index should be a useful measure of relative drought stress. Summer droughts affect stand productivity." -- would that help?

Also, a quick comment on the title tooltip: it should say, "...summertime precipitation..." instead of "annual precipitation".

I guess the "create historical variability maps" is no longer an action item here!

Other than that, I sent a screenshot of the clipped DSS output to Harold. Once the clipped projection files are created, I plan to ask him what he thinks about clipping those western Gulf loblolly "islands" where IMO the relationship falls apart, especially in the later future time periods.

daviswx commented 8 years ago

OK, I see what you were saying in the second paragraph. Here's what I changed it to:

"Summer droughts affect stand productivity, so at any particular location, a change in the Summer Dryness Index should be a useful measure of relative drought stress."

The tooltip has also been updated, although that may be removed or replaced at some point given our discussion in #83.

daviswx commented 8 years ago

We still need to clip the projected maps to the native loblolly region.

Also, I will check on a possible bug with time series plots not showing up when on the Projected Change display.

daviswx commented 8 years ago

The issue with the time series not showing up for the Projected Change display should be fixed. For this tool, I had set that any values less than 0 were invalid, but of course, the change maps can have negative values. I have now changed that threshold for invalid data to -100.

hadinon commented 8 years ago

The clipped summer dryness index files have now been generated for the historical map as well as for all future maps.

A few notes: 1) R's raster package complained about one of the summer dryness attributes, grid_mapping: crs, which is in the original daily MACA files and got trickled through to the MACA DSS files. When I removed it with NCO, the script worked properly. This does not appear to affect how the files are rendered in Godiva. Note for future reference (related to this): the MACA files are unprojected with a datum of WGS84 (EPSG: 4326). 2) The crop() function in R complained that the extents of the MACA DSS raster and native loblolly shapefile do not overlap. This is because the longitudes in the original MACA files are non-negative, e.g. 235 instead of -125 (360 degrees difference). This convention also got trickled through to the MACA DSS files. In contrast, the longitudes in the loblolly shapefile are negative values. So, I subtracted 360 degrees to get negative longitudes within the MACA DSS files. This does not appear to affect how the files are rendered in Godiva. 3) When the new netCDF is written out as the originalfilename_clipped.nc file, the time dimension and time variable are removed so any OPeNDAP calls within the DSS will need to account for this, e.g., remove the [0:1:0] part. This does not appear to affect how the files are rendered in Godiva. 4) When the new netCDF is written out as the originalfilename_clipped.nc file, the 0,0 point is defined as the top left corner instead of the bottom left corner. The originalfilename.nc MACA DSS files define 0,0 as bottom left corner. In order to get them to match, I ran a quick conversion to switch the clipped files back to being defined as the bottom left corner. Action item: once the new clipped files are in the DSS tool, I'll run some tests to make sure Godiva output matches up with the tool output, which will verify that this is all working properly.

Good news: the script is fully dynamic now so 15 arguments fed to the script will produce the clipped output. This will come in handy if we ever need to clip the output for future DSS tools.

daviswx commented 8 years ago

The new maps are now in place on the DSS, and after adjusting my scripts to account for not including the time dimension when needed, the time series should be working as well.

Everything seems fine from the spot checks I've done, but let me know if you notice any problems with the data on the maps or time series.

By the way, now that we've clipped the maps, I'm noticing that it's a bit tough to see what's happening on the Change maps, especially in the shorter-term periods where most values in the eastern half of the region are white.

If you think this is a problem, maybe we could adjust this color ramp so the zero value is a non-white color. We probably wouldn't want to use gray since that's what we were planning for the error maps, but perhaps something else could work.

daviswx commented 8 years ago

The Change map color ramp has been tweaked so points with data are easier to distinguish between masked-out points. The numerical extent of values has also been reduced for all map displays.

I will close this issue with the next commit to the public site.

hadinon commented 8 years ago

Everything looks good and I finally was able to test the DSS output with Godiva output. They match up!

One very minor suggestion: Can you update the title tooltip (map and time series) to say, "This parameter was developed within the native range of loblolly pine trees so values are unavailable outside of this region." instead of, "This parameter was developed for the Southeast US so values are unavailable west of this region."? Not even worth reopening the issue IMO :wink:

daviswx commented 8 years ago

This has been fixed and updated on the dev site and public site.