Exemplo n.º 1
0
def process_albedos(data, root):
	i0met = geti0met()
	excentricity = nc.getvar(root,'excentricity')[:]
	solarangle = nc.getvar(root,'solarangle')[:]
	atmosphericalbedo = nc.getvar(root,'atmosphericalbedo')[:]
	t_earth = nc.getvar(root,'t_earth')[:]
	t_sat = nc.getvar(root,'t_sat')[:]
	say("Calculating observed albedo, apparent albedo, effective albedo and cloud albedo... ")
	observedalbedo = geo.getalbedo(data, i0met , excentricity, solarangle)
	v_albedo = nc.clonevar(root, 'data', 'observedalbedo')
	v_albedo[:] = observedalbedo
	nc.sync(root)
	apparentalbedo = geo.getapparentalbedo(observedalbedo,atmosphericalbedo, t_earth, t_sat)
	v_albedo = nc.clonevar(root, 'data', 'apparentalbedo')
	v_albedo[:] = apparentalbedo
	nc.sync(root)
	effectivealbedo = geo.geteffectivealbedo(solarangle)
	v_albedo = nc.clonevar(root, 'data', 'effectivealbedo')
	v_albedo[:] = effectivealbedo
	nc.sync(root)
	cloudalbedo = geo.getcloudalbedo(effectivealbedo,atmosphericalbedo,t_earth,t_sat)
	v_albedo = nc.clonevar(root, 'data', 'cloudalbedo')
	v_albedo[:] = cloudalbedo
	nc.sync(root)
	v_albedo = None
Exemplo n.º 2
0
def process_atmospheric_irradiance(lat, lon, data, root):
	i0met = geti0met()
	dc = nc.getvar(root,'dc')[:]
	satellitalzenithangle = nc.getvar(root,'satellitalzenithangle')[:]
	excentricity = nc.getvar(root,'excentricity')[:]
	say("Calculating atmospheric irradiance... ")
	atmosphericradiance = geo.getatmosphericradiance(1367.0, i0met,dc, satellitalzenithangle)
	atmosphericalbedo = geo.getalbedo(atmosphericradiance, i0met, excentricity, satellitalzenithangle)
	satellitalelevation = geo.getelevation(satellitalzenithangle)
	v_atmosphericalbedo = nc.getvar(root, 'atmosphericalbedo', 'f4', ('timing','northing','easting',),4)
	v_atmosphericalbedo[:] = atmosphericalbedo
	v_satellitalelevation = nc.getvar(root, 'satellitalelevation', 'f4', ('northing','easting',),4)
	v_satellitalelevation[:] = satellitalelevation
	nc.sync(root)
Exemplo n.º 3
0
def process_atmospheric_irradiance(root):
	i0met = geti0met()
	dc = nc.getvar(root,'dc')[:]
	satellitalzenithangle = nc.getvar(root,'satellitalzenithangle')[:]
	excentricity = nc.getvar(root,'excentricity')[:]
	say("Calculating atmospheric irradiance... ")
	atmosphericradiance = geo.getatmosphericradiance(1367.0, i0met,dc, satellitalzenithangle)
	atmosphericalbedo = geo.getalbedo(atmosphericradiance, i0met, excentricity, satellitalzenithangle)
	satellitalelevation = geo.getelevation(satellitalzenithangle)
	v_atmosphericalbedo = nc.clonevar(root, 'data', 'atmosphericalbedo')
	v_atmosphericalbedo[:] = atmosphericalbedo
	v_satellitalelevation = nc.clonevar(root, 'lon', 'satellitalelevation')
	v_satellitalelevation[:] = satellitalelevation
	nc.sync(root)
	v_atmosphericalbedo, v_satellitalelevation = None, None
Exemplo n.º 4
0
def process_albedos(lat, lon, data, root):
	i0met = geti0met()
	excentricity = nc.getvar(root,'excentricity')[:]
	solarangle = nc.getvar(root,'solarangle')[:]
	atmosphericalbedo = nc.getvar(root,'atmosphericalbedo')[:]
	t_earth = nc.getvar(root,'t_earth')[:]
	t_sat = nc.getvar(root,'t_sat')[:]
	say("Calculating observed albedo, apparent albedo, effective albedo and cloud albedo... ")
	observedalbedo = geo.getalbedo(data, i0met , excentricity, solarangle)
	apparentalbedo = geo.getapparentalbedo(observedalbedo,atmosphericalbedo, t_earth, t_sat)
	effectivealbedo = geo.geteffectivealbedo(solarangle)
	cloudalbedo = geo.getcloudalbedo(effectivealbedo,atmosphericalbedo,t_earth,t_sat)
	v_observedalbedo = nc.getvar(root, 'observedalbedo', 'f4', ('timing','northing','easting',),4)
	v_observedalbedo[:] = observedalbedo
	v_apparentalbedo = nc.getvar(root, 'apparentalbedo', 'f4', ('timing','northing','easting',),4)
	v_apparentalbedo[:] = apparentalbedo
	v_effectivealbedo = nc.getvar(root, 'effectivealbedo', 'f4', ('timing','northing','easting',),4)
	v_effectivealbedo[:] = effectivealbedo
	v_cloudalbedo = nc.getvar(root, 'cloudalbedo', 'f4', ('timing','northing','easting',),4)
	v_cloudalbedo[:] = cloudalbedo
	nc.sync(root)