[Thread Prev][Thread Next][Index]

Re: [ferret_users] discarding NaN values in a sequenced data series



Thank you Russ,
The compressl function is working fine.

Cheers, Saurabh

On Fri, Apr 24, 2020 at 12:18 PM Fiedler, Russell (O&A, Hobart) <Russell.Fiedler@xxxxxxxx> wrote:

Hi Saurabh,

Check out the COMPRESS* functions. In this case compressl.

def sym  num_good `obst[l=1:94400]`
let obst_comp=compressl(obst)
list/l=1:($num_good) obst_comp   !All the good values put at the start of the variable. Ignore the rest.

Note that

list obst_comp[l=1:($num_good]

is different (and probably not what you want). It moves all the good values in the first num_good positions and then pads with the missing values.

Cheers,
Russ

From: owner-ferret_users@xxxxxxxx <owner-ferret_users@xxxxxxxx> on behalf of saurabh rathore <rohitsrb2020@xxxxxxxxx>
Sent: Friday, 24 April 2020 11:36 AM
To: ferret users <ferret_users@xxxxxxxx>
Subject: [ferret_users] discarding NaN values in a sequenced data series
 
Dear Ferreters,
G'day

I hope everything is fine with you and your family members in these tough days. Accept my best wishes for the coming days.

I am emailing for a problem to discard the NaN values and making the 3-d or 4-d data into 1-d data by using sequence x/y/z/t function. I am unable to do discard the NaN values in sequencing the data. I just want good/valid values in my sequenced data. I am trying to use @ngd operator but it seems that I am not able to use it in a proper way.

use coads_climatology
let obst=tsequence(sst)
sh gr obst
name                        title                             I         J         K         L
OBST     TSEQUENCE(SST1)                  ...       ...       ...       1:194400

but this series consists of NaN values also

list/l=1000:5000 obst

4796   / 4796:  17.95
 4797   / 4797:   ....
 4798   / 4798:   ....
 4799   / 4799:   ....
 4800   / 4800:   ....
 4801   / 4801:   ....
 4802   / 4802:   ....
 4803   / 4803:  18.38
 4804   / 4804:  18.42
 4805   / 4805:  18.58
 4806   / 4806:  18.12
 4807   / 4807:  18.45
 4808   / 4808:  18.45
 4809   / 4809:  18.34
 4810   / 4810:  17.70
 4811   / 4811:  17.93
 4812   / 4812:  17.26
 4813   / 4813:  16.00
 4814   / 4814:  14.84
 4815   / 4815:   ....
 4816   / 4816:   ....
 4817   / 4817:   ....
 4818   / 4818:   ....
 4819   / 4819:   ....
 4820   / 4820:   ....
 4821   / 4821:   ....
 4822   / 4822:  20.33
 4823   / 4823:  20.30
 4824   / 4824:  20.88
 4825   / 4825:  21.22
 4826   / 4826:  20.20
So how to get the valid values and discard the NaN values? Any help is appreciated.

Cheers, Saurabh


--


REGARDS

Saurabh Rathore
Research Scholar (PhD.)
Centre For Oceans, Rivers, Atmosphere & Land Science Technology
Indian Institute Of Technology, Kharagpur
contact :- 91- 8345984434


--


REGARDS

Saurabh Rathore
Research Scholar (PhD.)
Centre For Oceans, Rivers, Atmosphere & Land Science Technology
Indian Institute Of Technology, Kharagpur
contact :- 91- 8345984434

[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement