jgrib-commits Mailing List for Java GRIB reader
Status: Beta
Brought to you by:
kjellr
You can subscribe to this list here.
| 2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
(6) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(2) |
Sep
|
Oct
|
Nov
(4) |
Dec
|
| 2005 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2006 |
Jan
|
Feb
|
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
(43) |
Aug
(44) |
Sep
(18) |
Oct
(1) |
Nov
(1) |
Dec
|
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
| 2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(10) |
Nov
(2) |
Dec
|
|
From: Peter G. <fr...@us...> - 2008-11-14 22:47:09
|
Update of /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14894/src/net/sourceforge/jgrib Modified Files: GribFile.java Log Message: Bugfix in GribFile.java - When seeking for GRIB headers we failed if the previous grib record was zero padded to get even numbers of bytes Index: GribFile.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/GribFile.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** GribFile.java 8 Oct 2008 09:04:14 -0000 1.14 --- GribFile.java 14 Nov 2008 22:46:59 -0000 1.15 *************** *** 677,681 **** ui8 = in.readUI8(); ! while (ui8 > 0) { //This code has been commented by Antonio S. Cofio, because if // you have this sequence of characters GGRIB you will skip the message --- 677,688 ---- ui8 = in.readUI8(); ! // ! // Bugfix by frv_peg on 2008-11-15 due to the fact, that ! // GRIB files holding bitmaps are zero padded to reach ! // and equal number of bytes, thus we don't find record ! // number two if, ui8 > 0 ! // ! while (ui8 > -1) { ! //This code has been commented by Antonio S. Cofio, because if // you have this sequence of characters GGRIB you will skip the message |
|
From: Peter G. <fr...@us...> - 2008-11-14 22:47:09
|
Update of /cvsroot/jgrib/jgrib In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv14894 Modified Files: ChangeLog Log Message: Bugfix in GribFile.java - When seeking for GRIB headers we failed if the previous grib record was zero padded to get even numbers of bytes Index: ChangeLog =================================================================== RCS file: /cvsroot/jgrib/jgrib/ChangeLog,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** ChangeLog 8 Oct 2008 09:04:15 -0000 1.17 --- ChangeLog 14 Nov 2008 22:46:59 -0000 1.18 *************** *** 8,11 **** --- 8,17 ---- CVS history. + 2008-10-15 Peter Gylling <frv_peg at users.sourceforge.net> + - Bugfix by frv_peg on 2008-11-15 due to the fact, that + GRIB files holding bitmaps are zero padded to reach + and equal number of bytes, thus we don't find record + number two if, ui8 > 0 + 2008-10-08 Peter Gylling <frv_peg at users.sourceforge.net> - BUGFIX: GribGDSRotLatLon class didn't extract the GRID DX nd DY |
|
From: Peter G. <fr...@us...> - 2008-10-08 10:17:24
|
Update of /cvsroot/jgrib/jgrib In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29021 Modified Files: ChangeLog Log Message: Fixed arround 500 compilation warnings - no functionality changed Index: ChangeLog =================================================================== RCS file: /cvsroot/jgrib/jgrib/ChangeLog,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** ChangeLog 7 Oct 2008 20:44:28 -0000 1.16 --- ChangeLog 8 Oct 2008 09:04:15 -0000 1.17 *************** *** 8,11 **** --- 8,17 ---- CVS history. + 2008-10-08 Peter Gylling <frv_peg at users.sourceforge.net> + - BUGFIX: GribGDSRotLatLon class didn't extract the GRID DX nd DY + for grid mode 136 (bit mask: 10001000) - which is allready + supported. + - Removed ~500 compile warnings, type: Unqualified access + 2008-10-07 Peter Gylling <frv_peg at users.sourceforge.net> - Updated GribFile class with two new constructors to facillitate |
|
From: Peter G. <fr...@us...> - 2008-10-08 10:17:03
|
Update of /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/gds In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29021/src/net/sourceforge/jgrib/gds Modified Files: GribGDSPolarStereo.java GribGDSLatLon.java GribGDSLambert.java Log Message: Fixed arround 500 compilation warnings - no functionality changed Index: GribGDSLambert.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/gds/GribGDSLambert.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** GribGDSLambert.java 11 Sep 2006 11:15:02 -0000 1.5 --- GribGDSLambert.java 8 Oct 2008 09:04:14 -0000 1.6 *************** *** 133,137 **** if (this.grid_type != 3 ){ throw new NoValidGribException("GribGDSLambert: grid_type is not "+ ! "Lambert Conformal (read grid type " + grid_type + " needed 3)"); } --- 133,137 ---- if (this.grid_type != 3 ){ throw new NoValidGribException("GribGDSLambert: grid_type is not "+ ! "Lambert Conformal (read grid type " + this.grid_type + " needed 3)"); } *************** *** 200,204 **** */ public boolean isUVEastNorth() { ! return (grid_mode & 0x08) == 0; } --- 200,204 ---- */ public boolean isUVEastNorth() { ! return (this.grid_mode & 0x08) == 0; } *************** *** 213,227 **** // not equal, so either less than or greater than. // check if gds is less, if not, then gds is greater ! if (grid_type > gds.getGridType()) return -1; ! if (grid_mode > gds.getGridMode()) return -1; ! if (grid_scan > gds.getGridScanmode()) return -1; ! if (grid_nx > gds.getGridNX()) return -1; ! if (grid_ny > gds.getGridNY()) return -1; ! if (grid_dx > gds.getGridDX()) return -1; ! if (grid_dy > gds.getGridDY()) return -1; ! if (grid_lat1 > gds.getGridLat1()) return -1; ! if (grid_lat2 > gds.getGridLat2()) return -1; ! if (grid_lon1 > gds.getGridLon1()) return -1; ! if (grid_lon2 > gds.getGridLon2()) return -1; // if here, then something must be greater than something else - doesn't matter what --- 213,227 ---- // not equal, so either less than or greater than. // check if gds is less, if not, then gds is greater ! if (this.grid_type > gds.getGridType()) return -1; ! if (this.grid_mode > gds.getGridMode()) return -1; ! if (this.grid_scan > gds.getGridScanmode()) return -1; ! if (this.grid_nx > gds.getGridNX()) return -1; ! if (this.grid_ny > gds.getGridNY()) return -1; ! if (this.grid_dx > gds.getGridDX()) return -1; ! if (this.grid_dy > gds.getGridDY()) return -1; ! if (this.grid_lat1 > gds.getGridLat1()) return -1; ! if (this.grid_lat2 > gds.getGridLat2()) return -1; ! if (this.grid_lon1 > gds.getGridLon1()) return -1; ! if (this.grid_lon2 > gds.getGridLon2()) return -1; // if here, then something must be greater than something else - doesn't matter what *************** *** 238,246 **** { int result = 17; ! result = 37 * result + grid_nx; ! result = 37 * result + grid_ny; ! int intLat1 = Float.floatToIntBits((float) grid_lat1); result = 37 * result + intLat1; ! int intLon1 = Float.floatToIntBits((float) grid_lon1); result = 37 * result + intLon1; return result; --- 238,246 ---- { int result = 17; ! result = 37 * result + this.grid_nx; ! result = 37 * result + this.grid_ny; ! int intLat1 = Float.floatToIntBits((float) this.grid_lat1); result = 37 * result + intLat1; ! int intLon1 = Float.floatToIntBits((float) this.grid_lon1); result = 37 * result + intLon1; return result; *************** *** 268,286 **** GribGDSLambert gds = (GribGDSLambert) obj; ! if (grid_type != gds.grid_type) return false; ! if (grid_nx != gds.grid_nx) return false; ! if (grid_ny != gds.grid_ny) return false; ! if (grid_lat1 != gds.grid_lat1) return false; ! if (grid_lon1 != gds.grid_lon1) return false; ! if (grid_mode != gds.grid_mode) return false; ! if (grid_lat2 != gds.grid_lat2) return false; ! if (grid_dx != gds.grid_dx) return false; ! if (grid_dy != gds.grid_dy) return false; ! if (proj_center != gds.proj_center) ! if (grid_scan != gds.grid_scan) return false; ! if (grid_latin1 != gds.grid_latin1) return false; ! if (grid_latin2 != gds.grid_latin2) return false; ! if (grid_latsp != gds.grid_latsp) return false; ! if (grid_lonsp != gds.grid_lonsp) return false; return true; --- 268,286 ---- GribGDSLambert gds = (GribGDSLambert) obj; ! if (this.grid_type != gds.grid_type) return false; ! if (this.grid_nx != gds.grid_nx) return false; ! if (this.grid_ny != gds.grid_ny) return false; ! if (this.grid_lat1 != gds.grid_lat1) return false; ! if (this.grid_lon1 != gds.grid_lon1) return false; ! if (this.grid_mode != gds.grid_mode) return false; ! if (this.grid_lat2 != gds.grid_lat2) return false; ! if (this.grid_dx != gds.grid_dx) return false; ! if (this.grid_dy != gds.grid_dy) return false; ! if (this.proj_center != gds.proj_center) ! if (this.grid_scan != gds.grid_scan) return false; ! if (this.grid_latin1 != gds.grid_latin1) return false; ! if (this.grid_latin2 != gds.grid_latin2) return false; ! if (this.grid_latsp != gds.grid_latsp) return false; ! if (this.grid_lonsp != gds.grid_lonsp) return false; return true; *************** *** 438,447 **** public double[] getXCoords() { ! double[] xCoords = new double[grid_nx]; ! double startx = grid_startx/1000.0; ! double dx = grid_dx/1000.0; ! for (int i = 0; i < grid_nx; i++) { double x = startx + i * dx; --- 438,447 ---- public double[] getXCoords() { ! double[] xCoords = new double[this.grid_nx]; ! double startx = this.grid_startx/1000.0; ! double dx = this.grid_dx/1000.0; ! for (int i = 0; i < this.grid_nx; i++) { double x = startx + i * dx; *************** *** 484,493 **** public double[] getYCoords() { ! double[] yCoords = new double[grid_ny]; ! double starty = grid_starty/1000.0; ! double dy = grid_dy/1000.0; ! for (int j = 0; j < grid_ny; j++) { double y = starty + j * dy; --- 484,493 ---- public double[] getYCoords() { ! double[] yCoords = new double[this.grid_ny]; ! double starty = this.grid_starty/1000.0; ! double dy = this.grid_dy/1000.0; ! for (int j = 0; j < this.grid_ny; j++) { double y = starty + j * dy; *************** *** 528,548 **** //pi2=Math.PI/2; - peg - never used pi4=Math.PI/4; ! latin1r = Math.toRadians(grid_latin1); ! latin2r = Math.toRadians(grid_latin2); // compute the common parameters ! n = Math.log(Math.cos(latin1r) / Math.cos(latin2r)) / Math.log(Math.tan(pi4 + latin2r / 2) / Math.tan(pi4 + latin1r / 2)); ! f = (Math.cos(latin1r) * Math.pow(Math.tan(pi4 + latin1r / 2), n)) / n; ! rho = EARTH_RADIUS * f * ! Math.pow(Math.tan(pi4 + Math.toRadians(grid_lat1) / 2),-n); ! rhoRef = EARTH_RADIUS * f * ! Math.pow(Math.tan(pi4 + Math.toRadians(grid_latin1) / 2),-n); // compute the starting x and starting y coordinates for this projection // the grid_lon2 here is the lov - the reference longitude ! theta = n * Math.toRadians(grid_lon1 - grid_lon2); ! grid_startx = rho * Math.sin(theta); ! grid_starty = rhoRef - rho * Math.cos(theta); } --- 528,548 ---- //pi2=Math.PI/2; - peg - never used pi4=Math.PI/4; ! latin1r = Math.toRadians(this.grid_latin1); ! latin2r = Math.toRadians(this.grid_latin2); // compute the common parameters ! this.n = Math.log(Math.cos(latin1r) / Math.cos(latin2r)) / Math.log(Math.tan(pi4 + latin2r / 2) / Math.tan(pi4 + latin1r / 2)); ! this.f = (Math.cos(latin1r) * Math.pow(Math.tan(pi4 + latin1r / 2), this.n)) / this.n; ! rho = this.EARTH_RADIUS * this.f * ! Math.pow(Math.tan(pi4 + Math.toRadians(this.grid_lat1) / 2),-this.n); ! this.rhoRef = this.EARTH_RADIUS * this.f * ! Math.pow(Math.tan(pi4 + Math.toRadians(this.grid_latin1) / 2),-this.n); // compute the starting x and starting y coordinates for this projection // the grid_lon2 here is the lov - the reference longitude ! theta = this.n * Math.toRadians(this.grid_lon1 - this.grid_lon2); ! this.grid_startx = rho * Math.sin(theta); ! this.grid_starty = this.rhoRef - rho * Math.cos(theta); } *************** *** 588,592 **** // need space for a lat and lon for each grid point ! coords = new double[grid_ny * grid_nx * 2]; // compute the lat and lon for each grid point --- 588,592 ---- // need space for a lat and lon for each grid point ! coords = new double[this.grid_ny * this.grid_nx * 2]; // compute the lat and lon for each grid point *************** *** 596,614 **** int k = 0; ! for (int j = 0; j < grid_ny; j++) { ! y = grid_starty + grid_dy*j; ! for (int i = 0; i < grid_nx; i++) { ! x = grid_startx + grid_dx*i; ! theta = Math.atan(x/(rhoRef - y)); ! rho = Math.sqrt(Math.pow(x,2.0)+Math.pow((rhoRef-y),2.0)); ! if (n < 0) { rho = -rho; } ! lon = grid_lon2 + Math.toDegrees(theta/n); lat = Math.toDegrees(2.0 * ! Math.atan(Math.pow(EARTH_RADIUS * f / rho, 1 / n)) - pi2); // move x-coordinates to the range -180..180 --- 596,614 ---- int k = 0; ! for (int j = 0; j < this.grid_ny; j++) { ! y = this.grid_starty + this.grid_dy*j; ! for (int i = 0; i < this.grid_nx; i++) { ! x = this.grid_startx + this.grid_dx*i; ! theta = Math.atan(x/(this.rhoRef - y)); ! rho = Math.sqrt(Math.pow(x,2.0)+Math.pow((this.rhoRef-y),2.0)); ! if (this.n < 0) { rho = -rho; } ! lon = this.grid_lon2 + Math.toDegrees(theta/this.n); lat = Math.toDegrees(2.0 * ! Math.atan(Math.pow(this.EARTH_RADIUS * this.f / rho, 1 / this.n)) - pi2); // move x-coordinates to the range -180..180 Index: GribGDSLatLon.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/gds/GribGDSLatLon.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GribGDSLatLon.java 11 Sep 2006 11:15:02 -0000 1.4 --- GribGDSLatLon.java 8 Oct 2008 09:04:14 -0000 1.5 *************** *** 34,37 **** --- 34,39 ---- import java.io.IOException; + import org.apache.log4j.Logger; + import net.sourceforge.jgrib.BitInputStream; import net.sourceforge.jgrib.Bytes2Number; *************** *** 53,56 **** --- 55,63 ---- public class GribGDSLatLon extends GribRecordGDS { + /** + * Get instance of logger + */ + private static Logger logger = Logger.getLogger(GribGDSRotLatLon.class.getName()); + // Attributes for Lat/Lon grid not included in GribRecordGDS *************** *** 84,88 **** if (this.grid_type != 0 && this.grid_type != 10){ throw new NoValidGribException("GribGDSLatLon: grid_type is not "+ ! "Latitude/Longitude (read grid type " + grid_type + ", needed 0 or 10)"); } --- 91,95 ---- if (this.grid_type != 0 && this.grid_type != 10){ throw new NoValidGribException("GribGDSLatLon: grid_type is not "+ ! "Latitude/Longitude (read grid type " + this.grid_type + ", needed 0 or 10)"); } *************** *** 113,117 **** { case 136: ! //grid_mode_isUVgridIJ = true; case 128: // octets 24-25 (x increment) --- 120,126 ---- { case 136: ! // bit flags (1 0 0 0 1 0 0 0) ! // grid_mode_isUVgridIJ = true ! // Fall through is intended here! case 128: // octets 24-25 (x increment) *************** *** 155,159 **** */ public boolean isUVEastNorth() { ! return (grid_mode & 0x08) == 0; } --- 164,168 ---- */ public boolean isUVEastNorth() { ! return (this.grid_mode & 0x08) == 0; } *************** *** 168,182 **** // not equal, so either less than or greater than. // check if gds is less, if not, then gds is greater ! if (grid_type > gds.getGridType()) return -1; ! if (grid_mode > gds.getGridMode()) return -1; ! if (grid_scan > gds.getGridScanmode()) return -1; ! if (grid_nx > gds.getGridNX()) return -1; ! if (grid_ny > gds.getGridNY()) return -1; ! if (grid_dx > gds.getGridDX()) return -1; ! if (grid_dy > gds.getGridDY()) return -1; ! if (grid_lat1 > gds.getGridLat1()) return -1; ! if (grid_lat2 > gds.getGridLat2()) return -1; ! if (grid_lon1 > gds.getGridLon1()) return -1; ! if (grid_lon2 > gds.getGridLon2()) return -1; // if here, then something must be greater than something else - doesn't matter what --- 177,191 ---- // not equal, so either less than or greater than. // check if gds is less, if not, then gds is greater ! if (this.grid_type > gds.getGridType()) return -1; ! if (this.grid_mode > gds.getGridMode()) return -1; ! if (this.grid_scan > gds.getGridScanmode()) return -1; ! if (this.grid_nx > gds.getGridNX()) return -1; ! if (this.grid_ny > gds.getGridNY()) return -1; ! if (this.grid_dx > gds.getGridDX()) return -1; ! if (this.grid_dy > gds.getGridDY()) return -1; ! if (this.grid_lat1 > gds.getGridLat1()) return -1; ! if (this.grid_lat2 > gds.getGridLat2()) return -1; ! if (this.grid_lon1 > gds.getGridLon1()) return -1; ! if (this.grid_lon2 > gds.getGridLon2()) return -1; // if here, then something must be greater than something else - doesn't matter what *************** *** 191,199 **** { int result = 17; ! result = 37 * result + grid_nx; ! result = 37 * result + grid_ny; ! int intLat1 = Float.floatToIntBits((float) grid_lat1); result = 37 * result + intLat1; ! int intLon1 = Float.floatToIntBits((float) grid_lon1); result = 37 * result + intLon1; return result; --- 200,208 ---- { int result = 17; ! result = 37 * result + this.grid_nx; ! result = 37 * result + this.grid_ny; ! int intLat1 = Float.floatToIntBits((float) this.grid_lat1); result = 37 * result + intLat1; ! int intLon1 = Float.floatToIntBits((float) this.grid_lon1); result = 37 * result + intLon1; return result; *************** *** 217,231 **** GribGDSLatLon gds = (GribGDSLatLon) obj; ! if (grid_type != gds.grid_type) return false; ! if (grid_mode != gds.grid_mode) return false; ! if (grid_scan != gds.grid_scan) return false; ! if (grid_nx != gds.grid_nx) return false; ! if (grid_ny != gds.grid_ny) return false; ! if (grid_dx != gds.grid_dx) return false; ! if (grid_dy != gds.grid_dy) return false; ! if (grid_lat1 != gds.grid_lat1) return false; ! if (grid_lat2 != gds.grid_lat2) return false; ! if (grid_lon1 != gds.grid_lon1) return false; ! if (grid_lon2 != gds.grid_lon2) return false; return true; --- 226,240 ---- GribGDSLatLon gds = (GribGDSLatLon) obj; ! if (this.grid_type != gds.grid_type) return false; ! if (this.grid_mode != gds.grid_mode) return false; ! if (this.grid_scan != gds.grid_scan) return false; ! if (this.grid_nx != gds.grid_nx) return false; ! if (this.grid_ny != gds.grid_ny) return false; ! if (this.grid_dx != gds.grid_dx) return false; ! if (this.grid_dy != gds.grid_dy) return false; ! if (this.grid_lat1 != gds.grid_lat1) return false; ! if (this.grid_lat2 != gds.grid_lat2) return false; ! if (this.grid_lon1 != gds.grid_lon1) return false; ! if (this.grid_lon2 != gds.grid_lon2) return false; return true; *************** *** 281,285 **** public double getGridDX() { ! return grid_dx; } --- 290,294 ---- public double getGridDX() { ! return this.grid_dx; } *************** *** 291,295 **** public double getGridDY() { ! return grid_dy; } --- 300,304 ---- public double getGridDY() { ! return this.grid_dy; } *************** *** 310,320 **** public double[] getXCoords(boolean convertTo180) { ! double[] coords = new double[grid_nx]; int k = 0; ! for (int x = 0; x < grid_nx; x++) { ! double longi = grid_lon1 + x * grid_dx; if (convertTo180){ // move x-coordinates to the range -180..180 --- 319,329 ---- public double[] getXCoords(boolean convertTo180) { ! double[] coords = new double[this.grid_nx]; int k = 0; ! for (int x = 0; x < this.grid_nx; x++) { ! double longi = this.grid_lon1 + x * this.grid_dx; if (convertTo180){ // move x-coordinates to the range -180..180 *************** *** 335,347 **** public double[] getYCoords() { ! double[] coords = new double[grid_ny]; int k = 0; ! for (int y = 0; y < grid_ny; y++) { ! double lati = grid_lat1 + y * grid_dy; if (lati > 90.0 || lati < -90.0) ! System.err.println("GribGDSLatLon.getYCoords: latitude out of range (-90 to 90)."); coords[k++] = lati; --- 344,356 ---- public double[] getYCoords() { ! double[] coords = new double[this.grid_ny]; int k = 0; ! for (int y = 0; y < this.grid_ny; y++) { ! double lati = this.grid_lat1 + y * this.grid_dy; if (lati > 90.0 || lati < -90.0) ! logger.error("GribGDSLatLon.getYCoords: latitude out of range (-90 to 90)."); coords[k++] = lati; *************** *** 360,370 **** { ! double[] coords = new double[grid_ny * grid_nx * 2]; int k = 0; ! for (int y = 0; y < grid_ny; y++){ ! for (int x = 0; x < grid_nx; x++){ ! double longi = grid_lon1 + x * grid_dx; ! double lati = grid_lat1 + y * grid_dy; // move x-coordinates to the range -180..180 --- 369,379 ---- { ! double[] coords = new double[this.grid_ny * this.grid_nx * 2]; int k = 0; ! for (int y = 0; y < this.grid_ny; y++){ ! for (int x = 0; x < this.grid_nx; x++){ ! double longi = this.grid_lon1 + x * this.grid_dx; ! double lati = this.grid_lat1 + y * this.grid_dy; // move x-coordinates to the range -180..180 *************** *** 372,376 **** if (longi < -180.0) longi = longi + 360.0; if (lati > 90.0 || lati < -90.0){ ! System.err.println("GribGDSLatLon.getGridCoords: latitude out of range (-90 to 90)."); } coords[k++] = longi; --- 381,385 ---- if (longi < -180.0) longi = longi + 360.0; if (lati > 90.0 || lati < -90.0){ ! logger.error("GribGDSLatLon.getGridCoords: latitude out of range (-90 to 90)."); } coords[k++] = longi; Index: GribGDSPolarStereo.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/gds/GribGDSPolarStereo.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** GribGDSPolarStereo.java 15 Sep 2006 12:59:16 -0000 1.10 --- GribGDSPolarStereo.java 8 Oct 2008 09:04:14 -0000 1.11 *************** *** 160,164 **** if (this.grid_type != 5 ){ throw new NoValidGribException("GribGDSPolarStereo: grid_type is not "+ ! "Polar Stereo (read grid type " + grid_type + " needed 5)"); } --- 160,164 ---- if (this.grid_type != 5 ){ throw new NoValidGribException("GribGDSPolarStereo: grid_type is not "+ ! "Polar Stereo (read grid type " + this.grid_type + " needed 5)"); } *************** *** 192,197 **** // octets 27 (Projection Center flag) See Note 5 of Table D this.grid_proj_center = data[20]; ! if ((grid_proj_center & 128) == 128){ // if bit 1 set to 1, SP is on proj plane ! latitude_ts = -60.0; } --- 192,197 ---- // octets 27 (Projection Center flag) See Note 5 of Table D this.grid_proj_center = data[20]; ! if ((this.grid_proj_center & 128) == 128){ // if bit 1 set to 1, SP is on proj plane ! this.latitude_ts = -60.0; } *************** *** 228,232 **** */ public boolean isUVEastNorth() { ! return (grid_mode & 0x08) == 0; } --- 228,232 ---- */ public boolean isUVEastNorth() { ! return (this.grid_mode & 0x08) == 0; } *************** *** 241,245 **** */ public boolean isEarthSpherical() { ! return (grid_mode & 0x64) == 0; } --- 241,245 ---- */ public boolean isEarthSpherical() { ! return (this.grid_mode & 0x64) == 0; } *************** *** 254,268 **** // not equal, so either less than or greater than. // check if gds is less, if not, then gds is greater ! if (grid_type > gds.getGridType()) return -1; ! if (grid_mode > gds.getGridMode()) return -1; ! if (grid_scan > gds.getGridScanmode()) return -1; ! if (grid_nx > gds.getGridNX()) return -1; ! if (grid_ny > gds.getGridNY()) return -1; ! if (grid_dx > gds.getGridDX()) return -1; ! if (grid_dy > gds.getGridDY()) return -1; ! if (grid_lat1 > gds.getGridLat1()) return -1; ! if (grid_lat2 > gds.getGridLat2()) return -1; ! if (grid_lon1 > gds.getGridLon1()) return -1; ! if (grid_lon2 > gds.getGridLon2()) return -1; // if here, then something must be greater than something else - doesn't matter what --- 254,268 ---- // not equal, so either less than or greater than. // check if gds is less, if not, then gds is greater ! if (this.grid_type > gds.getGridType()) return -1; ! if (this.grid_mode > gds.getGridMode()) return -1; ! if (this.grid_scan > gds.getGridScanmode()) return -1; ! if (this.grid_nx > gds.getGridNX()) return -1; ! if (this.grid_ny > gds.getGridNY()) return -1; ! if (this.grid_dx > gds.getGridDX()) return -1; ! if (this.grid_dy > gds.getGridDY()) return -1; ! if (this.grid_lat1 > gds.getGridLat1()) return -1; ! if (this.grid_lat2 > gds.getGridLat2()) return -1; ! if (this.grid_lon1 > gds.getGridLon1()) return -1; ! if (this.grid_lon2 > gds.getGridLon2()) return -1; // if here, then something must be greater than something else - doesn't matter what *************** *** 278,286 **** { int result = 17; ! result = 37 * result + grid_nx; ! result = 37 * result + grid_ny; ! int intLat1 = Float.floatToIntBits((float) grid_lat1); result = 37 * result + intLat1; ! int intLon1 = Float.floatToIntBits((float) grid_lon1); result = 37 * result + intLon1; return result; --- 278,286 ---- { int result = 17; ! result = 37 * result + this.grid_nx; ! result = 37 * result + this.grid_ny; ! int intLat1 = Float.floatToIntBits((float) this.grid_lat1); result = 37 * result + intLat1; ! int intLon1 = Float.floatToIntBits((float) this.grid_lon1); result = 37 * result + intLon1; return result; *************** *** 306,320 **** GribGDSPolarStereo gds = (GribGDSPolarStereo) obj; ! if (grid_nx != gds.grid_nx) return false; ! if (grid_ny != gds.grid_ny) return false; ! if (grid_lat1 != gds.grid_lat1) return false; ! if (grid_lon1 != gds.grid_lon1) return false; ! if (grid_mode != gds.grid_mode) return false; ! if (grid_lat2 != gds.grid_lat2) return false; ! if (grid_dx != gds.grid_dx) return false; ! if (grid_dy != gds.grid_dy) return false; ! if (grid_type != gds.grid_type) return false; ! if (grid_proj_center != gds.grid_proj_center) return false; ! if (grid_scan != gds.grid_scan) return false; return true; --- 306,320 ---- GribGDSPolarStereo gds = (GribGDSPolarStereo) obj; ! if (this.grid_nx != gds.grid_nx) return false; ! if (this.grid_ny != gds.grid_ny) return false; ! if (this.grid_lat1 != gds.grid_lat1) return false; ! if (this.grid_lon1 != gds.grid_lon1) return false; ! if (this.grid_mode != gds.grid_mode) return false; ! if (this.grid_lat2 != gds.grid_lat2) return false; ! if (this.grid_dx != gds.grid_dx) return false; ! if (this.grid_dy != gds.grid_dy) return false; ! if (this.grid_type != gds.grid_type) return false; ! if (this.grid_proj_center != gds.grid_proj_center) return false; ! if (this.grid_scan != gds.grid_scan) return false; return true; *************** *** 379,383 **** public double getGridCenterLat() { ! return latitude_ts > 0 ? 90 : -90; } --- 379,383 ---- public double getGridCenterLat() { ! return this.latitude_ts > 0 ? 90 : -90; } *************** *** 389,393 **** public double getLatitudeTrueScale() { ! return latitude_ts; } --- 389,393 ---- public double getLatitudeTrueScale() { ! return this.latitude_ts; } *************** *** 399,405 **** public double[] getXCoords() { ! double[] xCoords = new double[grid_nx]; ! for (int i = 0; i < grid_nx; i++) { double x = this.grid_startx + i * this.grid_dx; --- 399,405 ---- public double[] getXCoords() { ! double[] xCoords = new double[this.grid_nx]; ! for (int i = 0; i < this.grid_nx; i++) { double x = this.grid_startx + i * this.grid_dx; *************** *** 415,421 **** public double[] getYCoords() { ! double[] yCoords = new double[grid_ny]; ! for (int j = 0; j < grid_ny; j++) { double y = this.grid_starty + j * this.grid_dy; --- 415,421 ---- public double[] getYCoords() { ! double[] yCoords = new double[this.grid_ny]; ! for (int j = 0; j < this.grid_ny; j++) { double y = this.grid_starty + j * this.grid_dy; *************** *** 449,460 **** int count = 0; double x,y; ! double[] coords = new double[grid_nx * grid_ny * 2]; ! for (int j = 0; j < grid_ny; j++) { ! y = grid_starty + grid_dy*j; ! for (int i = 0; i < grid_nx; i++) { ! x = grid_startx + grid_dx*i; double[] latLon = new double[2]; if(this.isEarthSpherical()) { --- 449,460 ---- int count = 0; double x,y; ! double[] coords = new double[this.grid_nx * this.grid_ny * 2]; ! for (int j = 0; j < this.grid_ny; j++) { ! y = this.grid_starty + this.grid_dy*j; ! for (int i = 0; i < this.grid_nx; i++) { ! x = this.grid_startx + this.grid_dx*i; double[] latLon = new double[2]; if(this.isEarthSpherical()) { *************** *** 476,480 **** public double getGrid_startx() { ! return grid_startx; } --- 476,480 ---- public double getGrid_startx() { ! return this.grid_startx; } *************** *** 485,489 **** public double getGrid_starty() { ! return grid_starty; } --- 485,489 ---- public double getGrid_starty() { ! return this.grid_starty; } *************** *** 816,820 **** str += " Adjacent points in i direction are consecutive\n"; } ! str += " proj_center flag: " + grid_proj_center + "\n"; str += " latitude_ts: " + getLatitudeTrueScale() + "\n"; str += " center_lon: " + getGridCenterLon() + "\n"; //=lov --- 816,820 ---- str += " Adjacent points in i direction are consecutive\n"; } ! str += " proj_center flag: " + this.grid_proj_center + "\n"; str += " latitude_ts: " + getLatitudeTrueScale() + "\n"; str += " center_lon: " + getGridCenterLon() + "\n"; //=lov |
|
From: Peter G. <fr...@us...> - 2008-10-08 09:08:53
|
Update of /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/unstable In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29021/src/net/sourceforge/jgrib/unstable Modified Files: GribFileGroup.java Log Message: Fixed arround 500 compilation warnings - no functionality changed Index: GribFileGroup.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/unstable/GribFileGroup.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GribFileGroup.java 11 Sep 2006 11:10:19 -0000 1.1 --- GribFileGroup.java 8 Oct 2008 09:04:14 -0000 1.2 *************** *** 85,92 **** Date date = gribFile.getRecord(1).getPDS().getLocalForecastTime().getTime(); dateList.add(date); ! files.put(date,gribFile); } ! dates = (Date[])dateList.toArray(dates); ! Arrays.sort(dates); } --- 85,92 ---- Date date = gribFile.getRecord(1).getPDS().getLocalForecastTime().getTime(); dateList.add(date); ! this.files.put(date,gribFile); } ! this.dates = (Date[])dateList.toArray(this.dates); ! Arrays.sort(this.dates); } *************** *** 103,109 **** String[] allTypeNames = null; HashSet typeNames = new HashSet(); ! for (int i = 0; i<dates.length; i++){ ! Date date = dates[i]; ! gribFile = (GribFile)files.get(date); String[] types = gribFile.getTypeNames(); for (int j = 0; j < types.length; j++){ --- 103,109 ---- String[] allTypeNames = null; HashSet typeNames = new HashSet(); ! for (int i = 0; i<this.dates.length; i++){ ! Date date = this.dates[i]; ! gribFile = (GribFile)this.files.get(date); String[] types = gribFile.getTypeNames(); for (int j = 0; j < types.length; j++){ *************** *** 123,129 **** GribRecordLight[] grls = null; ArrayList grlList = new ArrayList(); ! for (int i = 0; i<dates.length; i++){ ! Date date = dates[i]; ! gribFile = (GribFile)files.get(date); grls = gribFile.getLightRecords(); for (int j = 0; j < grls.length; j++){ --- 123,129 ---- GribRecordLight[] grls = null; ArrayList grlList = new ArrayList(); ! for (int i = 0; i<this.dates.length; i++){ ! Date date = this.dates[i]; ! gribFile = (GribFile)this.files.get(date); grls = gribFile.getLightRecords(); for (int j = 0; j < grls.length; j++){ *************** *** 143,149 **** GribRecordGDS[] gdss = null; ArrayList gdsList = new ArrayList(); ! for (int i = 0; i<dates.length; i++){ ! Date date = dates[i]; ! gribFile = (GribFile)files.get(date); gdss = gribFile.getGrids(); for (int j = 0; j < gdss.length; j++){ --- 143,149 ---- GribRecordGDS[] gdss = null; ArrayList gdsList = new ArrayList(); ! for (int i = 0; i<this.dates.length; i++){ ! Date date = this.dates[i]; ! gribFile = (GribFile)this.files.get(date); gdss = gribFile.getGrids(); for (int j = 0; j < gdss.length; j++){ *************** *** 164,170 **** GribFile gribFile = null; int recordCount = 0; ! for (int i = 0; i<dates.length; i++){ ! Date date = dates[i]; ! gribFile = (GribFile)files.get(date); recordCount = recordCount + gribFile.getRecordCount(); } --- 164,170 ---- GribFile gribFile = null; int recordCount = 0; ! for (int i = 0; i<this.dates.length; i++){ ! Date date = this.dates[i]; ! gribFile = (GribFile)this.files.get(date); recordCount = recordCount + gribFile.getRecordCount(); } *************** *** 188,194 **** //int recordCount; //int record; ! for (int i = 0; i<dates.length; i++){ ! Date date = dates[i]; ! gribFile = (GribFile)files.get(date); gribFile.listRecords(out); } --- 188,194 ---- //int recordCount; //int record; ! for (int i = 0; i<this.dates.length; i++){ ! Date date = this.dates[i]; ! gribFile = (GribFile)this.files.get(date); gribFile.listRecords(out); } *************** *** 204,210 **** public void listParameters(PrintStream out){ GribFile gribFile = null; ! for (int i = 0; i<dates.length; i++){ ! Date date = dates[i]; ! gribFile = (GribFile)files.get(date); gribFile.listParameters(out); } --- 204,210 ---- public void listParameters(PrintStream out){ GribFile gribFile = null; ! for (int i = 0; i<this.dates.length; i++){ ! Date date = this.dates[i]; ! gribFile = (GribFile)this.files.get(date); gribFile.listParameters(out); } *************** *** 219,225 **** GribFile gribFile = null; String theString = null; ! for (int i = 0; i<dates.length; i++){ ! Date date = dates[i]; ! gribFile = (GribFile)files.get(date); theString = theString + gribFile.toString(); } --- 219,225 ---- GribFile gribFile = null; String theString = null; ! for (int i = 0; i<this.dates.length; i++){ ! Date date = this.dates[i]; ! gribFile = (GribFile)this.files.get(date); theString = theString + gribFile.toString(); } |
|
From: Peter G. <fr...@us...> - 2008-10-08 09:07:32
|
Update of /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/gds In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv28881/src/net/sourceforge/jgrib/gds Modified Files: GribGDSRotLatLon.java Log Message: BUGFIX: Files of grib_mode 136 didn't read the grid_dy and grid_dx parameters fixed by intentioanally allowing fall through in a case construct Index: GribGDSRotLatLon.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/gds/GribGDSRotLatLon.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** GribGDSRotLatLon.java 30 Oct 2006 13:29:16 -0000 1.5 --- GribGDSRotLatLon.java 8 Oct 2008 09:03:09 -0000 1.6 *************** *** 46,50 **** * */ - public class GribGDSRotLatLon extends GribRecordGDS { --- 46,49 ---- *************** *** 80,84 **** if (this.grid_type != 10){ throw new NoValidGribException("GribGDSRotLatLon: grid_type is not "+ ! "Rotated Latitude/Longitude (read grid type " + grid_type + ", needed 10)"); } --- 79,83 ---- if (this.grid_type != 10){ throw new NoValidGribException("GribGDSRotLatLon: grid_type is not "+ ! "Rotated Latitude/Longitude (read grid type " + this.grid_type + ", needed 10)"); } *************** *** 110,118 **** //grid_mode_isUVgridIJ = false; switch(this.grid_mode) { case 136: ! //grid_mode_isUVgridIJ = true; ! break; case 128: // octets 24-25 (x increment) --- 109,119 ---- //grid_mode_isUVgridIJ = false; + logger.debug("grid_mode (table 7) = "+this.grid_mode); switch(this.grid_mode) { case 136: ! // bit flags (1 0 0 0 1 0 0 0) ! // grid_mode_isUVgridIJ = true ! // Fall through is intended here! case 128: // octets 24-25 (x increment) *************** *** 157,161 **** */ public boolean isUVEastNorth() { ! return (grid_mode & 0x08) == 0; } --- 158,162 ---- */ public boolean isUVEastNorth() { ! return (this.grid_mode & 0x08) == 0; } *************** *** 171,185 **** // not equal, so either less than or greater than. // check if gds is less, if not, then gds is greater ! if (grid_type > gds.getGridType()) return -1; ! if (grid_mode > gds.getGridMode()) return -1; ! if (grid_scan > gds.getGridScanmode()) return -1; ! if (grid_nx > gds.getGridNX()) return -1; ! if (grid_ny > gds.getGridNY()) return -1; ! if (grid_dx > gds.getGridDX()) return -1; ! if (grid_dy > gds.getGridDY()) return -1; ! if (grid_lat1 > gds.getGridLat1()) return -1; ! if (grid_lat2 > gds.getGridLat2()) return -1; ! if (grid_lon1 > gds.getGridLon1()) return -1; ! if (grid_lon2 > gds.getGridLon2()) return -1; // if here, then something must be greater than something else - doesn't matter what --- 172,186 ---- // not equal, so either less than or greater than. // check if gds is less, if not, then gds is greater ! if (this.grid_type > gds.getGridType()) return -1; ! if (this.grid_mode > gds.getGridMode()) return -1; ! if (this.grid_scan > gds.getGridScanmode()) return -1; ! if (this.grid_nx > gds.getGridNX()) return -1; ! if (this.grid_ny > gds.getGridNY()) return -1; ! if (this.grid_dx > gds.getGridDX()) return -1; ! if (this.grid_dy > gds.getGridDY()) return -1; ! if (this.grid_lat1 > gds.getGridLat1()) return -1; ! if (this.grid_lat2 > gds.getGridLat2()) return -1; ! if (this.grid_lon1 > gds.getGridLon1()) return -1; ! if (this.grid_lon2 > gds.getGridLon2()) return -1; // if here, then something must be greater than something else - doesn't matter what *************** *** 194,202 **** { int result = 17; ! result = 37 * result + grid_nx; ! result = 37 * result + grid_ny; ! int intLat1 = Float.floatToIntBits((float) grid_lat1); result = 37 * result + intLat1; ! int intLon1 = Float.floatToIntBits((float) grid_lon1); result = 37 * result + intLon1; return result; --- 195,203 ---- { int result = 17; ! result = 37 * result + this.grid_nx; ! result = 37 * result + this.grid_ny; ! int intLat1 = Float.floatToIntBits((float) this.grid_lat1); result = 37 * result + intLat1; ! int intLon1 = Float.floatToIntBits((float) this.grid_lon1); result = 37 * result + intLon1; return result; *************** *** 220,234 **** GribGDSRotLatLon gds = (GribGDSRotLatLon) obj; ! if (grid_type != gds.grid_type) return false; ! if (grid_mode != gds.grid_mode) return false; ! if (grid_scan != gds.grid_scan) return false; ! if (grid_nx != gds.grid_nx) return false; ! if (grid_ny != gds.grid_ny) return false; ! if (grid_dx != gds.grid_dx) return false; ! if (grid_dy != gds.grid_dy) return false; ! if (grid_lat1 != gds.grid_lat1) return false; ! if (grid_lat2 != gds.grid_lat2) return false; ! if (grid_lon1 != gds.grid_lon1) return false; ! if (grid_lon2 != gds.grid_lon2) return false; return true; --- 221,235 ---- GribGDSRotLatLon gds = (GribGDSRotLatLon) obj; ! if (this.grid_type != gds.grid_type) return false; ! if (this.grid_mode != gds.grid_mode) return false; ! if (this.grid_scan != gds.grid_scan) return false; ! if (this.grid_nx != gds.grid_nx) return false; ! if (this.grid_ny != gds.grid_ny) return false; ! if (this.grid_dx != gds.grid_dx) return false; ! if (this.grid_dy != gds.grid_dy) return false; ! if (this.grid_lat1 != gds.grid_lat1) return false; ! if (this.grid_lat2 != gds.grid_lat2) return false; ! if (this.grid_lon1 != gds.grid_lon1) return false; ! if (this.grid_lon2 != gds.grid_lon2) return false; return true; *************** *** 284,288 **** public double getGridDX() { ! return grid_dx; } --- 285,289 ---- public double getGridDX() { ! return this.grid_dx; } *************** *** 294,298 **** public double getGridDY() { ! return grid_dy; } --- 295,299 ---- public double getGridDY() { ! return this.grid_dy; } *************** *** 313,323 **** public double[] getXCoords(boolean convertTo180) { ! double[] coords = new double[grid_nx]; int k = 0; ! for (int x = 0; x < grid_nx; x++) { ! double longi = grid_lon1 + x * grid_dx; if (convertTo180){ // move x-coordinates to the range -180..180 --- 314,324 ---- public double[] getXCoords(boolean convertTo180) { ! double[] coords = new double[this.grid_nx]; int k = 0; ! for (int x = 0; x < this.grid_nx; x++) { ! double longi = this.grid_lon1 + x * this.grid_dx; if (convertTo180){ // move x-coordinates to the range -180..180 *************** *** 338,350 **** public double[] getYCoords() { ! double[] coords = new double[grid_ny]; int k = 0; ! ! for (int y = 0; y < grid_ny; y++) { ! double lati = grid_lat1 + y * grid_dy; if (lati > 90.0 || lati < -90.0) ! System.err.println("GribGDSLatLon.getYCoords: latitude out of range (-90 to 90)."); coords[k++] = lati; --- 339,350 ---- public double[] getYCoords() { ! double[] coords = new double[this.grid_ny]; int k = 0; ! for (int y = 0; y < this.grid_ny; y++) { ! double lati = this.grid_lat1 + y * this.grid_dy; if (lati > 90.0 || lati < -90.0) ! logger.error("GribGDSLatLon.getYCoords: latitude out of range (-90 to 90)."); coords[k++] = lati; *************** *** 363,373 **** { ! double[] coords = new double[grid_ny * grid_nx * 2]; int k = 0; ! for (int y = 0; y < grid_ny; y++){ ! for (int x = 0; x < grid_nx; x++){ ! double longi = grid_lon1 + x * grid_dx; ! double lati = grid_lat1 + y * grid_dy; // move x-coordinates to the range -180..180 --- 363,373 ---- { ! double[] coords = new double[this.grid_ny * this.grid_nx * 2]; int k = 0; ! for (int y = 0; y < this.grid_ny; y++){ ! for (int x = 0; x < this.grid_nx; x++){ ! double longi = this.grid_lon1 + x * this.grid_dx; ! double lati = this.grid_lat1 + y * this.grid_dy; // move x-coordinates to the range -180..180 *************** *** 375,379 **** if (longi < -180.0) longi = longi + 360.0; if (lati > 90.0 || lati < -90.0){ ! System.err.println("GribGDSLatLon.getGridCoords: latitude out of range (-90 to 90)."); } coords[k++] = longi; --- 375,379 ---- if (longi < -180.0) longi = longi + 360.0; if (lati > 90.0 || lati < -90.0){ ! logger.error("GribGDSLatLon.getGridCoords: latitude out of range (-90 to 90)."); } coords[k++] = longi; |
|
From: Peter G. <fr...@us...> - 2008-10-08 09:05:17
|
Update of /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/util In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29021/src/net/sourceforge/jgrib/util Modified Files: GribSummary.java SmartStringArray.java GribFldComparator.java GribRecHeader.java Log Message: Fixed arround 500 compilation warnings - no functionality changed Index: GribSummary.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/util/GribSummary.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GribSummary.java 25 Jul 2006 13:44:57 -0000 1.4 --- GribSummary.java 8 Oct 2008 09:04:14 -0000 1.5 *************** *** 92,96 **** public void reset() { ! N = 0; } --- 92,96 ---- public void reset() { ! this.N = 0; } *************** *** 102,139 **** { //String s = d.toString(); ! if (N == 0) { ! mDLast = mDmin = mDmax = d; } else { ! if (mDmin.compareTo(d) > 0) { ! mDmin = d; } ! else if (mDmax.compareTo(d) < 0) { ! mDmax = d; } ! long delta = d.getTime() - mDLast.getTime(); ! if (N == 1) { ! mMinDelta = mMaxDelta = delta; } else { ! if (mMinDelta > delta) { ! mMinDelta = delta; } ! else if (mMaxDelta < delta) { ! mMaxDelta = delta; } } ! mDLast = d; } ! N++; } --- 102,139 ---- { //String s = d.toString(); ! if (this.N == 0) { ! this.mDLast = this.mDmin = this.mDmax = d; } else { ! if (this.mDmin.compareTo(d) > 0) { ! this.mDmin = d; } ! else if (this.mDmax.compareTo(d) < 0) { ! this.mDmax = d; } ! long delta = d.getTime() - this.mDLast.getTime(); ! if (this.N == 1) { ! this.mMinDelta = this.mMaxDelta = delta; } else { ! if (this.mMinDelta > delta) { ! this.mMinDelta = delta; } ! else if (this.mMaxDelta < delta) { ! this.mMaxDelta = delta; } } ! this.mDLast = d; } ! this.N++; } *************** *** 176,196 **** { ! String str = " Dates(" + N + ")"; ! if (N > 0) { ! if (N > 1) { ! if (mMinDelta == mMaxDelta) { ! str += " delta[" + ms2str(mMinDelta) + "]"; } else { //str += mMinDelta + "," +mMaxDelta + "\n"; ! str += " delta[" + ms2str(mMinDelta) + " - " + ! ms2str(mMaxDelta) + "]"; } } ! return str + ":\n min " + mDmin + "\n max " + mDmax; } return str; --- 176,196 ---- { ! String str = " Dates(" + this.N + ")"; ! if (this.N > 0) { ! if (this.N > 1) { ! if (this.mMinDelta == this.mMaxDelta) { ! str += " delta[" + ms2str(this.mMinDelta) + "]"; } else { //str += mMinDelta + "," +mMaxDelta + "\n"; ! str += " delta[" + ms2str(this.mMinDelta) + " - " + ! ms2str(this.mMaxDelta) + "]"; } } ! return str + ":\n min " + this.mDmin + "\n max " + this.mDmax; } return str; *************** *** 214,234 **** final DateInfo dateInfo = (DateInfo) o; ! if (N != dateInfo.N) { return false; } ! if (mMaxDelta != dateInfo.mMaxDelta) { return false; } ! if (mMinDelta != dateInfo.mMinDelta) { return false; } ! if (mDmax != null ? !mDmax.equals(dateInfo.mDmax) : dateInfo.mDmax != null) { return false; } ! if (mDmin != null ? !mDmin.equals(dateInfo.mDmin) : dateInfo.mDmin != null) { return false; --- 214,234 ---- final DateInfo dateInfo = (DateInfo) o; ! if (this.N != dateInfo.N) { return false; } ! if (this.mMaxDelta != dateInfo.mMaxDelta) { return false; } ! if (this.mMinDelta != dateInfo.mMinDelta) { return false; } ! if (this.mDmax != null ? !this.mDmax.equals(dateInfo.mDmax) : dateInfo.mDmax != null) { return false; } ! if (this.mDmin != null ? !this.mDmin.equals(dateInfo.mDmin) : dateInfo.mDmin != null) { return false; *************** *** 244,252 **** { int result; ! result = (mDmin != null ? mDmin.hashCode() : 0); ! result = 29 * result + (mDmax != null ? mDmax.hashCode() : 0); ! result = 29 * result + N; ! result = 29 * result + (int) (mMinDelta ^ (mMinDelta >>> 32)); ! result = 29 * result + (int) (mMaxDelta ^ (mMaxDelta >>> 32)); return result; } --- 244,252 ---- { int result; ! result = (this.mDmin != null ? this.mDmin.hashCode() : 0); ! result = 29 * result + (this.mDmax != null ? this.mDmax.hashCode() : 0); ! result = 29 * result + this.N; ! result = 29 * result + (int) (this.mMinDelta ^ (this.mMinDelta >>> 32)); ! result = 29 * result + (int) (this.mMaxDelta ^ (this.mMaxDelta >>> 32)); return result; } *************** *** 287,295 **** public FldIter(GribRecordLight[] lights) { ! mLights = lights; ! mFldCmp = new GribFldComparator(new int[]{ GribRecHeader.F_GDS, GribRecHeader.F_LEV_TYP, GribRecHeader.F_PAR, GribRecHeader.F_DATE, GribRecHeader.F_LEV_Z}); ! TreeSet tree = new TreeSet(mFldCmp); for (int i = 0; i < lights.length; i++) { --- 287,295 ---- public FldIter(GribRecordLight[] lights) { ! this.mLights = lights; ! this.mFldCmp = new GribFldComparator(new int[]{ GribRecHeader.F_GDS, GribRecHeader.F_LEV_TYP, GribRecHeader.F_PAR, GribRecHeader.F_DATE, GribRecHeader.F_LEV_Z}); ! TreeSet tree = new TreeSet(this.mFldCmp); for (int i = 0; i < lights.length; i++) { *************** *** 298,302 **** tree.add(hd); } ! mHds = (GribRecHeader[]) tree.toArray(new GribRecHeader[0]); } --- 298,302 ---- tree.add(hd); } ! this.mHds = (GribRecHeader[]) tree.toArray(new GribRecHeader[0]); } *************** *** 309,313 **** { int f; ! if (i == mHds.length - 1) { return false; --- 309,313 ---- { int f; ! if (this.i == this.mHds.length - 1) { return false; *************** *** 315,321 **** do { ! GribRecHeader hd0 = mHds[i++]; ! GribRecHeader hd1 = i < mHds.length ? mHds[i] : null; ! f = mFldCmp.compare(hd0, hd1); if (f == 0) { --- 315,321 ---- do { ! GribRecHeader hd0 = this.mHds[this.i++]; ! GribRecHeader hd1 = this.i < this.mHds.length ? this.mHds[this.i] : null; ! f = this.mFldCmp.compare(hd0, hd1); if (f == 0) { *************** *** 328,332 **** return true; } ! --i; return false; } --- 328,332 ---- return true; } ! --this.i; return false; } *************** *** 338,342 **** public GribRecHeader currHd() { ! return i < mHds.length ? mHds[i] : null; } --- 338,342 ---- public GribRecHeader currHd() { ! return this.i < this.mHds.length ? this.mHds[this.i] : null; } *************** *** 352,356 **** return null; } ! return mLights[hd.getIx()]; } } --- 352,356 ---- return null; } ! return this.mLights[hd.getIx()]; } } *************** *** 532,537 **** { GribRecordPDS pds = rec.getPDS(); ! cenId = pds.getCenterId(); ! tabId = pds.getTableVersion(); } --- 532,537 ---- { GribRecordPDS pds = rec.getPDS(); ! this.cenId = pds.getCenterId(); ! this.tabId = pds.getTableVersion(); } *************** *** 542,546 **** public String toString() { ! return " PDS cent,tab: " + cenId + ", " + tabId; } --- 542,546 ---- public String toString() { ! return " PDS cent,tab: " + this.cenId + ", " + this.tabId; } *************** *** 562,570 **** final CenterTabId centerTabId = (CenterTabId) o; ! if (cenId != centerTabId.cenId) { return false; } ! if (tabId != centerTabId.tabId) { return false; --- 562,570 ---- final CenterTabId centerTabId = (CenterTabId) o; ! if (this.cenId != centerTabId.cenId) { return false; } ! if (this.tabId != centerTabId.tabId) { return false; *************** *** 581,586 **** { int result; ! result = cenId; ! result = 29 * result + tabId; return result; } --- 581,586 ---- { int result; ! result = this.cenId; ! result = 29 * result + this.tabId; return result; } Index: GribFldComparator.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/util/GribFldComparator.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GribFldComparator.java 25 Jul 2006 13:44:57 -0000 1.3 --- GribFldComparator.java 8 Oct 2008 09:04:14 -0000 1.4 *************** *** 63,67 **** throw new RuntimeException("Bad Field Order"); } ! mOrder = aFieldOrder; } --- 63,67 ---- throw new RuntimeException("Bad Field Order"); } ! this.mOrder = aFieldOrder; } *************** *** 73,81 **** public int getFieldId(int aFldIndex) { ! if (aFldIndex < 0 || aFldIndex >= mOrder.length) { return -1; } ! return mOrder[aFldIndex]; } --- 73,81 ---- public int getFieldId(int aFldIndex) { ! if (aFldIndex < 0 || aFldIndex >= this.mOrder.length) { return -1; } ! return this.mOrder[aFldIndex]; } *************** *** 102,108 **** } GribRecHeader hd = (GribRecHeader) o1; ! for (int fld = 0; fld < mOrder.length; ++fld) { ! int res = hd.compareField(mOrder[fld], o2); if (res != 0) { --- 102,108 ---- } GribRecHeader hd = (GribRecHeader) o1; ! for (int fld = 0; fld < this.mOrder.length; ++fld) { ! int res = hd.compareField(this.mOrder[fld], o2); if (res != 0) { Index: SmartStringArray.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/util/SmartStringArray.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** SmartStringArray.java 11 Sep 2006 11:15:37 -0000 1.1 --- SmartStringArray.java 8 Oct 2008 09:04:14 -0000 1.2 *************** *** 77,81 **** { this.growthSize = growthSize; ! array = new String[ initialSize ]; } --- 77,81 ---- { this.growthSize = growthSize; ! this.array = new String[ initialSize ]; } *************** *** 86,92 **** public SmartStringArray(String[] anArr) { ! array = anArr; ! growthSize = START/4; ! sp = array.length; } --- 86,92 ---- public SmartStringArray(String[] anArr) { ! this.array = anArr; ! this.growthSize = START/4; ! this.sp = this.array.length; } *************** *** 96,100 **** public void reset() { ! sp = 0; } --- 96,100 ---- public void reset() { ! this.sp = 0; } *************** *** 106,117 **** public void add(String str ) { ! if( sp >= array.length ) // time to grow! { ! String[] tmpArray = new String[ array.length + growthSize ]; ! System.arraycopy( array, 0, tmpArray, 0, array.length ); ! array = tmpArray; } ! array[ sp ] = str; ! sp += 1; } --- 106,117 ---- public void add(String str ) { ! if( this.sp >= this.array.length ) // time to grow! { ! String[] tmpArray = new String[ this.array.length + this.growthSize ]; ! System.arraycopy( this.array, 0, tmpArray, 0, this.array.length ); ! this.array = tmpArray; } ! this.array[ this.sp ] = str; ! this.sp += 1; } *************** *** 122,127 **** public String[] toArray() { ! String[] trimmedArray = new String[ sp ]; ! System.arraycopy( array, 0, trimmedArray, 0, trimmedArray.length ); return trimmedArray; } --- 122,127 ---- public String[] toArray() { ! String[] trimmedArray = new String[ this.sp ]; ! System.arraycopy( this.array, 0, trimmedArray, 0, trimmedArray.length ); return trimmedArray; } *************** *** 132,136 **** public int size() { ! return sp; } --- 132,136 ---- public int size() { ! return this.sp; } Index: GribRecHeader.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/util/GribRecHeader.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GribRecHeader.java 25 Jul 2006 13:44:57 -0000 1.3 --- GribRecHeader.java 8 Oct 2008 09:04:14 -0000 1.4 *************** *** 143,151 **** private void init(int index, GribRecordPDS p, GribRecordGDS g) { ! ix = index; ! param = p.getParameter(); ! gds = g; ! plev = p.getPDSLevel(); ! date = p.getLocalForecastTime().getTime(); } --- 143,151 ---- private void init(int index, GribRecordPDS p, GribRecordGDS g) { ! this.ix = index; ! this.param = p.getParameter(); ! this.gds = g; ! this.plev = p.getPDSLevel(); ! this.date = p.getLocalForecastTime().getTime(); } *************** *** 158,162 **** public GribRecordGDS getGDS() { ! return gds; } --- 158,162 ---- public GribRecordGDS getGDS() { ! return this.gds; } *************** *** 168,172 **** public int getPDSLevType() { ! return plev.getIndex(); } --- 168,172 ---- public int getPDSLevType() { ! return this.plev.getIndex(); } *************** *** 179,183 **** public GribPDSParameter getParam() { ! return param; } --- 179,183 ---- public GribPDSParameter getParam() { ! return this.param; } *************** *** 189,193 **** public String getParamName() { ! return param.getName(); } --- 189,193 ---- public String getParamName() { ! return this.param.getName(); } *************** *** 198,202 **** public String getParamUnit() { ! return param.getUnit(); } --- 198,202 ---- public String getParamUnit() { ! return this.param.getUnit(); } *************** *** 207,211 **** public String getParamDescr() { ! return param.getDescription(); } --- 207,211 ---- public String getParamDescr() { ! return this.param.getDescription(); } *************** *** 218,222 **** public Date getDate() { ! return date; } --- 218,222 ---- public Date getDate() { ! return this.date; } *************** *** 228,232 **** public GribPDSLevel getPDSLev() { ! return plev; } --- 228,232 ---- public GribPDSLevel getPDSLev() { ! return this.plev; } *************** *** 238,242 **** public float getPDSLevZvalue() { ! return plev.getValue1(); } --- 238,242 ---- public float getPDSLevZvalue() { ! return this.plev.getValue1(); } *************** *** 310,314 **** public int getIx() { ! return ix; } --- 310,314 ---- public int getIx() { ! return this.ix; } *************** *** 322,329 **** StringBuffer sb = new StringBuffer(200); //sb.append(varName()); ! sb.append(" " + param); ! sb.append("\n gds" + gds); ! sb.append("\n lev " + plev.getLevel()); ! sb.append("\n date " + date); return sb.toString(); } --- 322,329 ---- StringBuffer sb = new StringBuffer(200); //sb.append(varName()); ! sb.append(" " + this.param); ! sb.append("\n gds" + this.gds); ! sb.append("\n lev " + this.plev.getLevel()); ! sb.append("\n date " + this.date); return sb.toString(); } |
|
From: Peter G. <fr...@us...> - 2008-10-07 20:44:42
|
Update of /cvsroot/jgrib/jgrib In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19122 Modified Files: build.xml ChangeLog Log Message: Added two constructors to the GribFile class to facillitate the usage of streams based upon BZIP2 and GZIP Index: build.xml =================================================================== RCS file: /cvsroot/jgrib/jgrib/build.xml,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** build.xml 5 Oct 2008 21:39:35 -0000 1.15 --- build.xml 7 Oct 2008 20:44:28 -0000 1.16 *************** *** 11,15 **** <property name="version" value="1.1"/> <property name="dist.name" value="${name}_${version}"/> ! <property name="year" value="2006"/> <echo message="----------- ${Name} ${version} [${year}] ------------"/> --- 11,15 ---- <property name="version" value="1.1"/> <property name="dist.name" value="${name}_${version}"/> ! <property name="year" value="2008"/> <echo message="----------- ${Name} ${version} [${year}] ------------"/> Index: ChangeLog =================================================================== RCS file: /cvsroot/jgrib/jgrib/ChangeLog,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** ChangeLog 5 Oct 2008 21:39:35 -0000 1.15 --- ChangeLog 7 Oct 2008 20:44:28 -0000 1.16 *************** *** 8,11 **** --- 8,17 ---- CVS history. + 2008-10-07 Peter Gylling <frv_peg at users.sourceforge.net> + - Updated GribFile class with two new constructors to facillitate + the usage of either BZIP2 og GZIP based streams. User has to + extract the marker bytes from the BZIP2 stream before contructing + the GribFile object if they exists. + 2008-10-05 Peter Gylling <frv_peg at users.sourceforge.net> - Updated build.xml to reflect first work on new release (1.1) |
|
From: Peter G. <fr...@us...> - 2008-10-07 20:44:42
|
Update of /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv19122/src/net/sourceforge/jgrib Modified Files: GribFile.java Log Message: Added two constructors to the GribFile class to facillitate the usage of streams based upon BZIP2 and GZIP Index: GribFile.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/GribFile.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** GribFile.java 20 Apr 2007 07:53:48 -0000 1.12 --- GribFile.java 7 Oct 2008 20:44:28 -0000 1.13 *************** *** 49,54 **** --- 49,56 ---- import java.util.NoSuchElementException; import java.util.Set; + import java.util.zip.GZIPInputStream; import org.apache.log4j.Logger; + import org.apache.tools.bzip2.CBZip2InputStream; import net.sourceforge.jgrib.exceptions.NoValidGribException; *************** *** 143,146 **** --- 145,187 ---- } + /** + * Constructs a <tt>GribFile</tt> object from an BZIP2 decompressed input stream + * + * IMPORTANT: If the bzip2 stream has been compressed by one of + * the standard commandline tools, you have to extract the + * first 2 bytes before sending the stream to this constructor. + * This is because, the commandline tools add 2 marker bytes + * to the stream ('BZ'). + * + * You could do like this:<br> + * FileInputStream fis = new FileInputStream("path_to_file"); + * fis.skip(2); + * + * @param in input stream with GRIB content + * + * @throws IOException if stream can not be opened etc. + * @throws NotSupportedException if file contains features not yet in jgrib + * @throws NoValidGribException if stream does not contain a valid GRIB file + */ + public GribFile(CBZip2InputStream in) throws IOException, + NotSupportedException, NoValidGribException + { + this(new BitInputStream(in)); + } + + /** + * Constructs a <tt>GribFile</tt> object from an GZIP decompressed input stream + * + * @param in input stream with GRIB content + * + * @throws IOException if stream can not be opened etc. + * @throws NotSupportedException if file contains features not yet in jgrib + * @throws NoValidGribException if stream does not contain a valid GRIB file + */ + public GribFile(GZIPInputStream in) throws IOException, + NotSupportedException, NoValidGribException + { + this(new BitInputStream(in)); + } /** *************** *** 234,238 **** if (grids.length == 0) ! System.err.println("GribFile: No GRIB file or no records found."); } --- 275,279 ---- if (grids.length == 0) ! logger.error("GribFile: No GRIB file or no records found."); } *************** *** 661,665 **** catch (IOException ioe) { ! System.err.println(this.getClass().toString()+": IOException: "+ioe.getMessage()); // do nothing } --- 702,706 ---- catch (IOException ioe) { ! logger.error("IOException: "+ioe.getMessage()); // do nothing } |
|
From: Peter G. <fr...@us...> - 2008-10-05 21:39:45
|
Update of /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3789/src/net/sourceforge/jgrib Modified Files: BitInputStream.java Log Message: Update of BitInpuStream class to handle reading directly from the decompressed streams provided by BZIP2 and GZIP Index: BitInputStream.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/BitInputStream.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** BitInputStream.java 7 Aug 2006 13:46:48 -0000 1.5 --- BitInputStream.java 5 Oct 2008 21:39:35 -0000 1.6 *************** *** 37,40 **** --- 37,43 ---- import java.io.IOException; import java.io.InputStream; + import java.util.zip.GZIPInputStream; + + import org.apache.tools.bzip2.CBZip2InputStream; *************** *** 43,49 **** * This class is an input stream wrapper that can read a specific number of * bytes and bits from an input stream. * ! * @author Benjamin Stark ! * @version 1.0 */ --- 46,63 ---- * This class is an input stream wrapper that can read a specific number of * bytes and bits from an input stream. + * + * This class is modified by Peter Gylling to allow for reading of compressed + * streams like BZIP2 and GZIP. + * + * BZIP2 is implemented by the apache ant project and is available in their + * official download - both as binary and as source. JGRIB is providing the + * classes as binary ripped and repackaged available from this website: + * + * http://www.kohsuke.org/bzip2/ + * + * Needless to say that this is covered by the Apache Software Licence. * ! * @author Benjamin Stark, Peter Gylling ! * @version 2.0 */ *************** *** 61,65 **** protected int bitPos = 0; ! /** * Constructs a bit input stream from an <tt>InputStream</tt> object. --- 75,83 ---- protected int bitPos = 0; ! /** ! * Stores the input stream used to read from ! */ ! protected InputStream in = null; ! /** * Constructs a bit input stream from an <tt>InputStream</tt> object. *************** *** 69,78 **** public BitInputStream(InputStream in) { ! ! super(in); } /** * Read an unsigned 8 bit value. * --- 87,159 ---- public BitInputStream(InputStream in) { ! super(in); ! // Just read from the input stream stored in the super class. ! this.in = super.in; } + /** + * Constructs a bit input stream from an <i>CBZip2InputStream</i> + * object. + * <i>IMPORTANT NOTE:</i> If you send a stream directly from + * file to the constructor of the CBZip2InputStream class, then + * you should extract the first two bytes from the stream before + * sending the stream to this constructor. + * + * The first two bytes contains 'B' and 'Z' and are used by the + * command line tools to mark the stream as BZIP2 stream. The + * JAVA implementation as included in the Apache Ant package is + * expecting a stream without this header. + * + * For info see: http://en.wikipedia.org/wiki/Bzip2#File_format + * + * @param in input stream that will be wrapped + */ + public BitInputStream(CBZip2InputStream in) { + super(in); + // Must read directly from this stream to get + // the decompressed data directly + this.in = in; + } + + /** + * Constructs a bit input stream from an <i>GZIPInputStream</i> + * object. + * + * GZIPInputStream is build into java, so this doesn't require + * an external library - nice. + * + * @param in input stream that will be wrapped + */ + public BitInputStream(GZIPInputStream in) { + super(in); + // Must read directly from this stream to get + // the decompressed data directly + this.in = in; + } /** + * This method overrides the method in the + * super class by letting the read be + * done by the InputStream sent to this + * class in the constructor. + * + * Doing this allows us to read from a + * compressed stream as well as a standard + * uncompressed stream. + * + * Problem is, that the FilterInputStream class + * overrides the read() method from the InputStream + * class - thus it's not possbible to read from the + * compressed input stream, which acts correctly and + * simply extends InputStream. + * + * @see java.io.FilterInputStream#read() + * @see org.apache.tools.bzip2.CBZip2InputStream#read() + */ + public int read() throws IOException { + return this.in.read(); + } + + /** * Read an unsigned 8 bit value. * *************** *** 85,89 **** int ui8 = in.read(); ! if (ui8 < 0) throw new IOException("End of input."); --- 166,170 ---- int ui8 = in.read(); ! if (ui8 < 0 && ui8 != -1) throw new IOException("End of input."); *************** *** 143,148 **** return data; } ! ! /** * Read an unsigned value from the given number of bits. --- 224,228 ---- return data; } ! /** * Read an unsigned value from the given number of bits. |
|
From: Peter G. <fr...@us...> - 2008-10-05 21:39:45
|
Update of /cvsroot/jgrib/jgrib In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3789 Modified Files: build.xml ChangeLog Log Message: Update of BitInpuStream class to handle reading directly from the decompressed streams provided by BZIP2 and GZIP Index: build.xml =================================================================== RCS file: /cvsroot/jgrib/jgrib/build.xml,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** build.xml 11 Sep 2006 11:16:06 -0000 1.14 --- build.xml 5 Oct 2008 21:39:35 -0000 1.15 *************** *** 9,13 **** <property name="Name" value="JGrib"/> <property name="name" value="jgrib"/> ! <property name="version" value="1.0"/> <property name="dist.name" value="${name}_${version}"/> <property name="year" value="2006"/> --- 9,13 ---- <property name="Name" value="JGrib"/> <property name="name" value="jgrib"/> ! <property name="version" value="1.1"/> <property name="dist.name" value="${name}_${version}"/> <property name="year" value="2006"/> *************** *** 60,63 **** --- 60,64 ---- <classpath> <pathelement location="${lib}/log4j-1.2.13.jar"/> + <pathelement location="${lib}/bzip2.jar"/> </classpath> </javac> *************** *** 111,114 **** --- 112,116 ---- <copy file="COPYING" todir="${dist.dir}"/> <copy file="${lib}/log4j-1.2.13.jar" todir="${dist.dir.lib}"/> + <copy file="${lib}/bzip2.jar" todir="${dist.dir.lib}"/> <!-- Make zip file --> Index: ChangeLog =================================================================== RCS file: /cvsroot/jgrib/jgrib/ChangeLog,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** ChangeLog 11 Sep 2006 11:16:46 -0000 1.14 --- ChangeLog 5 Oct 2008 21:39:35 -0000 1.15 *************** *** 8,11 **** --- 8,17 ---- CVS history. + 2008-10-05 Peter Gylling <frv_peg at users.sourceforge.net> + - Updated build.xml to reflect first work on new release (1.1) + - Update of BitInputStream class to be capable of reading + GRIB files as provided by the decompression streams + providing access to BZIP2 and GZIP. + 2006-09-11 Peter Gylling <frv_peg at users.sourceforge.net> - Updated build.xml to reflect first stable release (1.0) |
|
From: Peter G. <fr...@us...> - 2008-10-05 21:39:42
|
Update of /cvsroot/jgrib/jgrib/lib In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv3789/lib Added Files: bzip2.jar Log Message: Update of BitInpuStream class to handle reading directly from the decompressed streams provided by BZIP2 and GZIP --- NEW FILE: bzip2.jar --- (This appears to be a binary file; contents omitted.) |
|
From: Peter G. <fr...@us...> - 2007-04-20 07:53:56
|
Update of /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv25531/src/net/sourceforge/jgrib Modified Files: GribFile.java Log Message: Bugfix: 1637606 - Give us ability to read from a GZipInputStream Index: GribFile.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/GribFile.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** GribFile.java 11 Sep 2006 11:14:17 -0000 1.11 --- GribFile.java 20 Apr 2007 07:53:48 -0000 1.12 *************** *** 629,638 **** int ui8 = 0; // seek header try { ! //if(in.available()>0) ui8 = in.readUI8(); ! while (in.available() > 2) ! { //This code has been commented by Antonio S. Cofio, because if // you have this sequence of characters GGRIB you will skip the message --- 629,640 ---- int ui8 = 0; // seek header + // + // Bugfix by frv_peg on 2007-04-20 due to reported bug: 1637606 + // try { ! ui8 = in.readUI8(); ! while (ui8 > 0) { //This code has been commented by Antonio S. Cofio, because if // you have this sequence of characters GGRIB you will skip the message |
|
From: Peter G. <fr...@us...> - 2006-11-17 14:05:54
|
Update of /cvsroot/jgrib/jgrib/tables In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv8273/tables Modified Files: tablelookup.lst Log Message: Updated to handle NCEP NWW3 grib files as well, Description is identical to ncep_opn.tab according to http://polar.ncep.noaa.gov/waves/products.html#grib Index: tablelookup.lst =================================================================== RCS file: /cvsroot/jgrib/jgrib/tables/tablelookup.lst,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** tablelookup.lst 29 Mar 2006 11:48:43 -0000 1.7 --- tablelookup.lst 17 Nov 2006 14:05:47 -0000 1.8 *************** *** 1,3 **** --- 1,4 ---- 7: -1: 140: ncep_oper_140.tab + 7: 0: 0: ncep_opn.tab 98: -1: 3: nc72_ecmwf_3.tab 98: -1: 128: ecmwf_128.tab |
|
From: Peter G. <fr...@us...> - 2006-10-30 13:29:25
|
Update of /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/gds In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv10737/src/net/sourceforge/jgrib/gds Modified Files: GribGDSRotLatLon.java Log Message: BUGFIX: scanmode was not set correctly in all cases. Affected: All types of rotated lat lon grids Index: GribGDSRotLatLon.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/gds/GribGDSRotLatLon.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GribGDSRotLatLon.java 11 Sep 2006 11:15:02 -0000 1.4 --- GribGDSRotLatLon.java 30 Oct 2006 13:29:16 -0000 1.5 *************** *** 106,109 **** --- 106,112 ---- this.grid_lon2 = Bytes2Number.int3(data[14], data[15], data[16]) / 1000.0; + // octet 28 (point scanning mode - See table 8) + this.grid_scan = data[21]; + //grid_mode_isUVgridIJ = false; switch(this.grid_mode) *************** *** 119,124 **** this.grid_dy = Bytes2Number.uint2(data[19], data[20]) / 1000.0; - // octet 28 (point scanning mode - See table 8) - this.grid_scan = data[21]; if ((this.grid_scan & 63) != 0) throw new NotSupportedException("GribGDSRotLatLon: This scanning mode (" + --- 122,125 ---- |
|
From: Peter G. <fr...@us...> - 2006-09-15 12:59:22
|
Update of /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/gds In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv30135/src/net/sourceforge/jgrib/gds Modified Files: GribGDSPolarStereo.java Log Message: BUGFIX: Math.cosh() -> Math.cos() in forwardTrans() Index: GribGDSPolarStereo.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/gds/GribGDSPolarStereo.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** GribGDSPolarStereo.java 11 Sep 2006 11:15:02 -0000 1.9 --- GribGDSPolarStereo.java 15 Sep 2006 12:59:16 -0000 1.10 *************** *** 1,3 **** ! /** * =============================================================================== * $Id$ --- 1,3 ---- ! /* * =============================================================================== * $Id$ *************** *** 652,659 **** if(this.latitude_ts < 0) { easting = GribRecordGDS.falseEasting + rho*Math.sin(lambda); ! northing = GribRecordGDS.falseNorthing + rho*Math.cosh(lambda); } else { easting = GribRecordGDS.falseEasting + rho*Math.sin(lambda); ! northing = GribRecordGDS.falseNorthing - rho*Math.cosh(lambda); } --- 652,659 ---- if(this.latitude_ts < 0) { easting = GribRecordGDS.falseEasting + rho*Math.sin(lambda); ! northing = GribRecordGDS.falseNorthing + rho*Math.cos(lambda); } else { easting = GribRecordGDS.falseEasting + rho*Math.sin(lambda); ! northing = GribRecordGDS.falseNorthing - rho*Math.cos(lambda); } |
|
From: Peter G. <fr...@us...> - 2006-09-11 11:25:24
|
Update of /cvsroot/jgrib/jgrib In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv6351 Removed Files: build.bat build.sh Log Message: Deleted file, functionality is fully implemented in build.xml - Published releases will include the jgrib.jar file in the future --- build.sh DELETED --- --- build.bat DELETED --- |
|
From: Peter G. <fr...@us...> - 2006-09-11 11:16:50
|
Update of /cvsroot/jgrib/jgrib In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv2750 Modified Files: ChangeLog Log Message: Summary of changes Index: ChangeLog =================================================================== RCS file: /cvsroot/jgrib/jgrib/ChangeLog,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** ChangeLog 16 Aug 2006 14:44:00 -0000 1.13 --- ChangeLog 11 Sep 2006 11:16:46 -0000 1.14 *************** *** 8,11 **** --- 8,28 ---- CVS history. + 2006-09-11 Peter Gylling <frv_peg at users.sourceforge.net> + - Updated build.xml to reflect first stable release (1.0) + - Removed deprecated classes + - Added new packages: exceptions and unstable + + 2006-09-06 Peter Gylling <frv_peg at users.sourceforge.net> + - Updated GribRecordGDS and GribGDSPolarStereo to reflect the matematical + background material decided upon. Based upon several weeks of testing + different involved algoritms to transform between geodetic lat/lon and + polar stereographic projection. + + 2006-08-31 Peter Gylling <frv_peg at users.sourceforge.net> + - Added static methods to GribRecordGDS, so users can specify the grid + precisely. A feature required when working with most known GRIB files + due to the fact, that the geographic grid specification looses precision + when defined in the GRIB specification. + 2006-08-16 Peter Gylling <frv_peg at users.sourceforge.net> - Added static methods to GribRecordGDS to allow users to |
|
From: Peter G. <fr...@us...> - 2006-09-11 11:16:09
|
Update of /cvsroot/jgrib/jgrib In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv2564 Modified Files: build.xml Log Message: Updated to reflect upcomming stable release Index: build.xml =================================================================== RCS file: /cvsroot/jgrib/jgrib/build.xml,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** build.xml 2 Aug 2006 10:43:00 -0000 1.13 --- build.xml 11 Sep 2006 11:16:06 -0000 1.14 *************** *** 9,13 **** <property name="Name" value="JGrib"/> <property name="name" value="jgrib"/> ! <property name="version" value="beta7"/> <property name="dist.name" value="${name}_${version}"/> <property name="year" value="2006"/> --- 9,13 ---- <property name="Name" value="JGrib"/> <property name="name" value="jgrib"/> ! <property name="version" value="1.0"/> <property name="dist.name" value="${name}_${version}"/> <property name="year" value="2006"/> |
|
From: Peter G. <fr...@us...> - 2006-09-11 11:15:40
|
Update of /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/util In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv2300/src/net/sourceforge/jgrib/util Added Files: SmartStringArray.java Log Message: Added class to util package --- NEW FILE: SmartStringArray.java --- /** * =============================================================================== * $Id: SmartStringArray.java,v 1.1 2006/09/11 11:15:37 frv_peg Exp $ * =============================================================================== * JGRIB library * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * Authors: * See AUTHORS file * =============================================================================== */ package net.sourceforge.jgrib.util; /** * Class to handle addition of elements * Kjell Roeang, 18/03/2002 */ public class SmartStringArray { /** * "stack pointer" to keep track of position in the array */ int sp = 0; /** * The array of strings */ private String[] array; /** * How much to add */ private int growthSize; /** * Start value */ private static final int START = 64; /** * Constructor */ public SmartStringArray() { this(START); } /** * Constructor * @param initialSize */ public SmartStringArray( int initialSize ) { this( initialSize, ( initialSize / 4 ) ); } /** * Constructor * @param initialSize * @param growthSize */ public SmartStringArray( int initialSize, int growthSize ) { this.growthSize = growthSize; array = new String[ initialSize ]; } /** * Constructor * @param anArr */ public SmartStringArray(String[] anArr) { array = anArr; growthSize = START/4; sp = array.length; } /** * Reset stack pointer */ public void reset() { sp = 0; } /** * Add one string * @param str */ public void add(String str ) { if( sp >= array.length ) // time to grow! { String[] tmpArray = new String[ array.length + growthSize ]; System.arraycopy( array, 0, tmpArray, 0, array.length ); array = tmpArray; } array[ sp ] = str; sp += 1; } /** * Return normal array * @return strings in an array */ public String[] toArray() { String[] trimmedArray = new String[ sp ]; System.arraycopy( array, 0, trimmedArray, 0, trimmedArray.length ); return trimmedArray; } /** * @return size */ public int size() { return sp; } /** * Split string in an array * @param token * @param string * @return String array */ public static String[] split( String token, String string ) { SmartStringArray ssa = new SmartStringArray(); int previousLoc = 0; int loc = string.indexOf( token, previousLoc ); if (loc == -1) { // No token in string ssa.add(string); return( ssa.toArray() ); } do { //String sub = string.substring( previousLoc, loc ); /* if (sub.trim().length() > 0) { ssa.add(sub); } */ ssa.add( string.substring( previousLoc, loc ) ); previousLoc = ( loc + token.length() ); loc = string.indexOf( token, previousLoc ); } while( ( loc != -1 ) && ( previousLoc < string.length() ) ); //String sub = string.substring( previousLoc); /* if (sub.trim().length() > 0) { ssa.add(sub); } */ ssa.add( string.substring( previousLoc ) ); return( ssa.toArray() ); } /** * Remove array elements with blanks and blanks inside a string * Alter number of elements * @param inArr * @return string array */ public static String[] removeBlanks(String[] inArr) { // Count number of non blanks int nonBl = 0; for (int i=0; i<inArr.length; i++) { String inStr = inArr[i].trim(); if (inStr.length() != 0) { nonBl++; } inArr[i] = inStr; } if (nonBl == inArr.length) { return inArr; } // Copy to new String[] outArr = new String[nonBl]; nonBl = 0; for (int i=0; i<inArr.length; i++) { String inStr = inArr[i].trim(); if (inStr.length() != 0) { outArr[nonBl] = inStr; nonBl++; } } return outArr; } /** * Join some elements with a token in between * @param token * @param strings * @return joined string */ public static String join( String token, String[] strings ) { StringBuffer sb = new StringBuffer(); for( int x = 0; x < strings.length; x++ ) { if (strings[x] != null) { sb.append( strings[x] ); } if( x < ( strings.length - 1 ) ) { sb.append( token ); } } return( sb.toString() ); } /** * Prints the array * @param arr */ private static void printArr(String[] arr) { for (int i=0; i<arr.length; i++) { System.out.print(arr[i]); if (i != (arr.length-1)) { System.out.print(" . "); } } System.out.println(); } /** * @param argv */ public static void main (String[] argv) { String s1 = "aaa.bbb.ccc"; String s2 = "aaa.."; String s3 = "..."; String token = "."; // peg - variable never used //String[] res; printArr(split(token, s1)); printArr(split(token, s2)); printArr(split(token, s3)); } } |
Update of /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/gds In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv1877/src/net/sourceforge/jgrib/gds Modified Files: GribGDSFactory.java GribGDSLambert.java GribGDSRotLatLon.java GribGDSPolarStereo.java GribGDSLatLon.java Log Message: Changes reflected by reorganization of code Index: GribGDSRotLatLon.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/gds/GribGDSRotLatLon.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GribGDSRotLatLon.java 31 Aug 2006 11:33:18 -0000 1.3 --- GribGDSRotLatLon.java 11 Sep 2006 11:15:02 -0000 1.4 *************** *** 32,37 **** import net.sourceforge.jgrib.Bytes2Number; import net.sourceforge.jgrib.GribRecordGDS; ! import net.sourceforge.jgrib.NoValidGribException; ! import net.sourceforge.jgrib.NotSupportedException; import org.apache.log4j.Logger; --- 32,37 ---- import net.sourceforge.jgrib.Bytes2Number; import net.sourceforge.jgrib.GribRecordGDS; ! import net.sourceforge.jgrib.exceptions.NoValidGribException; ! import net.sourceforge.jgrib.exceptions.NotSupportedException; import org.apache.log4j.Logger; Index: GribGDSFactory.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/gds/GribGDSFactory.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** GribGDSFactory.java 7 Aug 2006 13:45:58 -0000 1.1 --- GribGDSFactory.java 11 Sep 2006 11:15:02 -0000 1.2 *************** *** 35,40 **** import net.sourceforge.jgrib.BitInputStream; import net.sourceforge.jgrib.GribRecordGDS; ! import net.sourceforge.jgrib.NoValidGribException; ! import net.sourceforge.jgrib.NotSupportedException; import org.apache.log4j.Logger; --- 35,40 ---- import net.sourceforge.jgrib.BitInputStream; import net.sourceforge.jgrib.GribRecordGDS; ! import net.sourceforge.jgrib.exceptions.NoValidGribException; ! import net.sourceforge.jgrib.exceptions.NotSupportedException; import org.apache.log4j.Logger; Index: GribGDSLatLon.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/gds/GribGDSLatLon.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** GribGDSLatLon.java 31 Aug 2006 11:33:18 -0000 1.3 --- GribGDSLatLon.java 11 Sep 2006 11:15:02 -0000 1.4 *************** *** 37,42 **** import net.sourceforge.jgrib.Bytes2Number; import net.sourceforge.jgrib.GribRecordGDS; ! import net.sourceforge.jgrib.NoValidGribException; ! import net.sourceforge.jgrib.NotSupportedException; --- 37,42 ---- import net.sourceforge.jgrib.Bytes2Number; import net.sourceforge.jgrib.GribRecordGDS; ! import net.sourceforge.jgrib.exceptions.NoValidGribException; ! import net.sourceforge.jgrib.exceptions.NotSupportedException; Index: GribGDSLambert.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/gds/GribGDSLambert.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GribGDSLambert.java 31 Aug 2006 11:33:18 -0000 1.4 --- GribGDSLambert.java 11 Sep 2006 11:15:02 -0000 1.5 *************** *** 41,45 **** import net.sourceforge.jgrib.Bytes2Number; import net.sourceforge.jgrib.GribRecordGDS; ! import net.sourceforge.jgrib.NoValidGribException; /** --- 41,45 ---- import net.sourceforge.jgrib.Bytes2Number; import net.sourceforge.jgrib.GribRecordGDS; ! import net.sourceforge.jgrib.exceptions.NoValidGribException; /** Index: GribGDSPolarStereo.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/gds/GribGDSPolarStereo.java,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** GribGDSPolarStereo.java 6 Sep 2006 13:31:01 -0000 1.8 --- GribGDSPolarStereo.java 11 Sep 2006 11:15:02 -0000 1.9 *************** *** 41,46 **** import net.sourceforge.jgrib.Bytes2Number; import net.sourceforge.jgrib.GribRecordGDS; ! import net.sourceforge.jgrib.NoValidGribException; ! import net.sourceforge.jgrib.NotSupportedException; import org.apache.log4j.Logger; --- 41,46 ---- import net.sourceforge.jgrib.Bytes2Number; import net.sourceforge.jgrib.GribRecordGDS; ! import net.sourceforge.jgrib.exceptions.NoValidGribException; ! import net.sourceforge.jgrib.exceptions.NotSupportedException; import org.apache.log4j.Logger; |
|
From: Peter G. <fr...@us...> - 2006-09-11 11:14:43
|
Update of /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/examples In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv1847/src/net/sourceforge/jgrib/examples Modified Files: JgribDemoAFWA.java JgribDemo.java UserSuppliedGribTable.java Log Message: Changes reflected by reorganization of code Index: JgribDemoAFWA.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/examples/JgribDemoAFWA.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** JgribDemoAFWA.java 27 Jul 2006 14:08:37 -0000 1.3 --- JgribDemoAFWA.java 11 Sep 2006 11:14:38 -0000 1.4 *************** *** 40,45 **** import net.sourceforge.jgrib.GribRecordIS; import net.sourceforge.jgrib.GribRecordLight; ! import net.sourceforge.jgrib.NoValidGribException; ! import net.sourceforge.jgrib.NotSupportedException; /*************************************************************************** --- 40,45 ---- import net.sourceforge.jgrib.GribRecordIS; import net.sourceforge.jgrib.GribRecordLight; ! import net.sourceforge.jgrib.exceptions.NoValidGribException; ! import net.sourceforge.jgrib.exceptions.NotSupportedException; /*************************************************************************** Index: UserSuppliedGribTable.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/examples/UserSuppliedGribTable.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** UserSuppliedGribTable.java 25 Jul 2006 13:45:13 -0000 1.2 --- UserSuppliedGribTable.java 11 Sep 2006 11:14:38 -0000 1.3 *************** *** 36,41 **** import net.sourceforge.jgrib.GribRecordLight; import net.sourceforge.jgrib.GribRecordPDS; ! import net.sourceforge.jgrib.NoValidGribException; ! import net.sourceforge.jgrib.NotSupportedException; /**************************************************************************** --- 36,41 ---- import net.sourceforge.jgrib.GribRecordLight; import net.sourceforge.jgrib.GribRecordPDS; ! import net.sourceforge.jgrib.exceptions.NoValidGribException; ! import net.sourceforge.jgrib.exceptions.NotSupportedException; /**************************************************************************** Index: JgribDemo.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/examples/JgribDemo.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** JgribDemo.java 2 Aug 2006 10:42:11 -0000 1.4 --- JgribDemo.java 11 Sep 2006 11:14:38 -0000 1.5 *************** *** 32,37 **** import net.sourceforge.jgrib.GribFile; ! import net.sourceforge.jgrib.NoValidGribException; ! import net.sourceforge.jgrib.NotSupportedException; /*************************************************************************** --- 32,37 ---- import net.sourceforge.jgrib.GribFile; ! import net.sourceforge.jgrib.exceptions.NoValidGribException; ! import net.sourceforge.jgrib.exceptions.NotSupportedException; /*************************************************************************** |
|
From: Peter G. <fr...@us...> - 2006-09-11 11:14:24
|
Update of /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv1820/src/net/sourceforge/jgrib Modified Files: GribRecordIS.java GribRecord.java GribFile.java GribPDSParamTable.java GribRecordPDS.java GribRecordBDS.java GribRecordBMS.java Log Message: Changes reflected by reorganization of code Index: GribRecordIS.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/GribRecordIS.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** GribRecordIS.java 25 Jul 2006 13:46:23 -0000 1.4 --- GribRecordIS.java 11 Sep 2006 11:14:17 -0000 1.5 *************** *** 36,39 **** --- 36,41 ---- import java.io.IOException; + import net.sourceforge.jgrib.exceptions.NotSupportedException; + /** Index: GribPDSParamTable.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/GribPDSParamTable.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** GribPDSParamTable.java 25 Jul 2006 13:46:00 -0000 1.10 --- GribPDSParamTable.java 11 Sep 2006 11:14:17 -0000 1.11 *************** *** 56,59 **** --- 56,62 ---- import java.util.Map; + import net.sourceforge.jgrib.exceptions.NotSupportedException; + import net.sourceforge.jgrib.util.SmartStringArray; + import org.apache.log4j.Level; import org.apache.log4j.Logger; Index: GribRecordBMS.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/GribRecordBMS.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** GribRecordBMS.java 25 Jul 2006 13:46:23 -0000 1.2 --- GribRecordBMS.java 11 Sep 2006 11:14:17 -0000 1.3 *************** *** 34,37 **** --- 34,39 ---- import java.io.IOException; + import net.sourceforge.jgrib.exceptions.NoValidGribException; + /** Index: GribRecord.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/GribRecord.java,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** GribRecord.java 12 Aug 2006 22:01:18 -0000 1.7 --- GribRecord.java 11 Sep 2006 11:14:17 -0000 1.8 *************** *** 37,40 **** --- 37,42 ---- import java.util.Calendar; + import net.sourceforge.jgrib.exceptions.NoValidGribException; + import net.sourceforge.jgrib.exceptions.NotSupportedException; import net.sourceforge.jgrib.gds.GribGDSFactory; Index: GribFile.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/GribFile.java,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** GribFile.java 12 Aug 2006 22:01:18 -0000 1.10 --- GribFile.java 11 Sep 2006 11:14:17 -0000 1.11 *************** *** 52,55 **** --- 52,57 ---- import org.apache.log4j.Logger; + import net.sourceforge.jgrib.exceptions.NoValidGribException; + import net.sourceforge.jgrib.exceptions.NotSupportedException; import net.sourceforge.jgrib.gds.GribGDSFactory; import net.sourceforge.jgrib.util.GribPDSLevelComparator; Index: GribRecordBDS.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/GribRecordBDS.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** GribRecordBDS.java 12 Aug 2006 21:47:33 -0000 1.9 --- GribRecordBDS.java 11 Sep 2006 11:14:17 -0000 1.10 *************** *** 34,37 **** --- 34,40 ---- import java.io.IOException; + import net.sourceforge.jgrib.exceptions.NoValidGribException; + import net.sourceforge.jgrib.exceptions.NotSupportedException; + /** Index: GribRecordPDS.java =================================================================== RCS file: /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib/GribRecordPDS.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** GribRecordPDS.java 27 Jul 2006 13:11:27 -0000 1.13 --- GribRecordPDS.java 11 Sep 2006 11:14:17 -0000 1.14 *************** *** 44,47 **** --- 44,49 ---- import java.util.GregorianCalendar; + import net.sourceforge.jgrib.exceptions.NotSupportedException; + import org.apache.log4j.Logger; |
|
From: Peter G. <fr...@us...> - 2006-09-11 11:13:29
|
Update of /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv1424/src/net/sourceforge/jgrib Removed Files: GribTabPool.java GribTables.java GribTab.java Log Message: Deleted deprecated classes, so we can concentrate on the current API before first stable release --- GribTabPool.java DELETED --- --- GribTab.java DELETED --- --- GribTables.java DELETED --- |
|
From: Peter G. <fr...@us...> - 2006-09-11 11:12:29
|
Update of /cvsroot/jgrib/jgrib/src/net/sourceforge/jgrib In directory sc8-pr-cvs6.sourceforge.net:/tmp/cvs-serv1003/src/net/sourceforge/jgrib Removed Files: SmartStringArray.java Log Message: Moved to package: util --- SmartStringArray.java DELETED --- |