Skip to content

Commit

Permalink
added files for energy farm calibration
Browse files Browse the repository at this point in the history
  • Loading branch information
dlebauer committed Dec 11, 2015
1 parent 7a713b2 commit 8dfd284
Show file tree
Hide file tree
Showing 3 changed files with 239 additions and 0 deletions.
100 changes: 100 additions & 0 deletions inst/extdata/defaults/miscanthus_ebifarm2012.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
<constants>
<type>
<photosynthesis>C4</photosynthesis>
<genus>Miscanthus</genus>
</type>
<canopyControl>
<Sp>1.7</Sp>
<SpD>0</SpD>
<nlayers>10</nlayers>
<kd>0.1</kd>
<chi.l>1</chi.l>
<mResp>0.02,0.03</mResp>
<heightFactor>3</heightFactor>
<leafwidth>0.04</leafwidth>
<eteq>0</eteq>
</canopyControl>
<iPlantControl>
<iRhizome>3</iRhizome>
<iStem>1</iStem>
<iLeaf>0</iLeaf>
<iRoot>1</iRoot>
<ifrRhizome>0.01</ifrRhizome>
<ifrStem>0.01</ifrStem>
</iPlantControl>
<photoParms>
<vmax>39</vmax>
<alpha>0.04</alpha>
<kparm>0.7</kparm>
<theta>0.83</theta>
<beta>0.93</beta>
<Rd>0.8</Rd>
<Catm>400</Catm>
<b0>0.01</b0>
<b1>3</b1>
<ws>1</ws>
<UPPERTEMP>37.5</UPPERTEMP>
<LOWERTEMP>3</LOWERTEMP>
</photoParms>
<phenoControl>
<Tbase>0</Tbase>
</phenoControl>
<seneControl>
<senLeaf>3000</senLeaf>
<senStem>3500</senStem>
<senRoot>4000</senRoot>
<senRhizome>4000</senRhizome>
</seneControl>
<soilControl>
<FieldC>-1</FieldC>
<WiltP>-1</WiltP>
<phi1>0.01</phi1>
<phi2>10</phi2>
<soilDepth>1</soilDepth>
<iWatCont>0.32</iWatCont>
<soilType>6</soilType>
<soilLayers>1</soilLayers>
<soilDepths/>
<wsFun>0</wsFun>
<scsf>1</scsf>
<transpRes>5000000</transpRes>
<leafPotTh>-800</leafPotTh>
<hydrDist>0</hydrDist>
<rfl>0.2</rfl>
<rsec>0.2</rsec>
<rsdf>0.44</rsdf>
</soilControl>
<phenoParms>
<tp1>562</tp1>
<tp2>1312</tp2>
<tp3>2063</tp3>
<tp4>2676</tp4>
<tp5>3211</tp5>
<tp6>7000</tp6>
<kStem1>0.37</kStem1>
<kLeaf1>0.33</kLeaf1>
<kRoot1>0.3</kRoot1>
<kRhizome1>-0.0008</kRhizome1>
<kStem2>0.85</kStem2>
<kLeaf2>0.14</kLeaf2>
<kRoot2>0.01</kRoot2>
<kRhizome2>-0.0005</kRhizome2>
<kStem3>0.63</kStem3>
<kLeaf3>0.01</kLeaf3>
<kRoot3>0.01</kRoot3>
<kRhizome3>0.35</kRhizome3>
<kStem4>0.63</kStem4>
<kLeaf4>0.01</kLeaf4>
<kRoot4>0.01</kRoot4>
<kRhizome4>0.35</kRhizome4>
<kStem5>0.63</kStem5>
<kLeaf5>0.01</kLeaf5>
<kRoot5>0.01</kRoot5>
<kRhizome5>0.35</kRhizome5>
<kStem6>0.63</kStem6>
<kLeaf6>0.01</kLeaf6>
<kRoot6>0.01</kRoot6>
<kRhizome6>0.35</kRhizome6>
<kGrain6>0</kGrain6>
</phenoParms>
</constants>
81 changes: 81 additions & 0 deletions inst/extdata/remote_sensing_da.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
<?xml version="1.0"?>
<pecan>
<outdir>/home/dlebauer/pecan_remote/remote_sensing_da</outdir>
<constants>
<file>/home/dlebauer/dev/biocro_regional/inst/extdata/defaults/miscanthus_ebifarm2012.xml</file>
</constants>
<pfts>
<pft>
<name>Miscanthus_x_giganteus</name>
</pft>
</pfts>
<meta.analysis>
<iter>3000</iter>
<random.effects>FALSE</random.effects>
</meta.analysis>
<ensemble>
<size>500</size>
<variable>StemBiom</variable>
<variable>LAI</variable>
<variable>TotLivBiom</variable>
<variable>Yield</variable>
<variable>Evap</variable>
<variable>TVeg</variable>
</ensemble>
<sensitivity.analysis>
<variable>StemBiom</variable>
<variable>LAI</variable>
<variable>TotLivBiom</variable>
<variable>Yield</variable>
<variable>Evap</variable>
<variable>TVeg</variable>
<start.year>2012</start.year>
<end.year>2012</end.year>
</sensitivity.analysis>
<model>
<type>BIOCRO</type>
<id>12</id>
</model>
<run>
<site>
<id>368</id>
<name>SoyFACE</name>
<lat>40.0415</lat>
<lon>-88.2373</lon>
</site>
<inputs>
<met>
<id>305</id><!--305 is SoyFACE; 306 is EBI Farm-->
</met>
<soil>
<id>303</id>
</soil>
</inputs>
<start.date>2012-01-01 00:00:00</start.date>
<end.date>2012-12-31 00:00:00</end.date>
<host>
<name>roger-login.ncsa.illinois.edu</name>
<qsub>qsub -l walltime=05:00:00,nodes=5:ppn=10 -N @NAME@ -o @STDOUT@ -e @STDERR@</qsub>
<qsub.jobid>lionxo_test ([0-9]+) .*</qsub.jobid>
<qstat>qstat -j @JOBID@ 2&gt;1 &gt;/dev/null || echo DONE</qstat>
<modellauncher>
<binary>/home/dlebauer/dev/pecan/utils/modellauncher/modellauncher</binary>
<qsub.extra>-l ncpus=10</qsub.extra>
</modellauncher>
<rundir>/home/dlebauer/pecan_remote/remote_sensing_da/run</rundir>
<outdir>/home/dlebauer/pecan_remote/remote_sensing_da/out</outdir>
</host>
</run>
<database>
<bety>
<driver>PostgreSQL</driver>
<user>bety</user>
<password>bety</password>
<host>ebi-forecast.igb.illinois.edu</host>
<dbname>ebi_production</dbname>
</bety>
</database>
<bety>
<write>TRUE</write>
</bety>
</pecan>
58 changes: 58 additions & 0 deletions vignettes/remote_sensing_da.Rmd
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@

## Prepare met data

```{r eval = FALSE}
library(PEcAn.all)
format <- list(orig = c("TIMESTAMP",
"PAR_APOGE_Avg", "AirTC_Avg", "RH1_Avg",
"RAIN_Tot", "WindSpd_Avg"
),
units = c("ymd_hms",
"J m-2 s-1", "celsius", "%",
"mm", "m s-1"
),
bety = c("datetime",
"solar_radiation", "airT", "relative_humidity",
"precipitation_flux", "Wspd"
),
skip = 1, unit.row = TRUE, na.strings = NA)
met2CF.csv(in.path = "~/Downloads/", in.file = "WeatherSE_Avg15 2012.csv",
outfolder = "data/", lat = 40.04, lon = -88.24, format = format)
```

## PEcAn workflow


Note - This was run on ebi-forecast. To run on your VM, you will need to change the location of the settings files.


```{r}
library(PEcAn.all)
logger.setQuitOnSevere(FALSE)
setwd("/home/a-m/dlebauer/dev/")
settings <- read.settings("biocro_regional/inst/extdata/remote_sensing_da.xml")
# Query the trait database for data and priors
settings$pfts <- get.trait.data(pft = settings$pfts, modeltype = settings$model$type,
dbfiles = settings$run$dbfiles,
database = settings$database$bety, forceupdate = TRUE)
# Run the PEcAn meta.analysis
run.meta.analysis(pfts = settings$pfts, iterations = settings$meta.analysis$iter,
threshold = settings$meta.analysis$threshold,
dbfiles = settings$run$dbfiles, database = settings$database$bety)
settings$model$binary <- gsub("regional", "point", settings$model$binary)
run.write.configs(settings = settings, write = TRUE) # Calls model specific write.configs e.g. write.config.ed.R
## load met data
start.model.runs(settings = settings, write = TRUE) # Start ecosystem model runs
get.results(settings) # Get results of model runs
run.sensitivity.analysis() # Run sensitivity analysis and variance decomposition on model output
run.ensemble.analysis() # Run ensemble analysis on model output.
```

0 comments on commit 8dfd284

Please sign in to comment.