[Thread Prev][Thread Next][Index]
Re: [ferret_users] Picking the time corresponding to maximum value of a variable from an nc file
Dear Sandhya,
> I have done exactly what you said, though I did not understand why you are doing
> ! limit to one point only
> ?set region /i=100/j=50
This is because the backticks need to resolve to a single value. If
you do this across a whole 2-dimensional grid like I did (i.e. SST
values over a full year), you may get different time indices for each
grid point where the maximum occurs.
So, this is still a valid expression which you can plot
sst[t=@max]
as well as
zero_at_max[t=@loc:0.0]
but you can't put that between backticks, as it's a whole grid of
values, not a single one. I was setting the i and j region to reduce
my data to a single number.
> yes? let zero_at_max=hs[t=@max]-hs
> yes? let maxtval=zero_at_max[t=@loc:0.0]
> yes? set region/i=100/j=50
> yes? let dummy=t[gt=hs,t=`maxtval`]
> !-> DEFINE VARIABLE dummy=t[gt=hs,t=954690]
> yes? let tstring=`dummy,return=tend`
> !-> DEFINE VARIABLE tstring=12-DEC-2009 17:57:00
> **ERROR: command syntax: 12-DEC-2009 17:57:00
> illegal character: :
Ah, sorry, I didn't test the code verbatim. You need double quotes to
assign the result to a variable:
let tstring="`dummy,return=tend`"
Otherwise you're telling ferret (see the output)
let tstring=12-DEC-2009 17:57:00
which is a syntax error because there's a space in the string, and
there's no quotes.
Kind regards,
Hein
--
Dr. Hein Zelle
Senior consultant meteorology & oceanography
Tel: +31 (0)527-242299
Fax: +31 (0)527-242016
E-mail: hein.zelle@xxxxxxxxxxxxx
Website: www.bmtargoss.com
BMT ARGOSS b.v.
Voorsterweg 28, 8316 PT Marknesse, the Netherlands
Postal address: P.O. Box 61, 8325 ZH Vollenhove, the Netherlands
Registered in The Netherlands, Registered no. 39060160.
Unless otherwise agreed by BMT ARGOSS in writing, all work,
services, goods or products supplied by BMT ARGOSS shall be subject
to and governed by BMT ARGOSS' own terms and conditions which are
available for inspection from BMT ARGOSS on request.
----Confidentiality Notice & Disclaimer----
The contents of this e-mail and any attachments are intended for the
use of the mail addressee(s) shown. If you are not that person, you
are not allowed to read it, to take any action based upon it or to
copy it, forward, distribute or disclose the contents of it and you
should please delete it from your system. BMT ARGOSS does not accept
liability for any errors or omissions in the context of this e-mail or
its attachments which arise as a result of internet transmission, nor
accept liability for statements which are those of the author and
clearly not made on behalf of BMT ARGOSS.
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
Ferret
Privacy Policy | Disclaimer | Accessibility Statement