[gradsusr] [EXTERNAL] Re: gradsusr Digest, Vol 115, Issue 23

Wesley Ebisuzaki - NOAA Federal wesley.ebisuzaki at noaa.gov
Mon Sep 30 10:46:09 EDT 2019


Subhajit,

   The default wgrib2 build makes the jasper and png libraries but does
not make g2clib.  (You can modify wgrib2's makefile to compile g2clib
but that not important to the discussion.)

Potential problem #1

Jasper 1.900.1 included with GrADS and wgrib2 can be compiled with
gcc, clang, AOCC, xlc (AIX), opencc.  It will compile but not correctly
using
intel or portland C compilers.  No idea about windows compilers except
for cygwin CC which is a port of gcc.

Potential problem #2

A potential problem is that author of Jasper started making upgrades
to Jasper after a several year lapse.  One of the changes was to slightly
change the API which would break compatibility with old code.  At that
point, I stopped following his changes.  (I don't know whether he reverted
to the old API.)    I don't know what would happen if your system already
has jasper installed as a system library and you use it.

Potential problem #3

Wgrib2 and GrADS compile g2clib with the API passing integers as 64-bit
integers on a 64-bit Linux/Unix machine.  However, NCEP compile g2clib so
that the API to pass integers as 32-bit integers on a 64-bit Linux/UNIX
machines.
The problem with using 32-bit integers is that there is a 2G limit to a
32-bit integer.
Grib files are routinely bigger that 2GB.  Even some CONUS radar mosaics
are
approaching 2G limits.  If your system already has g2clib installed, you
cannot
use the system version.


Quick and Dirty

If you are having problems with Jasper, just convert the grib file to
simple packing.
GrADS should had that.

   wgrib2 IN.grb -set_grib_type s -grib_out OUT.grb

The OUT.grb file is a simple-packed grib file.

If you cannot get g2clib working, you can comvert the file into netcdf.  If
the grid is a
lat-lon, GrADS will probably read it using sdfopen.

wgrib2 IN.grb -netcdf
OUT.nc                                                         OUT.nc can
be large
wgrib2 IN.grb -match ':(TMP|HGT):' --netcdf OUT.nc                  OUT.nc
only has HGT and TMP fields

Wesley

On Mon, Sep 30, 2019 at 9:29 AM Adams, Jennifer M. (GSFC-610.2)[ADNET
SYSTEMS INC] <jennifer.m.adams at nasa.gov> wrote:

