Skip to content

Commit

Permalink
update after bug hunt
Browse files Browse the repository at this point in the history
  • Loading branch information
florianjehn committed Nov 24, 2023
1 parent f0f65c4 commit f825bca
Show file tree
Hide file tree
Showing 23 changed files with 49,170 additions and 49,145 deletions.
Binary file modified results/global/150tg/area.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7,020 changes: 3,510 additions & 3,510 deletions results/global/150tg/harvest_df_cluster_1.csv

Large diffs are not rendered by default.

7,020 changes: 3,510 additions & 3,510 deletions results/global/150tg/harvest_df_cluster_3.csv

Large diffs are not rendered by default.

Binary file modified results/global/16tg/area.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7,020 changes: 3,510 additions & 3,510 deletions results/global/16tg/harvest_df_cluster_1.csv

Large diffs are not rendered by default.

7,020 changes: 3,510 additions & 3,510 deletions results/global/16tg/harvest_df_cluster_3.csv

Large diffs are not rendered by default.

Binary file modified results/global/27tg/area.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7,020 changes: 3,510 additions & 3,510 deletions results/global/27tg/harvest_df_cluster_2.csv

Large diffs are not rendered by default.

7,020 changes: 3,510 additions & 3,510 deletions results/global/27tg/harvest_df_cluster_3.csv

Large diffs are not rendered by default.

Binary file modified results/global/37tg/area.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7,020 changes: 3,510 additions & 3,510 deletions results/global/37tg/harvest_df_cluster_2.csv

Large diffs are not rendered by default.

7,020 changes: 3,510 additions & 3,510 deletions results/global/37tg/harvest_df_cluster_3.csv

Large diffs are not rendered by default.

Binary file modified results/global/47tg/area.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7,020 changes: 3,510 additions & 3,510 deletions results/global/47tg/harvest_df_cluster_2.csv

Large diffs are not rendered by default.

7,020 changes: 3,510 additions & 3,510 deletions results/global/47tg/harvest_df_cluster_3.csv

Large diffs are not rendered by default.

Binary file modified results/global/5tg/area.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7,020 changes: 3,510 additions & 3,510 deletions results/global/5tg/harvest_df_cluster_2.csv

Large diffs are not rendered by default.

7,020 changes: 3,510 additions & 3,510 deletions results/global/5tg/harvest_df_cluster_3.csv

Large diffs are not rendered by default.

Binary file modified results/global/control/area.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7,020 changes: 3,510 additions & 3,510 deletions results/global/control/harvest_df_cluster_1.csv

Large diffs are not rendered by default.

7,020 changes: 3,510 additions & 3,510 deletions results/global/control/harvest_df_cluster_2.csv

Large diffs are not rendered by default.

