COMPASS-DOE / grossMethane

analysis code for paired data sets of laboratory-incubations of gross methane flux and associated field net methane and CO2 flux rates
1 stars 1 forks source link

Rework much of the code #15

Closed bpbond closed 1 year ago

bpbond commented 1 year ago

We now save convergence information (from optim) for easy reference in pk_results:

  id        P       k     k0 convergence message                                        
  <chr> <dbl>   <dbl>  <dbl>       <int> <chr>                                          
1 4      31.1 -18.9   -2.99            0 CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH
2 52     87.5 -39.4   -0.001           0 CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH
3 71     12.6  -0.001 -9.60            0 CONVERGENCE: REL_REDUCTION_OF_F <= FACTR*EPSMCH

In addition, ap_prediction now returns mt and nt, along with AP_pred. This makes it easier to see the actual methane concentrations being predicted.

Finally, cleaned up the loop so the output prediction information appears in a new data frame incdat_out; the original incdat is untouched.

kendalynnm commented 1 year ago

So excited about this awesome progress!