PNNL-TES / GlobalC

A topdown and bottom up approach for global C cycle
6 stars 4 forks source link

Global Grid Cell Ratio #77

Closed kdorheim closed 4 years ago

kdorheim commented 4 years ago

Okay so I've adde the grid cell results to my branch. They are located at cmip6/output/cmip6-ratio-RS2GPP-fromgridcell.csv

A quick look at the results it looks like the ratios range over the entire historical period from 0.3 to 0.4.

image

See the attachment for some more notes about the results.

cmip6_ratio_gridcell.pdf

Originally posted by @kdorheim in https://github.com/jinshijian/GlobalC/issues/24#issuecomment-556056514

kdorheim commented 4 years ago

For a while I have been exploring how we calculate the Rs to GPP ratio. We wanted to decide if we should take the global mean of the GPP, raRoot, and rhSoil individually and calculate the ratio from the global means or if we should calculate the Rs:GPP ratio at each individual grid cell and take the weighted average.

In theory the ratio results should be the same, however in practice they are not because of numerical instability issues caused by dividing by small numbers.

Based on the problems encountered while working on this I think that the best course of action is to opt the "ratio based on the global mean" method.

@bpbond and @jinshijian it would nice to hear your thoughts on this matter. Below is some output illustrating that depending on what we define 0 as impacts results on the global mean of the grid cell ratio. I have also attached the script used to generate these results.

> # Calculate the average grid cell ratio using three different cut offs for 0, this 
> # determines which gpp and RhSoil values will be used in the ratio. When very small 
> # numbers are used that we suspect of being 0 like a gpp of 1e-11 gC a year is
> # probably really 0 but dividing by small numbers is tricky. 
> ratio_small0 <- calculate_RStoGPP_gridcell(input, INTERMED, CDO, 1e-11)
[1] "------------------------------------------------"
[1] "CESM2_historical_r10i1p1f1_gn"
> ratio_med0   <- calculate_RStoGPP_gridcell(input, INTERMED, CDO, 1e-4)
[1] "------------------------------------------------"
[1] "CESM2_historical_r10i1p1f1_gn"
> ratiolarge0  <- calculate_RStoGPP_gridcell(input, INTERMED, CDO, 1e-1)
[1] "------------------------------------------------"
[1] "CESM2_historical_r10i1p1f1_gn"
> 
> # When we look at the range of the mean ratio calculated using different 
> # cut offs of 0 the results vary. Because we are diviging by small numbers 
> # it is fairly easy to end up with large ratios values that are unlikely. 
> range(ratio_small0$value)
[1] 8.894931e+00 2.378121e+08
> range(ratio_med0$value)
[1] 8.896795e+00 1.209425e+05
> range(ratiolarge0$value)
[1]    7.204959 5738.056709

Exploring_LatLon_gridcell_ratio.R.zip

bpbond commented 4 years ago

Another way to do a cutoff would be to say we'll use 5%-95% quantiles; that way we're letting the underlying population determine the bounds, rather than a hard numerical bound.

Regardless, though, I agree that basic things based on global fluxes is the most robust way.

bpbond commented 4 years ago

@kdorheim Are you good here? Close this, or not yet?

kdorheim commented 4 years ago

I think we can close this one, wasn't our final decision to stick with the global ratio and the the ratio at the observation relevant coordinates? I am still waiting for my rhSoil Lat/Lon script get out of the que.

bpbond commented 4 years ago

Yes. OK, thanks!