[Thread Prev][Thread Next][Index]
RE: [ferret_users] Interpolating in places given by a variable.Was:Creating custom variable along z axis.
Thank you for your help.
It worked perfectly.
I have another question:
I have a variable "modulus" that gives me the wind in m/seg for I,j,k.
But the k coordinate comes in 'sigma levels' and I want it interpolated
at some heights in meters.
The values for al sigma levels are given by the variable altz, and this is a variable that depends on I,j (on K too).
So, I can get the sigma level for 60 m for each I,j with the
Following command:
let micooz=mialtz[z=2:6@loc:60]
But now, I do not know how to use it to extract the interpolation of modulus in the sigma levels specified in micooz.
Thank you very much,
César.
-----Original Message-----
From: Jaison Kurian [mailto:jaison@caos.iisc.ernet.in]
Sent: 26 September 2006 12:26
To: TEJEDA HERNANDEZ, CESAR
Cc: ferret_users@noaa.gov
Subject: 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