[Thread Prev][Thread Next][Index]

[ferret_users] Making mask in the picture -- fland?



Hello Ferreters,
I'm wondering if somebody can help me with my problem. I don't know how I must prepare my data for making a mask in the graphic from it.
I think I need to use fland script, but I'm not familiar with it. I don;t know how to pass my own specific data to it.
This is my script which do graphical data (swh+coastline). I would like to data to be masked by coastline. Now it's only overlaying.

set win/size=6.0/aspect=`1.1`
SET VIEWPORT FULL
CANCEL MODE LOGO
DEFINE AXIS/X=-5.666666667:5.25:0.083333333/unit=degree xlon
DEFINE AXIS/Y=-2.0:10.0:0.083333333/unit=degree ylat
DEFINE GRID/x=xlon/y=ylat grid_xlon_xlat
FILE/VARIABLES=swh_grid/COLUMNS=132/GRID=grid_xlon_xlat swh20101018090000.txt
set var/bad=-1 swh_grid
set var/units=meters swh_grid
set var/title="Significant Wave Height" swh_grid
DEFINE AXIS/X=-5.666666667:5.25:0.010416667/unit=degree xfine
DEFINE AXIS/Y=-2.0:10.0:0.010416667/unit=degree yfine
DEFINE GRID/x=xfine/y=yfine fine_grid
let xpts = xsequence(0*swh_grid+x[g=swh_grid])
let ypts = xsequence(0*swh_grid+y[g=swh_grid])
let datapts = xsequence(swh_grid)
let xscale=0.1
let yscale=0.1
let cutoff=2
let xp = compressi(xpts)
let yp = compressi(ypts)
let dp = compressi(datapts)
let npts = dp[i=@ngd]
let swh_smooth = scat2gridgauss_xy(xp[i=1:`npts`],yp[i=1:`npts`],dp[i=1:`npts`],x[g=fine_grid],y[g=fine_grid],xscale,yscale,cutoff,0)
shade/levels=(0.0)(0.5)(1.0)(1.2)(2.0)(3.0)(4.0)(5.0)(6.0)(7.0)(9.0)(11.0)(15.0)/pal=swh/set_up/title="Significant Wave Height on 20101018 09:00 (meters)" swh_smooth
DEFINE AXIS/Z=1:45525:1 vec_len
DEFINE GRID/Z=vec_len vec_grid
FILE/VAR=lon,lat/G=vec_grid "/home/szymon/data/BalticShorelineDrJedr.dat"
let lon2 = lon[z=1:45525:1]
let lat2 = lat[z=1:45525:1]
go unlabel 1
go unlabel 2
go unlabel 3
ppl shade
plot/vs/line=1/nolab/over lon2,lat2
!show data/att
frame/file=int.gif
 
I attach the output file which was generated by this script. I'm aware of problem with sharing the coastline. But if it's necessary, I probably send it as private mail.

Best regards,
Szymon Roziewski

Attachment: int.gif
Description: GIF image


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

Privacy Policy | Disclaimer | Accessibility Statement