def _moist_adiabats(): ps = [p for p in plevs if p<=P_bot] for temp in np.concatenate((np.arange(-40.,10.1,5.),np.arange(12.5,45.1,2.5))): moist_adiabat = [] for p in ps: temp -= dp*gamma_s(temp,p) moist_adiabat.append(temp + _skewnessTerm(p)) plt.semilogy(moist_adiabat, ps, basey=math.e, color = 'green', \ linestyle = 'dotted', linewidth = .5)
def _dry_adiabats(): for tk in T_zero+np.arange(-30,210,10): dry_adiabat = tk * (plevs/P_bot)**kappa - T_zero + _skewnessTerm(plevs) plt.semilogy(dry_adiabat, plevs, basey=math.e, color = 'brown', \ linestyle='dashed', linewidth = .5)
def _isotherms(): for temp in np.arange(-140,50,10): plt.semilogy(temp + _skewnessTerm(plevs), plevs, basey=math.e, \ color = ('blue' if temp <= 0 else 'red'), \ linestyle=('solid' if temp == 0 else 'dashed'), linewidth = .5)
def _dewpoint(nc,time,y,x,P): w = nc.variables['QVAPOR'][time,:,y,x] plt.semilogy(td(e(w,P)) + _skewnessTerm(P), P, basey=math.e, color = 'red', \ linestyle='solid', linewidth = 1.5)
def _temperature(nc,time,y,x,P): theta = nc.variables['T'][time,:,y,x] + T_base T = theta*(P/P_bot)**kappa - T_zero # Temperatur i halvflatene (C) plt.semilogy(T + _skewnessTerm(P), P, basey=math.e, color = 'black', \ linestyle='solid', linewidth = 1.5)
def _dry_adiabats(): for tk in T_zero + np.arange(-30, 210, 10): dry_adiabat = tk * (plevs / P_bot)**kappa - T_zero + _skewnessTerm(plevs) plt.semilogy(dry_adiabat, plevs, basey=math.e, color = 'brown', \ linestyle='dashed', linewidth = .5)
def _isotherms(): for temp in np.arange(-140, 50, 10): plt.semilogy(temp + _skewnessTerm(plevs), plevs, basey=math.e, \ color = ('blue' if temp <= 0 else 'red'), \ linestyle=('solid' if temp == 0 else 'dashed'), linewidth = .5)
def _dewpoint(nc, time, y, x, P): w = nc.variables['QVAPOR'][time, :, y, x] plt.semilogy(td(e(w,P)) + _skewnessTerm(P), P, basey=math.e, color = 'red', \ linestyle='solid', linewidth = 1.5)
def _temperature(nc, time, y, x, P): theta = nc.variables['T'][time, :, y, x] + T_base T = theta * (P / P_bot)**kappa - T_zero # Temperatur i halvflatene (C) plt.semilogy(T + _skewnessTerm(P), P, basey=math.e, color = 'black', \ linestyle='solid', linewidth = 1.5)