[Thread Prev][Thread Next][Index]
[ferret_users] hand-editing a variable
Hi everyone,
Isearched in the online help and the mail archives and couldn't find a solution
to my problem, so here I am.
I have a 3D variable (lon,lat,time), with a 30-minutes time step over a whole
year. I'd like to replace my variable value by 0 each time the time step equals
the first of every month, i.e.:
if "we are on the 1st of January 0:00" then "reset variable to zero" else "keep it
as it is"
if "we are on the 1st of February 0:00" then "reset variable to zero" else "keep
it as it is"
etc.
How can I achieve this? I tried with a simple if, it didn't work (here after, let's
say the time step at which the variable "var" must be reset to 0 is the time
step 100):
if `L eq 100` then let new_var = 0*var else let new_var = var
or
let new_var = if `L eq 100` then 0*var else var
It doesn't work. I always get something like:
**ERROR: invalid command: grave accent doesnt evaluate to scalar
L eq 100
I don't mind if the solution takes time to be implemented, as long as it works.
I've only 12 changes to make in the variable.
Thanks in advance for any suggestion!
Emilie V.
------------------------------------------------------
Emilie VANVYVE
Physicist, PhD student
Université catholique de Louvain (UCL)
Institut d'astronomie et de géophysique G. Lemaître (ASTR)
Chemin du Cyclotron, 2, B-1348 Louvain-la-Neuve, Belgium
Phone: +32-(0)10-473300 Fax: +32-(0)10-474722
E-mail: vanvyve@astr.ucl.ac.be Web : www.astr.ucl.ac.be/u/vanvyve
[Thread Prev][Thread Next][Index]
Dept of Commerce /
NOAA /
OAR /
PMEL /
TMAP
Contact Us | Privacy Policy | Disclaimer | Accessibility Statement