GithubHelp home page GithubHelp logo

blaylockbk / pybkb_v2 Goto Github PK

View Code? Open in Web Editor NEW
67.0 67.0 28.0 563.96 MB

Python scripts that help me be a successfull meteorologist. (Python 2) For Python 3, use: https://github.com/blaylockbk/pyBKB_v3

Python 2.07% Makefile 0.01% Batchfile 0.01% Jupyter Notebook 97.90% Smarty 0.01% Shell 0.01% Perl 0.01% MATLAB 0.01%
mesowest python

pybkb_v2's Issues

Downloading a full year of HRRR srf variables

Hi @blaylockbk,

First, thanks for providing this archive and download scripts.

I am trying to download one year of HRRR srf variables. I realize this is a huge amount of data, but I will be sub-setting the domain down to a ~10x10 grid cell region, and sub-setting to ~10 srf variables.

I can successfully use HRRR_S3.py to grab srf variables for one day (+24 h forecasts from 00). But when I try to grab multiple initialization times (i.e. 00, 06, 12, 18) and only the 8 hour forecast times, the script hangs, without giving any error. (it just sits at a random download % and htop shows nothing is happening).

I have also tried your HRRR_S3_fastDwnld.py script, but get an error:
URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed

I was hoping to modify the scripts to either loop over days (HRRR_S3.py) or variables (HRRR_S3_fastDwnld.py), but maybe I am taking the wrong approach.

Appreciate your suggestions!

ipynb file unavailable

Hello,
I can't open this file: pyBKB_v2/demos/Find_nearest_lat_lon_in_grid.ipynb.
Have tried on Chrome and IE, neither of them works.
Could you please take a look at it?
Thanks.

CONUS Water Vapor

I tried your CONUS water vapor (mapping_GOES_16_data_CONUS_WaterVapor.py) almost verbatim. The only difference was I used an infrared channel instead of the wv channel. It displayed correctly for the initial GEOS figure, but I received a blank image for the LCC. I had the vmin=170 and vmax=370. I also used the 'Greys_r' cmap.

from netCDF4 import Dataset
import numpy as np
from datetime import datetime, timedelta
from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
from pyproj import Proj

p = Proj(proj='geos', h='35786023.0', lon_0='-89.5', sweep='x')

C_file = '/home/awips/scripts/Data/raw/CH13/OR_ABI-L2-CMIPF- M3C13_G16_s20182691245351_e20182691256129_c20182691256207.nc'
C = Dataset(C_file, 'r')

#from matplotlib.colors import LinearSegmentedColormap

#cmap_WV = LinearSegmentedColormap.from_list('this', ['darkgreen', 'green', 'lightgreen', 'white',   'blue', 'yellow', 'red', 'k'])

# Channel 13 Data
WV10 = C.variables['CMI']

h = C.variables['goes_imager_projection'].perspective_point_height
X = C.variables['x'][:] * h
Y = C.variables['y'][:] * h

# GOES-16 image on geostationary projection
m = Basemap(projection='geos', lon_0='-89.5',
            resolution='i', area_thresh=1500,
            llcrnrx=X.min(),llcrnry=Y.min(),
            urcrnrx=X.max(),urcrnry=Y.max())

# Long-Wave IR GEOS
plt.figure(1)
m.imshow(np.flipud(WV10), cmap='Greys_r', vmax=378, vmin=170)
m.drawcoastlines()
m.drawcountries()
m.drawstates()

plt.title('GOES-16 ABI Channel 10: Low-Level Troposphere WV Band' % ())
cb = plt.colorbar(orientation='horizontal', pad=.01, shrink=.75)
cb.set_label('Brightness Temperature (K)')

# Convert map points to lats/lons
Xs, Ys = np.meshgrid(X, Y)
lons, lats = p(Xs, Ys, inverse=True)

## Plot GOES-16 on HRRR Map:
Hm = Basemap(resolution='i', projection='lcc', area_thresh=1000, \
         width=1800*3000, height=1060*3000, \
         lat_1=38.5, lat_2=38.5, \
         lat_0=38.5, lon_0=-97.5)

Hx, Hy = Hm(lons, lats)

 #Long-Wave IR
 plt.figure(4)
 m = Hm.pcolormesh(Hx, Hy, WV10, cmap='Greys_r', vmax=378, vmin=170)
 Hm.drawstates()
 Hm.drawcountries()
 Hm.drawcoastlines()
 plt.title('GOES-16 ABI Channel 10: Low-Level Troposphere WV Band' % ())
 cb = plt.colorbar(orientation='horizontal', pad=.01, shrink=.75)
 cb.set_label('Brightness Temperature (K)')

 plt.show()

figure_4

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.