Skip to content
Snippets Groups Projects
Commit afd39293 authored by Nauta, Lisanne's avatar Nauta, Lisanne
Browse files

moved files to src.

parent 511b8955
No related branches found
No related tags found
No related merge requests found
Showing
with 9 additions and 7154 deletions
exercises
src/exercises
.Rhistory
MARINA/outputs/g5outputs.csv
MARINA/calculated_parameters/g5par_o.csv
MARINA/inputs/g5inputs.csv
src/MARINA/outputs/g5outputs.csv
src/MARINA/calculated_parameters/g5par_o.csv
src/MARINA/inputs/g5inputs.csv
%% Cell type:markdown id:1e5920b5 tags:
# Practicals 2 and 3: Using the Global NEWS and MARINA models for scenario analysis exercises
## Educational aims
1. Understand the principle of how the models work
2. Find and use relevant inputs and outputs of the models for your analyses
3. Run the models
4. Perform simple scenario analyses
5. Perform simple sensitivity analyses (optional exercises)
## Introduction
Students will work with two models (Annex A and B, Table 1). Your main task is to analyze the effects of the Sustainable Development Goals (SDGs) on future nitrogen (N) and phosphorus (P) export by rivers to coastal seas. In this practical, we will use examples of the Black Sea (Europe + Asia) and South China Sea (China). Locations of the seas are given in Annex C.
You will focus on two SDGs and their selected targets for river quality (see Annex D and Table D.1):
- SDG 2 focuses on sustainable agriculture;
- SDG 6 focuses on sustainable sanitation management for clean water.
The SDGs set targets for the year 2020 or 2030. We go beyond 2030 and focus on the year 2050. Trends in socio-economic developments for 2050 are from storylines of the Global Orchestration (GO) scenario of the Millennium Ecosystem Assessment (see Annex E for the scenario description and slides of Lecture 4).
%% Cell type:markdown id:30eaeee5 tags:
## Exercise 1: Analyzing future river export of nutrients by 2050 with GO
10.10 – 10.50 Introduction to Exercise 1
10.50 – 13.00 Work on steps from Table 2 in group work groups. Make sure to have breaks. Use
- Annex A: Step-by-step manual for GNEtraning (Global NEWS model, Black Sea) or
- Annex B: Step-by-step manual for MARINAtraning (MARINA model, South China Sea)
- Annex C: Black Sea and South China Sea
- Annex E: GO scenario
- Annex F: Global NEWS parameters (optional)
13.00 – 13.30 Plenary discussion
%% Cell type:markdown id:15969db4 tags:
## Annex B: MARINA manual
### Background information
The MARINA model is run with the MARINAtraining folder. This folder contains all needed model inputs and scripts to run the model. MARINA is a downscaled version of the Global NEWS-2 model for China (Strokal et al. 2016). In addition, the MARINA model has improved modelling of animal manure and human waste, updated information for reservoirs and included retentions of dissolved inorganic phosphorus in river systems via sedimentation processes (Figure B.1A).
The MARINA model quantifies river export of dissolved inorganic and organic nitrogen and phosphorus by source from sub-basins. This is done for Chinese rivers draining into the Bohai Gulf, Yellow Sea and South China Sea. Rivers include the Yangtze (Chang Jing in Chinese), Yellow (Huang He in Chinese), Pearl (Zhu Jing in Chinese), Hai, Huai and Liao (see Figure B.1B). The drainage areas of the Yangtze, Yellow and Pearl rivers are divided into smaller sub-basins. These sub-basins are further classified as up-, middle- and downstream. The Hai, Huai and Liao are considered as individual downstream sub-basins.
The model runs for 1970, 2000 and 2050. This version is published in Strokal et al. (2016). 2050 is based on the Global Orchestration scenario of the Millennium Ecosystem Assessment. Please always cite the original article when you use the original MARINA model: Strokal et al. (2016). We will appreciate if you contact the developers (maryna.strokal@wur.nl and/or carolien.kroeze@wur.n) in case you would like to use the model outside of the class.
<figure>
<img src="MARINA_fig1.png">
<figcaption align = "center"><b>Figure B.1. (A) the main difference of the MARINA model from the Global NEWS-2 model and (B) the study area of the MARINA model. The drainage area of the Yangtze River (Chang Jiang) is divided into 10 sub-basins; the Yellow River (Huang He) has 6 sub-basins and the Pearl River (Zhu Jiang) has 6 sub-basins. Source: Strokal et al. (2016).</b></figcaption>
</figure>
Several abbreviations are important to remember for running the model. These abbreviations are:
- **DIN**: dissolved inorganic nitrogen
- **DIP**: dissolved inorganic phosphorus
- **DON**: dissolved organic nitrogen
- **DOP**: dissolved organic phosphorus
- **c7**: model run for 1970
- **c0**: model run for 2000
- **g5**: model run for 2050 under the global orchestration of the Millennium Ecosystem Assessment scenarios (used in these practicals).
The model is written in R programming language (with Rstudio). The scripts are available to run the model for 1970, 2000 and 2050 separately (available on request: maryna.strokal@wur.nl). For the **practicals 2 and 3**, students use the script for 2050 GO to run the model for the Pearl River draining into the South China Sea. This river consists of 6 sub-basins (see [Annex C](#Annex-C:-Locations-of-the-rivers-draining-into-the-Black-Sea-and-South-China-Sea) and Figure B.1). We provide inputs and outputs for 2000 in case students would like to compare results of 2050 with 2000.
### Exercise 1
This exercise consists of four steps (Table 2 above):
- Step 1: select a sea (model) and study the folders
- Step 2: study model inputs
- Step 3: run the model for 2050
- Step 4: study model outputs
- Step 5: answer a few questions
Optional step for sensitivity analysis
Below we describe steps with a focus on files for 2050 global orchestration (g5...). The same description applies to files for 2000 (c0..).
### Step 1: Select a sea and study the MARINAtraining folder
### Step 2: Study model inputs for 2050
### Step 3: Run the model for 2050
%% Cell type:code id:57f999f7 tags:
``` R
```
%% Cell type:markdown id:a6c58f66 tags:
## Annex C: Locations of the rivers draining into the Black Sea and South China Sea
### Black Sea
<figure>
<img src="black_sea_rivers.png">
<figcaption align = "center"><b>Figure C.1. Locations of the rivers draining into the Black Sea. Small rivers are not considered in the practicals. Source: Strokal et al. (2014). See Table C.1 for more information.</b></figcaption>
</figure>
%% Cell type:code id:b0aa0d01 tags:
``` R
```
FROM jupyter/datascience-notebook:2022-09-21
COPY . /home/jovyan/marina_practical
RUN mamba install -y -c conda-forge ipysheet jupyter_contrib_nbextensions
RUN jupyter nbextension enable toc2/main
RUN jupyter nbextension enable hide_input/main
\ No newline at end of file
RUN jupyter nbextension enable hide_input/main
"code","Gdin","Gdon","Gp","ECDIP","ECDON","ECDOP","fRnatDIP","fRnatDON","fRnatDOP","FEwsDIN","FEwsDIP","FEwsDON","FEwsDOP","FErivDINo","FErivDIPo","FErivDONo","FErivDOPo"
1,0.700731704410726,0.521776171098325,0.748535605326528,1524686.82028,16419704.2184,879627.0117,0.258419337069598,0.519370310418369,0.519370310418369,0.47166112758,0.0749416077501834,0.00519370310418369,0.00519370310418369,0.335870303763963,0.432065520617137,0.892232568,0.892232568
2,0.701222928199023,0.550565364437973,0.728221490227461,1992978,21462840,1149795,0.104409853648772,0.308743814201672,0.308743814201672,0.27281162314,0.030278857558144,0.00308743814201672,0.00308743814201672,0.293491331866399,0.375046063763822,0.826826017,0.826826017
3,0.671965198671797,0.509018994230133,0.718301317465377,5035134,54224520,2904885,0.253672395639373,0.513258605189045,0.513258605189045,0.46582053722,0.0735649947354181,0.00513258605189045,0.00513258605189045,0.208038511623392,0.065142722475,0.868569633,0.868569633
4,0.701569774027491,0.623308961840572,0.702041239026239,802503,8642340,462982.5,0.427631482177098,0.746122432224401,0.746122432224401,0.690627306,0.124013129831358,0.00746122432224401,0.00746122432224401,0.254177908690731,0.067210698,0.89614264,0.89614264
5,0.675735671663263,0.58099600802219,0.669100454816437,881140,9489200,508350,0.423792568981368,0.740578088786449,0.740578088786449,0.68522629536,0.122899845004597,0.00740578088786449,0.00740578088786449,0.227995678309046,0.063456002025,0.846080027,0.846080027
6,0.627601091920581,0.527161813633267,0.607017189929971,1253831.82028,13502804.2184,723364.5117,0.410283683182554,0.721285999633429,0.721285999633429,0.66644962804,0.118982268122941,0.00721285999633429,0.00721285999633429,0.293907185799778,0.3749857965,0.749971593,0.749971593
code,areacell,frAgr,Nfe,Nma,Nhum,Nfxag,Ndpag,Nex,Nfxna,Ndpna,Npntma,Npnthumuncon,Npnthumcon,Pfe,Pma,Phum,Pex,Ppntma,Ppnthumuncon,Ppnthumcon,Ppntdetcon,FEpntDINhumcon,FEpntDONhumcon ,FEpntDIPhumcon ,FEpntDOPhumcon,Rnat,Ddin,Ddip,Ldin,Ldip,FQrem
1,58641.80078,0.618381419,174142000,119342649.2,23601181.4,21823000,167787008,151638000,35712400,101299000,116268358.8,10242022.12,6020005.062,87410600,21617388.78,3933530.233,28405800,24457611.22,3488224.924,880804.6568,369248,0.610739095,0.14,1,0.01,0.501767157,0.009525247,0.031495742,0.619941784,0.5,0.107767432
2,76653,0.258606969,73278000,68529981.5,35227328.43,12417900,76851696,79565800,90956600,222420992,52480018.5,15287331.21,8383747.061,37225300,12006069.35,5871221.405,14975700,11095730.65,5206554.831,1226650.705,514127,0.610739095,0.14,1,0.01,0.290225131,0.024439548,0.092805364,0.636146163,0.5,0.173173983
3,193659,0.779168539,762457984,519373463.7,99865603.77,99800600,586536000,678387008,67530704,180048992,488376552.3,50503356.36,28938590.24,325807008,93247114.12,16702264.44,122752000,102679893.9,16273384.71,4234090.301,1774140,0.610739095,0.14,1,0.01,0.495553763,0.315661376,0.85,0.65,0.5,0.131430367
4,30865.5,0.545975305,221471008,82650192.6,22817822.43,10624300,75112704,123155000,22430700,67356400,82431807.4,9902073.883,0,54313900,15802755.01,3802970.404,22025000,18891344.99,3372445.453,0,0,0.610739095,0.14,1,0.01,0.7347099,0.322883946,0.85,0.581112357,0.5,0.10385736
5,33890,0.555066368,189620000,72762821.84,17585871.17,10880200,70917696,117308000,22605100,49615300,72302170.16,7631604.471,5272122.727,47443700,13806733.35,2930978.529,21237600,16606866.65,2599169.639,439343.5606,187603.0529,0.74,0.14,1,0.01,0.728964144,0.347889522,0.85,0.586767954,0.5,0.153919973
6,48224.30078,0.561312449,351568992,110245072,20640641.6,20420300,109702000,228123008,31678600,87389296,108311920,8957259.564,70486682.77,79616496,21055584.55,3440106.934,40914300,24793715.45,3050660.866,10313113.99,4321860,0.610739095,0.14,1,0.01,0.708988966,0,0,0.608108909,0.5,0.250028407
"code","DINdiffe","DINdifma","DINdifhum","DINdiffxag","DINdifdpag","DINdiffxna","DINdifdpna","DINpntma","DINpnthumuncon","DINpnthumcon","DONdiffe","DONdifma","DONdifhum","DONdiflchag","DONdiflchna","DONpntma","DONpnthumuncon","DONpnthumcon","DIPdiffe","DIPdifma","DIPdifhum","DIPdifwthag","DIPdifwthna","DIPpntma","DIPpnthumuncon","DIPpnthumcon","DIPpntdetcon","DOPdiffe","DOPdifma","DOPdifhum","DOPdiflchag","DOPdiflchna","DOPpntma","DOPpnthumuncon","DOPpnthumcon","DOPpntdetcon"
1,13544084.40677,9282004.99645312,1835607.68212774,1697307.6799907,13049817.9572498,3963815.15233577,11243447.9653135,19152428.666031,1687127.95186726,865200.67368223,386279.089572479,264724.017641601,52351.7753558987,4316534.24516543,2663840.83166952,28550854.2380392,2515030.60393154,689860.377996459,1497408.11780238,370321.831046374,67384.277221702,74405.0989516376,45917.2404096581,5228205.98607333,745663.927044261,268980.139779689,112760.959977443,278157.000232938,68790.6045252403,12517.2344079191,231242.905991005,142705.758839439,6005810.18051535,856568.39386486,7209.67872028451,3022.41754463396
2,2834195.94999077,2650555.36477855,1362498.31552854,480290.972561892,2972416.89938483,5016887.65126594,12268061.1208766,7427271.63705224,2163550.33301401,1035216.47852491,94297.1516683696,88187.2057007023,45331.9786543735,1297309.18385826,3719219.1366073,11918814.1924375,3471928.27666858,888554.392303512,212589.050888857,68565.166379379,33529.8140256034,13937.4693856961,39956.9381764454,2011655.71915383,943948.274633825,317702.493476923,133158.876604412,63360.3806701375,20435.2718277105,9993.27938846589,69498.706278121,199243.882318248,2519967.708218,1182468.32579578,9286.21486157785,3892.13797267449
3,37746784.1287918,25712469.9693705,4944017.20029421,4940799.07768911,29037465.9854897,4975291.56753012,13265021.3692411,54069390.2957558,5591352.97019149,2795321.20673811,1602656.40104302,1091702.39357175,209913.532921988,17446874.7069953,4944782.33987027,117877342.822766,12189777.3824553,3259565.28765098,885733.943682894,253500.176787347,45406.5203866817,51201.2598369213,14511.4291053632,3697842.81656427,586058.443045006,217833.721725581,91275.2188990741,966401.514996978,276587.520040895,49541.8860317951,934654.002160463,264899.053921622,24783403.292508,3927836.7057415,34065.4706976278,14273.8840900997
4,23259494.0009695,8680150.40126007,2396390.42924197,1115793.18821947,7888542.63075642,3357803.96305467,10083037.3932644,12507244.1385694,1502425.57380627,0,882134.256237632,329201.401282727,90884.9560040401,3015218.44821631,2507409.44466304,21179729.7263814,2544202.96227303,0,276842.308778593,80547.9109773166,19384.045462764,10969.3404675346,9121.9353961871,774198.099485037,138208.309768925,0,0,243662.135679703,70894.0627603565,17060.8240351981,161529.559725874,134325.505964091,4853873.68876289,866503.90746502,0,0
5,20018043.2581045,7681517.32504414,1856527.42227883,1148614.6728026,7486728.75378706,3531563.89456447,7751330.54478787,11539207.6301917,1217980.9865664,889495.685980469,690302.732046886,264889.646174417,64020.5406290242,3300325.80839643,2645496.16652897,18352026.6243394,1937084.4350631,624489.283489046,247567.663405101,72045.4078142468,15294.2436174887,13152.729070167,10543.0482790508,737663.754639913,115453.039712992,27878.9858711043,11904.5397047186,198907.966621676,57884.803595339,12288.1431974147,176803.168306952,141723.008921195,4215221.45508522,659731.65550281,3717.19811614724,1587.27196062914
6,43218708.8792538,13552531.0267988,2537373.60430073,2510286.80290162,13485770.6719252,6205024.69778747,17117320.2099291,22283556.1170395,1842822.06565337,12652402.4602986,1002551.8055697,314380.387644545,58859.8908751233,4099972.66497079,3204288.39725053,24369258.9549866,2015307.06723827,7400821.36672236,2156259.92493169,570250.079345063,93168.691062011,108278.698088404,84624.0217449197,6508103.79534882,800768.146281873,3867271.26393544,1620636.11446149,261430.567757682,69138.6044341412,11296.0146965368,219641.392766292,171658.306995564,5578374.68172756,686372.696813034,77345.4252787089,32412.7222892298
docker build --build-arg BASE_IMAGE=jupyter/datascience-notebook:2022-09-21 -t marinapractical:2.0.0 -t marinapractical:latest .
\ No newline at end of file
docker build -t marinapractical .
docker run -v ${pwd}/src:/home/jovyan/marina_practical -p 8888:8888 --name marinapractical marinapractical start.sh jupyter notebook --NotebookApp.token=''
\ No newline at end of file
docker create -v ${pwd}:/home/jovyan/marina_practical -it -e DOCKER_STACKS_JUPYTER_CMD=notebook -p 8888:8888 --name marinapractical marinapractical
\ No newline at end of file
docker pull nauta008/marinapractical:latest
docker run -v ${pwd}/src:/home/jovyan/marina_practical -p 8888:8888 --name marinapractical nauta008/marinapractical start.sh jupyter notebook --NotebookApp.token=''
\ No newline at end of file
docker run -v ${pwd}:/home/jovyan/marina_practical -e DOCKER_STACKS_JUPYTER_CMD=notebook -p 8888:8888 --name marinapractical marinapractical start.sh jupyter notebook --NotebookApp.token=''
\ No newline at end of file
{
"cells": [],
"metadata": {},
"nbformat": 4,
"nbformat_minor": 5
}
Source diff could not be displayed: it is too large. Options to address this: view the blob.
%% Cell type:code id:d201bb1f tags:
``` python
```
Source diff could not be displayed: it is too large. Options to address this: view the blob.
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment