[Thread Prev][Thread Next][Index]

Re: [ferret_users] Automated enlargement of a land mask with increasing depth slices



Thanks Jaison, That's really useful!

Jon


On 28 Mar 2007, at 13:09, Jaison Kurian wrote:

Hi Jon,
        A quick solution is here. Please let me know if you have any
questions.

Basically, you have to use "immediate evaluation" using grave accents
to force Ferret to proper numeric value for the /LEVELS argument. See
the example below for details.

Hope this helps,

Regards,

Jaison


!-----example starts here------------------------------------------
\ cancel mode verify

! use datasets available with Ferret

    set data levitus_climatology
    set data etopo20

    set region/x=180w:180w/y=90s:90n/l=1

! extract the depth Z-axis values of of the variable to be shaded

    let zvals = z[gz=temp,d=1] * -1  ! change sign, if required

! Now make the plots. Name the output files according to the K-level.

    REPEAT/K=15:1:-1 (                                ;\
        shade/palette=chl temp[d=1]                   ;\
shade/over/nolabel/lev="(`zvals`)(10000)"/pal=gray rose [d=2] ;\
        say " Current Ocean Depth =  `zvals`" ; pause ;\
        let klv = IF `K` LE 9 THEN "0`k`" ELSE "`k`"  ;\
        FRAME/FILE=temp_slice_k`klv`.gif              ;\
     )

!-----example ends here--------------------------------------------

On Wed, 28 Mar 2007, Jonathan Lauderdale wrote:

Hi all,

I am running a model with 15 depth levels (non-uniform and in reverse
order, so i use the K index) and plotting each slice of ocean
temperature/salinity etc with a repeat statement:

use state.0004248000.glob.nc
set region/x=180w:180w/y=90s:90n/l=1
REPEAT/K=15:1:-1 (shade/palette=ocean_temp temp; shade/over/nolabel/
noaxes/lev="(0)(10000)"/pal=gray depth; FRAME/FILE=temp_slice.gif)

At the moment, the continents are masked out as they appear at the
sea surface and I know i can get the correct mask for each slice if I
change /lev"(0)(10000)" to /lev="(-2500)(10000)" but is there a way
to do this within a repeat ie /lev"(Z(k))(10000)" ?? I just get
"Error Syntax error"

Thanks,
Jon

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Jonathan Lauderdale, PhD Student
Ocean Observation and Climate Group
National Oceanography Centre, Southampton
European Way
Southampton, SO14 3ZH
U.K.
Tel: +44 (0)23 80596488
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

This e-mail (and any attachments) is confidential and intended solely
for the use of the individual or entity to whom it is addressed. Both
NERC and the University of Southampton (who operate NOCS as a
collaboration) are subject to the Freedom of Information Act 2000.
The information contained in this e-mail and any reply you make may
be disclosed unless it is legally exempt from disclosure. Any
material supplied to NOCS may be stored in the electronic records
management system of either the University or NERC as appropriate.







[Thread Prev][Thread Next][Index]

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

Privacy Policy | Disclaimer | Accessibility Statement