[ncl-talk] masking the contiguous United States
Ming Chen
chen1718 at umn.edu
Sat Jul 4 21:34:17 MDT 2015
I think I know why it is happening... The data I'm trying to mask has the
longitude from 0 to 357.5, while the shapefile has the longitude from
-179.1 to 179.8...
Does anyone has suggestion how I can fix that? Thanks!
Ming
On Sat, Jul 4, 2015 at 10:19 PM, Ming Chen <chen1718 at umn.edu> wrote:
> Hi all,
>
> I was trying to mask the contiguous United States using a shape file and
> the script "shapefile_mask_data.ncl", but got all missing values.
>
> I used ncl 6.2.1. The script I used is here:
>
> ;Begins to calculate US averaged NEE
> shp_filename = "coastl_usa.shp"
> opt = True
> opt at minlat = 20
> opt at maxlat = 50
> opt at minlon = 230
> opt at maxlon = 295
> opt at debug = True
> opt at keep = True
> opt at loop_check = True
> data_mask = shapefile_mask_data(NEE_AVG,shp_filename,opt)
> NEE_scalar = wgt_areaave(data_mask,1.,1.,0) ;averaged NEE over the
> United States
>
>
> And here is the message I got:
> (0) ==================================================
> (0) Shapefile: coastl_usa.shp
> (0) Areas of interest: the whole shapefile
> (0) min_lat_chk: 20
> (0) max_lat_chk: 50
> (0) min_lon_chk: 230
> (0) max_lon_chk: 295
> (0) min_lat_data: -90
> (0) max_lat_data: 90
> (0) min_lon_data: 0
> (0) max_lon_data: 357.5
> (0) 13824 data values originally
> (0) Will keep data values inside given shapefile areas
> (0) ==================================================
> (0) 0 data values kept
> (0) shapefile_mask_data: elapsed time: 0.930859 CPU seconds.
> (0) ==================================================
>
> I can see there are 13824 data points in my NEE_AVG data. And I have plot
> that without problem. Why there was no data masked?
>
> Thanks,
> Ming
>
>
> --
> Department of Soil, Water and Climate
> 439 Borlaug Hall 1991 Upper Buford Cir.
> St. Paul 55108
> MN USA
> Office: 612-624-1645
> http://www.biometeorology.umn.edu/people_ming.php
>
--
Department of Soil, Water and Climate
439 Borlaug Hall 1991 Upper Buford Cir.
St. Paul 55108
MN USA
Office: 612-624-1645
http://www.biometeorology.umn.edu/people_ming.php
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20150704/c93e82d1/attachment.html
More information about the ncl-talk
mailing list