This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
>From: Unidata Support <address@hidden> >Organization: UCAR/Unidata >Keywords: 200211192250.gAJMoQ427093 McIDAS gribdec gbtbpds001.bv1 Brian, I modified Mcmkmcgrid.c to add a new reformat routine ReformatLatLon that is called for non-ECMWF grid types 2, 3, 4. This routine stores grid values that initially look like: (90,0) +----------+----------+----------+----------+ | #####################| | #####################| | #####################| | #####################| | #####################| | #####################| | #####################| | #####################| +----------+----------+----------+----------+ (-90,-360) into a grid that looks like: (90,180) (90,0) +----------+----------+----------+----------+ |##################### | |##################### | |##################### | |##################### | |##################### | |##################### | |##################### | |##################### | +----------+----------+----------+----------+ (-90,-180) This makes McIDAS plotting/contouring routines happy. The Mcmkmcgrid.c mods will, in fact, work for all grids that span 360 degrees and that have longitudes specified with increasing values to the west and decreasing values to the east. Here are examples of what I mean (all longitudes are in McIDAS convention: West positive): West Lon East Lon ----------------+------------------ 180 -180 190 -170 270 - 90 160 -200 0 -360 360 0 etc. All of the above grids will be decoded so that the Western most longitude will be 180, and the Eastern most longitude will be -180. There is _no_ extra overhead in moving the grid points around since Mcmkmcgrid.c was doing that anyway. I put together a new gribdec.tar.Z bundle and stuck it in the unix/gribdec directory of passworded FTP on our ftp server, ftp.unidata.ucar.edu: machine: ftp.unidata.ucar.edu user: umcidas pass: XXXXXX directory: unix/gribdec file: gribdec.tar.Z This bundle should have all of the modifications that you made to Mcmkmcgrid.c (as I updated my code from your examples), and it contains my latest versions of gbtbpds001.bv1 (NCEP) and gbtbpds001.b98v1 (ECMWF). You should, however, your version of Mcmkmcgrid.c and Mcgribdecoder.c against the code in gribdec.tar.Z check before overwriting any of your own work. I have decoded 1 degree AVN grids with the new code and been successful in plotting resultant 500 mb Z fields over any map/image I displayed. Even though my tests were not exhaustive, I feel pretty confident that they correctly do the job that was needed. Please let me know if you see any problems. Tom >From address@hidden Fri Dec 27 15:21:05 2002 >Cc: address@hidden, >Brice Biggerstaff <address@hidden> >Subject: RE: 20021226: Unidata gribdec.tar.Z bundle (cont.) Tom, Thank you so very, very much!! Initial tests of the new software seem to indicate good results. We are very appreciative of all your hard work!! Brian