- open src/init.r, switch crop version or tree version at the end of the file.
- go to the LPJmL_Calibration directory and turn on R.
- run source("src/init.r").
- manually copy lpjoutpus/ to the repository directory.
- Notice: output files should always be in format: cftfrac1.bin pft_harvest1.pft.bin.
lpjml_calibration's Introduction
lpjml_calibration's People
Forkers
wk1984lpjml_calibration's Issues
about the country label
- please see plots/ we put all the countries label. They will always have a superpose problem.
- Solutions:
- Like what we used to do, to plot the countries that only have significant areas.
- Look at the plot and implement them manually.
calibration data for crops
I only have calibration data for trees, therefore the calibration result of crops is actually the calibration result of the trees. by updating tree_dens.csv, to change the parameter, i.e. change the value to 1-7.
Willmott 1980 or Willmott 1985 ?
Not sure you are using the latest output version
why two times plotting green dots?
plot_tree.r See lines 91 and 93
countries with zero not excluded
I may be wrong but it seemes to me that the plots still contain zero countries but now they are plottet in red... will look into that too
automatically include LPJmL_Util
error running with crop data
reading lpjml outputs...
Error in data[, b, y] <- readBin(fn, double(), size = data.size, n = ncells) :
replacement has length zero
legend labels still cut in some cases
willmott
willmott is computed with a different formula than in the version of Chistoph, why?
Christoph: willmott <- 1 - sum((p - o)^2) / sum((abs(p - mean(o)) + abs(o - mean(o)))^2)
Sinan: willmott <- 1 - sum(abs(p - o)) / sum((abs(p - mean(o)) + abs(o - mean(o))))
put base year into both tree and crop files instead to putting it in init.r
a small point on zero value.
circle.radius !=0, need to be rounded
make crop calibration plots for publication
For trees code unstable
Running for trees the code causes segmentation faut in the plotting part in console R, but runs through in R studio.
source("/home/mfader/_R/LPJmL_Calibration/src/init.r")
Loading required package: spam
Spam version 0.29-3 (2013-04-23) is loaded.
Type 'help( Spam)' or 'demo( spam)' for a short introduction
and overview of this package.
Help for individual functions is also obtained by adding the
suffix '.spam' to the function name, e.g. 'help( chol.spam)'.
Attaching package: ‘spam’
The following object(s) are masked from ‘package:base’:
backsolve, forwardsolve
Loading required package: maps
country.name country global.area local.area proportion
1 Albania 1 16 16 1.000000000
2 Algeria 2 869 835 0.960874568
3 Armenia 6 13 11 0.846153846
4 Austria 7 39 39 1.000000000
5 Azerbaijan 8 45 30 0.666666667
6 Belgium 11 19 17 0.894736842
7 Bosnia_and_Herzegovina 16 24 24 1.000000000
8 Bulgaria 19 49 49 1.000000000
9 Burundi 21 10 4 0.400000000
10 Central_African_Republic 27 204 1 0.004901961
11 Chad 28 429 85 0.198135198
12 Croatia 35 38 38 1.000000000
13 Cyprus 37 11 11 1.000000000
14 Czech_Republic 38 41 10 0.243902439
15 Egypt 43 385 385 1.000000000
16 Eritrea 46 51 1 0.019607843
17 Ethiopia 48 369 122 0.330623306
18 France 54 290 290 1.000000000
19 Georgia 60 31 18 0.580645161
20 Germany 61 200 85 0.425000000
21 Greece 63 116 116 1.000000000
22 Hungary 72 44 44 1.000000000
23 Iran 75 643 96 0.149300156
24 Iraq 76 171 133 0.777777778
25 Israel 78 10 10 1.000000000
26 Italy 79 214 214 1.000000000
27 Jordan 83 35 19 0.542857143
28 Kenya 85 194 14 0.072164948
29 Lebanon 91 6 6 1.000000000
30 Libya 94 609 609 1.000000000
31 Luxembourg 96 1 1 1.000000000
32 Macedonia 97 11 11 1.000000000
33 Mali 102 427 67 0.156908665
34 Mauritania 104 367 130 0.354223433
35 Moldova 107 16 6 0.375000000
36 Montenegro 109 7 7 1.000000000
37 Morocco 110 175 175 1.000000000
38 Netherlands 115 20 9 0.450000000
39 Niger 119 404 87 0.215346535
40 Portugal 133 61 51 0.836065574
41 Romania 137 116 112 0.965517241
42 Rwanda 138 10 8 0.800000000
43 Saudi_Arabia 140 715 48 0.067132867
44 Serbia 142 37 37 1.000000000
45 Slovakia 144 26 24 0.923076923
46 Slovenia 145 9 9 1.000000000
47 Spain 151 265 264 0.996226415
48 Sudan 154 839 730 0.870083433
49 Switzerland 159 18 18 1.000000000
50 Syria 160 76 76 1.000000000
51 Tanzania_United_Republic_of 163 316 38 0.120253165
52 Tunisia 168 74 74 1.000000000
53 Turkey 169 369 369 1.000000000
54 Uganda 172 82 79 0.963414634
55 Ukraine 173 320 13 0.040625000
56 West_Bank 183 2 2 1.000000000
57 Western_Sahara 184 100 10 0.100000000
58 Zaire_DR_Congo 187 767 7 0.009126467
countries selected: 1 2 7 16 19 35 37 43 54 63 72 78 79 91 94 96 97 109 110 137 142 144 145 151 159 160 168 169 172 183
countries excluded: 6 8 11 21 27 28 38 46 48 60 61 75 76 83 85 102 104 107 115 119 133 138 140 154 163 173 184 187
FAO TABLE:
Years:1961-2012
reading lpjml outputs...
computing best k_est
rgeos version: 0.3-8, (SVN revision 460)
GEOS runtime version: 3.4.2-CAPI-1.8.2 r3921
Polygon checking: TRUE
Loading required package: sp
rgdal: version: 0.9-2, (SVN revision 526)
Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runtime: GDAL 1.11.2, released 2015/02/10
Path to GDAL shared files: /usr/local/share/gdal
Loaded PROJ.4 runtime: Rel. 4.9.1, 04 March 2015, [PJ_VERSION: 491]
Path to PROJ.4 shared files: (autodetected)
OGR data source with driver: ESRI Shapefile
Source: "/home/mfader/_R/LPJmL_Calibration/src/country_polygon/", layer: "ne_10m_admin_0_countries"
with 254 features
It has 63 fields
reading lpjml outputs...
*** caught segfault ***
address 0x10637a6b8, cause 'memory not mapped'
Traceback:
1: plot.new()
2: plot.default(fao.yields[b, ], best_yields[b, ], main = "", xlab = "", ylab = "", col = "white", pch = 3, lwd = 0.8, yaxt = "n")
3: plot(fao.yields[b, ], best_yields[b, ], main = "", xlab = "", ylab = "", col = "white", pch = 3, lwd = 0.8, yaxt = "n")
4: plot(fao.yields[b, ], best_yields[b, ], main = "", xlab = "", ylab = "", col = "white", pch = 3, lwd = 0.8, yaxt = "n")
5: eval(expr, envir, enclos)
6: eval(ei, envir)
7: withVisible(eval(ei, envir))
8: source(paste(src.path, "plot_tree.r", sep = ""))
9: eval(expr, envir, enclos)
10: eval(ei, envir)
11: withVisible(eval(ei, envir))
12: source(paste(wkdir, "src/tree_calibr.r", sep = ""))
13: eval(expr, envir, enclos)
14: eval(ei, envir)
15: withVisible(eval(ei, envir))
16: source("/home/mfader/_R/LPJmL_Calibration/src/init.r")
Possible actions:
1: abort (with core dump, if enabled)
2: normal R exit
3: exit R without saving workspace
4: exit R saving workspace
Selection: 1
aborting ...
Segmentation fault
Error: object 'BAND_RAINF' not found
while running with crops init.r
Years:1961-2012
reading lpjml outputs...
Error: object 'BAND_RAINF' not found
still can not produce lpj laimax file.
it is not urgent, and very stright forward, so we keep this problem until when we need it!
running init.r: Error in library("rgeos")
Error in library("rgeos") : there is no package called ‘rgeos’
install.packages("rgeos")
--- Please select a CRAN mirror for use in this session ---
Loading Tcl/Tk interface ... done
trying URL 'http://cran.univ-lyon1.fr/src/contrib/rgeos_0.3-8.tar.gz'
Content type 'application/x-gzip' length 245688 bytes (239 Kb)opened URL
downloaded 239 Kb
- installing source package ‘rgeos’ ...
** package ‘rgeos’ successfully unpacked and MD5 sums checked
configure: loading site script /usr/share/site/x86_64-unknown-linux-gnu
configure: CC: gcc -std=gnu99
configure: CXX: g++
configure: rgeos: 0.3-4
checking for /usr/bin/svnversion... yes
configure: svn revision: 460
checking geos-config usability... ./configure: line 2056: geos-config: command not found
no
configure: error: geos-config not usable
ERROR: configuration failed for package ‘rgeos’ - removing ‘/usr/lib64/R/library/rgeos’
The downloaded source packages are in
‘/tmp/Rtmp3twA1Q/downloaded_packages’
Updating HTML index of packages in '.Library'
Making packages.html ... done
Warning message:
In install.packages("rgeos") :
installation of package ‘rgeos’ had non-zero exit status
Error while running init.r
reading lpjml outputs...
Error in if (nyears/as.integer(nyears) != 1) stop("nyears:", nyears, " error\n") :
missing value where TRUE/FALSE needed
I will track that down
Citrus
There are two weird thing in Citrus:
-one very small point (=bubble) without a cross.
-Croatia, which is almost on the line, appears blue, which is a strong overestimation. kind of unlogical...
k_est is negative
not like in the samurai version. I guess negative is standard value? But I can not show that in that way...
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.