[gradsusr] Handling two data files with different time increment

Jonni Lehtiranta Jonni.Lehtiranta at fmi.fi
Fri Feb 15 10:48:06 EST 2013


Hi!

I have a problem I'm unable to overcome by myself. I have two files, output from
the same model. The primary file has many variables once per hour, the secondary
has one variable (let's call it B) for each timestep. That's 10 times per hour. Like this:

TDEF 55 LINEAR 00z15FEB2013 1hr

and

TDEF 550 LINEAR 00z15FEB2013 6mn

I want to use these in a script (grads -bpc draw.gs), such that the script opens both in
this order. I want to loop over the hours, and draw hourly averages of B. Or multiply
the hourly outputs by this average, stuff like that.

In direct mode, writing commands to grads by hand,

  d B.2(t=500)                    works, but
  d ave(B.2, t=400, t=500)  does not work.

I can't easily use "time=00z16feb2013" syntax.

Can I somehow tell grads that I want "t = 400" to mean the steps in the second file?


Yours sincerely,
 -Jonni Lehtiranta



More information about the gradsusr mailing list