fcst_month, fcst_year, target_months, target_year, hind_period, outdir ) below, normal, above, f_signal, f_std, o_pad, fcst_sig_anom = cs.compute_probability(fcst, hind, obs) cn.create_netcdf_probs(below, normal, above, fcst_lats, fcst_lons, fileout=file_out) figout = "{5}/neb_precip_persistida_{1}_{2}-{3}_{4}_{0}_rsm97_" "1dg_{6}_tercilmaisprovavel.png".format( fcst_months[fcst_month], hind_period_name, target_year, target_months, fcst_year, outdir, obs_base ) figtitle = "RSM97 - {0}/{1} - {2}/{3}\nPROB PREC (%) ({4}) ({5})".format( fcst_month.upper(), fcst_year, target_months, target_year, hind_period_name, obs_base.upper() ) pm.maptercisrsm97(file_out, figtitle, figout, maskocean=1) background = Image.open(figout) foreground = Image.open("FUNCEME_LOGO.png") foreground = foreground.resize((90, 70), Image.ANTIALIAS) background.paste(foreground, (bx, by), foreground) background.save(figout, optimize=True, quality=95) ########## Curva para o CE ########## # Retorna matriz com os pontos sobre o Ceará # shapef = 'pontos_ce.txt' # TODO: Usar Thiessen pointsgrid, lonlatgrid, mymatriz = dg.pointinside(fcst_lats, fcst_lons, shapefile="pontos_ce.txt") # Aplica máscara para os pontos sobre o Ceará points_over_ce_fcst = np.ma.array(fcst, mask=mymatriz)