5 from .base
import Creator, ParamPassThru, CreatorError
6 from .value
import CreatorFlaggedValue
9 from refractor
import framework
as rf
12 "Creates an atmosphere object" 35 if surf_temp
and not ground:
36 raise CreatorError(
"Surface temperature can not be defined without ground being defined for atmosphere setup")
38 if aerosol
and ground
and surf_temp:
39 return rf.AtmosphereOco(absorber, pressure, temperature, aerosol, relative_humidity, ground, surf_temp, altitude, self.
constants())
40 if ground
and surf_temp:
41 return rf.AtmosphereOco(absorber, pressure, temperature, relative_humidity, ground, surf_temp, altitude, self.
constants())
42 elif aerosol
and ground:
43 return rf.AtmosphereOco(absorber, pressure, temperature, aerosol, relative_humidity, ground, altitude, self.
constants())
45 return rf.AtmosphereOco(absorber, pressure, temperature, aerosol, relative_humidity, altitude, self.
constants())
47 return rf.AtmosphereOco(absorber, pressure, temperature, relative_humidity, ground, altitude, self.
constants())
49 return rf.AtmosphereOco(absorber, pressure, temperature, relative_humidity, altitude, self.
constants())
53 "Creates a PressureSigma object statisfying the AtmosphereCreator's pressure parameter" 60 psurf = self.
value()[0]
63 return rf.PressureSigma(self.
a_coeff(), self.
b_coeff(), psurf, ret_flag)
66 "Creates a PressureSigma object statisfying the AtmosphereCreator's pressure parameter" 72 psurf = self.
value()[0]
78 "Creates a TemperatureMet object statisfying the AtmosphereCreator's temperature parameter" 84 offset = self.
value()[0]
87 return rf.TemperatureMet(self.
met(), self.
pressure(), offset, ret_flag)
90 "Creates a SurfaceTemperature object for use by AtmospherCreator" 97 "Creates a TemperatureMet object statisfying the AtmosphereCreator's temperature parameter" 103 offset = self.
value()[0]
109 "Creates a AltitudeHydrostatic object statisfying the AtmosphereCreator's altitude parameter" 124 altitude = rf.vector_altitude()
126 chan_alt = rf.AltitudeHydrostatic(self.
pressure(), self.
temperature(), latitudes[chan_idx], surface_heights[chan_idx])
127 altitude.push_back(chan_alt)
137 return np.full(self.
pressure().max_number_level, self.
value())
def retrieval_flag(self, kwargs)