[Thread Prev][Thread Next][Index]

Re: [ferret_users] Script



Gbenga, 

Below  is an example. The key is to use a dataset, like ETOPO (included with ferret),
which contains information that you can use to make an ocean mask to apply to
your data. 

Where does your original data come from (climate model, reanalysis)? It 
probably comes with a land/ocean mask that you should preferably use. But if
you can't find it, the ETOPO method below will work. 

Cheers,
-Neil

!!----------------------------------------------!!
! set the Southern African region
set region/y=-40:-20/x=10:40

! Use a  default-dataset and shade SST. Its coarse resolution
! but you will get the idea.

USE monthly_navy_winds
set view ul
shade uwnd[l=3:5@ave]
go land

! Use the default ETOPO data
! ETOPO has ocean values as < 0
use etopo5

! Now first remap the ETOPO data (rose) onto the
! SST grid
let rose_remap = rose[gxy=uwnd[d=1]]

! Now construct a mask, setting land to 1 and ocean to NaN
let omask IF rose_remap gt 0 then 1

! Multiply the SST by the mask to get rid of ocean data
let masked_uwnd = uwnd[d=1] * omask

! plot
set view ll
shade masked_uwnd[l=3:5@ave]
go land
!!----------------------------------------------!!

         


On 2014-07-01, at 3:41 AM, 'Gbenga Abiodun' via _OAR PMEL Ferret Users wrote:

Dear Ferret Users,

Kindly advise on this script (attachment - A). I am still new to ferret.
The scripts initially produces the map (attachment - B), so in order to remove the ocean part, I changed the cmax and cmin, but part of the land cuts off with ocean (as in attachment - C). Please what can I do to fix this problem.

Thank you.
 
Gbenga Jacob ABIODUN
Mathematics and Applied Mathematics Department
University of the Western Cape
Private Bag X17
Bellville 7535
Republic of South Africa
email:3109433@xxxxxxxxx, abbey_gbenx@xxxxxxxxx
Phone: +27 78 3321134, +27 843803030, +27 219592045

<A.jnl><B.gif><C.gif>


[Thread Prev][Thread Next][Index]
Contact Us
Dept of Commerce / NOAA / OAR / PMEL / Ferret

Privacy Policy | Disclaimer | Accessibility Statement