Changeset 12065
- Timestamp:
- 09/04/07 12:19:04 (10 months ago)
- Files:
-
- spike/grib/degrib18/degrib/degrib1.cpp (modified) (3 diffs)
- spike/grib/degrib18/degrib/meta.h (modified) (2 diffs)
- spike/grib/degrib18/degrib/metaparse.cpp (modified) (2 diffs)
- spike/grib/gribdataset.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
spike/grib/degrib18/degrib/degrib1.cpp
r10753 r12065 864 864 gridType = *(gds++); 865 865 switch (gridType) { 866 case GB1S2_LATLON: 866 case GB1S2_LATLON: // Latitude/Longitude Grid 867 case GB1S2_GAUSSIAN_LATLON: // Gaussian Latitude/Longitude 867 868 if ((sectLen != 32) && (sectLen != 42) && (sectLen != 52)) { 868 869 errSprintf ("For LatLon GDS, should have 32 or 42 or 52 bytes " … … 870 871 return -1; 871 872 } 872 gdsMeta->projType = GS3_LATLON; 873 if (gridType == GB1S2_GAUSSIAN_LATLON) 874 gdsMeta->projType = GS3_GAUSSIAN_LATLON; 875 else 876 gdsMeta->projType = GS3_LATLON; 873 877 gdsMeta->orientLon = 0; 874 878 gdsMeta->meshLat = 0; … … 905 909 gdsMeta->Dx = GRIB_UNSIGN_INT2 (*gds, gds[1]) * unit; 906 910 gds += 2; 907 gdsMeta->Dy = GRIB_UNSIGN_INT2 (*gds, gds[1]) * unit; 911 if (gridType == GB1S2_GAUSSIAN_LATLON) { 912 int np = GRIB_UNSIGN_INT2 (*gds, gds[1]); /* parallels between a pole and the equator */ 913 gdsMeta->Dy = 90.0 / np; 914 } else 915 gdsMeta->Dy = GRIB_UNSIGN_INT2 (*gds, gds[1]) * unit; 908 916 gds += 2; 909 917 gdsMeta->scan = *gds; spike/grib/degrib18/degrib/meta.h
r10749 r12065 65 65 /* For GRIB1 GDS Types. */ 66 66 enum { GB1S2_LATLON = 0, GB1S2_MERCATOR = 1, GB1S2_LAMBERT = 3, 67 GB1S2_ POLAR = 567 GB1S2_GAUSSIAN_LATLON = 4, GB1S2_POLAR = 5 68 68 }; 69 69 … … 381 381 */ 382 382 enum { GS3_LATLON = 0, GS3_MERCATOR = 10, GS3_POLAR = 20, 383 GS3_LAMBERT = 30, GS3_ ORTHOGRAPHIC = 90,383 GS3_LAMBERT = 30, GS3_GAUSSIAN_LATLON = 40, GS3_ORTHOGRAPHIC = 90, 384 384 GS3_EQUATOR_EQUIDIST = 110, GS3_AZIMUTH_RANGE = 120}; 385 385 spike/grib/degrib18/degrib/metaparse.cpp
r10753 r12065 824 824 switch (is3[12]) { 825 825 case GS3_LATLON: /* 0: Regular lat/lon grid. */ 826 case GS3_GAUSSIAN_LATLON: /* 40: Gaussian lat/lon grid. */ 826 827 if (ns3 < 72) { 827 828 return -1; … … 849 850 meta->gds.lon2 = is3[59] * unit; 850 851 meta->gds.Dx = is3[63] * unit; /* degrees. */ 851 meta->gds.Dy = is3[67] * unit; /* degrees. */ 852 if (is3[12] == GS3_GAUSSIAN_LATLON) { 853 int np = is3[67]; /* parallels between a pole and the equator */ 854 meta->gds.Dy = 90.0 / np; 855 } else 856 meta->gds.Dy = is3[67] * unit; /* degrees. */ 852 857 meta->gds.scan = (uChar) is3[71]; 853 858 meta->gds.meshLat = 0; spike/grib/gribdataset.cpp
r10749 r12065 386 386 { 387 387 case GS3_LATLON: 388 case GS3_GAUSSIAN_LATLON: 388 389 // No projection, only latlon system (geographic) 389 390 break;
