[ncl-talk] convert png to nc file after plot command

Rick Brownrigg brownrig at ucar.edu
Wed Jul 29 07:16:08 MDT 2020


Hi,

I don't believe there's a way to do this directly with NCL. However, "gdal"
is a set of utilities that are extremely useful for dealing with geospatial
(raster) data. In particular, the "gdal_translate" command can convert a
png to netCDF. See example 9 at the link below for an example command line
invocation to convert a jpg to netCDF.  Please be advised that gdal has
dozens of optional libraries that can be used to build it, netCDF being
one. The gdal_translate --format" command will list the formats supported
by a given binary.

http://ncl.ucar.edu/Applications/rgbacolor.shtml

Rick


On Wed, Jul 29, 2020 at 12:59 AM zoe jacobs via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Dear all NCL users,
> I have a script (attached) which gives me  monthly averages of
> precipitation and plots the result as png files. I wonder if there is any
> command in NCL which could   convert the png file to nc file after plot
> command?
> Please kindly advise me in this regard,
> Many thanks in advance,
> Best wishes,
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200729/ea92986c/attachment.html>


More information about the ncl-talk mailing list