コード例 #1
0
def agdriftOutputPage(request):
    import agdrift_model

    drop_size = request.POST.get('drop_size')
    ecosystem_type = request.POST.get('ecosystem_type')
    application_method = request.POST.get('application_method')
    boom_height = request.POST.get('boom_height')
    orchard_type = request.POST.get('orchard_type')
    application_rate = request.POST.get('application_rate')
    aquatic_type = request.POST.get('aquatic_type')
    distance = request.POST.get('distance')
    calculation_input = request.POST.get('calculation_input')
    
    agdrift_obj = agdrift_model.agdrift(True, True, 'single', drop_size, ecosystem_type, application_method, boom_height, orchard_type, application_rate, distance, aquatic_type, calculation_input, None)

    return agdrift_obj
コード例 #2
0
def html_table(row,iter):
    drop_size.append(str(row[0]))
    ecosystem_type.append(str(row[1])) 
    application_method.append(str(row[2]))
    boom_height.append(str(row[3]))
    orchard_type.append(str(row[4]))
    application_rate.append(float(row[5]))
    distance.append(float(row[6]))
    aquatic_type.append(str(row[7]))
    calculation_input.append(str(row[8]))

    Input_header="""<div class="out_">
                        <br><H3>Batch Calculation of Iteration {0!s}</H3>
                    </div>""".format((iter))

    agdrift_obj_temp = agdrift_model.agdrift(True,True,'batch',drop_size[iter-1],ecosystem_type[iter-1], application_method[iter-1],boom_height[iter-1],orchard_type[iter-1],application_rate[iter-1],distance[iter-1],aquatic_type[iter-1],calculation_input[iter-1],)
    agdrift_obj_temp.loop_indx = str(iter)

    init_avg_dep_foa_out.append(agdrift_obj_temp.init_avg_dep_foa)
    avg_depo_lbac_out.append(agdrift_obj_temp.avg_depo_lbac)
    avg_depo_gha_out.append(agdrift_obj_temp.avg_depo_gha)
    deposition_ngL_out.append(agdrift_obj_temp.deposition_ngL)
    deposition_mgcm_out.append(agdrift_obj_temp.deposition_mgcm)
    nasae_out.append(agdrift_obj_temp.nasae)
    y_out.append(agdrift_obj_temp.y)
    x_out.append(agdrift_obj_temp.x)
    express_y_out.append(agdrift_obj_temp.express_y)

    jid_all.append(agdrift_obj_temp.jid)
    agdrift_obj_all.append(agdrift_obj_temp)    
    if iter == 1:
        jid_batch.append(agdrift_obj_temp.jid)
    
    table_all_out = agdrift_tables.table_all(agdrift_obj_temp)

    html_table_temp = Input_header + table_all_out + "<br>"
    return html_table_temp
コード例 #3
0
def html_table(row,iter):
    drop_size.append(str(row[0]))
    ecosystem_type.append(str(row[1])) 
    application_method.append(str(row[2]))
    boom_height.append(str(row[3]))
    orchard_type.append(str(row[4]))
    application_rate.append(float(row[5]))
    distance.append(float(row[6]))
    aquatic_type.append(str(row[7]))
    calculation_input.append(str(row[8]))

    Input_header="""<div class="out_">
                        <br><H3>Batch Calculation of Iteration %s</H3>
                    </div>"""%(iter)

    agdrift_obj_temp = agdrift_model.agdrift(True,True,'batch',drop_size[iter-1],ecosystem_type[iter-1], application_method[iter-1],boom_height[iter-1],orchard_type[iter-1],application_rate[iter-1],distance[iter-1],aquatic_type[iter-1],calculation_input[iter-1],)
    agdrift_obj_temp.loop_indx = str(iter)

    init_avg_dep_foa_out.append(agdrift_obj_temp.init_avg_dep_foa)
    avg_depo_lbac_out.append(agdrift_obj_temp.avg_depo_lbac)
    avg_depo_gha_out.append(agdrift_obj_temp.avg_depo_gha)
    deposition_ngL_out.append(agdrift_obj_temp.deposition_ngL)
    deposition_mgcm_out.append(agdrift_obj_temp.deposition_mgcm)
    nasae_out.append(agdrift_obj_temp.nasae)
    y_out.append(agdrift_obj_temp.y)
    x_out.append(agdrift_obj_temp.x)
    express_y_out.append(agdrift_obj_temp.express_y)

    jid_all.append(agdrift_obj_temp.jid)
    agdrift_obj_all.append(agdrift_obj_temp)    
    if iter == 1:
        jid_batch.append(agdrift_obj_temp.jid)
    
    table_all_out = agdrift_tables.table_all(agdrift_obj_temp)

    html_table_temp = Input_header + table_all_out + "<br>"
    return html_table_temp
コード例 #4
0
import agdrift_model
import os
import unittest
from StringIO import StringIO
import csv

# agdrift_obj = agdrift_model.agdrift(True, True, 'single', drop_size, ecosystem_type, application_method, boom_height, orchard_type, application_rate, distance, aquatic_type, calculation_input, None)

agdrift_obj = agdrift_model.agdrift(True, True, 'qaqc', "Fine", "EPA Pond",
                                    "Aerial", "", "", "0.5", "225", "1", "0.5",
                                    None)
コード例 #5
0
ファイル: agdrift_qaqc.py プロジェクト: funkswing/HausBrew
import agdrift_model
import os
import unittest
from StringIO import StringIO
import csv

# agdrift_obj = agdrift_model.agdrift(True, True, 'single', drop_size, ecosystem_type, application_method, boom_height, orchard_type, application_rate, distance, aquatic_type, calculation_input, None)

agdrift_obj = agdrift_model.agdrift(True, True, 'qaqc', "Fine", "EPA Pond", "Aerial", "", "", "0.5", "225", "1", "0.5", None)