[ncl-talk] How to convert a contour map to a raster file from a nc file?

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Wed Jun 10 12:02:35 MDT 2020


This is a bit confusing.  Are you saying you can run NCL on your remote
server, and make some kind of smaller file that you can then download?  Or
are you running NCL locally and reading this Netcdf file through a server
path or a URL?


On Wed, Jun 10, 2020 at 10:45 AM zoe jacobs <zoejacobs1990 at gmail.com> wrote:

> Dear Dave,
> Many thanks for your explanations. My problem is that my nc file is just
> known by the remote server I work at. After copying the file to my desktop,
> and opening it by Panoply , it is no longer valid as a nc file ! . So I
> look for a way to sort it out. What can I do please?
> Many thanks in advance,
> Best wishes,
>
> On Tue, Jun 9, 2020 at 10:19 PM Dave Allured - NOAA Affiliate <
> dave.allured at noaa.gov> wrote:
>
>> According to this article, your original Netcdf file is already in a GIS
>> raster format.
>>
>>     https://en.wikipedia.org/wiki/GIS_file_formats
>>
>> You should be able to skip the plotting step, and use the Netcdf file
>> directly in ArcGIS.  Minor adjustments may be needed for coordinates and
>> area subsetting.  My guess is that this is really what you want to do.
>>
>> The expression "raster format" is problematical because it is used for at
>> least three fundamentally different things in computer graphics.
>> Generically, this refers to common "bit-mapped" image file formats such as
>> png, gif, and jpeg.  In GIS and satellite imagery, it refers to a variety
>> of gridded data formats, including Netcdf.  And NCL has a specialized
>> usage, referring to the rendering of gridded data as visibly rectangular
>> blocks when making plots, rather than smooth or segmented outlines.  It
>> would be nice if these nuances of terminology were discussed in NCL
>> documentation, but, um, they are not.
>>
>> To make things more confusing, some of these formats can be "rendered" in
>> one of the other formats, often losing software compatibility in the
>> process.  The picture on your example raster_4.ncl is a perfect example of
>> this.  That is an NCL "raster plot" projected onto a PNG "raster format"
>> image file for website display.  The "pixels" before and after are
>> completely different.  So be careful about which usage you are discussing.
>>
>>
>> On Tue, Jun 9, 2020 at 10:06 AM zoe jacobs via ncl-talk <
>> ncl-talk at mailman.ucar.edu> wrote:
>>
>>> Dear all NCL users,
>>>
>>> I would like to create a map plot in raster format from a nc file . So I
>>> can then use it on ArcGIS. Please have a look at the following link
>>> https://www.ncl.ucar.edu/Applications/raster.shtml , example
>>> easter_4.ncl . I already could plot a contour map from my nc file, and
>>> I just wonder which command should I add to my script to convert my plot to
>>> be in a raster format?
>>> Would you please kindly advise me in this regard?
>>> Best wishes,
>>>
>>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20200610/964a8d11/attachment.html>


More information about the ncl-talk mailing list