[ncl-talk] MODIS MYD04_L2 data product plotting issue

David Brown dbrown at ucar.edu
Fri Jul 24 17:54:17 MDT 2015


Hi Zhifeng,
After getting all the scripts and data you used to create this plot, I
am happy to report you can fix it pretty easily. It took a while for
me to realize that you were defining a big empty array (actually 3
arrays: data, lat, and lon) and then transferring all the modis data
that fit within the predefined lat/lon boundaries that you set up at
the beginning of the routine.

The problem, as I suggested to you earlier today, is that you pre-fill
this array with zeros. That means that every point where there is no
actual modis data looks like a point at (lat 0, lon 0) with data equal
to 0. The fix is simply to remove the 3 lines that pre-fill the 3
array with 0's. You already have the  _FillValue attribute set for
these array and when you created them using "new" they were
automatically pre-filled with the _FillValue. That is what you want.
So just remove these lines starting at line 95 or so:

      mlat  = 0.0
      mlon  = 0.0
      mdata = 0.0

and you will be fine. I am attaching a png plot (not perfect - but I'm
sure you know what to do about the little annotation map) to
illustrate that it can be fixed.
 -dave



On Mon, Jul 20, 2015 at 12:52 PM, Zhifeng Yang <yangzf01 at gmail.com> wrote:
> Hi
>
> I am using NCL to plot MODIS MYD04_L2 product. The variable name is
> Angstrom_Exponent_1_Ocean. However, while I plotted it, I got the image
> something wrong. There are several lines across (0 degree latitude, 0 degree
> longitude), like spokes (see the image attached). I believe MODIS data
> should be alright. So I bet there must be something wrong with my code. Here
> I also attached the plot subroutine and MODIS data. Please help me to figure
> this out.
> Here is the link to data
> https://drive.google.com/folderview?id=0B75ocgChenm7fmpyUS10d0gwZUYwODl0QWlQOTRKQWs2eUFUT2N5QlpiUDNrNjZObzBBek0&usp=sharing
>
> Thank you,
>
> Zhifeng
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 1plt_contour_pixel_modis_mod04_ang_v03.png
Type: image/png
Size: 293413 bytes
Desc: not available
Url : http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150724/b5a83e38/attachment-0001.png 


More information about the ncl-talk mailing list