예제 #1
0
def get_jid(wat_hl,wat_t,ben_hl,ben_t,unf_hl,unf_t,aqu_hl,aqu_t,hyd_hl,mw,vp,sol,koc,hea_h,hea_r_t,
           noa,dd_out,mm_out,ma_out,sr_out,weather,wea_l,nof,date_f1,nod_out,fl_out,wl_out,ml_out,to_out,
           zero_height_ref,days_zero_full,days_zero_removal,max_frac_cov,mas_tras_cof,leak,ref_d,ben_d,
           ben_por,dry_bkd,foc_wat,foc_ben,ss,wat_c_doc,chl,dfac,q10,area_app):
    all_dic = {"wat_hl" : wat_hl,
               "wat_t" : wat_t,
               "ben_hl" : ben_hl,
               "ben_t" : ben_t,
               "unf_hl" : unf_hl,
               "unf_t" : unf_t,
               "aqu_hl" : aqu_hl,
               "aqu_t" : aqu_t,
               "hyd_hl" : hyd_hl,
               "mw" : mw,
               "vp" : vp,
               "sol" : sol,
               "koc" : koc,
               "hea_h" : hea_h,
               "hea_r_t" : hea_r_t,
               "noa" : noa,
               "dd_out" : dd_out,
               "mm_out" : mm_out,
               "ma_out" : ma_out,
               "sr_out" : sr_out,
               "weather" : weather,
               "wea_l" : wea_l,
               "nof" : nof,
               "date_f1" : date_f1,
               "nod_out" : nod_out,
               "fl_out" : fl_out,
               "wl_out" : wl_out,
               "ml_out" : ml_out,
               "to_out" : to_out,
               "zero_height_ref" : zero_height_ref,
               "days_zero_full" : days_zero_full,
               "days_zero_removal" : days_zero_removal,
               "max_frac_cov" : max_frac_cov,
               "mas_tras_cof" : mas_tras_cof,
               "leak" : leak,
               "ref_d" : ref_d,
               "ben_d" : ben_d,
               "ben_por" : ben_por,
               "dry_bkd" : dry_bkd,
               "foc_wat" : foc_wat,
               "foc_ben" : foc_ben,
               "ss" : ss,
               "wat_c_doc" : wat_c_doc,
               "chl" : chl,
               "dfac" : dfac,
               "q10" : q10,
               "area_app" : area_app}

    data=json.dumps(all_dic)
    jid=rest_funcs.gen_jid()
    url=url_part1 + '/pfam/' + jid
    response_val = urlfetch.fetch(url=url, payload=data, method=urlfetch.POST, headers=http_headers, deadline=60)
    output_val = json.loads(response_val.content)['result']
    return(jid, output_val)
예제 #2
0
def get_jid(chem_name, noa, scenarios, unit, met_o, inp_o, run_o, exam_o, 
            MM, DD, YY, CAM_f, DEPI_text, Ar_text, EFF, Drft, 
            Apt_p, DayRe, Ap_mp, Ar, CAM_f_p, EFF_p, Drft_p, DEPI_f,
            farm, mw, sol, koc, vp, aem, anm, aqp, tmper, n_ph, ph_out, hl_out):
    all_dic = {"chem_name" : chem_name,
               "noa" : noa,
               "scenarios" : scenarios,
               "unit" : unit,
               "met" : met_o,
               "inp" : inp_o,
               "run" : run_o,
               "exam" : exam_o,
               "MM" : MM,
               "DD" : DD,
               "YY" : YY,
               "CAM_f" : CAM_f,
               "DEPI" : DEPI_text,
               "Ar" : Ar_text,
               "EFF" : EFF,
               "Drft" : Drft,
               "farm" : farm,
               "mw" : mw,
               "sol" : sol,
               "koc" : koc,
               "vp" : vp,
               "aem" : aem,
               "anm" : anm,
               "aqp" : aqp,
               "tmper" : tmper,
               "n_ph" : n_ph,
               "ph_out" : ph_out,
               "hl_out" : hl_out}

    data=json.dumps(all_dic)
    jid=rest_funcs.gen_jid()
    logging.info(jid)
    url=url_part1 + '/przm_exams/' + jid
    response = urlfetch.fetch(url=url, payload=data, method=urlfetch.POST, headers=http_headers, deadline=60)
    output_val = json.loads(response.content)['result']
    return(jid, output_val)
예제 #3
0
def get_jid(chem_name, scenarios, met, farm, mw, sol, koc, vp, aem, anm, aqp, tmper, n_ph, ph_out, hl_out):
    all_dic = {"chem_name": chem_name,
               "scenarios": scenarios,
               "met": met,
               "farm": farm,
               "mw": mw,
               "sol": sol,
               "koc": koc,
               "vp": vp,
               "aem": aem,
               "anm": anm,
               "aqp": aqp,
               "tmper": tmper,
               "n_ph": n_ph,
               "ph_out": ph_out,
               "hl_out": hl_out}
    data = json.dumps(all_dic)
    jid=rest_funcs.gen_jid()
    url=url_part1 + '/exams/' + jid 
    response_val = urlfetch.fetch(url=url, payload=data, method=urlfetch.POST, headers=http_headers, deadline=60)
    output_val = json.loads(response_val.content)['result']
    return(jid, output_val)