[Thread Prev][Thread Next][Index]

Re: [ferret_users] Creating custom variable along z axis.



Hi Cesar,
           You can use ZSEQUENCE function to define a 1D array 
(on Z-axis). From user manual, Ch3 Sec2.3.25 :

XSEQUENCE(A), YSEQUENCE(A), ZSEQUENCE(A), TSEQUENCE(A)  Unravels the 
data from the argument into a 1-dimensional line of data on an ABSTRACT 
axis. 

So try something like this,

    yes? let f2s = ZSEQUENCE({1, 0, 0, 0, 0})

Now f2s will be on a "ABSTRACT" axis. If you want to assign a proper Z
axis, then 

    yes? define axis/z=1:5:1 zax
    yes? let f2s_z = f2s[gz=zax@ASN]  ! @ASN regridding just assigns the
                                      !       axis 

Regarding the error message you got :

    let f2s= {1, 0, 0, 0, 0} --> will define f2s on X-axis (the default
way) and it does not have any other valid axes. So when you try
   
    set variable/grid=migrid f2s

there is a mismatch...like variable have only X-axis and the destination
grid does have only Z-axis. This way it won't work. That is why Ferret 
warns that "Grid for a user-defined variable is implied by its definition"
If you want to remap from X to Z axis, you have to use RESHAPE function.

In the solution i suggested earlier, the variable is defined on "Z" axis
and the regridding is done on Z-Axis ..so it is consistent.

Hope This Helps,

Regards,

Jaison

On Tue, 26 Sep 2006, TEJEDA HERNANDEZ, CESAR wrote:

> Hello,
> 
>  
> 
> I want to create a variable with these values:
> 
>  
> 
> let f2s= {1, 0, 0, 0, 0}
> 
>  
> 
> But along z axis (not x). 
> 
>  
> 
> This statements are not useful after the definition:
> 
>  
> 
> yes? define axis /z=1:5:1 zaxis
> 
> yes? define grid /z=zaxis migrid
> 
> yes? set variable/grid=migrid f2s
> 
>  **ERROR: invalid command: cannot specify grid for f2s
> 
>           Grid for a user-defined variable is implied by its definition
> 
>  
> 
> ¿Any hint?
> 
>  
> 
> Thanks in advance.
> 
>  
> 
> César.
> 
>  
> 
> 


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement