[Thread Prev][Thread Next][Index]
Re: [ferret_users] extract a string
> I am ploting wave model output and I want to extract the initial date in the
> format dd-mon-yyyy
>
> ? use ... .nc
> ? sh grid u
> GRID GAY1
> name axis # pts start end
> LON LONGITUDE 61mr 0E 160E
> LAT LATITUDE 141 r 70S 70N
> normal Z
> TIME TIME 20 r 04-OCT-2015 06:00 09-OCT-2015 00:00
> normal E
> normal F
>
> Now i want to extract the string "04-OCT-2015" and "06:00" and define it to
> a variable so that it can be used in naming the output file as well as in
> the label. How can i do that.
You can use the RETURN mechanism. To see what it does:
yes? say `u,return=tstart`
There is an extensive description of what information you can get by
the RETURN mechanism in the Ferret manual.
In this way, you get the string "04-OCT-2015 06:00". Now, I'm not
familiar with how to manipulate strings. . . .
Ryo
>
> Regards,
>
> --
> Gayatri Vani K
> Project Engineer
> Computational Earth Sciences (CES) Group
> Centre for Development of Advanced Computing (CDAC), Pune
> Mobile: +91-9527615716
> Email: gayatrivanik@xxxxxxx
[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce /
NOAA /
OAR /
PMEL /
Ferret
Privacy Policy | Disclaimer | Accessibility Statement