def etorad(fs,station_name,filename): #fs lista donde cada valor es un renglon del archivo #station name #name of fs file info_file='METAR_Station_Places.txt' #libreria de centrales krs=0.18 #0.16 interior, 0.19 coast, Rs=0.7Ra-4 island j=int(filename[4:7]) temp=data_matrix(fs) print temp wmed=temp['med_wind'] tmax=temp['tmax'] tmin=temp['tmin'] tmed=temp['tmed'] etowind=temp['etowind'] lat=station_name['latitude']*3.14159265/180 hemisf=station_name['hemisf'] z=station_name['altitude'] p=etowind20.atmp(z,tmed) d=etowind20.delta(tmed) g=etowind20.gamma(p) DT=d/(d+g*(1+0.34*wmed)) dr(j) dmin(j) ws(j, lat) ext_radiation=ra(j,lat) N(j,lat) surface_rad=rs(krs,tmax,tmin,ext_radiation) #Mean surface radiation pot_rad=rso(z,j,lat) esuba=temp['eamed'] rnl(tmed,esuba,surface_rad,pot_rad) radiation=rn(pot_rad,surface_rad) #print radiation etorad=DT*(0.408*radiation*0.98) #0.98 Estimador Gonzalo, estima perdidas por G #print "\nETO WindTODAY: " +str(etowind)+"\nETOradTODAY: " +str(etorad)+"\nETOTODAY: " +str(float(etorad)+float(etowind))+"\nEstimada: " +str(0.0023*(tmed+17.8)*ext_radiation*(tmax-tmin)**(0.5)) return "\nETO WindTODAY: " +str(etowind)+"\nETOradTODAY: " +str(etorad)+"\nETOTODAY: " +str(float(etorad)+float(etowind))+"\nEstimada: " +str(0.0023*(tmed+17.8)*ext_radiation*(tmax-tmin)**(0.5))
def etorad(fs,station_name,filename): #fs lista donde cada valor es un renglon del archivo #station name #name of fs file krs=0.18 #0.16 interior, 0.19 coast, Rs=0.7Ra-4 island j=int(filename[4:7]) temp=data_matrix(fs) #print 'temp %s'%temp wmed=temp['med_wind'] tmax=temp['tmax'] tmin=temp['tmin'] tmed=temp['tmed'] etowind=temp['etowind'] lat=float(station_name['latrad']) hemisf=station_name['hemisf'] z=float(station_name['altitude']) factor=float(station_name['factor']) p=etowind20.atmp(z,tmed) d=etowind20.delta(tmed) g=etowind20.gamma(p) DT=d/(d+g*(1+0.34*wmed)) dr(j) dmin(j) ws(j, lat) ext_radiation=ra(j,lat) N(j,lat) surface_rad=rs(krs,tmax,tmin,ext_radiation) #Mean surface radiation pot_rad=rso(z,j,lat) esuba=temp['eamed'] #rnl(tmed,esuba,surface_rad,pot_rad) radiation=rn(pot_rad,surface_rad) #print radiation etorad=DT*(0.408*radiation) if etorad<0: etorad=0 #print "\nETO WindTODAY: " +str(etowind)+"\nETOradTODAY: " +str(etorad)+"\nETOTODAY: " +str(float(etorad)+float(etowind))+"\nEstimada: " +str(0.0023*(tmed+17.8)*ext_radiation*(tmax-tmin)**(0.5)) return "\nETO WindTODAY: " +str(etowind)+"\nETOradTODAY: " +str(etorad)+"\nETOTODAY: " +str(factor*(float(etorad)+float(etowind)))+"\nEstimada: " +str(0.0023*(tmed+17.8)*ext_radiation*(abs(tmax-tmin))**(0.5))+ "\nTempMax: "+str(tmax)+"\nTempMin: "+str(tmin) + "\nTempMed: "+str(tmed) + "\nWindMed: "+str(wmed)
def eto(tmed,rn,p,es,ea,ws): #0.95 Estimador Gonzalo, estima G return (0.408*rn*0.97*etowind20.delta(tmed)+etowind20.gamma(p)*(900/(tmed+273))*ws*(es-ea))/(etowind20.delta(tmed)+etowind20.gamma(p)*(1+0.34*ws))
def eto(tmed,rn,p,es,ea,ws): return (0.408*rn*etowind20.delta(tmed)+etowind20.gamma(p)*(900/(tmed+273))*ws*(es-ea))/(etowind20.delta(tmed)+etowind20.gamma(p)*(1+0.34*ws))