Re: overlap values in netcdf

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Thu May 29 2014 - 09:19:31 MDT

Hi Nitin,
IF both files are on the exact same grid and the second file has data
over India and missing data elsewhere, you can use the where function
like this:
; file 1 = arr, file 2 = india with missing data denoted by india@_FillValue

data_combine = data ; allocate metadata + data (data will be
overwritten @next line though)
data_combine = where(ismissing(india), arr, india) ; where the india
array is missing, use the arr data, otherwise use the india data

http://www.ncl.ucar.edu/Document/Functions/Built-in/where.shtml

As always check the results to make sure the results are as expected.
If that does not help or does not apply to your situation please respond
to the ncl-talk email list only.
Adam

On 5/29/14, 7:50 AM, Nitin Patil wrote:
> Dear ncl users,
>
> I have 2 netcdf files. first one is global data and second is for
> INDIA region. Both files have same grids. What I have to do is I have
> to map INDIA region value from second file to first file (which is
> global data).
>
> means replacing INDIA region value in global data file.
>
> Whether this is possible in ncl any idea how to proceed for this...
> Any help will be appreciated!
>
>
> --
> Regards,
> Nitin Patil
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
----------------------------------------------------------------
Adam Phillips                                  asphilli@ucar.edu
NCAR/Climate and Global Dynamics Division         (303) 497-1726
P.O. Box 3000				
Boulder, CO 80307-3000    http://www.cgd.ucar.edu/staff/asphilli

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Thu May 29 09:19:43 2014

This archive was generated by hypermail 2.1.8 : Tue Jun 03 2014 - 11:40:09 MDT