Skip to content
Snippets Groups Projects
Commit 397b7ab4 authored by tomrink's avatar tomrink
Browse files

store fixed grid proj4 and cartopy crs

parent a108a04c
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ from metpy.calc import thickness_hydrostatic
from collections import namedtuple
import os
import h5py
import pickle
LatLonTuple = namedtuple('LatLonTuple', ['lat', 'lon'])
......@@ -354,6 +355,49 @@ def normalize(data, param, mean_std_dict, add_noise=False, noise_scale=1.0, seed
return data
f = open('/Users/tomrink/geos_crs_goes16_FD.pkl', 'rb')
geos_goes16_fd = pickle.load(f)
f.close()
f = open('/Users/tomrink/geos_crs_goes16_CONUS.pkl', 'rb')
geos_goes16_conus = pickle.load(f)
f.close()
f = open('/Users/tomrink/geos_crs_H08_FD.pkl', 'rb')
geos_h08_fd = pickle.load(f)
f.close()
def get_cartopy_crs(satellite, domain):
if satellite == 'GOES16':
if domain == 'FD':
geos = geos_goes16_fd
xlen = 5424
xmin = -5433893.0
xmax = 5433893.
ylen = 5424
ymin = -5433893.0
ymax = 5433893.0
elif domain == 'CONUS':
geos = geos_goes16_conus
xlen = 2500
xmin = -3626269.5
xmax = 1381770.0
ylen = 1500
ymin = 1584175.9
ymax = 4588198.0
elif satellite == 'H08':
geos = geos_h08_fd
xlen = 5500
xmin = -5498.99990119
xmax = 5498.99990119
ylen = 5500
ymin = -5498.99990119
ymax = 5498.99990119
return geos, xlen, xmin, xmax, ylen, ymin, ymax
# ------------ This code will not be needed when we implement a Fully Connected CNN -----------------------------------
# Example GOES file to retrieve GEOS parameters in MetPy form (CONUS)
exmp_file_conus = '/Users/tomrink/data/OR_ABI-L1b-RadC-M6C14_G16_s20193140811215_e20193140813588_c20193140814070.nc'
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment