def window_cloud_ceiling(f): dset = da.read_nc(f, ["cal333+cal05+cal20+cal80+csat", "cal333+cal05+cal20+cal80+csat_cprof", "nprof"]) vcm, cprof, nprof = ( dset["cal333+cal05+cal20+cal80+csat"], dset["cal333+cal05+cal20+cal80+csat_cprof"], dset["nprof"], ) cf_lat, cf_lat2 = compute_cf(vcm, cprof, nprof) ceiling = tropic_width.cloud_cover_top(vcm.altitude, cf_lat) return ceiling, vcm.lat, cprof, nprof
def window_cloud_ceiling(f): dset = da.read_nc(f, [ 'cal333+cal05+cal20+cal80+csat', 'cal333+cal05+cal20+cal80+csat_cprof', 'nprof' ]) vcm, cprof, nprof = dset['cal333+cal05+cal20+cal80+csat'], dset[ 'cal333+cal05+cal20+cal80+csat_cprof'], dset['nprof'] cf_lat, cf_lat2 = compute_cf(vcm, cprof, nprof) ceiling = tropic_width.cloud_cover_top(vcm.altitude, cf_lat) return ceiling, vcm.lat, cprof, nprof
def pcolor_zonal(x, y, vcmarray, title=None): z = vcmarray.copy() z = np.ma.masked_where(z==0, z) plt.contourf(x, y, z.T, np.r_[0:0.8:0.05]) plt.colorbar() if title is not None: plt.title(title[10:-4]) plt.clim(0,0.8) plt.xticks(np.r_[-90:90+30:30]) ctop = tropic_width.cloud_cover_top(y, vcmarray, 0.05) latup, latdown, ceiling, height = tropic_width.tropic_width3(x, y, vcmarray) plt.axvline(x=latup, ls='--', color='grey') plt.axvline(x=latdown, ls='--', color='grey') plt.axhline(y=ceiling, ls='--', color='grey') plt.axhline(y=height, ls='--', color='grey') plt.plot(x, ctop, ls='--', color='w', alpha=0.5) plt.xlim(-82,82) plt.ylim(0, 20) plt.ylabel('Altitude [km]') plt.xlabel('Latitude')
def pcolor_zonal(x, y, vcmarray, title=None): z = vcmarray.copy() z = np.ma.masked_where(z == 0, z) plt.contourf(x, y, z.T, np.r_[0:0.8:0.05]) plt.colorbar() if title is not None: plt.title(title[10:-4]) plt.clim(0, 0.8) plt.xticks(np.r_[-90:90 + 30:30]) ctop = tropic_width.cloud_cover_top(y, vcmarray, 0.05) latup, latdown, ceiling, height = tropic_width.tropic_width3( x, y, vcmarray) plt.axvline(x=latup, ls='--', color='grey') plt.axvline(x=latdown, ls='--', color='grey') plt.axhline(y=ceiling, ls='--', color='grey') plt.axhline(y=height, ls='--', color='grey') plt.plot(x, ctop, ls='--', color='w', alpha=0.5) plt.xlim(-82, 82) plt.ylim(0, 20) plt.ylabel('Altitude [km]') plt.xlabel('Latitude')
def pcolor_zonal(x, y, vcmarray, title=None): plt.figure(figsize=[15,5]) plt.contourf(x, y, vcmarray.T, np.r_[0:0.8:0.05]) plt.colorbar() if title is not None: plt.title(title) plt.clim(0,0.8) plt.xlim(-82,82) plt.xticks(np.r_[-90:90+30:30]) cover_top = tropic_width.cloud_cover_top(y, vcmarray) plt.plot(x, cover_top, lw=2, color='w', alpha=0.5) latup, latdown, ceiling, height = tropic_width.tropic_width3(x, y, vcmarray) plt.figure(figsize=[15,5]) plt.plot(x, cover_top) plt.axvline(x=latup) plt.axvline(x=latdown) plt.axhline(y=ceiling) plt.axhline(y=height) print 'lat range, second method : ', latup, latdown