@@ -126,14 +126,17 @@ def omega_to_w(omega, p, t):
126126
127127# Values according to the 1976 U.S. Standard atmosphere [NOAA1976]_.
128128# List of tuples (height, temperature, pressure, temperature gradient)
129+ # Added a value for 100km roughly based on CIRA
129130_STANDARD_ATMOSPHERE = [
130131 (0 * units .km , 288.15 * units .K , 101325 * units .Pa , 0.0065 * units .K / units .m ),
131132 (11 * units .km , 216.65 * units .K , 22632.1 * units .Pa , 0 * units .K / units .m ),
132133 (20 * units .km , 216.65 * units .K , 5474.89 * units .Pa , - 0.001 * units .K / units .m ),
133134 (32 * units .km , 228.65 * units .K , 868.019 * units .Pa , - 0.0028 * units .K / units .m ),
134135 (47 * units .km , 270.65 * units .K , 110.906 * units .Pa , 0 * units .K / units .m ),
135136 (51 * units .km , 270.65 * units .K , 66.9389 * units .Pa , 0.0028 * units .K / units .m ),
136- (71 * units .km , 214.65 * units .K , 3.95642 * units .Pa , np .nan * units .K / units .m )
137+ (71 * units .km , 214.65 * units .K , 3.95642 * units .Pa , 0.002 * units .K / units .m ),
138+ (84.852 * units .km , 186.95 * units .K , 0.3734 * units .Pa , 0 * units .K / units .m ),
139+ (100 * units .km , 186.95 * units .K , 0.025641 * units .Pa , np .nan * units .K / units .m ),
137140]
138141_HEIGHT , _TEMPERATURE , _PRESSURE , _TEMPERATURE_GRADIENT = 0 , 1 , 2 , 3
139142
@@ -235,8 +238,8 @@ def pressure2flightlevel(pressure):
235238 z [indices ] = z0 - (Rd * t0 ) / g * np .log (pressure [indices ] / p0 )
236239
237240 if np .isnan (z ).any ():
238- raise ValueError ("flight level to pressure conversion not "
239- "implemented for z > 71km " )
241+ raise ValueError ("pressure to flight level conversion not "
242+ "implemented for p < 0.025641 Pa " )
240243
241244 return z if is_array else z [0 ]
242245
@@ -262,7 +265,7 @@ def isa_temperature(height):
262265 return t0 - gamma * (height - z0 )
263266
264267 raise ValueError ("ISA temperature from flight level not "
265- "implemented for z > 71km " )
268+ "implemented for z > 100 km " )
266269
267270
268271def convert_pressure_to_vertical_axis_measure (vertical_axis , pressure ):
0 commit comments