Re: Is there any method similar as ndtooned but can move the missing values?

From: Will Hobbs <Will.Hobbs_at_nyahnyahspammersnyahnyah>
Date: Sat May 31 2014 - 02:01:48 MDT

Dachao

I'm not sure from you post if you want to include the missing values in your new 1-d array, or remove them, but either case is easy in NCL.

If you use either the ndtooned() or reshape() functions, the new 1-d array will include any missing values that were in the original, multi-dimensional array. There are a number of ways to exclude missing values from new 1-d array, the ind() function is probably the easiest:

> tmp = ndtooned(x) ;here x is a multidimensional array with some missing values, tmp is a 1-d array
> ii = ind(.not.ismissing(tmp)) ; find locations of non-missing values
>x1d = tmp(jj) ;x1d is a new array containing no missing values


Will

From: 小螃蟹直着走 <54215407@qq.com<mailto:54215407@qq.com>>
Date: Saturday, 31 May 2014 4:38 PM
To: ncl-talk <ncl-talk@ucar.edu<mailto:ncl-talk@ucar.edu>>
Subject: [ncl-talk] Is there any method similar as ndtooned but can move the missing values?

Dear all,

I want to convert a multi-dimensional array to one-dimensional array, but there exist some missing values in the multi-dimensional, so I want move these missing values in the oen-dimensional array. Then do some progress, is there still any way I can re-convert the one-dimensional to multi-dimensional array?

Thanks for your time. Have a nice afternoon.

Best regards,
Dachao
--------------------------------------------------
Dachao Jin, Post-Doctor
ARC-ENV, Center for Advanced Information Science and Technology,
University of Aizu, Tsuruga, Ikki-machi,
Aizuwakamatsu-shi, Fukushima 965-8580,
Japan

Tel: +81242 37-2562<tel:%2B81242%2037-2562>
E-mail: jindc@u-aizu.ac.jp<mailto:saji@u-aizu.ac.jp>
ResearchGate: https://www.researchgate.net/profile/Dachao_Jin

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Sat May 31 02:02:08 2014

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