ashiklom / rrtm

Other
6 stars 3 forks source link

First pass at updated code for inverting leaf reflectance on Arctic plants #3

Open serbinsh opened 2 years ago

serbinsh commented 2 years ago

OK so I have working version here that I am going to continue to edit to match my previous approach using PEcAn RTM https://github.com/serbinsh/SSerbin_NGEEArctic_Spectra_Trait/blob/main/R_scripts/PROSPECT/Invert_leaf_refl_spectra_rrtm_PROSPECT-5b.R

So its producing inversion fits, but clearly much more sensitive to the priors than my previous approaches. I may also be doing some steps improperly using the rrtm/BayesTools explicitly but overall I think the basic parts are there and correct.

you can compare the results here

Here is the PEcAn RTM approach https://github.com/serbinsh/SSerbin_NGEEArctic_Spectra_Trait/tree/main/R_Output/PROSPECTD/Utqiagvik/20130725/Range_400_700nm-v1

Here is rrtm https://github.com/serbinsh/SSerbin_NGEEArctic_Spectra_Trait/tree/main/R_Output/PROSPECT5b/Utqiagvik/20130725/Range_400_700nm

Here is the fit comparison. this is not using prediction intervals with an AR1 weighting, but I would like to incorporate that. I may need adjust how I am calculating the PI as well.

PROSPECTD_Inversion_Diagnostics.pdf

I also need to update the code to also provide the parameter names in the pdfs. I am aiming to have the same results as show in the PEcAn RTM output

So to me: 1) address priors 2) develop reflectance PIs like those in Shiklomanov et al 2021 3) update code to provide all of the same outputs as the previous PEcAn RTM approach 4) confirm error stats and outputs 5) Apply a non PEcAn dependent burn-in method for calculating params and stats 6) CLEAN UP SCRIPT CODE

serbinsh commented 2 years ago

@ashiklom the residual bugfix in issue #2 significantly improved my test inversions. Still some tweaking in priors, I think, but the results are much more constrained now.

PROSPECTD_Inversion_Diagnostics.pdf