Re: Removing for inland data

From: Adam Phillips <asphilli_at_nyahnyahspammersnyahnyah>
Date: Fri May 17 2013 - 10:28:19 MDT

Hello,
In the coding you sent, it does not look like you are actually masking
your sic array after you create the land-sea mask..

lm = addfile("$NCARG_ROOT/lib/ncarg/data/cdf/landsea.nc
<http://landsea.nc>", "r")
lsmask = lm->LSMASK
lsm = landsea_mask(lsmask,sic&lat,sic&lon) ; create land sea mask
for sic array
sic = mask(sic,conform(sic,lsm,(/1,2/)).ge.1,False) ; conform 2D lsm
array to 3D array, mask out land values

See example #3 here:
http://www.ncl.ucar.edu/Document/Functions/Shea_util/landsea_mask.shtml

Hope that helps, if not, please respond to ncl-talk..
Adam

On 05/17/2013 09:15 AM, 진현근 wrote:
> Hi,
> Using Sea Ice Concentration data,
> I am trying to find total SIC area(values in the non-land area),
> but I couldn't removing inland data
> my code as follows
>
> Thank you for your help in advance
>
> >>>>>>>>>>>>>>>>>>>>>>>>>>>>
> begin
> year = 2006
> f = addfile("SON_"+year+".nc","r") ;#
>
> lon = f->longitude
> lat = f->latitude
> time = f->time
> sic = f->sic
> ; float lon(lon) ;
> lon@units = "degrees_east" ;
> ; float lat(lat) ;
> lat@units = "degrees_north" ;
> ; float sic(time, lat, lon) ;
> sic@long_name = "Sea-ice concentration" ;
> sic@units = "%" ;
> sic@grid_name = "linear" ;
> sic@grid_type = "uniform" ;
> sic@level_description = "Earth surface" ;
> sic@time_statistic = "average" ;
> ; sic@_FillValue = 1.e+20f ;
> ; lm = addfile("$NCARG_ROOT/lib/ncarg/data/cdf/landsea.nc
> <http://landsea.nc>", "r") ; landsea mask
> ; lsmask = lm->LSMASK
> ; shpfile = "/home/hkjin/seaice/GSHHS_shp/c/GSHHS_c_L1.shp"
> ; land_mask = create_mask_from_shapefile(sic,shpfile) ;#
> ; lsm = landsea_mask(lsmask,lat,lon)
>
> ;==============
> wks = gsn_open_wks("x11","sic_"+year+"_SON")
> ;#
> res = True
> gsn_define_colormap(wks,"seaice_2")
> ;********************** map config.
> res@mpOutlineOn = True ; turn off
> outline
> res@mpFillOn = True ; turn off map
> fill
> res@mpFillDrawOrder = "Predraw"
> res@tiMainString = "Seasonal Sea Ice
> Concentration : "+year+", SON" ;#
> res@gsnLeftString = "+year+" ; line#
> res@cnFillOn = True ; turn on color fill
> res@cnFillDrawOrder = "Predraw"
> res@gsnPolar = "NH" ; "NH" or "SH"
> res@mpMinLatF = 45 ; specify min lat
> plot = gsn_csm_contour_map_polar(wks,sic(0,:,:),res)
> end
>
>
> _______________________________________________
> ncl-talk mailing list
> List instructions, subscriber options, unsubscribe:
> http://mailman.ucar.edu/mailman/listinfo/ncl-talk

-- 
______________________________________________________________
Adam Phillips                                asphilli@ucar.edu
NCAR/Climate and Global Dynamics Division       (303) 497-1726
P.O. Box 3000				
Boulder, CO 80307-3000    http://www.cgd.ucar.edu/cas/asphilli

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Fri May 17 10:28:28 2013

This archive was generated by hypermail 2.1.8 : Thu May 30 2013 - 11:38:10 MDT