29 changes: 25 additions & 4 deletions scripts/Global.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -40,22 +40,22 @@
"optimal_growth_rate = 30 # % per day\n",
"days_to_run = 3600 - 3 * 30 # 120 month at 30 days per month (and skip the first three months before the nuclear war)\n",
"global_pop = 8000000000\n",
"calories_per_person_per_day = 2100\n",
"calories_per_person_per_day = 2100 # WHO emergency level https://www.unhcr.org/uk/media/food-and-nutrition-needs-emergencies\n",
"harvest_loss = 20 # % of the harvest that is lost\n",
"food_waste = 13 # https://www.researchsquare.com/article/rs-1446444/v1\n",
"food_waste = 13 # % https://www.researchsquare.com/article/rs-1446444/v1\n",
"calories_per_t_seaweed_wet = 288200 # see Efficiency.ipynb\n",
"food_limit = 0.15 # amount of food that can be replaced by seaweed\n",
"# https://academic.oup.com/jcem/article/87/12/5499/2823602\n",
"feed_limit = 0.05 # amount of feed that can be replaced by seaweed\n",
"biofuel_limit = 0.5 # amount of biofuel that can be replaced by seaweed\n",
"# percent of the area of the module that can acutally be used for food production.\n",
"# Rest is needed for things like lanes for harvesting\n",
"percent_usable_for_growth = 50 # %\n",
"percent_usable_for_growth = 50 # % \n",
"# Which scenario to run\n",
"scenarios = [str(i) + \"tg\" for i in [5, 16, 27, 37, 47, 150]] + [\"control\"]\n",
"location = \"global\"\n",
"number_of_clusters = 3\n",
"consumption_aim = 70 # % of the global need is the aim for the building of the farms"
"consumption_aim = (food_limit + feed_limit + biofuel_limit) * 100 # % of the global need is the aim for the building of the farms"
]
},
{
Expand Down Expand Up @@ -100,16 +100,19 @@
"stable_harvest_intervall None\n",
"stable_harvest_for_food None\n",
"productivity_day_km2 None\n",
"This productivity refers to the area that is usable for growth\n",
"Not enough productivity in cluster for production 1, skipping it\n",
"Cluster 2 has a mean growth rate (fraction of max growth rate) of 0.6671969338094497\n",
"stable_harvest_intervall 16.0\n",
"stable_harvest_for_food 2001.4923635059743\n",
"productivity_day_km2 125.09327271912339\n",
"This productivity refers to the area that is usable for growth\n",
"calculating yield for cluster 2\n",
"Cluster 3 has a mean growth rate (fraction of max growth rate) of 0.1403057758614612\n",
"stable_harvest_intervall 71.0\n",
"stable_harvest_for_food 1940.0140670937017\n",
"productivity_day_km2 27.324141790052135\n",
"This productivity refers to the area that is usable for growth\n",
"calculating yield for cluster 3\n",
"done\n",
"\n",
Expand All @@ -118,16 +121,19 @@
"stable_harvest_intervall 16.0\n",
"stable_harvest_for_food 1953.0356804644573\n",
"productivity_day_km2 122.06473002902858\n",
"This productivity refers to the area that is usable for growth\n",
"calculating yield for cluster 1\n",
"Cluster 2 has a mean growth rate (fraction of max growth rate) of 0.0008290451651297299\n",
"stable_harvest_intervall None\n",
"stable_harvest_for_food None\n",
"productivity_day_km2 None\n",
"This productivity refers to the area that is usable for growth\n",
"Not enough productivity in cluster for production 2, skipping it\n",
"Cluster 3 has a mean growth rate (fraction of max growth rate) of 0.10311863106918191\n",
"stable_harvest_intervall 96.0\n",
"stable_harvest_for_food 1933.6558304032906\n",
"productivity_day_km2 20.14224823336761\n",
"This productivity refers to the area that is usable for growth\n",
"calculating yield for cluster 3\n",
"done\n",
"\n",
Expand All @@ -136,16 +142,19 @@
"stable_harvest_intervall None\n",
"stable_harvest_for_food None\n",
"productivity_day_km2 None\n",
"This productivity refers to the area that is usable for growth\n",
"Not enough productivity in cluster for production 1, skipping it\n",
"Cluster 2 has a mean growth rate (fraction of max growth rate) of 0.6372351191943018\n",
"stable_harvest_intervall 16.0\n",
"stable_harvest_for_food 1925.7783967660791\n",
"productivity_day_km2 120.36114979787995\n",
"This productivity refers to the area that is usable for growth\n",
"calculating yield for cluster 2\n",
"Cluster 3 has a mean growth rate (fraction of max growth rate) of 0.1012105149836842\n",
"stable_harvest_intervall 97.0\n",
"stable_harvest_for_food 1920.097278167647\n",
"productivity_day_km2 19.79481730069739\n",
"This productivity refers to the area that is usable for growth\n",
"calculating yield for cluster 3\n",
"done\n",
"\n",
Expand All @@ -154,16 +163,19 @@
"stable_harvest_intervall None\n",
"stable_harvest_for_food None\n",
"productivity_day_km2 None\n",
"This productivity refers to the area that is usable for growth\n",
"Not enough productivity in cluster for production 1, skipping it\n",
"Cluster 2 has a mean growth rate (fraction of max growth rate) of 0.6289827839838661\n",
"stable_harvest_intervall 17.0\n",
"stable_harvest_for_food 2008.3666058123663\n",
"productivity_day_km2 118.13921210660978\n",
"This productivity refers to the area that is usable for growth\n",
"calculating yield for cluster 2\n",
"Cluster 3 has a mean growth rate (fraction of max growth rate) of 0.10928418574591024\n",
"stable_harvest_intervall 90.0\n",
"stable_harvest_for_food 1922.316143874736\n",
"productivity_day_km2 21.359068265274846\n",
"This productivity refers to the area that is usable for growth\n",
"calculating yield for cluster 3\n",
"done\n",
"\n",
Expand All @@ -172,16 +184,19 @@
"stable_harvest_intervall None\n",
"stable_harvest_for_food None\n",
"productivity_day_km2 None\n",
"This productivity refers to the area that is usable for growth\n",
"Not enough productivity in cluster for production 1, skipping it\n",
"Cluster 2 has a mean growth rate (fraction of max growth rate) of 0.6112763238231855\n",
"stable_harvest_intervall 17.0\n",
"stable_harvest_for_food 1960.9814349350627\n",
"productivity_day_km2 115.35184911382721\n",
"This productivity refers to the area that is usable for growth\n",
"calculating yield for cluster 2\n",
"Cluster 3 has a mean growth rate (fraction of max growth rate) of 0.10393025800517539\n",
"stable_harvest_intervall 95.0\n",
"stable_harvest_for_food 1929.1865451606054\n",
"productivity_day_km2 20.30722679116427\n",
"This productivity refers to the area that is usable for growth\n",
"calculating yield for cluster 3\n",
"done\n",
"\n",
Expand All @@ -190,16 +205,19 @@
"stable_harvest_intervall 87.0\n",
"stable_harvest_for_food 1931.0029876298024\n",
"productivity_day_km2 22.195436639423015\n",
"This productivity refers to the area that is usable for growth\n",
"calculating yield for cluster 1\n",
"Cluster 2 has a mean growth rate (fraction of max growth rate) of 0.0004594581205788031\n",
"stable_harvest_intervall None\n",
"stable_harvest_for_food None\n",
"productivity_day_km2 None\n",
"This productivity refers to the area that is usable for growth\n",
"Not enough productivity in cluster for production 2, skipping it\n",
"Cluster 3 has a mean growth rate (fraction of max growth rate) of 0.43795151408829613\n",
"stable_harvest_intervall 23.0\n",
"stable_harvest_for_food 1926.66699609971\n",
"productivity_day_km2 83.76813026520479\n",
"This productivity refers to the area that is usable for growth\n",
"calculating yield for cluster 3\n",
"done\n",
"\n",
Expand All @@ -208,16 +226,19 @@
"stable_harvest_intervall 86.0\n",
"stable_harvest_for_food 1927.701596304412\n",
"productivity_day_km2 22.415134840748976\n",
"This productivity refers to the area that is usable for growth\n",
"calculating yield for cluster 1\n",
"Cluster 2 has a mean growth rate (fraction of max growth rate) of 0.664092485148619\n",
"stable_harvest_intervall 16.0\n",
"stable_harvest_for_food 1993.722770257882\n",
"productivity_day_km2 124.60767314111763\n",
"This productivity refers to the area that is usable for growth\n",
"calculating yield for cluster 2\n",
"Cluster 3 has a mean growth rate (fraction of max growth rate) of 0.0008398693376529189\n",
"stable_harvest_intervall None\n",
"stable_harvest_for_food None\n",
"productivity_day_km2 None\n",
"This productivity refers to the area that is usable for growth\n",
"Not enough productivity in cluster for production 3, skipping it\n",
"done\n",
"\n"
Expand Down
6 changes: 5 additions & 1 deletion src/scaleup_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -259,6 +259,7 @@ def determine_average_productivity(
else:
productivity_day_km2 = None
print("productivity_day_km2", productivity_day_km2)
print("This productivity refers to the area that is usable for growth")
return productivity_day_km2


Expand Down Expand Up @@ -436,7 +437,10 @@ def run_model(
percent_usable_for_growth=percent_usable_for_growth,
days_to_run=days_to_run,
)
harvest_df["max_area"] = max_area
# The productivity assumes that the whole area is used for growth
# but we can only use a fraction of it. Therefore, we have to multiply
# the productivity by the fraction of the area that is usable for growth
harvest_df["max_area"] = max_area / (percent_usable_for_growth / 100)
harvest_df["cluster"] = cluster
harvest_df["seaweed_needed_per_day"] = seaweed_needed
harvest_df.to_csv(
Expand Down

0 comments on commit f825bca

Please sign in to comment.