-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
merged yunkebranch, resolved issue with c4 data (reversed lat), added…
… plotting example in Rmd
- Loading branch information
Showing
15 changed files
with
684 additions
and
163 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
--- | ||
title: "Visualise SOFUN" | ||
author: "Beni Stocker" | ||
date: "2/2/2021" | ||
output: html_document | ||
--- | ||
|
||
```{r setup, include=FALSE} | ||
library(ggplot2) | ||
library(dplyr) | ||
library(rbeni) | ||
``` | ||
|
||
## Read output | ||
|
||
Annual | ||
|
||
```{r} | ||
nc_gpp <- read_nc_onefile("~/sofun/output_nc/global_FULL_MODIS-C006_MOD15A2_v3.3.2000.a.gpp.nc", varnam = "gpp") | ||
nc_pet <- read_nc_onefile("~/sofun/output_nc/global_FULL_MODIS-C006_MOD15A2_v3.3.2000.a.pet.nc", varnam = "pet") | ||
nc_alpha <- read_nc_onefile("~/sofun/output_nc/global_FULL_MODIS-C006_MOD15A2_v3.3.2000.a.alpha.nc", varnam = "alpha") | ||
``` | ||
|
||
Daily: Take mean over daily values and read file. | ||
|
||
```{r} | ||
nc_wcont <- nc_timmean("~/sofun/output_nc/global_FULL_MODIS-C006_MOD15A2_v3.3.2000.d.wcont.nc") | ||
nc_vpd <- nc_timmean("~/sofun/output_nc/global_FULL_MODIS-C006_MOD15A2_v3.3.2000.d.vpd.nc") | ||
``` | ||
|
||
## Global maps | ||
|
||
Annual | ||
|
||
```{r} | ||
plot_map3(nc_gpp, varnam = "gpp") | ||
plot_map3(nc_pet, varnam = "pet") | ||
plot_map3(nc_alpha, varnam = "alpha") | ||
plot_map3(nc_wcont, varnam = "wcont") | ||
plot_map3(nc_vpd, varnam = "vpd") | ||
``` | ||
|
||
## Integrate globally | ||
|
||
```{r} | ||
df <- integrate_lonlat("~/sofun/output_nc/global_FULL_MODIS-C006_MOD15A2_v3.3.2000.a.gpp.nc", | ||
"~/sofun/output_nc/global_FULL_MODIS-C006_MOD15A2_v3.3.fland.nc", | ||
varnam = "gpp") | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.