Presentation is loading. Please wait.

Presentation is loading. Please wait.

Using R to Model Complex Biogeochemical Systems Chris Wood

Similar presentations


Presentation on theme: "Using R to Model Complex Biogeochemical Systems Chris Wood"— Presentation transcript:

1 Using R to Model Complex Biogeochemical Systems Chris Wood

2 Introduction to the science  Why are we interested in sediments? – 71% of Earth’s surface (335,258,000 km 2 ) – Very dynamic environments  Why are we interested in shelf-seas? – Globally important sinks & sources for nutrients – High rates of primary productivity

3

4 Main reactions Oxic zone – O 2 mineralisation NO denitrification MnO 2 reduction Fe(OH) 3 reduction Froelich et al. (1979) SO 4 2- reduction

5 The maths…  Despite the complexity, it can be described mathematically(!):  Oxic breakdown of organic matter: Change in concentration of i Transport of chemical species Rate of consumption of i, but dependent on j

6 Transport  ReacTran package  written for ecological and biogeochemical models; the examples in the vignette reflect this  Grid <- setup.grid.1D(N=100,dx.1=0.1,L=15) – Grid$x.mid, Grid$x.int, Grid$dx  O2tran <- tran.1D (C=O2, C.up=bwO2, dx=Grid) – Other arguments allow specific transport terms to be used

7 Solving the maths  The deSolve and rootSolve packages – rootSolve: ‘Nonlinear root finding, equilibrium and steady-state analysis of ordinary differential equations’ – deSolve: ‘General solvers for initial value problems of ordinary differential equations (ODE), partial differential equations (PDE), differential algebraic equations (DAE), and delay differential equations (DDE).’

8 Solving the maths (cont…) – Simple to implement modelFunction <- function(t, y, pars){ #implementation of transport and differential #equations; e.g: OC <- y[1:100]; O2 <- y[101:200] oxicMin <- r*OC*(O2/(O2+ksO2oxic)) } ss.output <- steady.1D(y=rep(10,2*100), func=modelFunction, parms=c(r=10, ksO2oxic=1)) dyn.output <- ode.1D(y=ss.output$y, times=0:364, func=modelFunction, parms=pars)

9 Output

10 Data management  Data – Multiple sites, cruises, repeat measurements & parameters  R + MySQL (+ RJDBC/rJava)  Post-processing / data consistency checking carried out in R  Allows model calibration to be carried out

11 Model testing & model calibration  Sensitivity analysis – Allows us to discover the most sensitive model parameters  Genetic algorithm – (Relatively) efficient method of making model output fit real data

12 Future ideas / personal interests  Web-based model-runs via R + python (mod_python / rpy2) – R would provide better graphics than currently available via PHP libraries – Greater access for non-modeller researchers – Public engagement of science

13 Any questions?  Acknowledgements: – Funding: NERC & Defra – University of Southampton  Boris Kelly-Gerreyn, Peter Statham, Adrian Martin, Andy Yool, John Hemmings, Charlie Thompson, Carl Amos – Netherlands Institute of Ecology  Karline Soetaert, Filip Meysman – University of Portsmouth  Gary Fones, Fay Couceiro, Adam Hamilton – Cefas  John Aldridge, Ruth Parker, Dave Sivyer, Johan van Molen, Naomi Greenwood, Elke Neubacher – UEA  Keith Weston – Partrac Ltd  Kevin Black, Rachel Helsby – Crew of Cefas Endeavour  Main aims Main aims  Objectives Objectives  The importance The importance  Initial considerations Initial considerations  Multidisciplinary approach Multidisciplinary approach  Our model Our model  Current results Current results  Observations Observations  Conclusions Conclusions

14 The importance of nutrients in the coastal ocean  Shelf seas: – Globally important sinks & sources for nutrients – High rates of primary productivity  Knowledge of nutrient origin & fate is key to understanding primary productivity  Sediments are potentially important sources of nutrients in shelf seas  Need to be able to model sediment systems to predict nutrient exchanges

15 Results from genetic algorithm

16

17 Analysis of genetic algorithm output  Are values sensible? ParameterOMEXDIA valueGA result Mean flux (g C m -2 yr -1 )-16 Bioturbation (cm 2 d -1 )1/36517/365 rFast (d -1 ) rSlow (d -1 ) pFast NCrFdet (mol N : mol C)0.16

18 Evaluation of outputs  Are all processes well explained by model? – How important is the benthic fluff layer? – Do more mineralisation reactions need to be included in the model? – Should other biogeochemical processes be included?  Has model been ‘over-fitted’?

19 Conclusions & future work  The GA is able to give a good fit with sensible parameter values, but: – How much predictive ability does this model have? – Effect of increasing number of biogeochemical processes?  Incorporate a simple sediment resuspension model into current model  The model could help in calculating nutrient budgets of shelf seas?

20 Sensitivity analysis  3 simple sensitivity analysis experiments were carried out – each with an upper and lower value: – Literature data – Double and halve the default values – Order of magnitude above and below the default value  Non-linearity of model leads to unexpected results

21 Sensitivity analysis results

22 Observational data

23 Comparison with observations

24 Sensitivity analysis results  Increased cost function implies more sensitive parameter  Ranking all results into a single list allows us to pick an arbitrary number of parameters to use in future experiments o Mean Flux o pFast o rFast o NCrFdet o rSlow o biot

25 Optimising model to data: Genetic Algorithm  The population is the set of free parameters  A generation is a set of model runs equal to the number of free parameters  Initial run: randomly generated parameter set from a range given to the algorithm  Parameter values are converted into binary to allow ‘genetic crossover’ between random pairs of parameters  Subsequent runs:  The model is run for n generations * m unconstrained parameters – 5000 * 30 = (~28 hrs) Parents: Children: Crossover point

26 Example of inhibition

27 Current understanding of early diagenesis Euphotic zone Thermocline has little effect, although cells sink out… with a short delay at the pycnocline (1) PP = 250 g C m -2 yr -1 (1) 370 g C m -2 yr -1 (2) 1.Brockmann et al. (1990) 2.Wollast (1991) 3.Kuhn & Radach (1997) 4.Billen et al. (1990) 5.van Raaphorst et al. (1990) 6.Hall et al. (1996) 7.van der Weijden (1992) 8.Fang et al. (2007) 9.Canfield et al. (1993) 10.Wijsmann et al. (2002) 11.Ussher et al. (2007) 12.Overnell (2002) 13.Rysgaard et al. (2001) 14.Price et al. (1994) 15.Jorgensen (1977) 16.Slomp et al. (1998) C org : 50-90% recycled [1) NO NO 3 - : -160 – 309 µmol m -2 d -1 (5, 6) NH 4 + : -400 – 66 µmol m -2 d -1 (5, 6) 10-50% (1, 2) ‘Normal’: ~340 mg Spring bloom: 185 mg C m -2 d -1 (12-21%) (3) Shelf sea C org content = 1-5% C org metabolism: 12 – 23 mmol C cm -2 day -1 (4) C org ~1% (2) Nitrate reduction: 0.7 mmol m -2 d -1 (7) Z Z < 1 cm: 113 – 401 nmole cm -2 d -1 [9] 1 < Z (cm) < 4: 387 – 1987 nmole cm -2 d -1 [9] Fe 3+ reduction rates: (12) / (13) nmol cm -2 d -1 C org metabolism: 18 mmol C m -2 d -1 (9) SO 4 2- reduction: nmol cm -3 d -1 (15) C org : 2 µmol cm -2 d -1 [2] Si(OH) 3 – 0.05 – 0.2 µmol cm -2 d -1 [6] Fe 2+ flux increases (7 – 22 [modelled] / 46 [in situ measurement] nmol cm -2 d -1 ) as O 2 of BW decreases (300 -> 0 µM) [6] PO 4 : µmol m -2 d -1 (16) 1.1  5.2 ΣCO 2 (g d.w.) -1 d -1 CFA: 5.8 % (8) Pyrite formation: 8.9 x10-6 µmol l -1 d -1 (10) Permanently buried: Sediment-water interface (SWI) Fluxes: Z

28 Multidisciplinary approach  NOCS, University of Portsmouth, CEFAS & Partrac Ltd

29 Why include resuspension?  Previous work has concentrated on other sources of nutrients  Frequent resuspension events – Release of nutrients – Sink for nutrients  Resuspension may be involved in regulating primary production

30 What is early diagenesis?  The physical, biological & chemical changes which occur to deposited material during burial in sediment  Oxidation of organic matter and reduced species  Transport (advection, diffusion & bioturbation)

31 Main Aims & Objectives  How do resuspension events impact nutrient concentrations in overlying waters?  Modify an existing one-dimensional non- steady state sediment biogeochemistry model with a view to include resuspension  Validate and calibrate the model with literature and experimental data  Use the model to investigate the role of resuspension on nutrient dynamics

32 Objectives  Modify an existing one-dimensional non- steady state early diagenetic model to include resuspension  Validate and calibrate the model with literature and project data  Study changes in nutrient (organic and inorganic) concentrations in the sediment and bottom waters following resuspension  Study role of exchanges between particles and macro- and micro-nutrients

33 Initial considerations  Understand early diagenetic processes associated with degradation of organic matter in shelf-seas  Acquire data for calibration and validation  Recognise potential limitations of modelling approaches  Decide on model and programming language to use

34 Experimental aspects  : 9 cruises  Porewater profiles and fluxes across the sediment-water interface of O 2, NO 3, NH 4 +, TOC measured  in-situ resuspension experiments using Voyager II  Lab-based resuspension experiments using a mini-flume

35 Experimental aspects  9 cruises  Diffusive fluxes and porewater profiles of major nutrients and other species measured

36 Secondary reactions  Oxidation of reduced species –O2–O2 – MnO 2  Sink of species – Adsorption – Fe H 2 S  FeS 2 + 2H 2 – Formation of apatites (e.g. carbonate fluorapatite [CFA])

37 Processes to be included Sediment-water interface cm - m POC Resuspension Erosion depth Benthic fluff DOC DON DOP OM + O 2  NH PO CO 2 OM + HNO 3  CO 2 + NH 3 + H 3 PO 4 OM + Fe 2 O 3  Fe 2+ + CO 2 + NH 3 + H 3 PO 4 OM + SO 4 2-  CO 2 + NH 3 + S 2- + H 3 PO 4 OM = (CH 2 O) 106 (NH 3 ) 16 (H 3 PO 4 ) Concentrations, fluxes and profiles Fe 2+ S 2- NH 4 + C org / FeS z ≅ 50 cm

38 The General Diagenetic Equations Change in concentration of i Bioturbation Advection Rate of addition of i, but dependent on j

39 The diagenetic model used  OMEXDIA (Soetaert et al. 1996) – Written in the R programming language  1-dimensional  Multi-G  TOC, O 2, NO 3 -, NH 4 + & ODU  OMEXDIA (Soetaert et al. 1996) – Written in the R programming language  1-dimensional  Multi-G  TOC, O 2, NO 3 -, NH 4 + & ODU  Fe(OH) 3  SO 4 2-

40 ODU

41 With no ODU component…

42 Addition of Fe(OH) 3 & SO 4 2-

43

44 Overview of nitrate

45 Comparison with observations

46

47

48 Beck et al. (2008) Bottcher et al. (1998) Slomp et al. (1997)

49 Nitrogen  Nitrate shows clear classical profile – including increasing concentrations in the oxygen penetration zone  Ammonium shows expected increase in concentration towards depth Comparison with observations

50

51

52

53

54

55 Conclusions & future work  (Some) general features in the model are consistent with real data but need better fitting to match the data  Incorporate a simple sediment resuspension model into current model  The model could help in calculating nutrient budgets of shelf seas?

56 Future work  Implement the remaining biogeochemical processes into the model  Incorporate a sediment transport model into OMEXDIA  Upscale model into ERSEM  Carry out scenario testing

57 Summary  A combined experimental and observational approach is being taken to improve our knowledge about nutrient cycling  An early diagenetic model has been shown to recreate the profiles found in experimental work  Resuspension will be added to the model and calibrated using experimental results


Download ppt "Using R to Model Complex Biogeochemical Systems Chris Wood"

Similar presentations


Ads by Google