Commit 64ccb566 authored by Lozac'h Loic's avatar Lozac'h Loic

debug

parent 354eda51
......@@ -323,9 +323,9 @@ def select_tfmodel_from_gpm(sardate,gpmdir):
stats = gdal.Band.GetStatistics(srcband,1,1)
if stats[2] > 5 :
return "wet"
return stats[2],"wet"
else :
return "dry"
return stats[2],"dry"
def wet_or_dry_pipeline(args):
sars=[]
......@@ -348,22 +348,20 @@ def wet_or_dry_pipeline(args):
download_gpm(sars, args.sardirtype, args.gpmdir)
affectation=[]
for sar in sars :
sardata = os.path.basename(sar)
sarsplit = sardata.split('_')
sardatetime = sarsplit[datepos]
sardate = sardatetime.split("T")[0]
sar3dates = get_meteodates_from_sardate(sardate)
process_gpm_noresampling(sar, sar3dates, args.gpmdir)
affectation.append((sar,select_tfmodel_from_gpm(sardate, args.gpmdir)))
with open(args.outtxt, 'w') as affout:
for aff in affectation:
affout.write(aff[0]+" "+aff[1])
return affectation
for sar in sars :
sardata = os.path.basename(sar)
sarsplit = sardata.split('_')
sardatetime = sarsplit[datepos]
sardate = sardatetime.split("T")[0]
sar3dates = get_meteodates_from_sardate(sardate)
process_gpm_noresampling(sar, sar3dates, args.gpmdir)
res=select_tfmodel_from_gpm(sardate, args.gpmdir)
affout.write(sar+";"+res[0]+";"+res[1]+"\n")
def short_pipeline(intersectionEnv):
global slopevalue
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment