[Thread Prev][Thread Next][Index]

Re: [ferret_users] adding 2 dimensional variable to 3 dimensional variable



Hi Murat,

I think you want to use a mask here.  

let out = if (k eq 1) then zeros + ones else zeros

Steve

----- Original Message -----
From: gunduz@xxxxxxxxxxxxxxx
Date: Friday, September 5, 2008 12:28 pm
Subject: [ferret_users] adding 2 dimensional variable to 3 dimensional variable
To: ferret_users@xxxxxxxx

> 
> 
> Dear Ferret Users,
> 
> I have a 3 dimensional variable (its name is zeros)
> 
> ========================
> yes? show grid zeros
>    GRID (G006)
> name       axis              # pts   start                end
> LONGITUDE LONGITUDE         1489mi   22E                  
> 41.839E(41.84) LATITUDE  LATITUDE          1279 i   34.503N         
>     47.313N
> DEPTH     DEPTH (m)           25 i-  0                    1750
> normal    T
> ===========================
> 
> and another 2 dimensional variable called ones
> 
> ===========================
> yes? show grid ones
>    GRID (G007)
> name       axis              # pts   start                end
> LONGITUDE LONGITUDE         1489mi   22E                  
> 41.839E(41.84) LATITUDE  LATITUDE          1279 i   34.503N         
>     47.313N
> normal    Z
> normal    T
> ==============================
> 
> I want to add ones to the first level of the zeros
> 
> let out = zeros[k=1] + ones
> 
> however, above command add ones to whole levels, not the first level.
> (i.e the whole elements of 3 dim. out variable are 1)
> 
> Is there any way to add 2 dimensional variable to the only selected 
> levelsof the 3 dimensional variable?
> 
> Thank you very much in advance,
> Murat
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> 
> -- 
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> 
> 
> 
> 

=======================================================
Stephen R. Guimond
Graduate Research Assistant
Florida State University
Center for Ocean-Atmospheric Prediction Studies (COAPS)
=======================================================


[Thread Prev][Thread Next][Index]

Contact Us
Dept of Commerce / NOAA / OAR / PMEL / TMAP

Privacy Policy | Disclaimer | Accessibility Statement