Skip to content
This repository has been archived by the owner on Sep 1, 2022. It is now read-only.

Commit

Permalink
Merge pull request #1216 from lesserwhirls/prer
Browse files Browse the repository at this point in the history
GRIB table updates and logging cleanup
  • Loading branch information
lesserwhirls authored Feb 12, 2019
2 parents 2e01241 + ac15821 commit ea24a71
Show file tree
Hide file tree
Showing 111 changed files with 257 additions and 115 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -233,8 +233,8 @@ private void readData(DebugOut out, BitReader reader, BitCounterUncompressed tab

if (req.wantRow()) {
int index = req.abb.addObjectToHeap(seq);
if (req.bb.position() >= req.bb.limit())
System.out.println("HEY");
//if (req.bb.position() >= req.bb.limit())
// todo: make logger System.out.println("HEY");
req.bb.putInt(index); // an index into the Heap
}
continue;
Expand Down Expand Up @@ -358,8 +358,6 @@ private ArraySequence makeArraySequenceUncompressed(DebugOut out, BitReader read
if (req.wantRow()) {
Sequence seq = (Sequence) seqdd.refersTo;

if (seq == null)
System.out.println("HEY");
assert seq != null;

// for the obs structure
Expand Down
2 changes: 1 addition & 1 deletion cdm/src/main/java/ucar/nc2/ft/fmrc/FmrcInv.java
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ public static double getOffsetInHours(CalendarDate base, CalendarDate forecast)
double result = diff / 1000.0 / 60.0 / 60.0; // LOOK why convert to double? precision may be lost ??
long testRoundoff = (long) ( result * 1000.0 * 60.0 * 60.0);
if (diff != testRoundoff)
System.out.println("HEY");
log.debug("diff does not equal testRoundoff");
return result;
}

Expand Down
2 changes: 1 addition & 1 deletion cdm/src/main/java/ucar/nc2/ft/point/standard/Table.java
Original file line number Diff line number Diff line change
Expand Up @@ -1050,7 +1050,7 @@ public StructureDataIterator getStructureDataIterator(Cursor cursor, int bufferS
StructureMembers.Member m = members.findMember(nestedTableName);

if (m == null) {
System.out.println("HEY");
log.debug("Member is null");
} else if (m.getDataType() == DataType.SEQUENCE) {
ArraySequence seq = parentStruct.getArraySequence(m);
return seq.getStructureDataIterator();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
*/
public class NcepLocalTables extends LocalTables {
static private final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(NcepLocalTables.class);
static private final String defaultResourcePath = "resources/grib2/ncep/v20.0.0/";
static private final String defaultResourcePath = "resources/grib2/ncep/v21.0.0/";
private static NcepLocalTables single;

public static Grib2Customizer getCust(Grib2Table table) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<table3>
<title>NCEP GRIB-1 Table 3</title>
<source>http://www.nco.ncep.noaa.gov/pmb/docs/on388/table3.html</source>
<source>https://www.nco.ncep.noaa.gov/pmb/docs/on388/table3.html</source>
<parameter code="1">
<description>Ground or water surface</description>
<abbrev>SFC</abbrev>
Expand Down
5 changes: 4 additions & 1 deletion grib/src/main/resources/resources/grib1/ncep/ncepTableA.xml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<description>NCEP/ARL Smoke Model</description>
</parameter>
<parameter code="5">
<description>Satellite Derived Precipitation and temperatures, from IR (See PDS Octet 41... for specific satellite ID)</description>
<description>Satellite Derived Precipitation and temperatures, from IR (See PDS Octet 41... dfor specific satellite ID)</description>
</parameter>
<parameter code="6">
<description>NCEP/ARL Dust Model</description>
Expand Down Expand Up @@ -185,6 +185,9 @@
<parameter code="99">
<description>Miscellaneous Test ID</description>
</parameter>
<parameter code="100">
<description>Miscellaneous Test ID</description>
</parameter>
<parameter code="104">
<description>National Blend GRIB</description>
</parameter>
Expand Down
4 changes: 4 additions & 0 deletions grib/src/main/resources/resources/grib1/ncep/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -66,3 +66,7 @@

12/01/2017 sarms
- updated ncep grib1 tables using ucar/nc2/grib/grib1/tables/NcepHtmlScraper.java

02/11/2019 sarms
- updated ncep grib1 tables using grib\src\test\java\ucar\nc2\grib\grib1\table\NcepHtmlScraper.java
of 5.0 branch.
8 changes: 7 additions & 1 deletion grib/src/main/resources/resources/grib2/ncep/readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -827,4 +827,10 @@ Conflicts=0 extra=3 udunits=0
Noticed a warning that "*** Cant parse 0-90 == 0-90 Elevation in increments of 100 m" on
http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-216.shtml. Not sure how to interpret
without an example file, so will leave out for now. Has been left out since 2015, when this
table appeared.
table appeared.

02/11/2019 sarms
- updated ncep grib2 tables to v21.0.0 using grib\src\test\java\ucar\nc2\grib\grib2\table\NcepHtmlScraper.java
of 5.0 branch.
URL of NCEP GRIB2 docs changed (to https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/),
so updated that as well
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<codeTable>
<table>Table 4.0</table>
<title>Product Definition Template Number</title>
<source>http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-0.shtml</source>
<source>https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-0.shtml</source>
<parameter code="0">
<description>Analysis or forecast at a horizontal level or in a horizontal layer at a point in time. (see Template 4.0)</description>
</parameter>
Expand Down Expand Up @@ -61,14 +61,17 @@
<description>Satellite product (see Template 4.31)</description>
</parameter>
<parameter code="32">
<description>Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for simulate (synthetic) staellite data (see Template 4.32)</description>
<description>Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for simulate (synthetic) satellite data (see Template 4.32)</description>
</parameter>
<parameter code="33">
<description>Individual Ensemble Forecast, control and perturbed, at a horizontal level or in a horizontal layer at a point in time for simulated (synthetic) satellite data (see Template 4.33)</description>
</parameter>
<parameter code="34">
<description>Individual Ensemble Forecast, control and perturbed, at a horizontal level or in a horizontal layer, in a continuous or non-continuous interval for simulated (synthetic) satellite data(see Template 4.34)</description>
</parameter>
<parameter code="35">
<description>Satellite product with or without associated quality values (see Template 4.35)</description>
</parameter>
<parameter code="40">
<description>Analysis or forecast at a horizontal level or in a horizontal layer at a point in time for atmospheric chemical constituents. (see Template 4.40)</description>
</parameter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
<codeTable>
<table>Table 4.1</table>
<title>Parameter Category by Product Discipline</title>
<source>http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-1.shtml</source>
<source>https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-1.shtml</source>
</codeTable>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<codeTable>
<table>Table 4.10</table>
<title>Type of Statistical Processing</title>
<source>http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-10.shtml</source>
<source>https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-10.shtml</source>
<parameter code="0">
<description>Average</description>
</parameter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<codeTable>
<table>Table 4.11</table>
<title>Type of Time Intervals</title>
<source>http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-11.shtml</source>
<source>https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-11.shtml</source>
<parameter code="1">
<description>Successive times processed have same forecast time, start time of forecast is incremented.</description>
</parameter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<codeTable>
<table>Table 4.12</table>
<title>Operating Mode</title>
<source>http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-12.shtml</source>
<source>https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-12.shtml</source>
<parameter code="0">
<description>Maintenance Mode</description>
</parameter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<codeTable>
<table>Table 4.13</table>
<title>Quality Control Indicator</title>
<source>http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-13.shtml</source>
<source>https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-13.shtml</source>
<parameter code="0">
<description>No Quality Control Applied</description>
</parameter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<codeTable>
<table>Table 4.14</table>
<title>Clutter Filter Indicator</title>
<source>http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-14.shtml</source>
<source>https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-14.shtml</source>
<parameter code="0">
<description>No Clutter Filter Used</description>
</parameter>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<codeTable>
<table>Table 4.15</table>
<title>Type of Spatial Processing used to arrive at given</title>
<source>http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-15.shtml</source>
<source>https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-15.shtml</source>
<parameter code="0">
<description>Data is calculated directly from the source grid with no interpolation (see note 1)</description>
</parameter>
Expand Down
24 changes: 24 additions & 0 deletions grib/src/main/resources/resources/grib2/ncep/v21.0.0/Table4.16.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<codeTable>
<table>Table 4.16</table>
<title>Quality Value Associated with Parameter</title>
<source>https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-16.shtml</source>
<parameter code="0">
<description>Confidence index (see Note 2)</description>
</parameter>
<parameter code="1">
<description>Quality indicator (see Note 3 and see Code Table 244)</description>
</parameter>
<parameter code="2">
<description>Correlation of Product with used Calibration Product (see Note 4)</description>
</parameter>
<parameter code="3">
<description>Standard deviation (see Note 5)</description>
</parameter>
<parameter code="4">
<description>Random error (see Note 5)</description>
</parameter>
<parameter code="255">
<description>Missing</description>
</parameter>
</codeTable>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parameterMap>
<table>Table4.2.0.0</table>
<title>Temperature</title>
<source>http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-2-0-0.shtml</source>
<source>https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-2-0-0.shtml</source>
<parameter code="0">
<shortName>TMP</shortName>
<description>Temperature</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parameterMap>
<table>Table4.2.0.1</table>
<title>Moisture</title>
<source>http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-2-0-1.shtml</source>
<source>https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-2-0-1.shtml</source>
<parameter code="0">
<shortName>SPFH</shortName>
<description>Specific Humidity</description>
Expand Down Expand Up @@ -783,6 +783,46 @@
<description>Frozen Rain</description>
<units>kg m-2</units>
</parameter>
<parameter code="228">
<shortName>FICEAC</shortName>
<description>Flat Ice Accumulation (FRAM)</description>
<units>kg m-2</units>
</parameter>
<parameter code="229">
<shortName>LICEAC</shortName>
<description>Line Ice Accumulation (FRAM)</description>
<units>kg m-2</units>
</parameter>
<parameter code="230">
<shortName>SLACC</shortName>
<description>Sleet Accumulation</description>
<units>kg m-2</units>
</parameter>
<parameter code="231">
<shortName>PPINDX</shortName>
<description>Precipitation Potential Index</description>
<units>%</units>
</parameter>
<parameter code="232">
<shortName>PROBCIP</shortName>
<description>Probability Cloud Ice Present</description>
<units>%</units>
</parameter>
<parameter code="233">
<shortName>SNOWLR</shortName>
<description>Snow Liquid ratio</description>
<units>kg kg-1</units>
</parameter>
<parameter code="234">
<shortName>PCPDUR</shortName>
<description>Precipitation Duration</description>
<units>hour</units>
</parameter>
<parameter code="235">
<shortName>CLLMR</shortName>
<description>Cloud Liquid Mixing Ratio</description>
<units>kg kg-1</units>
</parameter>
<parameter code="241">
<shortName>TSNOW</shortName>
<description>Total Snow</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parameterMap>
<table>Table4.2.0.13</table>
<title>Aerosols</title>
<source>http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-2-0-13.shtml</source>
<source>https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-2-0-13.shtml</source>
<parameter code="0">
<shortName>AEROT</shortName>
<description>Aerosol Type</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parameterMap>
<table>Table4.2.0.14</table>
<title>Trace gases</title>
<source>http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-2-0-14.shtml</source>
<source>https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-2-0-14.shtml</source>
<parameter code="0">
<shortName>TOZNE</shortName>
<description>Total Ozone</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parameterMap>
<table>Table4.2.0.15</table>
<title>Radar</title>
<source>http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-2-0-15.shtml</source>
<source>https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-2-0-15.shtml</source>
<parameter code="0">
<shortName>BSWID</shortName>
<description>Base Spectrum Width</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parameterMap>
<table>Table4.2.0.16</table>
<title>Forecast Radar Imagery</title>
<source>http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-2-0-16.shtml</source>
<source>https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-2-0-16.shtml</source>
<parameter code="0">
<shortName>REFZR</shortName>
<description>Equivalent radar reflectivity factor for rain</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parameterMap>
<table>Table4.2.0.17</table>
<title>Electrodynamics</title>
<source>http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-2-0-17.shtml</source>
<source>https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-2-0-17.shtml</source>
<parameter code="0">
<shortName>LTNGSD</shortName>
<description>Lightning Strike Density</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parameterMap>
<table>Table4.2.0.18</table>
<title>Nuclear/radiology</title>
<source>http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-2-0-18.shtml</source>
<source>https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-2-0-18.shtml</source>
<parameter code="0">
<shortName>ACCES</shortName>
<description>Air Concentration of Caesium 137</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parameterMap>
<table>Table4.2.0.19</table>
<title>Physical atmospheric Properties</title>
<source>http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-2-0-19.shtml</source>
<source>https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-2-0-19.shtml</source>
<parameter code="0">
<shortName>VIS</shortName>
<description>Visibility</description>
Expand Down Expand Up @@ -358,4 +358,19 @@
<description>Joint Fire Weather Probability</description>
<units>%</units>
</parameter>
<parameter code="236">
<shortName>SNOWLVL</shortName>
<description>Snow Level</description>
<units>m</units>
</parameter>
<parameter code="237">
<shortName>DRYTPROB</shortName>
<description>Dry Thunderstorm Probability</description>
<units>%</units>
</parameter>
<parameter code="238">
<shortName>ELLINX</shortName>
<description>Ellrod Index</description>
<units />
</parameter>
</parameterMap>
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parameterMap>
<table>Table4.2.0.190</table>
<title>CCITT IA5 string</title>
<source>http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-2-0-190.shtml</source>
<source>https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-2-0-190.shtml</source>
<parameter code="0">
<shortName>ATEXT</shortName>
<description>Arbitrary Text String</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parameterMap>
<table>Table4.2.0.191</table>
<title>Miscellaneous</title>
<source>http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-2-0-191.shtml</source>
<source>https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-2-0-191.shtml</source>
<parameter code="0">
<shortName>TSEC</shortName>
<description>Seconds prior to initial reference time (defined in Section 1)</description>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<parameterMap>
<table>Table4.2.0.192</table>
<title>Covariance</title>
<source>http://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_table4-2-0-192.shtml</source>
<source>https://www.nco.ncep.noaa.gov/pmb/docs/grib2/grib2_doc/grib2_table4-2-0-192.shtml</source>
<parameter code="1">
<shortName>COVMZ</shortName>
<description>Covariance between zonal and meridional components of the wind. Defined as [uv]-[u][v], where "[]" indicates the mean over the indicated time span.</description>
Expand Down
Loading

0 comments on commit ea24a71

Please sign in to comment.