[ncl-talk] about where as mask in NCL

Dennis Shea shea at ucar.edu
Tue Feb 6 20:16:39 MST 2018


You must be more specific.

How does  it "not work." ? Is there an error message?

---
The array sizes and rank must match

Mfc(:,:)   ==> Mfc( n0, n1)
PCT_PFT(:,:) ==>PCT_PFT( n0, n1)
mod_PCT_PFT(:,:) ==>  mod_PCT_PFT(n0, n1)

You write: "the variable 'PCT_PFT' which has bigger domain." What does this
mean?



On Tue, Feb 6, 2018 at 9:47 AM, yogesh kumkar <yogeshkumkar at gmail.com>
wrote:

> Hello,
>
> 1) I have a mask 2d var 'Mfc', includes 0 and 1.
> 2) I have a variable 'mod_PCT_PFT' which I want to replace values from.
> 3) to the netcdf file opened for writing the variable 'PCT_PFT' which has
> bigger domain.
>
> I want to replace the values of 'mod_PCT_PFT' (where Mfc == 1) in to the
> 'PCT_PFT' only.
> Everything is 2d.
>
> I am using
>
> masked_PCT_PFT = where(Mfc .eq. 1, PCT_PFT  , mod_PCT_PFT)
> FM->PCT_PFT  =  masked_PCT_PFT
>
> but it does not work.
>
> Any suggestions?
>
> Thank you,
> Yogesh
>
> _______________________________________________
> ncl-talk mailing list
> ncl-talk at ucar.edu
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180206/0549f016/attachment.html>


More information about the ncl-talk mailing list