Re: how to assign the data on missing days with missing value

From: Matt Stumbaugh (Matt.Stumbaugh AT
Date: Fri Jan 21 2005 - 11:53:41 MST


I suggest you use the functions:

My first impression is that you should make a function that takes
arguments of "start_date" and "end_date." These "_date" variables would
have year, month, and day data. Then create time arrays of equal length.
Populate them so that ultimetly you can concatenate them into one
"time_array" that you can loop through. You may have to tweek the
variable types to "strings". At each iteration, use

time_file_exists = systemfunc("*"+time_array(loop_number)+".nc")

and have an if statement like,

if any(ismissing(time_file_exists)).eq.True
then make a missing value data file corresponding to this time.

I hope this helps. You might want to read up about systemfunc and make
sure it behaves well with the wildcard "*". If it doesn't you're going
to have some more thinking to do. This is an instance where knowing some
Python or Perl might be a nice accompaniment to your NCL code.


Li Tao wrote:

> Hi, All:
> I have a lots nc file which name with date such *20020601*.nc, but
> some days is missing
> Is there any simple way to assign the data on these days with missing
> value?one way is thatto use eyecheck which day is missing , then
> assign the data with missing value. But there are a lots files, I try
> to use a ncl file to check it, May I do it?
> Thanks and regards!
> Li Tao
>ncl-talk mailing list

ncl-talk mailing list

This archive was generated by hypermail 2b29 : Sat Jan 22 2005 - 21:53:04 MST