From c2dd35c99ee9b90cd623b1a42f7b2f81ce8b7ead Mon Sep 17 00:00:00 2001 From: Peter Alexander <peter@blackhillock.co.uk> Date: Thu, 20 Aug 2015 14:05:52 +0100 Subject: [PATCH] Remove tropical cereals and improve log output format --- GAMS/IntExtOpt.gms | 19 +- config.properties | 4 +- data/con_prod_c_and_m.csv | 505 ++++++------------ .../country/gams/GamsLocationOptimiser.java | 4 +- .../lurg/country/gams/GamsLocationTest.java | 3 - .../country/gams/GamsRasterOptimiser.java | 30 +- src/ac/ed/lurg/types/CropType.java | 4 +- src/ac/ed/lurg/utils/LazyTreeMap.java | 23 + .../lurg/yield/LPJYieldResponseMapReader.java | 12 +- src/ac/ed/lurg/yield/YieldResponse.java | 6 +- src/ac/ed/lurg/yield/YieldResponsesItem.java | 4 + 11 files changed, 244 insertions(+), 370 deletions(-) create mode 100644 src/ac/ed/lurg/utils/LazyTreeMap.java diff --git a/GAMS/IntExtOpt.gms b/GAMS/IntExtOpt.gms index b02699c6..791de819 100644 --- a/GAMS/IntExtOpt.gms +++ b/GAMS/IntExtOpt.gms @@ -1,13 +1,13 @@ - SET all_types / meat, cereals, wheat, maize, rice, tropicalCereals, oilcrops, pulses, starchyRoots, pasture /; + SET all_types / meat, cereals, wheat, maize, rice, oilcrops, pulses, starchyRoots, pasture /; - SET crop(all_types) / wheat, maize, rice, tropicalCereals, oilcrops, pulses, starchyRoots, pasture /; - SET crop_less_pasture(crop) / wheat, maize, rice, tropicalCereals, oilcrops, pulses, starchyRoots /; - SET cereal_crop(crop) / wheat, maize, rice, tropicalCereals /; - SET non_cereal_crop(crop) / oilcrops, pulses, starchyRoots, pasture /; - SET feed_crop(crop) / wheat, maize, oilcrops, pasture/; - SET feed_crop_less_pasture(feed_crop) / wheat, maize, oilcrops /; - SET not_feed_crop(crop) / rice, tropicalCereals, pulses, starchyRoots /; - SET import_crop(all_types) / meat, wheat, maize, rice, tropicalCereals, oilcrops, pulses, starchyRoots /; + SET crop(all_types) / wheat, maize, rice, oilcrops, pulses, starchyRoots, pasture /; + SET crop_less_pasture(crop) / wheat, maize, rice, oilcrops, pulses, starchyRoots /; + SET cereal_crop(crop) / wheat, maize, rice /; + SET non_cereal_crop(crop) / oilcrops, pulses, starchyRoots, pasture /; + SET feed_crop(crop) / wheat, maize, oilcrops, pasture/; + SET feed_crop_less_pasture(feed_crop) / wheat, maize, oilcrops /; + SET not_feed_crop(crop) / rice, pulses, starchyRoots /; + SET import_crop(all_types) / meat, wheat, maize, rice, oilcrops, pulses, starchyRoots /; SET location; PARAMETER suitableLandArea(location) areas of land in Mha; @@ -55,7 +55,6 @@ $gdxin / wheat 1.1 maize 0.9 rice 1.1 - tropicalCereals 0.9 oilcrops 0.7 pulses 0.5 starchyRoots 4.0 diff --git a/config.properties b/config.properties index 1bfc16aa..1a7b09b9 100644 --- a/config.properties +++ b/config.properties @@ -7,7 +7,7 @@ CHANGE_YIELD_DATA_YEAR=false KEEP_DEMAND_FIXED=true DEBUG_LIMIT_COUNTRIES=true MAX_IMPORT_CHANGE=0.0 -SEED_AND_WASTE_FRACTION=0.1 +SEED_AND_WASTE_FRACTION=0.15 DEBUG_LIMIT_COUNTRIES=true @@ -15,5 +15,5 @@ END_TIMESTEP=0 TIMESTEP_SIZE=10 POPULATION_AGGREG_LIMIT=60 -NUM_CEREAL_CATEGORIES=5 +NUM_CEREAL_CATEGORIES=10 NUM_PASTURE_CATEGORIES=1 \ No newline at end of file diff --git a/data/con_prod_c_and_m.csv b/data/con_prod_c_and_m.csv index 4abec649..95e63562 100644 --- a/data/con_prod_c_and_m.csv +++ b/data/con_prod_c_and_m.csv @@ -171,329 +171,179 @@ Viet Nam,2010,WheatBarleyOats,0,0.9,2.80867273449025,-0.502928734490247,0 Yemen,2010,WheatBarleyOats,0.196215,0.038748,2.9090140351582,-0.184576035158198,0 Zambia,2010,WheatBarleyOats,0.030591,5.9e-05,-0.0555677739220175,0.180754773922018,0 Zimbabwe,2010,WheatBarleyOats,0.027266,0.002903,0.54199639254798,-0.0901703925479798,0 -Afghanistan,2010,Maize and products,0.183,0.178,-4.5e-05,0.301,0 -Albania,2010,Maize and products,0.0542,0.4,0.0710917273223192,0.361659272677681,0.003245 -Algeria,2010,Maize and products,0.000139,1.75,2.63449562726404,-0.0123036272640382,0 -Angola,2010,Maize and products,1.489815,0.132216,0.179745007422527,0.996873992577473,0 -Antigua and Barbuda,2010,Maize and products,4e-05,1e-04,0.000229101255540477,0.000140898744459523,0 -Argentina,2010,Maize and products,2.902751,2.412375,-17.832638,22.676923,1.052948 -Armenia,2010,Maize and products,0.002729,0.056852,0.0493050017844743,0.0125139982155257,0 -Australia,2010,Maize and products,0.059,0.306,0.00564714498305913,0.434719855016941,0.008862 -Austria,2010,Maize and products,0.2011,1.277909,0.324462643499065,1.75199935650094,0.114319 -Azerbaijan,2010,Maize and products,0.02987,0.115472,0.0699221051229809,0.161723894877019,0.004002 -Bahamas,2010,Maize and products,9e-05,0.000758,0.00138967998426526,0.000671320015734736,1.2e-05 -Bangladesh,2010,Maize and products,0.152009,1.4,0.716420727506504,0.883947272493496,0.011466 -Barbados,2010,Maize and products,9e-05,0.03271,0.0374570504507999,0.000107949549200122,0.000229 -Belarus,2010,Maize and products,0.111668,0.569491,0.0753280908896817,0.550223909110318,0 -Belgium,2010,Maize and products,0.062906,0.604722,0.660393412566039,0.691937587433961,0.691202 -Belize,2010,Maize and products,0.0219,0.0332,-0.011253,0.058048,2.6e-05 -Benin,2010,Maize and products,0.918236,0.3,-0.026389,1.012629,0 -Bermuda,2010,Maize and products,0,0,0,0,0 -Bolivia (Plurinational State of),2010,Maize and products,0.314292,0.29,0.0398485460130207,1.01879745398698,0.309033 -Bosnia and Herzegovina,2010,Maize and products,0.188752,0.291062,0.170778908724335,0.852557091275665,0.240237 -Botswana,2010,Maize and products,0.065388,0.0025,0.0360402400546943,0.0453987599453057,0 -Brazil,2010,Maize and products,12.678875,34.16512,-10.420159,55.364275,0 -Brunei Darussalam,2010,Maize and products,0,0,0.00370782295151036,0.000857177048489643,0 -Bulgaria,2010,Maize and products,0.3275,0.631397,-0.596676,2.0474,0.243435 -Burkina Faso,2010,Maize and products,0.790321,0,-0.021732,1.033453,1e-06 -Cabo Verde,2010,Maize and products,0.032028,0.007,0.0219274017473873,0.00472159825261274,4e-06 -Cambodia,2010,Maize and products,0.330322,0.23218,-0.217646,0.74327,0 -Cameroon,2010,Maize and products,0.84613,0.475,0.0360934960483068,1.53014750395169,0.000666 -Canada,2010,Maize and products,1.2029,9.927017,0.745967755660748,11.7109142443393,0.25619 -Central African Republic,2010,Maize and products,0.092891,0,0.0139701524376283,0.164932847562372,0 -Chad,2010,Maize and products,0.21,0.014881,0.0223645028270369,0.188782497172963,0 -Chile,2010,Maize and products,0.122547,1.4,0.584637264067321,1.35510873593268,0.157044 -China,2010,Maize and products,32.517868,119.415039,6.00848991421001,169.12364108579,30.291943 -Colombia,2010,Maize and products,0.5222367,3.70804,3.60860603058024,1.51253596941976,0 -Congo,2010,Maize and products,0.013125,0,0.00493673012487002,0.01047626987513,1.2e-05 -Costa Rica,2010,Maize and products,0.009598,0.57,0.649590484503251,0.0156425154967487,0.012859 -Cote d'Ivoire,2010,Maize and products,0.324045,0.065825,0.0281241887777299,0.64147581122227,0.005004 -Croatia,2010,Maize and products,0.296768,1.749268,-0.136388,2.067815,0 -Cuba,2010,Maize and products,0.225608,0.816119,0.790160182058425,0.320664817941575,0.000506 -Cyprus,2010,Maize and products,0,0.151247,0.18323277258911,-0.0296537725891102,0.000796 -Czech Republic,2010,Maize and products,0.1053,0.525,-0.205461,0.8026,0 -Democratic People's Republic of Korea,2010,Maize and products,0.503,0.102479,0.109833955430296,1.9324710445697,0.272819 -Denmark,2010,Maize and products,0,0.034557,0.0810023662845811,-0.00260536628458113,0.017369 -Djibouti,2010,Maize and products,9e-06,0,0.00105205708136351,7.94291863649232e-06,0 -Dominica,2010,Maize and products,0.00012,2.1e-05,0.000198956353495678,0.000169043646504322,1.2e-05 -Dominican Republic,2010,Maize and products,0.02224145,0.99,1.09479149933228,0.0113955006677161,0.013998 -Ecuador,2010,Maize and products,0.361711,0.7,0.490490715661139,0.981738284338861,0.603415 -Egypt,2010,Maize and products,0.968519,6.878773,6.24433659399805,7.01108340600195,0.184637 -El Salvador,2010,Maize and products,0.253894,0.6,0.382219270986833,0.766274729013167,0.00666 -Estonia,2010,Maize and products,0,0.009028,0.0187400807711838,-9.10807711837806e-05,0.000334 -Ethiopia,2010,Maize and products,1.96318,0.35,-0.003671,4.336126,0 -Fiji,2010,Maize and products,0.00046,0.000666,0.00137259787310654,0.000916402126893456,0 -Finland,2010,Maize and products,0,0.001351,0.00474782207205594,-2.18220720559439e-05,0 -France,2010,Maize and products,1.5824,5.802,-6.294702,14.725072,0.502084 -French Polynesia,2010,Maize and products,0,0.004186,0.00446847931310747,-2.14793131074675e-05,0.00026 -Gabon,2010,Maize and products,0.025,0.015,0.0051809038314329,0.0374520961685671,0 -Gambia,2010,Maize and products,0.0528,0.015,0.00212320593402205,0.0459897940659779,2e-06 -Georgia,2010,Maize and products,0.0998,0.046019,0.00550847843365306,0.141073521566347,0.001736 -Germany,2010,Maize and products,0.4636,3.572284,1.31024615771708,3.89967884228292,0.004258 -Ghana,2010,Maize and products,0.991669,0.842692,-0.007079,1.871694,0.000621 -Greece,2010,Maize and products,0.15155,1.748079,0.371799183180014,1.71667181681999,0.154666 -Grenada,2010,Maize and products,0.000381,0.000737,0.000985738296864949,0.000323261703135052,3.7e-05 -Guatemala,2010,Maize and products,0.821381,1.003,0.680313163837243,1.63073383616276,0 -Guinea,2010,Maize and products,0.485,0.346882,0.00220359233947485,0.580089407660525,6.1e-05 -Guinea-Bissau,2010,Maize and products,0.017843,5e-04,0.00084305242718623,0.0223089475728138,0 -Guyana,2010,Maize and products,0.00329,0.023879,0.0310402056355302,-0.0045342056355302,0.00026 -Haiti,2010,Maize and products,0.415,0.02,0.0408543809112488,0.309802619088751,6.9e-05 -Honduras,2010,Maize and products,0.469823,0.235,0.389193796489931,0.507070203510069,0 -Hungary,2010,Maize and products,1.078825,2.641032,-3.885086,7.27724,0 -Iceland,2010,Maize and products,0,0.017262,0.0231603282410196,-0.000111328241019568,0.001562 -India,2010,Maize and products,8.5532,6.5,-2.366708,19.7258,0.018391 -Indonesia,2010,Maize and products,4.131676,5,1.78088444572158,17.9514285542784,5.298042 -Iran (Islamic Republic of),2010,Maize and products,0.240209,7.271449,5.81383322857599,2.11729177142401,0 -Iraq,2010,Maize and products,0.113075,0.246053,0.00285371739357437,0.266685282606426,0 -Ireland,2010,Maize and products,0,0.301822,0.351494581992705,-0.00168858199270465,0.006019 -Israel,2010,Maize and products,0.00296,0.98,1.1778819024985,0.0808750975014986,0.132209 -Italy,2010,Maize and products,0.926776,9.37,1.93836241883368,8.62328258116632,0.43578 -Jamaica,2010,Maize and products,0.002017,0.182157,0.212026178192235,0.00134282180776537,0.001147 -Japan,2010,Maize and products,6.8e-05,11.857,16.2747914935874,-0.771833493587406,0.080964 -Jordan,2010,Maize and products,0.001496,0.497382,0.535817595205768,0.0264304047942315,0.006514 -Kazakhstan,2010,Maize and products,0.0956,0.37,-0.002783,0.466,0.028633 -Kenya,2010,Maize and products,2.008346,0.095,0.242591099205525,3.21337590079447,0.002179 -Kiribati,2010,Maize and products,0,1e-06,1.00483006815999e-06,-4.83006815998821e-09,0 -Kuwait,2010,Maize and products,0.0009278,0.10411,0.10590506986379,0.0175119301362099,0.000933 -Kyrgyzstan,2010,Maize and products,0.072714,0.298876,0.000725487309211511,0.440874512690788,0.002072 -Lao People's Democratic Republic,2010,Maize and products,0.212745,0.39,-0.225128,1.020875,0.29 -Latvia,2010,Maize and products,0,0.004579,0.00839133589920406,-4.03358992040612e-05,0 -Lebanon,2010,Maize and products,0.001645,0.35672,0.368219978477228,0.00273102152277232,0.006136 -Lesotho,2010,Maize and products,0.14134,0.005,0.257441482782862,0.126973517217138,0 -Liberia,2010,Maize and products,0,0.00066,0.000771709492346871,-3.709492346871e-06,0 -Libya,2010,Maize and products,0.001523,0.611718,0.652188975059513,-0.000235975059513003,0 -Lithuania,2010,Maize and products,0.0071,0.039824,0.0230196520314772,0.0473893479685228,0 -Madagascar,2010,Maize and products,0.293313,0.018868,0.00860837919392662,0.411873620806073,0.000476 -Malawi,2010,Maize and products,1.69627,0.55,0.00593754087275737,2.91937945912724,0.000351 -Malaysia,2010,Maize and products,0.0086,2.861272,3.25241688250909,0.0319671174909091,0.026856 -Maldives,2010,Maize and products,2.7e-05,0,0.000106511987224959,0.000116488012775041,0 -Mali,2010,Maize and products,0.5043,0.280811,0.00294515692977693,1.33356184307022,0.452353 -Malta,2010,Maize and products,0,0.043856,0.0555882042006787,-0.000267204200678709,0.007286 -Mauritania,2010,Maize and products,0.023174,0.001052,0.00342848019256188,0.0198935198074381,0 -Mauritius,2010,Maize and products,4.8e-05,0.077359,0.0820735151372397,-6.65151372396795e-05,0.000601 -Mexico,2010,Maize and products,7.148045,11.77848,7.27030728196205,24.0769337180379,0.026494 -Mongolia,2010,Maize and products,0,0,0.00103899429047743,-4.99429047742774e-06,3.4e-05 -Morocco,2010,Maize and products,0.2301,0.6,1.91106018105171,0.0199638189482905,0.01974 -Mozambique,2010,Maize and products,1.738042,0.45,0.0882964277493545,1.93946557225065,0 -Myanmar,2010,Maize and products,0.389073,0.82,-0.044538,1.096127,0.000338 -Namibia,2010,Maize and products,0.032,0.011033,0.000284366909289277,0.109998633090711,0 -Nepal,2010,Maize and products,0.87566,0.399435,0.144695529815038,1.73948847018496,0 -Netherlands,2010,Maize and products,0.016733,2.2,2.75957787897866,0.183637121021338,0.440297 -Netherlands Antilles,2010,Maize and products,0,8.5e-05,0.000301449020447996,-1.44902044799647e-06,0 -New Caledonia,2010,Maize and products,0.00085,0.005112,0.00206794028027326,0.00332605971972674,3.1e-05 -New Zealand,2010,Maize and products,0.017548,0.12,-0.009585,0.188812,0.038276 -Nicaragua,2010,Maize and products,0.3411937,0.0289,0.136721198394121,0.466316801605879,0.046415 -Niger,2010,Maize and products,0.012398,0,0.0504876867746986,-0.00386068677469861,4e-06 -Nigeria,2010,Maize and products,4.14931,2.34822,0.0432599440944238,7.82664305590558,0.034624 -Norway,2010,Maize and products,0,0.101022,0.107005358788425,-0.000515358788425307,0.000174 -Occupied Palestinian Territory,2010,Maize and products,0,0.028835,0.0331593922492796,-0.000159392249279612,0 -Pakistan,2010,Maize and products,0.97418,0.741,-0.291762,3.70691,0.238641 -Panama,2010,Maize and products,0.056963,0.394507,0.395661887638677,0.100577112361323,0.010591 -Paraguay,2010,Maize and products,0.794034,0.131362,-1.075166,1.908821,0.005416 -Peru,2010,Maize and products,0.497176,2.762309,1.9181201171106,1.5319748828894,0 -Philippines,2010,Maize and products,2.49904,2.758,0.144790988671514,6.02609901132849,0.748706 -Poland,2010,Maize and products,0.2987,2.126,0.178034786646519,2.17733921335348,0.032728 -Portugal,2010,Maize and products,0.090371,1.787602,1.42508617654695,0.619371823453051,0.028325 -Republic of Korea,2010,Maize and products,0.015528,6.068752,8.48202985149605,0.0335671485039536,0.10512 -Republic of Moldova,2010,Maize and products,0.411077,0.703184,-0.04593,1.16985,0.001303 -Romania,2010,Maize and products,2.094249,6.334212,-1.644849,9.042031,0.001088 -Russian Federation,2010,Maize and products,1.0252,4.594,-0.141557,6.084351,0.004307 -Rwanda,2010,Maize and products,0.184658,0,0.132116062191743,0.0817689378082566,1.1e-05 -Saint Kitts and Nevis,2010,Maize and products,0,5.3e-05,0.000107516817293119,-5.16817293118734e-07,1.9e-05 -Saint Lucia,2010,Maize and products,0,0,0.000385854746173436,0.000499145253826564,0.000284 -Saint Vincent and the Grenadines,2010,Maize and products,3.1e-05,0.002716,0.00389170685398363,0.000562293146016366,0.000159 -Samoa,2010,Maize and products,0,0,0,0,0 -Sao Tome and Principe,2010,Maize and products,0.0012,0.000365,0.000650125054099512,0.00359587494590049,0 -Saudi Arabia,2010,Maize and products,0.014951,1.274722,1.93703704797378,0.0700729520262186,0 -Senegal,2010,Maize and products,0.121235,0.01,0.111056833623246,0.244801166376754,0.001919 -Serbia,2010,Maize and products,1.226313,4.735523,-1.677388,7.217675,0.006438 -Sierra Leone,2010,Maize and products,0.03544,0.01,0.00106210538204511,0.0413828946179549,0 -Slovakia,2010,Maize and products,0.1735,0.810369,-0.072322,1.256517,0.090948 -Slovenia,2010,Maize and products,0.036433,0.261427,0.0987295783470596,0.31064342165294,0 -Solomon Islands,2010,Maize and products,0,0,1.40676209542398e-05,-6.76209542398354e-08,0 -Somalia,2010,Maize and products,0.201129,0,0.0785445519378618,0.132249448062138,0 -South Africa,2010,Maize and products,2.742,4.288,-1.413724,11.615,0.25 -Spain,2010,Maize and products,0.31499,6.5,3.80699967923775,4.07816732076225,1.230468 -Sri Lanka,2010,Maize and products,0.05762,0.0876,0.0175995986438222,0.161604401356178,0.006013 -Sudan (former),2010,Maize and products,0.02646,0.1,0.116165389689772,0.0456926103102282,0 -Suriname,2010,Maize and products,1.5e-05,0.01622,0.017529260539051,-5.02605390509925e-05,8.5e-05 -Swaziland,2010,Maize and products,0.055,0.0336,0.105192645345465,0.0674953546545353,0.021851 -Sweden,2010,Maize and products,0,0.016035,0.0402625360011026,-0.00019253600110257,0.013944 -Switzerland,2010,Maize and products,0.015208,0.233949,0.112504793751465,0.142961206248535,0.003097 -Syrian Arab Republic,2010,Maize and products,0.037918,1.829117,1.90391684409716,0.12394715590284,0 -Tajikistan,2010,Maize and products,0.012534,0.090129,0,0.151061,0 -Thailand,2010,Maize and products,1.162898,3.850189,-0.054439,4.860745,0 -The former Yugoslav Republic of Macedonia,2010,Maize and products,0.02948,0.13,0.0564624063599779,0.131734593640022,0 -Timor-Leste,2010,Maize and products,0.07025486,0.014971,0.00082396065589119,0.111886039344109,0 -Togo,2010,Maize and products,0.534572,0.065,-0.002308,0.638129,0 -Trinidad and Tobago,2010,Maize and products,0.001305,0.043611,0.0568151017139021,0.00291389828609795,0.001388 -Tunisia,2010,Maize and products,0,0.889276,0.903943119656589,-0.00434511965658912,0.010322 -Turkey,2010,Maize and products,0.593552,2.619,0.359891946872318,4.30827005312768,0.380989 -Turkmenistan,2010,Maize and products,0.0161,0.01566,5.02415034079994e-06,0.0169999758496592,0 -Uganda,2010,Maize and products,1.032,0.237496,-0.185809,2.373501,0.000688 -Ukraine,2010,Maize and products,2.6476,7.275897,-2.904687,11.953,0.006504 -United Arab Emirates,2010,Maize and products,0.0002816,0.331042,0.346560866358039,0.00356013364196086,0.013145 -United Kingdom,2010,Maize and products,0,0.01,1.06304188366863,-0.0195848836686327,0.163786 -United Republic of Tanzania,2010,Maize and products,3.05071,0.85,0.0160250299270155,3.98299297007298,0.008227 -United States of America,2010,Maize and products,32.96038,121.902096,-50.97901,335.636024,136.709871 -Uruguay,2010,Maize and products,0.096,0.35,0.0764766116575885,0.428732388342412,0.008361 -Uzbekistan,2010,Maize and products,0.033,0.089084,0.00322048036845276,0.231584519631547,0.003155 -Vanuatu,2010,Maize and products,0.00133,0.000736,0.000139671379474238,0.000713328620525762,0 -Venezuela (Bolivarian Republic of),2010,Maize and products,0.65,1.538134,1.82136804433768,1.53658095566232,0.001671 -Viet Nam,2010,Maize and products,1.12639082,5,1.66708744050246,4.59878655949754,0 -Yemen,2010,Maize and products,0.053202,0.123874,0.383631057232597,0.0876099427674026,0 -Zambia,2010,Maize and products,1.080556,0.055,-0.062411,1.745483,0.000167 -Zimbabwe,2010,Maize and products,1.362563,0.05,0.298406395001608,1.30096460499839,0 -Afghanistan,2010,TropicalCereals,0.005,0,0,0.015,0 -Albania,2010,TropicalCereals,0,0,0,0,0 -Algeria,2010,TropicalCereals,3.5e-05,0.000393,0.000650851431702307,0.000247148568297693,0 -Angola,2010,TropicalCereals,0.194381,0,7.40953150242326e-07,0.0507232590468498,0 -Argentina,2010,TropicalCereals,0.757315,1.879234,-1.662874,3.634116,0 -Armenia,2010,TropicalCereals,0,0.000207,0.000153377302100162,5.36226978998384e-05,0 -Australia,2010,TropicalCereals,0.554,1.930787,-0.058809,2.035,0 -Austria,2010,TropicalCereals,0.004167,0.002247,-0.014055,0.017077,0 -Azerbaijan,2010,TropicalCereals,8.9e-05,7.2e-05,2.22285945072698e-06,6.9777140549273e-05,0 -Bahamas,2010,TropicalCereals,0,3e-06,2.22285945072698e-06,7.77140549273021e-07,0 -Bangladesh,2010,TropicalCereals,0.036067,1.3e-05,0,0.012242,0 -Barbados,2010,TropicalCereals,0,4.1e-05,3.03790791599354e-05,1.06209208400646e-05,0 -Belarus,2010,TropicalCereals,0,0.001125,0.000833572294022617,0.000291427705977383,0 -Belgium,2010,TropicalCereals,0,0.067855,0.0576787465735696,0.0101762534264304,0 -Benin,2010,TropicalCereals,0.143899,0.008,5.40837358882816e-06,0.175017591626411,0 -Bolivia (Plurinational State of),2010,TropicalCereals,0.087032,0.3,-0.009403,0.338397,0.024623 -Bosnia and Herzegovina,2010,TropicalCereals,0,2.7e-05,2.00057350565428e-05,6.99426494345719e-06,0 -Botswana,2010,TropicalCereals,0.066951,0,0.0271842177562075,0.0391497822437925,0 -Brazil,2010,TropicalCereals,0.66118,1.493231,0.00264394817819206,1.53272505182181,0 -Brunei Darussalam,2010,TropicalCereals,0,0,4.44571890145396e-06,1.55428109854604e-06,0 -Bulgaria,2010,TropicalCereals,0.0075,0.013675,-0.000282338325683548,0.0143103383256835,0 -Burkina Faso,2010,TropicalCereals,3.344957,0,-0.009238,2.858121,0 -Cambodia,2010,TropicalCereals,0,0,-7.21712439418417e-06,3.12171243941842e-05,0 -Cameroon,2010,TropicalCereals,0.8175,0.25,0,1.170536,0 -Canada,2010,TropicalCereals,0,0.012109,0.00962103095557454,0.00248796904442546,0 -Central African Republic,2010,TropicalCereals,0.062442,0.001,0,0.06,0 -Chad,2010,TropicalCereals,1.855,0.026505,0.040607877664691,1.16697412233531,0 -Chile,2010,TropicalCereals,0,0.625829,0.563984092361099,0.0618449076389008,0 -China,2010,TropicalCereals,1.358415,2.227003,0.0866082606693909,4.04444773933061,0.0115 -Colombia,2010,TropicalCereals,0.017341,0.259236,0.151730167938802,0.115699832061198,0 -Congo,2010,TropicalCereals,0.013,0.010551,3.90721502455242e-05,0.0105119278497545,0 -Costa Rica,2010,TropicalCereals,0,0.000763,0.00056785307371199,0.00019614692628801,0 -Cote d'Ivoire,2010,TropicalCereals,0.1304,0.0085,-0.000118,0.096528,0 -Croatia,2010,TropicalCereals,0.00054,0.001456,5.98888429117479e-05,0.00141011115708825,0 -Cuba,2010,TropicalCereals,0.000128,0.000207,7.40953150242326e-07,0.000223259046849758,0 -Cyprus,2010,TropicalCereals,0,0.000103,7.63181744749596e-05,2.66818255250404e-05,0 -Czech Republic,2010,TropicalCereals,0.0016,0.000113,-0.00161856462698061,0.00181056462698061,0 -Democratic People's Republic of Korea,2010,TropicalCereals,0.08405,0.022393,0,0.093929,0 -Denmark,2010,TropicalCereals,0,0.004313,0.00337751223046098,0.000935487769539018,0 -Ecuador,2010,TropicalCereals,0.008128,0.038565,0.0240846865367259,0.0166503134632741,0 -Egypt,2010,TropicalCereals,0.140157,0.442,0.00343552748115879,0.702082472518841,0 -El Salvador,2010,TropicalCereals,0.096512,0.053417,0.00028797746365105,0.166118022536349,0 -Estonia,2010,TropicalCereals,0,2.8e-05,2.07466882067851e-05,7.25331179321486e-06,0 -Ethiopia,2010,TropicalCereals,2.305844,0,0.297404674814446,3.92725632518555,1.1 -Fiji,2010,TropicalCereals,5e-06,0.005847,0.00255004814713248,0.00329695185286752,0 -Finland,2010,TropicalCereals,0,3.9e-05,2.88971728594507e-05,1.01028271405493e-05,0 -France,2010,TropicalCereals,0.063861,0.201712,-0.119057,0.3234,0 -French Polynesia,2010,TropicalCereals,0,6e-06,4.44571890145396e-06,1.55428109854604e-06,0 -Gabon,2010,TropicalCereals,0,7.9e-05,5.85352988691438e-05,2.04647011308562e-05,0 -Gambia,2010,TropicalCereals,0.1804,0.006701,0,0.16902,0 -Georgia,2010,TropicalCereals,0,0.000136,0.000100769628432956,3.52303715670436e-05,0 -Germany,2010,TropicalCereals,0,0.082837,0.0803533614656084,0.0124836385343916,0 -Ghana,2010,TropicalCereals,0.429155,0,0.000146708723747981,0.543425291276252,0 -Greece,2010,TropicalCereals,8.3e-05,0.00057,0.000412882952296048,0.000180117047703952,0 -Guatemala,2010,TropicalCereals,0.0277,0.034773,0.0003519147819063,0.0476930852180937,0 -Guinea,2010,TropicalCereals,0.2639,0.20104,0,0.2753,0 -Guinea-Bissau,2010,TropicalCereals,0.034507,0.001,0,0.041597,0 -Guyana,2010,TropicalCereals,0,3.9e-05,2.88971728594507e-05,1.01028271405493e-05,0 -Honduras,2010,TropicalCereals,0.056115,0.044464,0.000389140371298278,0.0634968596287017,0 -Hungary,2010,TropicalCereals,0.013898,0.015638,-0.007024,0.023164,0 -Iceland,2010,TropicalCereals,0,1e-06,7.40953150242326e-07,2.59046849757674e-07,0 -India,2010,TropicalCereals,19.579,0.346255,-0.28614,18.4912,0 -Indonesia,2010,TropicalCereals,0,0,0.00778741760904685,0.00272258239095315,0 -Iran (Islamic Republic of),2010,TropicalCereals,0.012,0.018811,0.00798451114701131,0.0124914888529887,0 -Iraq,2010,TropicalCereals,0.020204,0.050126,0.000173067954842501,0.0534979320451575,0 -Ireland,2010,TropicalCereals,0,0.00043,0.000368026128556076,6.19738714439239e-05,0 -Israel,2010,TropicalCereals,0.0065,0.079614,0.0590772198963011,0.0210197801036989,0 -Italy,2010,TropicalCereals,0.0407,0.27483,0.00479110953150242,0.274288890468498,0 -Jamaica,2010,TropicalCereals,0,0,1.48190630048465e-06,5.18093699515347e-07,0 -Japan,2010,TropicalCereals,0.000285,1.596336,1.44421772655293,0.160121273447071,0 -Jordan,2010,TropicalCereals,0.002,0.026062,0.00111223475589812,0.0257327652441019,0 -Kazakhstan,2010,TropicalCereals,0.0269,0.00808,-0.000329,0.01797,0 -Kenya,2010,TropicalCereals,0.324906,0.023079,-0.0271052117124394,0.222341211712439,0 -Kuwait,2010,TropicalCereals,0,0.001042,0.000772073182552504,0.000269926817447496,0 -Kyrgyzstan,2010,TropicalCereals,0.000115,0.000154,4.74210016155089e-05,0.000108578998384491,0 -Latvia,2010,TropicalCereals,0,6.6e-05,5.66041454149872e-05,9.39585458501283e-06,0 -Lebanon,2010,TropicalCereals,0.000228,0.002178,0.00199016497258098,0.000192835027419021,0 -Libya,2010,TropicalCereals,0.006,0.016532,0.000504250678181008,0.016537749321819,0 -Lithuania,2010,TropicalCereals,0,0.000514,0.000445187340830732,6.88126591692683e-05,0 -Malawi,2010,TropicalCereals,0.13639,0.003922,-0.000355,0.078428,0 -Malaysia,2010,TropicalCereals,0,0.005994,0.00461423014138407,0.00137976985861593,0 -Maldives,2010,TropicalCereals,4.5e-05,4.6e-05,8.81734248788368e-05,7.68265751211632e-05,0 -Mali,2010,TropicalCereals,2.682203,0.356923,-0.00027549302200931,2.46014849302201,0.2 -Malta,2010,TropicalCereals,0,3.4e-05,2.66363891393004e-05,7.3636108606996e-06,0 -Mauritania,2010,TropicalCereals,0.240965,0.014068,5.18667205169628e-05,0.097611133279483,0 -Mauritius,2010,TropicalCereals,0,0.000112,8.29867528271405e-05,2.90132471728595e-05,0 -Mexico,2010,TropicalCereals,1.770289,8.98537,2.03353635220286,7.16529464779714,0 -Mongolia,2010,TropicalCereals,0,0.005,0.00370476575121163,0.00129523424878837,0 -Morocco,2010,TropicalCereals,0.011557,0.030446,0.126424851794776,-0.0341918517947758,0 -Mozambique,2010,TropicalCereals,0.747145,0.011709,0.00154409065961044,0.35346290934039,0 -Myanmar,2010,TropicalCereals,0.420706,0.2601,0,0.395992,0 -Namibia,2010,TropicalCereals,0.28,0,0.000835214642770997,0.059291785357229,0 -Nepal,2010,TropicalCereals,0.268473,0,0.00820383327948304,0.296252166720517,0 -Netherlands,2010,TropicalCereals,0,0.02669,0.0222710800871937,0.00441891991280627,0 -New Caledonia,2010,TropicalCereals,6.7e-05,0.000449,0.000417772074271766,0.000123227925728234,0 -New Zealand,2010,TropicalCereals,0,0.044452,0.0399047803527731,0.00454721964722688,0 -Nicaragua,2010,TropicalCereals,0.03534375,0.046452,0.000184786097618296,0.0587952139023817,0 -Niger,2010,TropicalCereals,10.575342,0.742796,0.0563424231679548,4.48200557683205,0 -Nigeria,2010,TropicalCereals,9.32427,2.088661,0.0116805437864791,13.9126774562135,0 -Norway,2010,TropicalCereals,0,0.016954,0.0152517769057319,0.00170222309426807,0 -Pakistan,2010,TropicalCereals,0.777196,0.181306,0.0217579057344965,0.489651094265504,0 -Panama,2010,TropicalCereals,0.001324,0.004732,0.000179360233289063,0.00467763976671094,0 -Paraguay,2010,TropicalCereals,0.024988,0.140775,-0.00102551809369952,0.1495435180937,0 -Peru,2010,TropicalCereals,1.7e-05,0.033669,0.0309090592709497,0.00344594072905033,0 -Philippines,2010,TropicalCereals,6.8e-05,0.077505,0.0595534332353696,0.0179515667646304,0 -Poland,2010,TropicalCereals,0.011874,0.021956,0.00361712758835814,0.0193488724116419,0 -Portugal,2010,TropicalCereals,0,0.006127,0.00521409249836954,0.000955907501630461,0 -Republic of Korea,2010,TropicalCereals,0.002564,0.010729,0.0144314447014438,0.00763955529855617,0 -Republic of Moldova,2010,TropicalCereals,0.000754,0.000441,-2e-06,0.000479,0 -Romania,2010,TropicalCereals,0.013323,0.019725,-0.004226,0.024555,0 -Russian Federation,2010,TropicalCereals,0.1796,0.027,-0.00464266022578749,0.147868660225787,0 -Rwanda,2010,TropicalCereals,0.13928,0,0.0121556784500565,0.170059321549943,0 -Samoa,2010,TropicalCereals,0,0,0,0,0 -Saudi Arabia,2010,TropicalCereals,0.047347,0,0.00825644095315024,0.12287755904685,0 -Senegal,2010,TropicalCereals,1.207421,0.024,7.08158346454562e-05,0.864135184165355,0.2 -Serbia,2010,TropicalCereals,0.002518,0.006844,-1.11809369951535e-05,0.00704318093699515,0 -Sierra Leone,2010,TropicalCereals,0.05768,0.012289,0,0.069297,0 -Slovakia,2010,TropicalCereals,0.000937,0.00036,-0.000337380461626068,0.00122938046162607,0.000466 -Slovenia,2010,TropicalCereals,0.000199,0.000485,0.000151460738095615,0.000349539261904385,0 -South Africa,2010,TropicalCereals,0.100775,0.05182,0.00218001849757674,0.250138981502423,0 -Spain,2010,TropicalCereals,0.007674,0.761609,0.29600704329558,0.47092295670442,0.005 -Sri Lanka,2010,TropicalCereals,0.00668,0,0.0048278432414111,0.0086291567585889,0 -Sudan (former),2010,TropicalCereals,7.62888,0.113,0.439267650995836,3.93100634900416,0.085 -Suriname,2010,TropicalCereals,0,1.9e-05,1.40781098546042e-05,4.9218901453958e-06,0 -Swaziland,2010,TropicalCereals,9e-04,1e-05,7.40953150242326e-06,0.000372590468497577,0 -Sweden,2010,TropicalCereals,0,0.00018,5.54439418416801e-05,0.00012455605815832,0 -Switzerland,2010,TropicalCereals,3.4e-05,0.001431,0.00238847116292961,0.000842528837070389,0 -Syrian Arab Republic,2010,TropicalCereals,0.002782,0.004552,0.000943233360258481,0.00510176663974152,0 -Tajikistan,2010,TropicalCereals,9.03e-05,8.6e-05,0,9.7e-05,0 -Thailand,2010,TropicalCereals,0.028178,0.04566,-0.012001,0.059719,0 -The former Yugoslav Republic of Macedonia,2010,TropicalCereals,6e-05,2.6e-05,7.40953150242326e-06,8.25904684975767e-05,0 -Togo,2010,TropicalCereals,0.297371,0.055,6.03935050752478e-05,0.295945606494925,0 -Trinidad and Tobago,2010,TropicalCereals,0,0.000108,8.22078754074749e-05,2.57921245925251e-05,0 -Tunisia,2010,TropicalCereals,0.002092,0,0.00518917401603273,0.00148082598396727,0 -Turkey,2010,TropicalCereals,0.002964,0.0085,0.00152400642371118,0.00750099357628882,0 -Turkmenistan,2010,TropicalCereals,0,0,0,0,0 -Uganda,2010,TropicalCereals,0.522,0.066456,-0.002598,0.658751,0 -Ukraine,2010,TropicalCereals,0.114,0.069703,-0.072669,0.2185,0 -United Arab Emirates,2010,TropicalCereals,0.001457,0.148784,0.0185423370409147,0.130241662959085,0 -United Kingdom,2010,TropicalCereals,0,0.021003,0.0170453690028874,0.00395763099711256,0 -United Republic of Tanzania,2010,TropicalCereals,0.964225,0.023009,-0.000624145947539203,1.14944914594754,0 -United States of America,2010,TropicalCereals,2.09467,3.378979,-3.921836,9.675454,0 -Uruguay,2010,TropicalCereals,0.0353,0.138263,0.00783023103838713,0.138867768961613,0 -Uzbekistan,2010,TropicalCereals,0.0057,0.025493,0,0.026,0 -Vanuatu,2010,TropicalCereals,0,0,9.01395598138027e-07,9.86044018619731e-08,1e-06 -Venezuela (Bolivarian Republic of),2010,TropicalCereals,0.233736,0.375218,0.000835751260631053,0.459164248739369,0 -Viet Nam,2010,TropicalCereals,0.001644,0.001768,0,0.001801,0 -Yemen,2010,TropicalCereals,0.677886,0,0.0086332912503493,0.541156708749651,0 -Zambia,2010,TropicalCereals,0.079714,0.00336,5.40837358882816e-06,0.0757295916264112,0 -Zimbabwe,2010,TropicalCereals,0.510497,0.002,0.0271034224706207,0.152639577529379,0 +Afghanistan,2010,MaizeMilletSorghum,0.188,0.178,-4.5e-05,0.316,0 +Albania,2010,MaizeMilletSorghum,0.0542,0.4,0.0710917273223192,0.361659272677681,0.003245 +Algeria,2010,MaizeMilletSorghum,0.000174,1.750393,2.63514647869574,-0.0120564786957405,0 +Angola,2010,MaizeMilletSorghum,1.684196,0.132216,0.179745748375677,1.04759725162432,0 +Antigua and Barbuda,2010,MaizeMilletSorghum,4e-05,1e-04,0.000229101255540477,0.000140898744459523,0 +Argentina,2010,MaizeMilletSorghum,3.660066,4.291609,-19.495512,26.311039,1.052948 +Armenia,2010,MaizeMilletSorghum,0.002729,0.057059,0.0494583790865745,0.0125676209134255,0 +Australia,2010,MaizeMilletSorghum,0.613,2.236787,-0.0531618550169409,2.46971985501694,0.008862 +Austria,2010,MaizeMilletSorghum,0.205267,1.280156,0.310407643499065,1.76907635650094,0.114319 +Azerbaijan,2010,MaizeMilletSorghum,0.029959,0.115544,0.0699243279824317,0.161793672017568,0.004002 +Bahamas,2010,MaizeMilletSorghum,9e-05,0.000761,0.00139190284371599,0.000672097156284009,1.2e-05 +Bangladesh,2010,MaizeMilletSorghum,0.188076,1.400013,0.716420727506504,0.896189272493496,0.011466 +Barbados,2010,MaizeMilletSorghum,9e-05,0.032751,0.0374874295299598,0.000118570470040187,0.000229 +Belarus,2010,MaizeMilletSorghum,0.111668,0.570616,0.0761616631837043,0.550515336816296,0 +Belgium,2010,MaizeMilletSorghum,0.062906,0.672577,0.718072159139609,0.702113840860391,0.691202 +Belize,2010,MaizeMilletSorghum,0.027654,0.0431,-0.0112313665056447,0.0692103665056447,2.6e-05 +Benin,2010,MaizeMilletSorghum,1.062135,0.308,-0.0263835916264112,1.18764659162641,0 +Bermuda,2010,MaizeMilletSorghum,0,0,0,0,0 +Bolivia (Plurinational State of),2010,MaizeMilletSorghum,0.401324,0.59,0.0304455460130207,1.35719445398698,0.333656 +Bosnia and Herzegovina,2010,MaizeMilletSorghum,0.188752,0.291089,0.170798914459392,0.852564085540608,0.240237 +Botswana,2010,MaizeMilletSorghum,0.132339,0.0025,0.0632244578109018,0.0845485421890982,0 +Brazil,2010,MaizeMilletSorghum,13.340055,35.658351,-10.4175150518218,56.8970000518218,0 +Brunei Darussalam,2010,MaizeMilletSorghum,0,0,0.00371226867041181,0.000858731329588189,0 +Bulgaria,2010,MaizeMilletSorghum,0.335,0.645072,-0.596958338325683,2.06171033832568,0.243435 +Burkina Faso,2010,MaizeMilletSorghum,4.135278,0,-0.03097,3.891574,1e-06 +Cabo Verde,2010,MaizeMilletSorghum,0.032028,0.007,0.0219274017473873,0.00472159825261274,4e-06 +Cambodia,2010,MaizeMilletSorghum,0.330322,0.23218,-0.217653217124394,0.743301217124394,0 +Cameroon,2010,MaizeMilletSorghum,1.66363,0.725,0.0360934960483068,2.70068350395169,0.000666 +Canada,2010,MaizeMilletSorghum,1.2029,9.939126,0.755588786616323,11.7134022133837,0.25619 +Central African Republic,2010,MaizeMilletSorghum,0.155333,0.001,0.0139701524376283,0.224932847562372,0 +Chad,2010,MaizeMilletSorghum,2.065,0.041386,0.0629723804917278,1.35575661950827,0 +Chile,2010,MaizeMilletSorghum,0.122547,2.025829,1.14862135642842,1.41695364357158,0.157044 +China,2010,MaizeMilletSorghum,33.876283,121.642042,6.0950981748794,173.168088825121,30.303443 +Colombia,2010,MaizeMilletSorghum,0.5395777,3.967276,3.76033619851904,1.62823580148096,0 +Congo,2010,MaizeMilletSorghum,0.026125,0.010551,0.00497580227511555,0.0209881977248845,1.2e-05 +Costa Rica,2010,MaizeMilletSorghum,0.009598,0.570763,0.650158337576963,0.0158386624230367,0.012859 +Cote d'Ivoire,2010,MaizeMilletSorghum,0.454445,0.074325,0.0280061887777299,0.73800381122227,0.005004 +Croatia,2010,MaizeMilletSorghum,0.297308,1.750724,-0.136328111157088,2.06922511115709,0 +Cuba,2010,MaizeMilletSorghum,0.225736,0.816326,0.790160923011575,0.320888076988425,0.000506 +Cyprus,2010,MaizeMilletSorghum,0,0.15135,0.183309090763585,-0.0296270907635851,0.000796 +Czech Republic,2010,MaizeMilletSorghum,0.1069,0.525113,-0.207079564626981,0.804410564626981,0 +Democratic People's Republic of Korea,2010,MaizeMilletSorghum,0.58705,0.124872,0.109833955430296,2.0264000445697,0.272819 +Denmark,2010,MaizeMilletSorghum,0,0.03887,0.0843798785150421,-0.00166987851504212,0.017369 +Djibouti,2010,MaizeMilletSorghum,9e-06,0,0.0011016338392611,1.33661607389008e-05,0 +Dominica,2010,MaizeMilletSorghum,0.00012,2.1e-05,0.000198956353495678,0.000169043646504322,1.2e-05 +Dominican Republic,2010,MaizeMilletSorghum,0.02292051,0.991317,1.09479510491468,0.0128028950853236,0.013998 +Ecuador,2010,MaizeMilletSorghum,0.369839,0.738565,0.514575402197865,0.998388597802135,0.603415 +Egypt,2010,MaizeMilletSorghum,1.108676,7.320773,6.2477721214792,7.7131658785208,0.184637 +El Salvador,2010,MaizeMilletSorghum,0.350406,0.653417,0.382507248450484,0.932392751549516,0.00666 +Estonia,2010,MaizeMilletSorghum,0,0.009056,0.0187608274593906,-8.38274593905657e-05,0.000334 +Ethiopia,2010,MaizeMilletSorghum,4.269024,0.35,0.293733674814446,8.26338232518555,1.1 +Fiji,2010,MaizeMilletSorghum,0.000465,0.006513,0.00392264602023902,0.00421335397976098,0 +Finland,2010,MaizeMilletSorghum,0,0.00139,0.00477671924491539,-1.17192449153946e-05,0 +France,2010,MaizeMilletSorghum,1.646261,6.003712,-6.413759,15.048472,0.502084 +French Polynesia,2010,MaizeMilletSorghum,0,0.004192,0.00447292503200892,-1.99250320089215e-05,0.00026 +Gabon,2010,MaizeMilletSorghum,0.025,0.015079,0.00523943913030204,0.037472560869698,0 +Gambia,2010,MaizeMilletSorghum,0.2332,0.021701,0.00212320593402205,0.215009794065978,2e-06 +Georgia,2010,MaizeMilletSorghum,0.0998,0.046155,0.00560924806208601,0.141108751937914,0.001736 +Germany,2010,MaizeMilletSorghum,0.4636,3.655121,1.39059951918269,3.91216248081731,0.004258 +Ghana,2010,MaizeMilletSorghum,1.420824,0.842692,-0.00693229127625202,2.41511929127625,0.000621 +Greece,2010,MaizeMilletSorghum,0.151633,1.748649,0.37221206613231,1.71685193386769,0.154666 +Grenada,2010,MaizeMilletSorghum,0.000381,0.000737,0.000985738296864949,0.000323261703135052,3.7e-05 +Guatemala,2010,MaizeMilletSorghum,0.849081,1.037773,0.680665078619149,1.67842692138085,0 +Guinea,2010,MaizeMilletSorghum,0.7489,0.547922,0.00220359233947485,0.855389407660525,6.1e-05 +Guinea-Bissau,2010,MaizeMilletSorghum,0.05235,0.0015,0.00084305242718623,0.0639059475728138,0 +Guyana,2010,MaizeMilletSorghum,0.00329,0.023918,0.0310691028083896,-0.00452410280838965,0.00026 +Haiti,2010,MaizeMilletSorghum,0.581678,0.10581,0.0408543809112488,0.455602619088751,6.9e-05 +Honduras,2010,MaizeMilletSorghum,0.525938,0.279464,0.389582936861229,0.570567063138771,0 +Hungary,2010,MaizeMilletSorghum,1.092723,2.65667,-3.89211,7.300404,0 +Iceland,2010,MaizeMilletSorghum,0,0.017263,0.0231610691941698,-0.00011106919416981,0.001562 +India,2010,MaizeMilletSorghum,28.1322,6.846255,-2.652848,38.217,0.018391 +Indonesia,2010,MaizeMilletSorghum,4.131676,5,1.78867186333063,17.9541511366694,5.298042 +Iran (Islamic Republic of),2010,MaizeMilletSorghum,0.252209,7.29026,5.821817739723,2.129783260277,0 +Iraq,2010,MaizeMilletSorghum,0.133279,0.296179,0.00302678534841687,0.320183214651583,0 +Ireland,2010,MaizeMilletSorghum,0,0.302252,0.351862608121261,-0.00162660812126073,0.006019 +Israel,2010,MaizeMilletSorghum,0.00946,1.059614,1.2369591223948,0.101894877605198,0.132209 +Italy,2010,MaizeMilletSorghum,0.967476,9.64483,1.94315352836519,8.89757147163481,0.43578 +Jamaica,2010,MaizeMilletSorghum,0.002017,0.182157,0.212027660098535,0.00134333990146489,0.001147 +Japan,2010,MaizeMilletSorghum,0.000353,13.453336,17.7190092201403,-0.611712220140335,0.080964 +Jordan,2010,MaizeMilletSorghum,0.003496,0.523444,0.536929829961667,0.0521631700383334,0.006514 +Kazakhstan,2010,MaizeMilletSorghum,0.1225,0.37808,-0.003112,0.48397,0.028633 +Kenya,2010,MaizeMilletSorghum,2.333252,0.118079,0.215485887493086,3.43571711250691,0.002179 +Kiribati,2010,MaizeMilletSorghum,0,1e-06,1.00483006815999e-06,-4.83006815998821e-09,0 +Kuwait,2010,MaizeMilletSorghum,0.0009278,0.105152,0.106677143046343,0.0177818569536574,0.000933 +Kyrgyzstan,2010,MaizeMilletSorghum,0.072829,0.29903,0.00077290831082702,0.440983091689173,0.002072 +Lao People's Democratic Republic,2010,MaizeMilletSorghum,0.212745,0.39,-0.225128,1.020875,0.29 +Latvia,2010,MaizeMilletSorghum,0,0.004645,0.00844794004461905,-3.09400446190484e-05,0 +Lebanon,2010,MaizeMilletSorghum,0.001873,0.358898,0.370210143449809,0.00292385655019134,0.006136 +Lesotho,2010,MaizeMilletSorghum,0.174486,0.006,0.259965390457648,0.151079609542352,0 +Liberia,2010,MaizeMilletSorghum,0,0.00066,0.000771709492346871,-3.709492346871e-06,0 +Libya,2010,MaizeMilletSorghum,0.007523,0.62825,0.652693225737694,0.016301774262306,0 +Lithuania,2010,MaizeMilletSorghum,0.0071,0.040338,0.0234648393723079,0.0474581606276921,0 +Madagascar,2010,MaizeMilletSorghum,0.295878,0.018868,0.010988063573011,0.413318936426989,0.000476 +Malawi,2010,MaizeMilletSorghum,1.83266,0.553922,0.00558254087275737,2.99780745912724,0.000351 +Malaysia,2010,MaizeMilletSorghum,0.0086,2.867266,3.25703111265048,0.033346887349525,0.026856 +Maldives,2010,MaizeMilletSorghum,7.2e-05,4.6e-05,0.000194685412103796,0.000193314587896204,0 +Mali,2010,MaizeMilletSorghum,3.186503,0.637734,0.00266966390776762,3.79371033609223,0.652353 +Malta,2010,MaizeMilletSorghum,0,0.04389,0.055614840589818,-0.000259840589818009,0.007286 +Mauritania,2010,MaizeMilletSorghum,0.264139,0.01512,0.00348034691307884,0.117504653086921,0 +Mauritius,2010,MaizeMilletSorghum,4.8e-05,0.077471,0.0821565018900668,-3.750189006682e-05,0.000601 +Mexico,2010,MaizeMilletSorghum,8.918334,20.76385,9.30384363416491,31.2422283658351,0.026494 +Mongolia,2010,MaizeMilletSorghum,0,0.005,0.00474376004168906,0.00129023995831094,3.4e-05 +Morocco,2010,MaizeMilletSorghum,0.241657,0.630446,2.03748503284649,-0.0142280328464853,0.01974 +Mozambique,2010,MaizeMilletSorghum,2.485187,0.461709,0.0898405184089649,2.29292848159104,0 +Myanmar,2010,MaizeMilletSorghum,0.809779,1.0801,-0.044538,1.492119,0.000338 +Namibia,2010,MaizeMilletSorghum,0.312,0.011033,0.00111958155206027,0.16929041844794,0 +Nepal,2010,MaizeMilletSorghum,1.144133,0.399435,0.152899363094521,2.03574063690548,0 +Netherlands,2010,MaizeMilletSorghum,0.016733,2.22669,2.78184895906586,0.188056040934145,0.440297 +Netherlands Antilles,2010,MaizeMilletSorghum,0,8.5e-05,0.000301449020447996,-1.44902044799647e-06,0 +New Caledonia,2010,MaizeMilletSorghum,0.000917,0.005561,0.00248571235454502,0.00344928764545498,3.1e-05 +New Zealand,2010,MaizeMilletSorghum,0.017548,0.164452,0.0303197803527731,0.193359219647227,0.038276 +Nicaragua,2010,MaizeMilletSorghum,0.37653745,0.075352,0.136905984491739,0.525112015508261,0.046415 +Niger,2010,MaizeMilletSorghum,10.58774,0.742796,0.106830109942653,4.47814489005735,4e-06 +Nigeria,2010,MaizeMilletSorghum,13.47358,4.436881,0.0549404878809029,21.7393205121191,0.034624 +Norway,2010,MaizeMilletSorghum,0,0.117976,0.122257135694157,0.00118686430584277,0.000174 +Occupied Palestinian Territory,2010,MaizeMilletSorghum,0.000285,0.028961,0.0331593922492796,-9.39224927961186e-06,0 +Pakistan,2010,MaizeMilletSorghum,1.751376,0.922306,-0.270004094265504,4.1965610942655,0.238641 +Panama,2010,MaizeMilletSorghum,0.058287,0.399239,0.395841247871966,0.105254752128034,0.010591 +Paraguay,2010,MaizeMilletSorghum,0.819022,0.272137,-1.0761915180937,2.0583645180937,0.005416 +Peru,2010,MaizeMilletSorghum,0.497193,2.795978,1.94902917638155,1.53542082361845,0 +Philippines,2010,MaizeMilletSorghum,2.499108,2.835505,0.204344421906883,6.04405057809312,0.748706 +Poland,2010,MaizeMilletSorghum,0.310574,2.147956,0.181651914234877,2.19668808576512,0.032728 +Portugal,2010,MaizeMilletSorghum,0.090371,1.793729,1.43030026904532,0.620327730954682,0.028325 +Republic of Korea,2010,MaizeMilletSorghum,0.018092,6.079481,8.49646129619749,0.0412067038025098,0.10512 +Republic of Moldova,2010,MaizeMilletSorghum,0.411831,0.703625,-0.045932,1.170329,0.001303 +Romania,2010,MaizeMilletSorghum,2.107572,6.353937,-1.649075,9.066586,0.001088 +Russian Federation,2010,MaizeMilletSorghum,1.2048,4.621,-0.146199660225787,6.23221966022579,0.004307 +Rwanda,2010,MaizeMilletSorghum,0.323938,0,0.1442717406418,0.2518282593582,1.1e-05 +Saint Kitts and Nevis,2010,MaizeMilletSorghum,0,5.3e-05,0.000107516817293119,-5.16817293118734e-07,1.9e-05 +Saint Lucia,2010,MaizeMilletSorghum,0,0,0.000385854746173436,0.000499145253826564,0.000284 +Saint Vincent and the Grenadines,2010,MaizeMilletSorghum,3.1e-05,0.002716,0.00389170685398363,0.000562293146016366,0.000159 +Samoa,2010,MaizeMilletSorghum,0,0,0,0,0 +Sao Tome and Principe,2010,MaizeMilletSorghum,0.0012,0.000365,0.000650125054099512,0.00359587494590049,0 +Saudi Arabia,2010,MaizeMilletSorghum,0.062298,1.274722,1.94529348892693,0.192950511073068,0 +Senegal,2010,MaizeMilletSorghum,1.328656,0.034,0.111127649457892,1.10893635054211,0.201919 +Serbia,2010,MaizeMilletSorghum,1.228831,4.742367,-1.677399180937,7.224718180937,0.006438 +Sierra Leone,2010,MaizeMilletSorghum,0.09312,0.022289,0.00106210538204511,0.110679894617955,0 +Slovakia,2010,MaizeMilletSorghum,0.174437,0.810729,-0.0726593804616261,1.25774638046163,0.091414 +Slovenia,2010,MaizeMilletSorghum,0.036632,0.261912,0.0988810390851552,0.310992960914845,0 +Solomon Islands,2010,MaizeMilletSorghum,0,0,1.40676209542398e-05,-6.76209542398354e-08,0 +Somalia,2010,MaizeMilletSorghum,0.561129,0,0.0913443694314218,0.347258630568578,0 +South Africa,2010,MaizeMilletSorghum,2.842775,4.33982,-1.41154398150242,11.8651389815024,0.25 +Spain,2010,MaizeMilletSorghum,0.322664,7.261609,4.10300672253333,4.54909027746667,1.235468 +Sri Lanka,2010,MaizeMilletSorghum,0.0643,0.0876,0.0224274418852333,0.170233558114767,0.006013 +Sudan (former),2010,MaizeMilletSorghum,7.65534,0.213,0.555433040685607,3.97669895931439,0.085 +Suriname,2010,MaizeMilletSorghum,1.5e-05,0.016239,0.0175433386489056,-4.53386489055967e-05,8.5e-05 +Swaziland,2010,MaizeMilletSorghum,0.0559,0.03361,0.105200054876967,0.0678679451230329,0.021851 +Sweden,2010,MaizeMilletSorghum,0,0.016215,0.0403179799429442,-6.79799429442497e-05,0.013944 +Switzerland,2010,MaizeMilletSorghum,0.015242,0.23538,0.114893264914395,0.143803735085605,0.003097 +Syrian Arab Republic,2010,MaizeMilletSorghum,0.0407,1.833669,1.90486007745742,0.129048922542581,0 +Tajikistan,2010,MaizeMilletSorghum,0.0126243,0.090215,0,0.151158,0 +Thailand,2010,MaizeMilletSorghum,1.191076,3.895849,-0.06644,4.920464,0 +The former Yugoslav Republic of Macedonia,2010,MaizeMilletSorghum,0.02954,0.130026,0.0564698158914803,0.13181718410852,0 +Timor-Leste,2010,MaizeMilletSorghum,0.07025486,0.014971,0.00082396065589119,0.111886039344109,0 +Togo,2010,MaizeMilletSorghum,0.831943,0.12,-0.00224760649492475,0.934074606494925,0 +Trinidad and Tobago,2010,MaizeMilletSorghum,0.001305,0.043719,0.0568973095893095,0.00293969041069047,0.001388 +Tunisia,2010,MaizeMilletSorghum,0.002092,0.889276,0.909132293672622,-0.00286429367262184,0.010322 +Turkey,2010,MaizeMilletSorghum,0.596516,2.6275,0.361415953296029,4.31577104670397,0.380989 +Turkmenistan,2010,MaizeMilletSorghum,0.0161,0.01566,5.02415034079994e-06,0.0169999758496592,0 +Uganda,2010,MaizeMilletSorghum,1.554,0.303952,-0.188407,3.032252,0.000688 +Ukraine,2010,MaizeMilletSorghum,2.7616,7.3456,-2.977356,12.1715,0.006504 +United Arab Emirates,2010,MaizeMilletSorghum,0.0017386,0.479826,0.365103203398954,0.133801796601046,0.013145 +United Kingdom,2010,MaizeMilletSorghum,0,0.031003,1.08008725267152,-0.0156272526715201,0.163786 +United Republic of Tanzania,2010,MaizeMilletSorghum,4.014935,0.873009,0.0154008839794763,5.13244211602052,0.008227 +United States of America,2010,MaizeMilletSorghum,35.05505,125.281075,-54.900846,345.311478,136.709871 +Uruguay,2010,MaizeMilletSorghum,0.1313,0.488263,0.0843068426959757,0.567600157304024,0.008361 +Uzbekistan,2010,MaizeMilletSorghum,0.0387,0.114577,0.00322048036845276,0.257584519631547,0.003155 +Vanuatu,2010,MaizeMilletSorghum,0.00133,0.000736,0.000140572775072376,0.000713427224927624,1e-06 +Venezuela (Bolivarian Republic of),2010,MaizeMilletSorghum,0.883736,1.913352,1.82220379559831,1.99574520440169,0.001671 +Viet Nam,2010,MaizeMilletSorghum,1.12803482,5.001768,1.66708744050246,4.60058755949754,0 +Yemen,2010,MaizeMilletSorghum,0.731088,0.123874,0.392264348482947,0.628766651517053,0 +Zambia,2010,MaizeMilletSorghum,1.16027,0.05836,-0.0624055916264112,1.82121259162641,0.000167 +Zimbabwe,2010,MaizeMilletSorghum,1.87306,0.052,0.325509817472229,1.45360418252777,0 Afghanistan,2010,Oilcrops + (Total),0.085692,0.001643,0.0191461945956032,0.069349,0 Albania,2010,Oilcrops + (Total),0.04504,0.026216,0.0612976070855799,0.0736702430240444,0.022936 Algeria,2010,Oilcrops + (Total),0.313882,0.977532,1.54732748852745,0.352788128831308,0.001166 @@ -1013,15 +863,6 @@ Viet Nam,2010,Rice (Paddy Equivalent),7.4894,3.580293,-10.685235,40.703282,1.715 Yemen,2010,Rice (Paddy Equivalent),0,0,0.600059284053182,-0.106059284053182,0 Zambia,2010,Rice (Paddy Equivalent),0.030788,0,0.0190629014075528,0.0497100985924472,0.000749 Zimbabwe,2010,Rice (Paddy Equivalent),0.000288,0,0.1627853277476,-0.0455373277475998,0 -Belize,2010,TropicalCereals,0.005754,0.0099,2.16334943553126e-05,0.0111623665056447,0 -Djibouti,2010,TropicalCereals,0,0,4.95767578975915e-05,5.42324210240852e-06,0 -Dominican Republic,2010,TropicalCereals,0.00067906,0.001317,3.60558239255211e-06,0.00140739441760745,0 -Haiti,2010,TropicalCereals,0.166678,0.08581,0,0.1458,0 -Lesotho,2010,TropicalCereals,0.033146,0.001,0.00252390767478648,0.0241060923252135,0 -Madagascar,2010,TropicalCereals,0.002565,0,0.00237968437908439,0.00144531562091561,0 -Occupied Palestinian Territory,2010,TropicalCereals,0.000285,0.000126,0,0.00015,0 -Solomon Islands,2010,TropicalCereals,0,0,0,0,0 -Somalia,2010,TropicalCereals,0.36,0,0.01279981749356,0.21500918250644,0 Afghanistan,2010,Starchy Roots + (Total),0.0205,0,-0.02607,0.246,0 Albania,2010,Starchy Roots + (Total),0.009,0.068978,0.0311237757498875,0.212135224250112,0.00328 Algeria,2010,Starchy Roots + (Total),0.121996,0,0.12810895302139,3.31733304697861,0.015747 diff --git a/src/ac/ed/lurg/country/gams/GamsLocationOptimiser.java b/src/ac/ed/lurg/country/gams/GamsLocationOptimiser.java index a099c652..7b7d24d8 100644 --- a/src/ac/ed/lurg/country/gams/GamsLocationOptimiser.java +++ b/src/ac/ed/lurg/country/gams/GamsLocationOptimiser.java @@ -80,10 +80,10 @@ public class GamsLocationOptimiser { } private void setupInDB(GAMSDatabase inDB) { - if (DEBUG) LogWriter.println("\nLocation set"); + //if (DEBUG) LogWriter.println("\nLocation set"); GAMSSet locationSet = inDB.addSet("location", 1); for (Integer locId : inputData.getPreviousAreas().keySet()) { - if (DEBUG) LogWriter.println(" " + locId); + //if (DEBUG) LogWriter.println(" " + locId); locationSet.addRecord(locId.toString()); } diff --git a/src/ac/ed/lurg/country/gams/GamsLocationTest.java b/src/ac/ed/lurg/country/gams/GamsLocationTest.java index 67e2b48e..74e8e5f7 100644 --- a/src/ac/ed/lurg/country/gams/GamsLocationTest.java +++ b/src/ac/ed/lurg/country/gams/GamsLocationTest.java @@ -98,7 +98,6 @@ public class GamsLocationTest { dummyMap.setCropFraction(CropType.WHEAT, 0.2); dummyMap.setCropFraction(CropType.MAIZE, 0.2); dummyMap.setCropFraction(CropType.RICE, 0.1); - dummyMap.setCropFraction(CropType.TROPICAL_CEREALS, 0.1); dummyMap.setCropFraction(CropType.OILCROPS, 0.1); dummyMap.setCropFraction(CropType.PULSES, 0.1); dummyMap.setCropFraction(CropType.STARCHY_ROOTS, 0.1); @@ -115,7 +114,6 @@ public class GamsLocationTest { dummyMap.put(CropType.WHEAT, 0.4); dummyMap.put(CropType.MAIZE, 0.4); dummyMap.put(CropType.RICE, 1.0); - dummyMap.put(CropType.TROPICAL_CEREALS, 2.0); dummyMap.put(CropType.OILCROPS, 10.0); dummyMap.put(CropType.PULSES, 20.0); dummyMap.put(CropType.STARCHY_ROOTS, 5.0); @@ -128,7 +126,6 @@ public class GamsLocationTest { dummyMap.put(CropType.WHEAT, 24.0); dummyMap.put(CropType.MAIZE, 5.0); dummyMap.put(CropType.OILCROPS, 5.0); - dummyMap.put(CropType.TROPICAL_CEREALS, 2.0); dummyMap.put(CropType.OILCROPS, 10.0); dummyMap.put(CropType.PULSES, 20.0); dummyMap.put(CropType.STARCHY_ROOTS, 5.0); diff --git a/src/ac/ed/lurg/country/gams/GamsRasterOptimiser.java b/src/ac/ed/lurg/country/gams/GamsRasterOptimiser.java index aa4369e4..a9211c71 100644 --- a/src/ac/ed/lurg/country/gams/GamsRasterOptimiser.java +++ b/src/ac/ed/lurg/country/gams/GamsRasterOptimiser.java @@ -15,7 +15,7 @@ import ac.ed.lurg.landuse.IrrigationCostItem; import ac.ed.lurg.types.CropType; import ac.ed.lurg.types.LandCoverType; import ac.ed.lurg.types.YieldType; -import ac.ed.lurg.utils.LazyHashMap; +import ac.ed.lurg.utils.LazyTreeMap; import ac.ed.lurg.utils.LogWriter; import ac.ed.lurg.yield.AveragingYieldResponsesItem; import ac.ed.lurg.yield.YieldRaster; @@ -28,7 +28,7 @@ public class GamsRasterOptimiser { public static final boolean DEBUG = false; private GamsRasterInput rasterInputData; - private LazyHashMap<Integer, Set<RasterKey>> mapping; + private LazyTreeMap<Integer, Set<RasterKey>> mapping; public GamsRasterOptimiser(GamsRasterInput rasterInputData) { this.rasterInputData = rasterInputData; @@ -265,16 +265,16 @@ public class GamsRasterOptimiser { if (DEBUG) LogWriter.println("Making " + numCerealCats * numPastureCats + " categories"); - LazyHashMap<Integer, AveragingYieldResponsesItem> aggregatedYields = new LazyHashMap<Integer, AveragingYieldResponsesItem>() { + LazyTreeMap<Integer, AveragingYieldResponsesItem> aggregatedYields = new LazyTreeMap<Integer, AveragingYieldResponsesItem>() { protected AveragingYieldResponsesItem createValue() { return new AveragingYieldResponsesItem(); } }; - LazyHashMap<Integer, AreasItem> aggregatedAreas = new LazyHashMap<Integer, AreasItem>() { + LazyTreeMap<Integer, AreasItem> aggregatedAreas = new LazyTreeMap<Integer, AreasItem>() { protected AreasItem createValue() { return new AreasItem(); } }; - LazyHashMap<Integer, IrrigationCostItem> aggregatedIrrigCosts = new LazyHashMap<Integer, IrrigationCostItem>() { + LazyTreeMap<Integer, IrrigationCostItem> aggregatedIrrigCosts = new LazyTreeMap<Integer, IrrigationCostItem>() { protected IrrigationCostItem createValue() { return new IrrigationCostItem(); } }; - mapping = new LazyHashMap<Integer, Set<RasterKey>>() { + mapping = new LazyTreeMap<Integer, Set<RasterKey>>() { protected Set<RasterKey> createValue() { return new HashSet<RasterKey>(); } }; @@ -302,8 +302,8 @@ public class GamsRasterOptimiser { IrrigationCostItem irrigCost = irrigCostRaster.get(key); - int cerealCat = findCategory(wheatlDivisions, yresp.getYieldMax(CropType.WHEAT)); - int pastureCat = findCategory(pastureDivisions, yresp.getYieldMax(CropType.PASTURE)); + int cerealCat = findCategory(wheatlDivisions, yresp.getYieldNone(CropType.WHEAT) + yresp.getYieldMax(CropType.WHEAT)); + int pastureCat = findCategory(pastureDivisions, yresp.getYieldNone(CropType.PASTURE) + yresp.getYieldMax(CropType.PASTURE)); Integer id = cerealCat + pastureCat * numCerealCats; AveragingYieldResponsesItem avgYResp = aggregatedYields.lazyGet(id); @@ -346,8 +346,16 @@ public class GamsRasterOptimiser { for (Map.Entry<Integer, Set<RasterKey>> e : mapping.entrySet()) { LogWriter.println(e.getKey() + " category has " + e.getValue().size() + " raster areas"); - if (DEBUG) for (RasterKey key : e.getValue()) { - LogWriter.println(String.format("\t%s: yields pasture=%.1f, cereal=%.1f", key, yieldRaster.get(key).getYieldMax(CropType.PASTURE), yieldRaster.get(key).getYieldMax(CropType.WHEAT))); + + CropType[] cs = {CropType.WHEAT, CropType.MAIZE}; + for (CropType c : cs) { + for (RasterKey key : e.getValue()) { + YieldResponsesItem yri = yieldRaster.get(key); + LogWriter.println(String.format("\t%s: x=%.1f y=%.1f: %s yields (none,fmid,fmax,irrig,both) %.1f, %.1f, %.1f, %.1f, %.1f", + key, yieldRaster.getXCoordin(key), yieldRaster.getYCoordin(key), c.getGamsName(), + yri.getYieldNone(c), yri.getYieldMidFertOnly(c), yri.getYieldFertOnly(c), yri.getYieldIrrigOnly(c), yri.getYieldMax(c))); + } + LogWriter.println(""); } } @@ -374,7 +382,7 @@ public class GamsRasterOptimiser { if (DEBUG) LogWriter.println("GamsRasterOptimiser: Can't get value for crop " + crop); } else { - double d = yresp.getYieldMax(crop); + double d = yresp.getYieldNone(crop) + yresp.getYieldMax(crop) ; //LogWriter.println("GamsRasterOptimiser: Got value for crop " + crop + " of " + d); if (Double.isNaN(d) || d == 0.0) { diff --git a/src/ac/ed/lurg/types/CropType.java b/src/ac/ed/lurg/types/CropType.java index efe7556f..0c5cd924 100644 --- a/src/ac/ed/lurg/types/CropType.java +++ b/src/ac/ed/lurg/types/CropType.java @@ -11,9 +11,9 @@ import ac.ed.lurg.utils.LogWriter; public enum CropType { WHEAT("WheatBarleyOats", "wheat"), - MAIZE("Maize and products", "maize"), + MAIZE("MaizeMilletSorghum", "maize"), RICE("Rice (Paddy Equivalent)", "rice"), - TROPICAL_CEREALS("TropicalCereals", "tropicalCereals"), +// TROPICAL_CEREALS("TropicalCereals", "tropicalCereals"), OILCROPS("Oilcrops + (Total)", "oilcrops"), // SOYBEAN("Soyabeans", "soybean"), PULSES("Pulses + (Total)", "pulses"), diff --git a/src/ac/ed/lurg/utils/LazyTreeMap.java b/src/ac/ed/lurg/utils/LazyTreeMap.java new file mode 100644 index 00000000..6a40ba66 --- /dev/null +++ b/src/ac/ed/lurg/utils/LazyTreeMap.java @@ -0,0 +1,23 @@ +package ac.ed.lurg.utils; + +import java.util.TreeMap; + +public abstract class LazyTreeMap <K,V> extends TreeMap<K,V> { + + private static final long serialVersionUID = -4392188954477560133L; + + public LazyTreeMap() { + super(); + } + + public V lazyGet(K key) { + V value = get(key); + if (value == null) { + value = createValue(); + put(key, value); + } + return value; + } + + protected abstract V createValue(); +} diff --git a/src/ac/ed/lurg/yield/LPJYieldResponseMapReader.java b/src/ac/ed/lurg/yield/LPJYieldResponseMapReader.java index 74c14780..f00d2ace 100644 --- a/src/ac/ed/lurg/yield/LPJYieldResponseMapReader.java +++ b/src/ac/ed/lurg/yield/LPJYieldResponseMapReader.java @@ -72,7 +72,7 @@ public class LPJYieldResponseMapReader extends AbstractTabularRasterReader<Yield } else { // TeWWhi TeWWme TeWWlo TeSWhi TeSWme TeSWlo TeCohi TeCome TeColo TrRihi TrRime TrRilo - double adjFactor = 10; // 10 for kg/m2 to t/ha + double adjFactor; boolean isSpringWheat = (getValueForCol(rowValues, "teSWhi") > getValueForCol(rowValues, "TeWWhi")); item.setIsSpringWheat(isSpringWheat); @@ -81,9 +81,11 @@ public class LPJYieldResponseMapReader extends AbstractTabularRasterReader<Yield for (IrrigationRate irrig : IrrigationRate.values()) { YieldType yieldType = YieldType.getYieldType(fert, irrig); - if (fert.equals(FertiliserRate.NO_FERT)) - adjFactor *= 0.5; - + // if (!fert.equals(FertiliserRate.NO_FERT)) + adjFactor = 10; // 10 for kg/m2 to t/ha + // else + // adjFactor = 5; + String fertIrrigString = irrig.getId() + fert.getId(); double ww = getValueForCol(rowValues, "TeWW" + fertIrrigString) * adjFactor; double sw = getValueForCol(rowValues, "TeSW" + fertIrrigString) * adjFactor; @@ -94,7 +96,7 @@ public class LPJYieldResponseMapReader extends AbstractTabularRasterReader<Yield item.setYield(yieldType, CropType.MAIZE, co); item.setYield(yieldType, CropType.RICE, ri); - item.setYield(yieldType, CropType.TROPICAL_CEREALS, co); +// item.setYield(yieldType, CropType.TROPICAL_CEREALS, co); item.setYield(yieldType, CropType.OILCROPS, isSpringWheat ? sw : ww); // item.setYield(yieldType, CropType.SOYBEAN, sw); item.setYield(yieldType, CropType.PULSES, sw); diff --git a/src/ac/ed/lurg/yield/YieldResponse.java b/src/ac/ed/lurg/yield/YieldResponse.java index bafa6c47..fb5d8d40 100644 --- a/src/ac/ed/lurg/yield/YieldResponse.java +++ b/src/ac/ed/lurg/yield/YieldResponse.java @@ -30,8 +30,8 @@ public class YieldResponse { public double getFertParam() { if (fertParm == 0) { - fertParm = calcParam (0, 0.4, 1, 5.0/200, 50.0/200, 200.0/200); // we do have MID fert data, but looks wrong - // fertParm = calcParam(getYield(YieldType.NO_FERT_NO_IRRIG), getYield(YieldType.FERT_MID_NO_IRRIG), getYield(YieldType.FERT_MAX_NO_IRRIG), 5.0/200, 50.0/200, 200.0/200); + // fertParm = calcParam (0, 0.5, 1, 5.0/200, 50.0/200, 200.0/200); // we do have MID fert data, but looks wrong + fertParm = calcParam(getYield(YieldType.NO_FERT_NO_IRRIG), getYield(YieldType.FERT_MID_NO_IRRIG), getYield(YieldType.FERT_MAX_NO_IRRIG), 5.0/200, 50.0/200, 200.0/200); if (fertParm > 1) LogWriter.println(String.format("%s %s %s", getYield(YieldType.NO_FERT_NO_IRRIG), getYield(YieldType.FERT_MID_NO_IRRIG), getYield(YieldType.FERT_MAX_NO_IRRIG))); } @@ -40,7 +40,7 @@ public class YieldResponse { public double getIrrigParam() { if (irrigParm == 0) { - irrigParm = calcParam (0, 0.6, 1, 0, 0.5, 1.0); // we don't have a mid irrigation figure, so lets assume 60% at mid point + irrigParm = calcParam (0, 0.7, 1, 0, 0.5, 1.0); // we don't have a mid irrigation figure, so lets assume 60% at mid point } return irrigParm; } diff --git a/src/ac/ed/lurg/yield/YieldResponsesItem.java b/src/ac/ed/lurg/yield/YieldResponsesItem.java index 723a12cd..159d5554 100644 --- a/src/ac/ed/lurg/yield/YieldResponsesItem.java +++ b/src/ac/ed/lurg/yield/YieldResponsesItem.java @@ -38,6 +38,10 @@ public class YieldResponsesItem implements RasterItem { return getYield(YieldType.NO_FERT_NO_IRRIG, crop); } + public double getYieldMidFertOnly(CropType crop) { + return getYield(YieldType.FERT_MID_NO_IRRIG, crop); + } + public double getYieldFertOnly(CropType crop) { return getYield(YieldType.FERT_MAX_NO_IRRIG, crop); } -- GitLab