[gradsusr] define a simple scalar

Joey Woodson instantweathermaps at gmail.com
Sat Jul 30 16:31:13 EDT 2011


set t 1
variable1 = const(kanto, 1, -a)
set t 2
variable2 = const(kanto, 2, -a)

where "kanto" is any variable in the file.

AFAIK there is no way to define different timesteps of the same variable in
different ways. A for loop can take care of the trouble involved with using
multiple variables.

On Sat, Jul 30, 2011 at 2:00 PM, Lisa Welp-Smith <lwelp at ucsd.edu> wrote:

> Hello,
>
> I'm having a problem with what I'm sure is a simple task.  I want to
> define a scalar to convert a slope (i.e. units/year) into a trend line
> over several years.  I'm using this to detrend a time series.
> Basically I just need to construct a simple scalar (i.e. variable = 1 2
> 3 4 5...) or a variable that equals the year of each entry of my dataset
> (i.e. variable = 1991 1992 1993 1994 1995...) that I can multiply by my
> slope values.  I can use tloop to create the right dimensions (variable
> = 1 1 1 1 1...) but I can't seem to get the values to increase for each
> time step.
>
> Imagine I could either create a datafile manually and read it in or
> somehow extract the year information from the existing dataset into a
> user defined variable.
>
> Is there an equivalent of 'define variable(t=2) = 2'?  I know this
> syntax is wrong.
>
> Any advice would be appreciated.
>
> Lisa
>
> --
> Lisa Welp-Smith
> Carbon Dioxide Research Group
> Scripps Institution of Oceanography
>
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://gradsusr.org/pipermail/gradsusr/attachments/20110730/6d6899e6/attachment-0003.html 


More information about the gradsusr mailing list