[ncl-talk] Removing line over ocean for soil moisture+ reversing color of plot

Adam Phillips asphilli at ucar.edu
Thu May 26 13:42:26 MDT 2022


Hi Setareh,
Thanks for sending a short script and data file. Unfortunately the data
file (for me) is corrupted so I cannot run the script. Looking at your
script/plot though, I see that you are setting mpFillOn = False, but it
looks to me like the land in your plot is getting filled with gray (before
the color fill is applied).

The reason I am asking this is that the weird contouring that you are
seeing over the ocean in the first panel is similar to an issue I have seen
when color filling an incomplete array when mpFIllOn is set to True. So
please verify that the script you sent creates the plot that you attached.

If it does, please write out your anom array (which should be much smaller
than your original data file) and send it to ncl-talk.

Something simple like this should work:
anom = calcMonAnomTLL(prc,prcClm)
v = addfile("anom.nc","c")
v->anom = anom

Adam



On Thu, May 26, 2022 at 9:55 AM Setareh Rahimi via ncl-talk <
ncl-talk at mailman.ucar.edu> wrote:

> Dear Rick,
> Thank you for your advice. I got no errors or warnings regarding the
> script. I just wonder why there are values over the ocean!
> Best wishes,
>
> On Thu, May 26, 2022 at 8:17 PM Rick Brownrigg <brownrig at ucar.edu> wrote:
>
>> To your 1st question, were there any errors or warnings reported by NCL?
>>
>> On the 2nd question, it looks like you are setting your colors with this
>> line:
>>
>>     res at cnFillPalette        = "perc2_9lev"
>>
>> Perhaps try:
>>
>>    cmap = read_colormap_file("perc2_9lev")
>>    res at cnFillPalette = cmap(::-1, :)
>>
>> Take a look at the documentation for cnFillPalette for discussion on how
>> there might be two extra colors in the new palette; I don't know if that
>> matters to what you are trying to do:
>>
>>
>> http://ncl.ucar.edu/Document/Graphics/Resources/cn.shtml#cnFillPalette
>>
>> HTH...Rick
>>
>>
>> On Thu, May 26, 2022 at 8:47 AM Setareh Rahimi via ncl-talk <
>> ncl-talk at mailman.ucar.edu> wrote:
>>
>>>
>>> Dear all,
>>> I plotted the monthly anomaly of soil moisture, however, after plotting
>>> I noticed that for the month of January there are some lines over the
>>> Atlantic ocean. I wonder why this happened, please? The script, image,
>>>  soilw.mon.mean.v2.nc
>>> <https://drive.google.com/file/d/1vl3N7Ptg0NnQGDBWOToGjj9CdcD9Fnr-/view?usp=drive_web>
>>> and the data set have been attached.
>>> I have another question. How can I reverse the color of the map, please?
>>> Please kindly advise me.
>>> Thanks in advance,
>>> Best wishes,
>>> --
>>> S.Rahimi
>>>
>>> _______________________________________________
>>> ncl-talk mailing list
>>> ncl-talk at mailman.ucar.edu
>>> List instructions, subscriber options, unsubscribe:
>>> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>>>
>>
>
> --
> S.Rahimi
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at mailman.ucar.edu
> List instructions, subscriber options, unsubscribe:
> https://mailman.ucar.edu/mailman/listinfo/ncl-talk
>


-- 
Adam Phillips
Associate Scientist,  Climate and Global Dynamics Laboratory, NCAR
www.cgd.ucar.edu/staff/asphilli/   303-497-1726

<http://www.cgd.ucar.edu/staff/asphilli>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.ucar.edu/pipermail/ncl-talk/attachments/20220526/93f873ed/attachment.htm>


More information about the ncl-talk mailing list