[ncl-talk] generate indices for resampling
Andrew Kren - NOAA Affiliate
andrew.kren at noaa.gov
Fri Jun 1 10:06:48 MDT 2018
Dear ncl-talk,
This is more of a science question than a coding issue. I noticed ncl has
the function generate_sample_indices to resample with and without
replacement. My data is temperature and moisture retrievals as function of
(time,lev). The issue I am tackling is that my data has a high temporal
frequency. I want to thin the data prior to assimilating it in the HWRF.
The data is reported at approximately every 2-3 seconds for a full 24
hours. So I have a lot of measurements and want to thin it.
I did a test where I retain 80% of the data randomly:
; generate indices for resampling without replacement to sub-sample the
HAMSR data
n_retain = toint(ceil(0.8*dimsizes(time)))
print(dimsizes(time))
iwo = generate_sample_indices(n_retain,0)
print(dimsizes(iwo))
14398 - dimsizes(time)
11519 - dimsizes(iwo)
However, I noticed that maybe this may not be correct since it will only
select n_retain values, and thus may not randomly get indices from the full
dataset to subset. Is there a way to do this with the function without
having to do replacement?
Thanks,
--
Andrew Kren
Assistant Scientist
CIMAS & NOAA/AOML
325 Broadway, Boulder, CO 80305
(303) 497-5418
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20180601/fb69818d/attachment.html>
More information about the ncl-talk
mailing list