Index: /experiments/frams/foraminifera/data/scripts/foraminifera.expdef
===================================================================
--- /experiments/frams/foraminifera/data/scripts/foraminifera.expdef	(revision 589)
+++ /experiments/frams/foraminifera/data/scripts/foraminifera.expdef	(revision 590)
@@ -27,5 +27,4 @@
 global max_chamber_volume;
 global movePerStep;
-global nutrientenergywaiting;
 global reprocounter;
 global changePeriod;
@@ -37,4 +36,6 @@
 global chamber_vis_denominator;
 global curRadius;
+global nutrient_num_counter;
+global wrldsizSquareMeters;
 
 @include "foraminifera.inc"
@@ -85,4 +86,5 @@
 	World.wrldwat = 200;
 	World.wrldsiz = micronsToFrams(100000);
+	wrldsizSquareMeters = Math.pow(framsToMicrons(World.wrldsiz)*0.000001,2);
 	World.wrldbnd = 1;
 
@@ -166,5 +168,5 @@
 
 	reprocounter = 0;
-	nutrientenergywaiting = 0;
+	nutrient_num_counter = 0;
 	changePeriod = 0;
 	phase = "low";
@@ -801,12 +803,21 @@
 }
 
+function getNumberCounter(counter, increase, unit)
+{
+	var result = 0;
+	counter += increase;
+	result = int(counter/unit);
+	counter -= result*unit;
+	return {"counter" : counter, "number" : result};
+}
+
 function nutrientGrowth()
 {
-	if (ExpProperties.foodPeriodChange > 0)
+	if (ExpProperties.foodfluxChange > 0)
 	{
 			changePeriod += 1;
 			if (phase=="low" && changePeriod >= secToSimSteps(23328000)) //9 months
 			{
-				ExpProperties.foodperiod = ExpProperties.foodperiod/ExpProperties.foodPeriodChange;
+				ExpProperties.foodflux = ExpProperties.foodflux/ExpProperties.foodfluxChange;
 				phase = "high";
 				changePeriod = 0;
@@ -815,24 +826,22 @@
 			else if (phase == "high" && changePeriod >= secToSimSteps(7776000)) //3 months
 			{
-				ExpProperties.foodperiod = ExpProperties.foodperiod*ExpProperties.foodPeriodChange;
+				ExpProperties.foodflux = ExpProperties.foodflux*ExpProperties.foodfluxChange;
 				phase = "low";
 				changePeriod = 0;
 			}
 	}
-	nutrientenergywaiting = nutrientenergywaiting + 1;
-	if (nutrientenergywaiting >= secToSimSteps(ExpProperties.foodperiod))
-	{
-		for (var i = 0; i < ExpProperties.nutrient_pop; i++)
-		{    
-			addNutrient();
-		}
-
-		nutrientenergywaiting = 0.0;
-		Simulator.checkpoint();
-
-		if (ExpProperties.logging == 1)
-		{
-			log([ExpProperties.nutrient_pop],ExpProperties.logPref+"nutrients_log.txt");
-		}
+
+	var nutrientNum = getNumberCounter(nutrient_num_counter, ExpProperties.foodflux*wrldsizSquareMeters*ExpProperties.secPerStep,ExpProperties.energy_nut*0.000000000001); 
+
+	nutrient_num_counter = nutrientNum["counter"];
+
+	for (var i = 0; i < nutrientNum["number"]; i++)
+	{    
+		addNutrient();
+	}
+
+	if (ExpProperties.logging == 1 && nutrientNum["number"] > 0)
+	{
+		log([nutrientNum["number"]],ExpProperties.logPref+"nutrients_log.txt");
 	}
 
@@ -1216,11 +1225,11 @@
 
 property:
-id:foodperiod
-name:Time between food occurrences
-type:f 0 1000000 14400
-group:Energy
-
-property:
-id:foodPeriodChange
+id:foodflux
+name:POM flux in grams per second per square meter
+type:f 0 1 0.0000000075631
+group:Energy
+
+property:
+id:foodfluxChange
 name:Set variable feed rate
 type:f 0 -1 0
Index: /experiments/frams/foraminifera/data/scripts/foraminifera.inc
===================================================================
--- /experiments/frams/foraminifera/data/scripts/foraminifera.inc	(revision 589)
+++ /experiments/frams/foraminifera/data/scripts/foraminifera.inc	(revision 590)
@@ -241,5 +241,5 @@
 
 	//if creature has proper energy
-	if ( properEnergy && cr.signals.size == 0)
+	if ( properEnergy )
 	{
 		//reproduce with probability repro_prob
Index: /experiments/frams/foraminifera/data/scripts/foraminifera.show
===================================================================
--- /experiments/frams/foraminifera/data/scripts/foraminifera.show	(revision 589)
+++ /experiments/frams/foraminifera/data/scripts/foraminifera.show	(revision 590)
@@ -19,5 +19,5 @@
 {
 	var nutrient_multiple = 200;
-	Params = { "foodperiod" : [28800,14400,7200], "feedtrans" : [0.0005,0.001,0.002],"energy_nut" :[nutrient_multiple*144.54,nutrient_multiple*544.54,nutrient_multiple*944.54], "stress" : [0,1], "visualize" : [0,1]};
+	Params = { "foodflux" : [0.0000000037815,0.0000000075631,0.000000015126], "feedtrans" : [0.0005,0.001,0.002],"energy_nut" :[nutrient_multiple*144.54,nutrient_multiple*544.54,nutrient_multiple*944.54], "stress" : [0,1], "visualize" : [0,1]};
 	ShowProperties.visualize=1;
 	ExpProperties.secPerStep=50;
@@ -63,7 +63,7 @@
 }
 
-function ShowProperties_foodperiod_set()
+function ShowProperties_foodflux_set()
 {
-	setShowParam("foodperiod");
+	setShowParam("foodflux");
 }
 
@@ -91,6 +91,6 @@
 
 property:
-id:foodperiod
-name:Feeding period
+id:foodflux
+name:Food flux
 type:d 0 2 1 ~Low~Medium~High
 
@@ -98,10 +98,10 @@
 id:feedtrans
 name:Energy transfer
-type:d 0 2 1 ~0.05~0.125~0.25
+type:d 0 2 1 ~0.0001~0.001~0.01
 
 property:
 id:energy_nut
 name:Nutrient energy
-type:d 0 2 1 ~0.5~1.5~3
+type:d 0 2 1 ~28908~108908~188908
 
 property:
