def iSoilTexture(data): for i in range(1,11): textureClass = Soil_Textural_Class_Choices[i-1][1] dryDencity = data['GullyDB_'+twonum(i)+"1"] correctFactor = data['GullyDB_'+twonum(i)+"2"] s = SoilTexture(Standard=INPUT_STANDARD,Soil_Textural_Class=textureClass,Dry_Density=dryDencity,Correction_Factor=correctFactor) s.save()
def iAnimalWeight(data): Animals = [ '', 'Beef cattle', 'Dairy cow', 'Hog', 'Sheep', 'Horse', 'Chicken (Layer)', 'Turkey', 'Duck', 'Goose', 'Deer', 'Beaver', 'Raccoon', 'Other', ] for i in range(1, 14): Animal = Animals[i] r = AnimalWeight(Standard=INPUT_STANDARD, Animal=Animal) r.MassLb = data['Reference_' + twonum(i) + "1"] r.BOD_per_1000lb = data['Reference_' + twonum(i) + "2"] r.BOD_per_day = data['Reference_' + twonum(i) + "3"] r.BDO_per_year = data['Reference_' + twonum(i) + "4"] r.save()
def iFeedlotAnimal(data): Animals = ['','Slaughter Steer','Young Beef','Dairy Cow','Young Dairy Stock','Swine','Feeder Pig','Sheep','Horse','Chicken','Turkey','Duck'] for i in range(1,12): Animal = Animals[i] r = FeedlotAnimal(Standard=INPUT_STANDARD,Animal=Animal) r.N = data['Feedlot_'+twonum(i)+"1"] r.P = data['Feedlot_'+twonum(i)+"2"] r.BOD = data['Feedlot_'+twonum(i)+"3"] r.COD = data['Feedlot_'+twonum(i)+"4"] r.save()
def iAnimalWeight(data): Animals = ['','Beef cattle','Dairy cow','Hog','Sheep','Horse','Chicken (Layer)','Turkey','Duck','Goose','Deer','Beaver','Raccoon','Other',] for i in range(1,14): Animal = Animals[i] r = AnimalWeight(Standard=INPUT_STANDARD,Animal=Animal) r.MassLb = data['Reference_'+twonum(i)+"1"] r.BOD_per_1000lb = data['Reference_'+twonum(i)+"2"] r.BOD_per_day = data['Reference_'+twonum(i)+"3"] r.BDO_per_year = data['Reference_'+twonum(i)+"4"] r.save()
def iSoilTexture(data): for i in range(1, 11): textureClass = Soil_Textural_Class_Choices[i - 1][1] dryDencity = data['GullyDB_' + twonum(i) + "1"] correctFactor = data['GullyDB_' + twonum(i) + "2"] s = SoilTexture(Standard=INPUT_STANDARD, Soil_Textural_Class=textureClass, Dry_Density=dryDencity, Correction_Factor=correctFactor) s.save()
def iFeedlotAnimal(data): Animals = [ '', 'Slaughter Steer', 'Young Beef', 'Dairy Cow', 'Young Dairy Stock', 'Swine', 'Feeder Pig', 'Sheep', 'Horse', 'Chicken', 'Turkey', 'Duck' ] for i in range(1, 12): Animal = Animals[i] r = FeedlotAnimal(Standard=INPUT_STANDARD, Animal=Animal) r.N = data['Feedlot_' + twonum(i) + "1"] r.P = data['Feedlot_' + twonum(i) + "2"] r.BOD = data['Feedlot_' + twonum(i) + "3"] r.COD = data['Feedlot_' + twonum(i) + "4"] r.save()