> Wesley may be able to chime in about what’s in his wgrib2 tarball. You can
> examine the makefiles in the subdirectories under your
> /usr/bin/grib2/wgrib2 directory to see how the your grib2 libraries was
> built.
>
>
>
> In the meanwhile, this doc page
> http://cola.gmu.edu/grads/gadoc/supplibs2.html has some instructions for
> how I build png, jpeg, jasper, and grib2 libraries.
>
> The src code for these libraries is at
> ftp://cola.gmu.edu/grads/Supplibs/2.2/src
>
>
>
> --Jennifer
>
>
>
> --
> Jennifer Miletta Adams
> ADNET Systems, Inc.
> NASA/GSFC, Code 610.2
>
> Building 32, Room S159
> (301) 614-6070
>
>
>
>
>
> *From: *gradsusr <gradsusr-bounces at gradsusr.org> on behalf of Subhajit
> Ghosh <subhajitghosh08 at gmail.com>
> *Reply-To: *GrADS Users Forum <gradsusr at gradsusr.org>
> *Date: *Monday, September 30, 2019 at 7:09 AM
> *To: *"gradsusr at gradsusr.org" <gradsusr at gradsusr.org>
> *Subject: *[EXTERNAL] Re: [gradsusr] gradsusr Digest, Vol 115, Issue 23
>
>
>
> hi  Jennifer
>
> can please explain a bit more. How I can rebuild grib2 library and linked
> with a build of jasper. the process I followed is very simple and follows
>
>
>
> tar -zxvf wgrib2.gz
>
> sudo mv grib2 /usr/bin/
>
> export CC=gcc
>
> export FC=gfortran
>
>  make
>
> sudo ln -s /usr/bin/grib2/wgrib2/wgrib2  /usr/bin
>
>
>
> what should I add more with it?
>
> I can do all the other things except displaying in to map format.
>
>
>
> Thanks & Regards
>
> Subhajit
>
>
>
> On Sat, Sep 28, 2019 at 9:32 PM <gradsusr-request at gradsusr.org> wrote:
>
> Send gradsusr mailing list submissions to
>         gradsusr at gradsusr.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>         http://gradsusr.org/mailman/listinfo/gradsusr
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__gradsusr.org_mailman_listinfo_gradsusr&d=DwMFaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=M2mFZsxo0ZoztoK2Lyoypu1kKkBVKyEoM9CXGWO42zk&m=eHUHt3cwXi_D3pfG3s5mjNxRcISCO_V0rHvwty3aAI4&s=JnFil0Fr7e-sffM3sGekMANpck07T2fVWlScNMMXhZ4&e=>
> or, via email, send a message with subject or body 'help' to
>         gradsusr-request at gradsusr.org
>
> You can reach the person managing the list at
>         gradsusr-owner at gradsusr.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of gradsusr digest..."
>
>
> Today's Topics:
>
>    1. Re: error reading GRIB2 file (Jennifer M Adams)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Sat, 28 Sep 2019 15:53:28 +0000
> From: Jennifer M Adams <jadams21 at gmu.edu>
> To: GrADS Users Forum <gradsusr at gradsusr.org>
> Subject: Re: [gradsusr] error reading GRIB2 file
> Message-ID: <4915F45D-464B-470E-90BE-651BE0C6F92C at gmu.edu>
> Content-Type: text/plain; charset="utf-8"
>
> Data Representation Template 5.40 is (Grid Point Data - JPEG2000
> Compression) (Lossless)
> My build of the grib2c library is linked with a build of jasper that
> supports jpeg2000, so it works for me (see attached). If rebuilding your
> grib2 library is not an option, I believe you can use wgrib2 to rewrite the
> grib2 records and change the DRT to a different compression setting.
> ?Jennifer
>
> [cid:A652AD6F-0B9F-43D4-BA51-8A96602E1E08]
>
>
> On Sep 27, 2019, at 10:01 AM, Subhajit Ghosh <subhajitghosh08 at gmail.com
> <mailto:subhajitghosh08 at gmail.com>> wrote:
>
> Hi everyone
> I am unable to read a GRIB2 file in GrADS and its showing following error
>
> Config: v2.2.0 little-endian readline grib2 netcdf hdf4-sds hdf5
> opendap-grids,stn geotiff shapefile
>
> ga-> open wvhgt2.ctl
>
> Scanning description file:  wvhgt2.ctl
> Data file wvhgt.grib2 is open as file 1
> LON set to 0 360
> LAT set to -90 90
> LEV set to 1 1
> Time values set: 2019:9:11:0 2019:9:11:0
> E set to 1 1
> ga-> q file
>
> File 1 : wvhgt.grib2
>   Descriptor: wvhgt2.ctl
>   Binary: wvhgt.grib2
>   Type = Gridded
>   Xsize = 1440  Ysize = 721  Zsize = 1  Tsize = 24  Esize = 1
>   Number of Variables = 1
>      wvhgtsfc  0  10,0,5  ** surface Significant Height of Wind Waves [m]
>
> ga-> d wvhgtsfc
>
> g2_unpack7: Data Representation Template 5.40 not yet implemented.
>
> g2_getfld: return from g2_unpack7 = 4
> GRIB2 I/O Error: g2_getfld failed, ierr=14
> Data Request Error:  Error for variable 'wvhgtsfc'
>   Error ocurred at column 1
> DISPLAY error:  Invalid expression
>   Expression = wvhgtsfc
>
> If anyone can suggest  what's the problem and possible solution
> using wgrib2 v0.2.0.8 2/2019
>
> files are attached herewith
> thanks & Regards
> Subhajit
> <grads
> error.txt><wvhgt.ctl><wvhgt.grib2>_______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org<mailto:gradsusr at gradsusr.org>
>
> http://secure-web.cisco.com/1Hw0_otC2UCde9rhYn4uDCDsR0_bofsTjcbxhWaDZKDZHo72UABYI92dEyrBJ1dqzvthrCPgC4DMBo29tM8pLkBQHgYoDL7d6itNI4-M0IgJ3IeKqtuDqDifQukU7gxi9s_xDhCCdv-tg3Hi5vP52hA2KC5ozHO1b8GqZ5j9BMAYBrEyCW5O7ncO-OftiOpqqmx8vNo0DKHglyZwjdkPuX-bXMoFrO9H8AeyOPZ_mPlxBCe9IBJX2IPSf18d6hEpIdTwFxfoNhwjBHv0o5H8g03jIlbR4BWbrZn7k-d6qXKC_wt5WR9-Q8xosNJCCmZ09YyGvui4_H0flPbMHgsTtAjaRVLw-cdOT8uBUvruAtiVM2QrunPNZzEVDLeF6UuRzBIFNBXPEzWJO6oYUXRsqwCEqdQYdizA01NJ4y2JbfIt8KVuEYAgmQ_-Ukq960MTE/http%3A%2F%2Fgradsusr.org%2Fmailman%2Flistinfo%2Fgradsusr
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__secure-2Dweb.cisco.com_1Hw0-5FotC2UCde9rhYn4uDCDsR0-5FbofsTjcbxhWaDZKDZHo72UABYI92dEyrBJ1dqzvthrCPgC4DMBo29tM8pLkBQHgYoDL7d6itNI4-2DM0IgJ3IeKqtuDqDifQukU7gxi9s-5FxDhCCdv-2Dtg3Hi5vP52hA2KC5ozHO1b8GqZ5j9BMAYBrEyCW5O7ncO-2DOftiOpqqmx8vNo0DKHglyZwjdkPuX-2DbXMoFrO9H8AeyOPZ-5FmPlxBCe9IBJX2IPSf18d6hEpIdTwFxfoNhwjBHv0o5H8g03jIlbR4BWbrZn7k-2Dd6qXKC-5Fwt5WR9-2DQ8xosNJCCmZ09YyGvui4-5FH0flPbMHgsTtAjaRVLw-2DcdOT8uBUvruAtiVM2QrunPNZzEVDLeF6UuRzBIFNBXPEzWJO6oYUXRsqwCEqdQYdizA01NJ4y2JbfIt8KVuEYAgmQ-5F-2DUkq960MTE_http-253A-252F-252Fgradsusr.org-252Fmailman-252Flistinfo-252Fgradsusr&d=DwMFaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=M2mFZsxo0ZoztoK2Lyoypu1kKkBVKyEoM9CXGWO42zk&m=eHUHt3cwXi_D3pfG3s5mjNxRcISCO_V0rHvwty3aAI4&s=HTdRPLajEUju5aFJV8AuWlWVkJD2WHV4pEbxQhJiNws&e=>
>
> --
> Jennifer Miletta Adams
> Center for Ocean-Land-Atmosphere Studies (COLA)
> George Mason University
>
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://gradsusr.org/pipermail/gradsusr/attachments/20190928/dd9ed700/attachment.html
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__gradsusr.org_pipermail_gradsusr_attachments_20190928_dd9ed700_attachment.html&d=DwMFaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=M2mFZsxo0ZoztoK2Lyoypu1kKkBVKyEoM9CXGWO42zk&m=eHUHt3cwXi_D3pfG3s5mjNxRcISCO_V0rHvwty3aAI4&s=Wpgl12etDE1pfdccJEgKGDhK4ilqRBz4ILTznX5ER10&e=>
> >
> -------------- next part --------------
> A non-text attachment was scrubbed...
> Name: wvhgt.png
> Type: image/png
> Size: 220064 bytes
> Desc: wvhgt.png
> URL: <
> http://gradsusr.org/pipermail/gradsusr/attachments/20190928/dd9ed700/attachment.png
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__gradsusr.org_pipermail_gradsusr_attachments_20190928_dd9ed700_attachment.png&d=DwMFaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=M2mFZsxo0ZoztoK2Lyoypu1kKkBVKyEoM9CXGWO42zk&m=eHUHt3cwXi_D3pfG3s5mjNxRcISCO_V0rHvwty3aAI4&s=zxaq5wSP9BevXadcEE_a8whPNwZhNN1KDtWolJulmvE&e=>
> >
>
> ------------------------------
>
> Subject: Digest Footer
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
> <https://urldefense.proofpoint.com/v2/url?u=http-3A__gradsusr.org_mailman_listinfo_gradsusr&d=DwMFaQ&c=ApwzowJNAKKw3xye91w7BE1XMRKi2LN9kiMk5Csz9Zk&r=M2mFZsxo0ZoztoK2Lyoypu1kKkBVKyEoM9CXGWO42zk&m=eHUHt3cwXi_D3pfG3s5mjNxRcISCO_V0rHvwty3aAI4&s=JnFil0Fr7e-sffM3sGekMANpck07T2fVWlScNMMXhZ4&e=>
>
>
> ------------------------------
>
> End of gradsusr Digest, Vol 115, Issue 23
> *****************************************
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://gradsusr.org/pipermail/gradsusr/attachments/20190930/faf5fc45/attachment-0001.html>


More information about the gradsusr mailing list