[Thread Prev][Thread Next][Index]

Re: substract 2D data at specific depth



      *******************************************
      ***  Tailor-made calculations in Ferret ***
      *******************************************

Hi Dongxiao,

In answer to your question:

  "Is there any way to substract a 2D field from a 3D data only at a specific
  depth level and leave the other levels not being changed?"

You can use the IF THEN syntax to specify levels arbitrarily. For example, this
expression will subtract a 2D field only at layers less than 100 meters deep:

  let my_field = IF Z[g=my_3d_grid] LT 100 THEN my_3d-my_2d ELSE my_3d

	- steve

====================================


On Apr 18, 12:17pm, Dongxiao Zhang wrote:
> Subject: substract 2D data at specific depth
> Hi Ferrets,
>
> I am impressed by Steve's reply to Stefan's question about ...
>
> > 3. How can I e.g. subtract a 2-d field from a 3-d field, e.g. if I
> > wanted to subtract the temperature at level 1 (at each i,j) from the
> > temperatures at every level (for the same i,j)? (There are useful
> > applications for this e.g. to define a mixed layer depth.)
>
> Steve wrote:
>
> Ferret will subtract a 2D field from a 3D field as in
>
>         LET temp_anomaly = temp - sst           ! temp is 3D, sst is 2D
>   or
>         LET temp_anomaly = temp - temp[z=0]     ! temp[Z=0] is a 2D field
>
>
> My question is:
>
> Is there any way to substract a 2D field from a 3D data only at a specific
> depth level and leave the other levels not being changed?  This is useful,
> for example, to get rid of the Ekman component in the upper layer of
> velocity field.
>
> Thanks,
>
> Dongxiao
> --------------------------------------------------------------------
> Dongxiao Zhang
> Division of Meteorology and Physical Oceanography
> Rosenstiel School of Marine and Atmospheric Science
> 4600 Rickenbacker Causeway
> Miami, FL 33149
> Phone  : (305)361-4806
> Fax    : (305)361-4696
> Office : MSC Room 309
> --------------------------------------------------------------------
>
>-- End of excerpt from Dongxiao Zhang




-- 

		|  NOAA/PMEL               |  ph. (206) 526-6080  
Steve Hankin	|  7600 Sand Point Way NE  |  FAX (206) 526-6744
		|  Seattle, WA 98115-0070  |  hankin@pmel.noaa.gov


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement