Browse files

adding fixed 207 grid from William; initial work to test GOES 13 and …

…15 products in geocat2awips; fixed fornav calls to single sample all category variables
  • Loading branch information...
1 parent 28ec84c commit b8b6429f1f8399f1fec5250328c5ef3ecaac3be6 @evas-ssec evas-ssec committed Jun 14, 2013
View
51 py/polar2grid/polar2grid/awips/awips_grids.conf
@@ -48,26 +48,37 @@ terra, modis, geo_nav, ndvi, none, contiguous_ind
terra, modis, mod07_nav, total_precipitable_water, none, distance, 211e, 7360, TPW, SSEC, MODIS, grid211e.ncml, SSEC_AWIPS_MODIS_EAST_4KM_TPW_%Y%m%d_%H%M.7360
# TODO, these are temporary entries for testing the geocat products; this is only a small subset of the grids/satellites/instruments that will need to be configured
-aqua, modis, geo_nav, ifr, fog, percent, 207, 9814, IFR Fog, SSEC, AQUA-MODIS, grid207_2km.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_2KM_IFRPROB_%Y%m%d_%H%M.9814
-aqua, modis, geo_nav, lifr, fog, percent, 207, 9714, LIFR Fog, SSEC, AQUA-MODIS, grid207_2km.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_2KM_LIFRPROB_%Y%m%d_%H%M.9714
-aqua, modis, geo_nav, mvfr, fog, percent, 207, 9804, LIFR Fog, SSEC, AQUA-MODIS, grid207_2km.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_2KM_MVFRPROB_%Y%m%d_%H%M.9804
-aqua, modis, geo_nav, cloud_thickness, none, distance, 207, 9806, CLD T, SSEC, AQUA-MODIS, grid207_2km.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_2KM_GM06_%Y%m%d_%H%M.9806
-aqua, modis, geo_nav, cloud_phase, none, category, 207, 9724, CLD P, SSEC, AQUA-MODIS, grid207_2km.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_2KM_CPHASE_%Y%m%d_%H%M.9724
-
-#aqua, modis, geo_nav, ifr, fog, percent, 203, 9814, IFR Fog, SSEC, AQUA-MODIS, grid203.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_2KM_IFRPROB_%Y%m%d_%H%M.9814
-#aqua, modis, geo_nav, lifr, fog, percent, 203, 9714, LIFR Fog, SSEC, AQUA-MODIS, grid203.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_2KM_LIFRPROB_%Y%m%d_%H%M.9714
-#aqua, modis, geo_nav, mvfr, fog, percent, 203, 9804, LIFR Fog, SSEC, AQUA-MODIS, grid203.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_2KM_MVFRPROB_%Y%m%d_%H%M.9804
-#aqua, modis, geo_nav, cloud_thickness, none, distance, 203, 9806, CLD T, SSEC, AQUA-MODIS, grid203.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_2KM_GM06_%Y%m%d_%H%M.9806
-#aqua, modis, geo_nav, cloud_phase, none, category, 203, 9724, CLD P, SSEC, AQUA-MODIS, grid203.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_2KM_CPHASE_%Y%m%d_%H%M.9724
-
-aqua, modis, geo_nav, ash_height, none, distance, 203, 9801, ASH H, SSEC, AQUA-MODIS, grid203.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_1KM_GM02_%Y%m%d_%H%M.9801
-aqua, modis, geo_nav, ash_mass_loading, none, mass_loading, 203, 9800, ASH M, SSEC, AQUA-MODIS, grid203.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_1KM_GM01_%Y%m%d_%H%M.9800
-aqua, modis, geo_nav, ash_effective_radius, none, distance, 203, 9802, ASH E, SSEC, AQUA-MODIS, grid203.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_1KM_GM03_%Y%m%d_%H%M.9802
-aqua, modis, geo_nav, ash_btd_11_12, none, btemp, 203, 9816, ASH BTD, SSEC, AQUA-MODIS, grid203.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_1KM_BTD1112_%Y%m%d_%H%M.9816
-aqua, modis, geo_nav, ash_11, none, btemp, 203, 9820, ASH 11um, SSEC, AQUA-MODIS, grid203.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_1KM_IRWBT_%Y%m%d_%H%M.9820
-aqua, modis, geo_nav, ash_visible, none, reflectance, 203, 9818, ASH VIS, SSEC, AQUA-MODIS, grid203.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_1KM_VISREF_%Y%m%d_%H%M.9818
-aqua, modis, geo_nav, so2_loading, none, mass_loading, 203, 9809, SO2 L, SSEC, AQUA-MODIS, grid203.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_1KM_SO2LOADING_%Y%m%d_%H%M.9809
-aqua, modis, geo_nav, so2_mask, none, category, 203, 9808, SO2 M, SSEC, AQUA-MODIS, grid203.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_1KM_SO2MASK_%Y%m%d_%H%M.9808
+aqua, modis, geo_nav, ifr, fog, percent, 207, 9814, IFR Fog, SSEC, AQUA-MODIS, grid207_2km.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_2KM_IFRPROB_%Y%m%d_%H%M.9814
+aqua, modis, geo_nav, lifr, fog, percent, 207, 9714, LIFR Fog, SSEC, AQUA-MODIS, grid207_2km.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_2KM_LIFRPROB_%Y%m%d_%H%M.9714
+aqua, modis, geo_nav, mvfr, fog, percent, 207, 9804, MVFR Fog, SSEC, AQUA-MODIS, grid207_2km.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_2KM_MVFRPROB_%Y%m%d_%H%M.9804
+aqua, modis, geo_nav, cloud_thickness, none, distance, 207, 9806, CLD T, SSEC, AQUA-MODIS, grid207_2km.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_2KM_GM06_%Y%m%d_%H%M.9806
+aqua, modis, geo_nav, cloud_phase, none, category, 207, 9724, CLD P, SSEC, AQUA-MODIS, grid207_2km.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_2KM_CPHASE_%Y%m%d_%H%M.9724
+aqua, modis, geo_nav, ash_height, none, distance, 203, 9801, ASH H, SSEC, AQUA-MODIS, grid203.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_1KM_GM02_%Y%m%d_%H%M.9801
+aqua, modis, geo_nav, ash_mass_loading, none, mass_loading, 203, 9800, ASH M, SSEC, AQUA-MODIS, grid203.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_1KM_GM01_%Y%m%d_%H%M.9800
+aqua, modis, geo_nav, ash_effective_radius, none, distance, 203, 9802, ASH E, SSEC, AQUA-MODIS, grid203.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_1KM_GM03_%Y%m%d_%H%M.9802
+aqua, modis, geo_nav, ash_btd_11_12, none, btemp, 203, 9816, ASH BTD, SSEC, AQUA-MODIS, grid203.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_1KM_BTD1112_%Y%m%d_%H%M.9816
+aqua, modis, geo_nav, ash_11, none, btemp, 203, 9820, ASH 11um, SSEC, AQUA-MODIS, grid203.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_1KM_IRWBT_%Y%m%d_%H%M.9820
+aqua, modis, geo_nav, ash_visible, none, reflectance, 203, 9818, ASH VIS, SSEC, AQUA-MODIS, grid203.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_1KM_VISREF_%Y%m%d_%H%M.9818
+aqua, modis, geo_nav, so2_loading, none, mass_loading, 203, 9809, SO2 L, SSEC, AQUA-MODIS, grid203.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_1KM_SO2LOADING_%Y%m%d_%H%M.9809
+aqua, modis, geo_nav, so2_mask, none, category, 203, 9808, SO2 M, SSEC, AQUA-MODIS, grid203.ncml, SSEC_AWIPS_GEOCAT-MOD_ALAS_1KM_SO2MASK_%Y%m%d_%H%M.9808
+# TODO, here are more test lines for the geocat products; this time for goes15
+goes15, goes_imager, geo_nav, ifr, fog, percent, 207, 9814, IFR Fog, SSEC, GOES-15, grid207_2km.ncml, SSEC_AWIPS_GEOCAT-GEOW_ALAS_2KM_IFRPROB_%Y%m%d_%H%M.9814
+goes15, goes_imager, geo_nav, lifr, fog, percent, 207, 9714, LIFR Fog, SSEC, GOES-15, grid207_2km.ncml, SSEC_AWIPS_GEOCAT-GEOW_ALAS_2KM_LIFRPROB_%Y%m%d_%H%M.9714
+goes15, goes_imager, geo_nav, mvfr, fog, percent, 207, 9804, MVFR Fog, SSEC, GOES-15, grid207_2km.ncml, SSEC_AWIPS_GEOCAT-GEOW_ALAS_2KM_MVFRPROB_%Y%m%d_%H%M.9804
+goes15, goes_imager, geo_nav, cloud_thickness, none, distance, 207, 9806, CLD T, SSEC, GOES-15, grid207_2km.ncml, SSEC_AWIPS_GEOCAT-GEOW_ALAS_2KM_GM06_%Y%m%d_%H%M.9806
+goes15, goes_imager, geo_nav, cloud_phase, none, category, 207, 9724, CLD P, SSEC, GOES-15, grid207_2km.ncml, SSEC_AWIPS_GEOCAT-GEOW_ALAS_2KM_CPHASE_%Y%m%d_%H%M.9724
+# TODO, this isn't a 4km grid yet, need to confirm it's the right grid first
+goes15, goes_imager, geo_nav, ifr, fog, percent, 211w, 9814, IFR Fog, SSEC, GOES-15, grid211w.ncml, SSEC_AWIPS_GEOCAT-GEOW_CONUS_4KM_IFRPROB_%Y%m%d_%H%M.9814
+goes15, goes_imager, geo_nav, lifr, fog, percent, 211w, 9714, LIFR Fog, SSEC, GOES-15, grid211w.ncml, SSEC_AWIPS_GEOCAT-GEOW_CONUS_4KM_LIFRPROB_%Y%m%d_%H%M.9714
+goes15, goes_imager, geo_nav, mvfr, fog, percent, 211w, 9804, MVFR Fog, SSEC, GOES-15, grid211w.ncml, SSEC_AWIPS_GEOCAT-GEOW_CONUS_4KM_MVFRPROB_%Y%m%d_%H%M.9804
+goes15, goes_imager, geo_nav, cloud_thickness, none, distance, 211w, 9806, CLD T, SSEC, GOES-15, grid211w.ncml, SSEC_AWIPS_GEOCAT-GEOW_CONUS_4KM_FOGDEPTH_%Y%m%d_%H%M.9806
+goes15, goes_imager, geo_nav, cloud_phase, none, category, 211w, 9724, CLD P, SSEC, GOES-15, grid211w.ncml, SSEC_AWIPS_GEOCAT-GEOW_CONUS_4KM_CPHASE_%Y%m%d_%H%M.9724
+# TODO the grid for goes 13 isn't at 4km yet, need to confirm it's the right grid to start with
+goes13, goes_imager, geo_nav, ifr, fog, percent, 211e, 9814, IFR Fog, SSEC, GOES-13, grid211e.ncml, SSEC_AWIPS_GEOCAT-GEOE_CONUS_4KM_IFRPROB_%Y%m%d_%H%M.9814
+goes13, goes_imager, geo_nav, lifr, fog, percent, 211e, 9714, LIFR Fog, SSEC, GOES-13, grid211e.ncml, SSEC_AWIPS_GEOCAT-GEOE_CONUS_4KM_LIFRPROB_%Y%m%d_%H%M.9714
+goes13, goes_imager, geo_nav, mvfr, fog, percent, 211e, 9804, MVFR Fog, SSEC, GOES-13, grid211e.ncml, SSEC_AWIPS_GEOCAT-GEOE_CONUS_4KM_MVFRPROB_%Y%m%d_%H%M.9804
+goes13, goes_imager, geo_nav, cloud_thickness, none, distance, 211e, 9806, CLD T, SSEC, GOES-13, grid211e.ncml, SSEC_AWIPS_GEOCAT-GEOE_CONUS_4KM_FOGDEPTH_%Y%m%d_%H%M.9806
+goes13, goes_imager, geo_nav, cloud_phase, none, category, 211e, 9724, CLD P, SSEC, GOES-13, grid211e.ncml, SSEC_AWIPS_GEOCAT-GEOE_CONUS_4KM_CPHASE_%Y%m%d_%H%M.9724
# TODO, this is missing a lot of information and I'm not planning to do the other versions of these lines until I've got that information
#terra, modis, ice_surface_temperature, none, btemp, 211e, 0000, IST, SSEC, MODIS, grid211e.ncml, SSEC_AWIPS_MODIS_EAST_IST_%Y%m%d_%H%M.0000
View
29 py/polar2grid/polar2grid/awips/ncml/grid207_dnb.ncml
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<netcdf xmlns="http://www.unidata.ucar.edu/namespaces/netcdf/ncml-2.2" location="grid203.nc">
+ <dimension name="y" length="4352" />
+ <dimension name="x" length="6144" />
+ <attribute name="depictorName" value="grid207" />
+ <attribute name="projName" value="STEREOGRAPHIC" />
+ <attribute name="projIndex" type="int" value="1" />
+ <attribute name="lat00" type="float" value="63.96961" />
+ <attribute name="lon00" type="float" value="153.6901" />
+ <attribute name="latNxNy" type="float" value="42.15363" />
+ <attribute name="lonNxNy" type="float" value="-124.3318" />
+ <attribute name="centralLat" type="float" value="90." />
+ <attribute name="centralLon" type="float" value="-150." />
+ <attribute name="latDxDy" type="float" value="60." />
+ <attribute name="lonDxDy" type="float" value="-150." />
+ <attribute name="dyKm" type="float" value="0.750" />
+ <attribute name="dxKm" type="float" value="0.750" />
+ <attribute name="rotation" type="float" value="0." />
+ <attribute name="xMin" type="float" value="-0.2556496" />
+ <attribute name="xMax" type="float" value="0.01474848" />
+ <attribute name="yMin" type="float" value="-0.8768771" />
+ <attribute name="yMax" type="float" value="-0.5622397" />
+ <variable name="validTime" type="double">
+ <attribute name="units" value="seconds since 1970-1-1 00:00:00.00 0:00" />
+ </variable>
+ <variable name="image" shape="y x" type="byte">
+ <attribute name="long_name" value="image" />
+ </variable>
+</netcdf>
View
13 py/polar2grid/polar2grid/grids/grid207_1km.gpd
@@ -0,0 +1,13 @@
+Grid Width: 2304
+Grid Height: 1632
+Grid Map Units per Cell: 750.0
+Map Projection: Polar Stereographic (ellipsoid)
+Map Reference Latitude:90.0
+Map Second Reference Latitude:60.0
+Map Reference Longitude:-150.0
+Map Equatorial Radius:6378137
+Map Polar Radius:6356752.314
+Map Origin Latitude:63.896
+Map Origin Longitude:153.379
+Map Eccentricity:0.0818191910435
+Map Eccentricity Squared:0.006785161574
View
4 py/polar2grid/polar2grid/grids/grid207_2km.gpd
@@ -6,8 +6,8 @@ Map Reference Latitude:90.0
Map Second Reference Latitude:60.0
Map Reference Longitude:-150.0
Map Equatorial Radius:6378137
+Map Origin Latitude:63.896
+Map Origin Longitude:153.379
Map Polar Radius:6356752.314
-Map Origin Latitude:63.8
-Map Origin Longitude:153.69
Map Eccentricity:0.0818191910435
Map Eccentricity Squared:0.006785161574
View
13 py/polar2grid/polar2grid/grids/grid207_dnb.gpd
@@ -0,0 +1,13 @@
+Grid Width: 6144
+Grid Height: 4352
+Grid Map Units per Cell: 750.0
+Map Projection: Polar Stereographic (ellipsoid)
+Map Reference Latitude:90.0
+Map Second Reference Latitude:60.0
+Map Reference Longitude:-150.0
+Map Equatorial Radius:6378137
+Map Polar Radius:6356752.314
+Map Origin Latitude:63.896
+Map Origin Longitude:153.379
+Map Eccentricity:0.0818191910435
+Map Eccentricity Squared:0.006785161574
View
4 py/polar2grid/polar2grid/remap.py
@@ -42,7 +42,7 @@
"""
__docformat__ = "restructuredtext en"
-from polar2grid.core.constants import GRID_KIND_PROJ4,GRID_KIND_GPD,DEFAULT_FILL_VALUE
+from polar2grid.core.constants import GRID_KIND_PROJ4, GRID_KIND_GPD, DEFAULT_FILL_VALUE, DKIND_CATEGORY
from polar2grid.core.fbf import check_stem
from . import ll2cr as gator # gridinator
from . import ms2gt
@@ -280,7 +280,7 @@ def run_fornav(sat, instrument, nav_set_uid, grid_jobs, ll2cr_output,
grid_fill_1=fornav_job["grid_fill_1"],
weight_delta_max=fornav_D,
weight_distance_max=fornav_d,
- select_single_samples=do_single_sample,
+ select_single_samples=do_single_sample or remap_data_as is DKIND_CATEGORY,
# We only specify start_scan for the 'image'/channel
# data because ll2cr is not 'forced' so it only writes
# useful data to the output cols/rows files
View
5 py/polar2grid_core/polar2grid/core/constants.py
@@ -72,8 +72,9 @@
SAT_MTSAT2 = "mtsat2"
# Instruments
-INST_VIIRS = "viirs"
-INST_MODIS = "modis"
+INST_VIIRS = "viirs"
+INST_MODIS = "modis"
+INST_GIMAGER = "goes_imager"
# Band Kinds
BKIND_I = "i"
View
12 py/polar2grid_core/polar2grid/core/rescale_configs/rescale.8bit.conf
@@ -80,6 +80,18 @@ aqua, modis, geo_nav, ash_11, none, btemp,
aqua, modis, geo_nav, ash_visible, none, reflectance, sqrt, 100.0, 2.55
aqua, modis, geo_nav, so2_loading, none, mass_loading, raw
aqua, modis, geo_nav, so2_mask, none, category, raw
+# TODO more temporary entries for testing geocat products from goes
+goes15, goes_imager, geo_nav, ifr, fog, percent, linear, 2.55, 0.0
+goes15, goes_imager, geo_nav, lifr, fog, percent, linear, 2.55, 0.0
+goes15, goes_imager, geo_nav, mvfr, fog, percent, linear, 2.55, 0.0
+goes15, goes_imager, geo_nav, cloud_thickness, none, distance, linear, 0.17, 0.0
+goes15, goes_imager, geo_nav, cloud_phase, none, category, linear, 30.0, 30.0
+goes13, goes_imager, geo_nav, ifr, fog, percent, linear, 2.55, 0.0
+goes13, goes_imager, geo_nav, lifr, fog, percent, linear, 2.55, 0.0
+goes13, goes_imager, geo_nav, mvfr, fog, percent, linear, 2.55, 0.0
+goes13, goes_imager, geo_nav, cloud_thickness, none, distance, linear, 0.17, 0.0
+goes13, goes_imager, geo_nav, cloud_phase, none, category, linear, 30.0, 30.0
+
# TODO, this is guesswork
terra, modis, geo_nav, inversion_strength, none, btemp, btemp_c, 242.0, 660, 2, 418, 1
View
19 py/polar2grid_modis/polar2grid/modis/geocat_guidebook.py
@@ -62,12 +62,19 @@
# this is true for the 1km data, FUTURE: when we get to other kinds, this will need to be more sophisicated
MODIS_ROWS_PER_SCAN = 10
+#AVHRR_ROWS_PER_SCAN = 1 # TODO William confirmed that this is 1, but fornav won't accept less than 2 (TODO, is this line needed at all?)
+MTSAT_ROWS_PER_SCAN = 2 # confirmed by William
+SEVIRI_ROWS_PER_SCAN = 2 # confirmed by William
+GOES_ROWS_PER_SCAN = 2 # confirmed by William
# TODO, need additional values for other cases: this should cover Aqua and Terra, but we also expect Goes-12, Goes-15, SNPP (VIIRS), Meteosat-9 (SEVIRI), and MTSAT-2
# more general rows per scan dictionary
ROWS_PER_SCAN = {
- (SAT_AQUA, INST_MODIS) : MODIS_ROWS_PER_SCAN,
- (SAT_TERRA, INST_MODIS) : MODIS_ROWS_PER_SCAN,
+ (SAT_AQUA, INST_MODIS) : MODIS_ROWS_PER_SCAN,
+ (SAT_TERRA, INST_MODIS) : MODIS_ROWS_PER_SCAN,
+ (SAT_GOES13, INST_GIMAGER) : GOES_ROWS_PER_SCAN,
+ (SAT_GOES15, INST_GIMAGER) : GOES_ROWS_PER_SCAN,
+ # TODO, add the other satellites that we'll need to know this information for
}
# a regular expression that will match geocat files
@@ -215,11 +222,11 @@ def get_satellite_from_filename (data_file_name_string) :
satellite_to_return = SAT_TERRA
instrument_to_return = INST_MODIS
elif data_file_name_string.find("GOES-13") >= 0 :
- satellite_to_return = SAT_GOES13
- # TODO, what instrument name to use here?
+ satellite_to_return = SAT_GOES13
+ instrument_to_return = INST_GIMAGER
elif data_file_name_string.find("GOES-15") >= 0 :
- satellite_to_return = SAT_GOES15
- # TODO, what instrument name to use here?
+ satellite_to_return = SAT_GOES15
+ instrument_to_return = INST_GIMAGER
elif data_file_name_string.find("SNPP") >= 0 :
satellite_to_return = SAT_NPP
instrument_to_return = INST_VIIRS

0 comments on commit b8b6429

Please sign in to comment.