Commit e2a2022e authored by Lozac'h Loic's avatar Lozac'h Loic

debug

parent 64ccb566
......@@ -265,6 +265,11 @@ def process_gpm(sar, sar3dates, gpmdir):
def process_gpm_noresampling(sar, sar3dates, gpmdir):
outdir = os.path.join( os.path.dirname(gpmdir),"CumulPluie")
outfile = os.path.join(outdir,"CumulPluie_"+args.zone+"_"+sar3dates[0]+".tif")
if os.path.exists(outfile):
print("Already exists : "+outfile)
return
if not os.path.exists(outdir):
os.mkdir(outdir)
......@@ -307,7 +312,7 @@ def process_gpm_noresampling(sar, sar3dates, gpmdir):
app1 = otbApplication.Registry.CreateApplication("Smoothing")
app1.SetParameterInputImage("in", app0.GetParameterOutputImage("out"))
app1.SetParameterString("type", "gaussian")
app1.SetParameterString("out", os.path.join(outdir,"CumulPluie_"+args.zone+"_"+sar3dates[0]+".tif"))
app1.SetParameterString("out", outfile)
app1.SetParameterOutputImagePixelType("out", otbApplication.ImagePixelType_uint16)
app1.ExecuteAndWriteOutput()
......@@ -323,9 +328,9 @@ def select_tfmodel_from_gpm(sardate,gpmdir):
stats = gdal.Band.GetStatistics(srcband,1,1)
if stats[2] > 5 :
return stats[2],"wet"
return str(stats[2]),"wet"
else :
return stats[2],"dry"
return str(stats[2]),"dry"
def wet_or_dry_pipeline(args):
sars=[]
......
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