<div dir="ltr"><div><div><div><div><div><div><div><div><div>Hi Toni,<br><br></div>Sorry for the delay...this took a bit to figure out.<br><br></div>This *may* be a bug in gc_inout, or perhaps the documentation is misleading. The issue is that although the shapefile says it contains 1 feature, that feature is comprised of 6 &quot;segments&quot;:  1 for the large 4 state area and 5 for the islands off the coast of Texas (see the attached png).  This apparently is confusing the in/out tests.<br><br></div>I don&#39;t know of a good way of programmatically working around this.  As a hack (an extreme hack!), I know from looking at the shapefile that the large 4-state area&#39;s coordinates begin at index 56, and extend to the end of the x/y arrays. So if I change your script from:<br><br>  shp = addfile(&quot;./<a href="http://4_states_merged.nc">4_states_merged.nc</a>&quot;,&quot;r&quot;)<br>  shp_lat = shp-&gt;y<br>  shp_lon = shp-&gt;x+360          ; adding 360 to get shapefile longitudes in same value range as data longitudes<br><br></div>to<br><br>  shp = addfile(&quot;./<a href="http://4_states_merged.nc">4_states_merged.nc</a>&quot;,&quot;r&quot;)<br>  shp_lat = shp-&gt;y(56:)<br>  shp_lon = shp-&gt;x(56:)+360          ; adding 360 to get shapefile longitudes in same value range as data longitudes<br><br></div>Then it works, as seen in the second png. <br><br></div>The docs for gc_inout() suggest one should be able to pass in multiple polygons to test against, but as practical matter, I don&#39;t see how they would be delineated in the lat/lon arguments, so I suspect the docs are wrong, or maybe the implementation incomplete.<br><br></div>If you have access to something like ArcGIS that can edit shapefiles, the better solution would be to create a simpler mask excluding the island polygons.<br><br></div>Wish I had a better answer, but I hope that helps.<br></div>Rick<br><br><br><div><div><div><div><div><br></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, May 24, 2017 at 3:19 PM, Klemm, Toni <span dir="ltr">&lt;<a href="mailto:toni@ou.edu" target="_blank">toni@ou.edu</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">



<div>
<div style="word-wrap:break-word">Hi Rick,
<div><br>
</div>
<div>Thanks for getting back to me!</div>
<div><br>
</div>
<div>I got it to work in the meantime using masking example 9 (<a href="https://www.ncl.ucar.edu/Applications/Scripts/mask_9.ncl" target="_blank">https://www.ncl.ucar.edu/<wbr>Applications/Scripts/mask_9.<wbr>ncl</a>), which looks similar to example 4 on the page you
 linked (<a href="http://ncl.ucar.edu/Applications/Scripts/shapefiles_4.ncl" target="_blank">http://ncl.ucar.edu/<wbr>Applications/Scripts/<wbr>shapefiles_4.ncl</a>). The masking worked, but for some reason there is large wedge with missing data right in the middle of my plot
 now. I imagine it has somewhere to do with the “<i>if (MASK_INSIDE) then</i>” loop in my script below, but I can’t figure it out. Do you have any suggestions? I also attached my original data file, the resulting datafile (_<a href="http://shp.nc" target="_blank">shp.nc</a>) and plot, and the
 .nc file of my study area. This shapefile was created in ArcMap 10.3 from the states.* files in the <a href="https://www.ncl.ucar.edu/Applications/Data/#shp" target="_blank">NCL shapefile set</a> and converted to .nc using ncl_convert2nc. </div>
<div><br>
</div>
<div>Again, thank you very much!</div>
<div><br>
</div>
<div>Best,</div>
<div>Toni</div>
<div><br>
</div>
<div>Script:</div>
<div><br>
</div>
<div>
<div><i>; ******************************<wbr>******************************<wbr>*****</i></div>
<div><i>; Create map of GFDL-OBS bias averages by FORECAST MONTH 1980-2014</i></div>
<div><i>; </i></div>
<div><i>; Use SHAPEFILE OF STUDY REGION to define subset and plot</i></div>
<div><i>; ******************************<wbr>******************************<wbr>*****</i></div>
<div><i><br>
</i></div>
<div><i>load &quot;$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_code.ncl&quot;</i></div>
<div><i>load &quot;$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/gsn_csm.ncl&quot;</i></div>
<div><i>load &quot;$NCARG_ROOT/lib/ncarg/<wbr>nclscripts/csm/contributed.<wbr>ncl&quot;</i></div>
<div><i><br>
</i></div>
<div><i>; ******************************<wbr>******************************</i></div>
<div><i><br>
</i></div>
<div><i>begin</i></div>
<div><i><br>
</i></div>
<div><i>do target_month = 1,12<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span> ; do-loop through the 12 calendar months</i></div>
<div><i><br>
</i></div>
<div><i>  <span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>if (target_month .lt. 10) then</i></div>
<div><i> <span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>  target_month_zero = &quot;0&quot; + target_month<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; turns &quot;1&quot;...&quot;9&quot; into &quot;01&quot;...&quot;09&quot; to match filename structure (months have 2 digits&quot;</i></div>
<div><i> <span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>end if</i></div>
<div><i><br>
</i></div>
<div><i> if (target_month .gt. 9) then</i></div>
<div><i>    target_month_zero = target_month<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; leaves &quot;10...&quot;12&quot; unchanged</i></div>
<div><i> end if</i></div>
<div><i><br>
</i></div>
<div><i> print(&quot;****  START: target_month &quot; + target_month + &quot;  ****&quot;)</i></div>
<div><i><br>
</i></div>
<div><i>  ; ******************************<wbr>***********************</i></div>
<div><i>  ; READ IN FILE INFORMATION BY TARGET MONTH</i></div>
<div><i>  ; ******************************<wbr>***********************</i></div>
<div><i><br>
</i></div>
<div><i>; *****</i></div>
<div><i>print(&quot;1 - Read in file information&quot;)</i></div>
<div><i><br>
</i></div>
<div><i>  bias_f = addfile(&quot;~/GFDL/TAS/DATAFILES/<wbr>monthly/5b-4alt_GFDL_TAS_bias/<wbr>avg_by_target_month/stack/<wbr>GFDL_TAS_bias_1980-2014_<wbr>target_&quot; + target_month_zero + &quot;.nc&quot;,&quot;r&quot;)</i></div>
<div><i>  print(&quot;Finished: 1/8 Read in multiple files&quot;)</i></div>
<div><i><br>
</i></div>
<div><i><br>
</i></div>
<div><i>  ; ******************************<wbr>*****************</i></div>
<div><i>  ; READ IN THE VARIABLE (precipitation)</i></div>
<div><i>  ; ******************************<wbr>*****************</i></div>
<div><i><br>
</i></div>
<div><i>  print(&quot;2 - Read in variable and dimensions and average all years&quot;)</i></div>
<div><i>  lat = (/bias_f-&gt;lat/)</i></div>
<div><i>  lon = (/bias_f-&gt;lon/)</i></div>
<div><i><br>
</i></div>
<div><i>  printMinMax(lat, False)</i></div>
<div><i>  printMinMax(lon, False)</i></div>
<div><i><br>
</i></div>
<div><i>  nlat = dimsizes(lat)</i></div>
<div><i>  lat!0 = &quot;lat&quot;</i></div>
<div><i>  lat&amp;lat = lat</i></div>
<div><i>  lat@long_name = &quot;latitude&quot;</i></div>
<div><i>  lat@units = &quot;degrees_north&quot;</i></div>
<div><i><br>
</i></div>
<div><i>  mlon = dimsizes(lon)</i></div>
<div><i>  lon!0 = &quot;lon&quot;</i></div>
<div><i>  lon&amp;lon = lon</i></div>
<div><i>  lon@long_name = &quot;longitude&quot;</i></div>
<div><i>  lon@units = &quot;degrees_east&quot;</i></div>
<div><i>  </i></div>
<div><i>  GFDL_bias_3D = rm_single_dims(bias_f-&gt;GFDL_<wbr>OBS_bias)<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span><span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap"></span>; extract precipitation into new variable, output is mm/day</i></div>
<div><i>  GFDL_bias_2D = dim_avg_n(GFDL_bias_3D,0)   ; averaging all bias for GFDL and LTM made in that month for 1985-2010</i></div>
<div><i><br>
</i></div>
<div><i>  min_bias = decimalPlaces(min(GFDL_bias_<wbr>2D),2,True)</i></div>
<div><i>  max_bias = decimalPlaces(max(GFDL_bias_<wbr>2D),2,True)</i></div>
<div><i>  avg_bias = decimalPlaces(avg(GFDL_bias_<wbr>2D),2,True)</i></div>
<div><i>  </i></div>
<div><i>;  printVarSummary(GFDL_bias_2D)</i></div>
<div><i>  </i></div>
<div><i>;  GFDL_bias_2D@_FillValue = 1.0E20</i></div>
<div><i><br>
</i></div>
<div><i>;  printVarSummary(GFDL_bias_2D)</i></div>
<div><i><br>
</i></div>
<div><i>;  printVarSummary(GFDL_bias_3D)</i></div>
<div><i>;  printVarSummary(GFDL_bias_2D)</i></div>
<div><i><br>
</i></div>
<div><i><br>
</i></div>
<div><i>; ******************************<wbr>***********</i></div>
<div><i>; ***** Read in shapefile information ***** (source: <a href="https://www.ncl.ucar.edu/Applications/Scripts/mask_9.ncl" target="_blank">
https://www.ncl.ucar.edu/<wbr>Applications/Scripts/mask_9.<wbr>ncl</a>)</i></div>
<div><i><br>
</i></div>
<div><i>  MASK_INSIDE = True    ; Whether to mask data inside or outside the given geographical area.</i></div>
<div><i><br>
</i></div>
<div><i>  shp = addfile(&quot;~/States_shapefile_<wbr>data/NCL/4_states_merged.shp&quot;,<wbr>&quot;r&quot;)</i></div>
<div><i>  shp_lat = shp-&gt;y</i></div>
<div><i>  shp_lon = shp-&gt;x+360          ; adding 360 to get shapefile longitudes in same value range as data longitudes</i></div>
<div><i>;  printVarSummary(shp_lat)</i></div>
<div><i>;  printVarSummary(shp_lon)</i></div>
<div><i>  printMinMax(shp_lat, False)</i></div>
<div><i>  printMinMax(shp_lon, False)</i></div>
<div><i>  </i></div>
<div><i>  nshp = dimsizes(shp_lon)</i></div>
<div><i>  </i></div>
<div><i>  min_shp_lat = min(shp_lat)</i></div>
<div><i>  max_shp_lat = max(shp_lat)</i></div>
<div><i>  min_shp_lon = min(shp_lon)</i></div>
<div><i>  max_shp_lon = max(shp_lon)</i></div>
<div><i>  </i></div>
<div><i>  </i></div>
<div><i>; ***** Create new subset based on shapefile ***** (source:
<a href="https://www.ncl.ucar.edu/Applications/Scripts/mask_9.ncl" target="_blank">https://www.ncl.ucar.edu/<wbr>Applications/Scripts/mask_9.<wbr>ncl</a>)</i></div>
<div><i><br>
</i></div>
<div><i>  if(MASK_INSIDE) then</i></div>
<div><i>;---Start with data filled in.</i></div>
<div><i>    data_mask = GFDL_bias_2D</i></div>
<div><i>  else</i></div>
<div><i>;---Start with data all missing</i></div>
<div><i>  data_mask = new(dimsizes(GFDL_bias_2D),<wbr>typeof(GFDL_bias_2D),GFDL_<wbr>bias_2D@_FillValue)</i></div>
<div><i>  copy_VarCoords(GFDL_bias_2D,<wbr>data_mask)</i></div>
<div><i>  end if</i></div>
<div><i><br>
</i></div>
<div><i>; ***** Determine the boundary lat/lons of the subset region within the lat/lon box </i></div>
<div><i>  ilt_mn = ind(min_shp_lat.gt.lat)</i></div>
<div><i>  ilt_mx = ind(max_shp_lat.lt.lat)</i></div>
<div><i>  iln_mn = ind(min_shp_lon.gt.lon)</i></div>
<div><i>  iln_mx = ind(max_shp_lon.lt.lon)</i></div>
<div><i>  ilt1   = ilt_mn(dimsizes(ilt_mn)-1)    ; Start of lat box</i></div>
<div><i>  iln1   = iln_mn(dimsizes(iln_mn)-1)    ; Start of lon box</i></div>
<div><i>  ilt2   = ilt_mx(0)                     ; End of lat box</i></div>
<div><i>  iln2   = iln_mx(0)                     ; End of lon box</i></div>
<div><i><br>
</i></div>
<div><i><br>
</i></div>
<div><i>  if (MASK_INSIDE) then</i></div>
<div><i>; ***** Put missing values in the areas that we want masked. (source:
<a href="https://www.ncl.ucar.edu/Applications/Scripts/mask_9.ncl" target="_blank">https://www.ncl.ucar.edu/<wbr>Applications/Scripts/mask_9.<wbr>ncl</a>)</i></div>
<div><i>    do ilt=ilt1,ilt2</i></div>
<div><i>      do iln=iln1,iln2</i></div>
<div><i>        if(gc_inout(lat(ilt),lon(iln),<wbr>shp_lat,shp_lon)) then</i></div>
<div><i>          data_mask(ilt,iln) = data_mask@_FillValue                 ; replace data inside and outside study region with missing values</i></div>
<div><i>        end if</i></div>
<div><i>      end do</i></div>
<div><i>    end do</i></div>
<div><i>  else</i></div>
<div><i>; ***** Put data back in the areas that we don&#39;t want masked. (source:
<a href="https://www.ncl.ucar.edu/Applications/Scripts/mask_9.ncl" target="_blank">https://www.ncl.ucar.edu/<wbr>Applications/Scripts/mask_9.<wbr>ncl</a>)</i></div>
<div><i>    do ilt=ilt1,ilt2</i></div>
<div><i>      do iln=iln1,iln2</i></div>
<div><i>        if(gc_inout(lat(ilt),lon(iln),<wbr>shp_lat,shp_lon)) then</i></div>
<div><i>          data_mask(ilt,iln) = GFDL_bias_2D(ilt,iln)                ; replace missing values *inside* study region with data again</i></div>
<div><i>        end if</i></div>
<div><i>      end do</i></div>
<div><i>    end do</i></div>
<div><i>  end if</i></div>
<div><i><br>
</i></div>
<div><i><br>
</i></div>
<div><i>  ; ******************************<wbr>*****************</i></div>
<div><i>  ; WRITE THE AVERAGES INTO NEW netCDF FILE</i></div>
<div><i>  ; ******************************<wbr>*****************</i></div>
<div><i><br>
</i></div>
<div><i>  print(&quot;3 - Write the averages into new netCDF file&quot;)</i></div>
<div><i>  </i></div>
<div><i>    netCDF1 = False<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; Output format is NetCDF</i></div>
<div><i><br>
</i></div>
<div><i>  if (netCDF1) then</i></div>
<div><i>    diro = &quot;~/GFDL/TAS/DATAFILES/monthly/<wbr>5b-4alt_GFDL_TAS_bias/avg_by_<wbr>target_month/nc_shp/&quot;<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; output in subdirectory &quot;subset&quot; within input directory</i></div>
<div><i><br>
</i></div>
<div><i>    filename = &quot;GFDL_TAS_bias_1980-2014_<wbr>target_month_&quot; + target_month_zero + &quot;_shp&quot;<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; output filename for subset using initialization year and month to differentiate</i></div>
<div><i>    filo = filename +&quot;.nc&quot;</i></div>
<div><i><br>
</i></div>
<div><i>  end if</i></div>
<div><i><br>
</i></div>
<div><i>  setfileoption(&quot;nc&quot;,&quot;Format&quot;,&quot;<wbr>LargeFile&quot;)</i></div>
<div><i><br>
</i></div>
<div><i>  if (netCDF1) then</i></div>
<div><i>    system(&quot;/bin/rm -f &quot;+ diro + filo)<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; removes old files with the same name if they are present</i></div>
<div><i>    ncdf = addfile(diro + filo,&quot;c&quot;)</i></div>
<div><i><br>
</i></div>
<div><i>    setfileoption(ncdf,&quot;<wbr>DefineMode&quot;,True)</i></div>
<div><i><br>
</i></div>
<div><i>    ; create attributes</i></div>
<div><i>    fAtt = True</i></div>
<div><i>    fAtt@title = &quot;Data: GFDL FLOR-B01 for the Contiguous U.S., Forecast Month &quot; + target_month_zero</i></div>
<div><i>    fAtt@source = &quot;Vecchi et al. 2014&quot;</i></div>
<div><i>    fAtt@Conventions = &quot;None&quot;</i></div>
<div><i>    fAtt@creation_date = systemfunc(&quot;date&quot;)</i></div>
<div><i><br>
</i></div>
<div><i>    fileattdef(ncdf,fAtt)</i></div>
<div><i><br>
</i></div>
<div><i>    dimNames = (/&quot;target_month&quot;,&quot;lat&quot;,&quot;lon&quot;/)</i></div>
<div><i>    dimSizes = (/dimsizes(target_month),<wbr>dimsizes(lat),dimsizes(lon)/)</i></div>
<div><i>    dimUnlim = (/True,False,False/)</i></div>
<div><i><br>
</i></div>
<div><i>    filedimdef(ncdf,dimNames,<wbr>dimSizes,dimUnlim)</i></div>
<div><i><br>
</i></div>
<div><i>    filevardef(ncdf,&quot;target_month&quot;<wbr>,typeof(target_month),(/&quot;<wbr>target_month&quot;/))</i></div>
<div><i>    filevardef(ncdf,&quot;lat&quot;,typeof(<wbr>lat),(/&quot;lat&quot;/))</i></div>
<div><i>    filevardef(ncdf,&quot;lon&quot;,typeof(<wbr>lon),(/&quot;lon&quot;/))</i></div>
<div><i>    filevardef(ncdf,&quot;data_mask&quot;,<wbr>typeof(data_mask),(/&quot;lat&quot;,&quot;<wbr>lon&quot;/))</i></div>
<div><i><br>
</i></div>
<div><i>    ; now write all the variables to the file</i></div>
<div><i><br>
</i></div>
<div><i>    ncdf-&gt;target_month = (/target_month/)</i></div>
<div><i>    ncdf-&gt;lat = (/lat/)</i></div>
<div><i>    ncdf-&gt;lon = (/lon/)</i></div>
<div><i>    ncdf-&gt;data_mask = (/data_mask/)</i></div>
<div><i><br>
</i></div>
<div><i>  end if</i></div>
<div><i><br>
</i></div>
<div><i><br>
</i></div>
<div><i>  ; ******************************<wbr>*****************</i></div>
<div><i>  ; CREATE MAP</i></div>
<div><i>  ; ******************************<wbr>*****************</i></div>
<div><i><br>
</i></div>
<div><i>  ; Define boundaries for map</i></div>
<div><i>  data_mask!0 = &quot;lat&quot;<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; latitude information come from variable lat_subdomain</i></div>
<div><i>  data_mask&amp;lat = lat</i></div>
<div><i>  data_mask!1 = &quot;lon&quot;<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; longitude information come from variable lon_subdomain</i></div>
<div><i>  data_mask&amp;lon = lon</i></div>
<div><i>  data_mask@long_name = &quot;Range: &quot; + min_bias + &quot; - &quot; + max_bias + &quot; mm/day&quot;    ; map subtitle, printed on the top left</i></div>
<div><i>  data_mask@units = &quot;Avg.: &quot; + avg_bias + &quot; mm/day&quot;<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; map units, printed on the top right</i></div>
<div><i><br>
</i></div>
<div><i>  diro = &quot;~/GFDL/TAS/DATAFILES/monthly/<wbr>5b-4alt_GFDL_TAS_bias/avg_by_<wbr>target_month/png_shp/&quot;<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; output directory</i></div>
<div><i>  wks = gsn_open_wks(&quot;png&quot;, diro + &quot;GFDL_TAS_bias_1980-2014_<wbr>target_month_&quot; + target_month_zero + &quot;_shp&quot;)<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; map name and file type</i></div>
<div><i><br>
</i></div>
<div><i>  cmap = read_colormap_file(&quot;<wbr>BlueGreen14&quot;)</i></div>
<div><i><br>
</i></div>
<div><i>  res                      = True<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; plot mods desired</i></div>
<div><i>  res@tiMainString         = &quot;Avg. GFDL bias, Forecast Month &quot; + target_month_zero + &quot;, 1980-2014, no bias correction&quot;
<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap"></span>; main title</i></div>
<div><i>  res@cnFillOn             = True<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; turn on color fill, works with gsn_csm_map() function 3 lines down</i></div>
<div><i>  res@gsnAddCyclic         = False</i></div>
<div><i>  res@cnLinesOn            = False<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; contour lines of the map fill on or off  </i></div>
<div><i>  res@mpProjection         = &quot;Mercator&quot;<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; Mercator map projection</i></div>
<div><i>  res@cnFillPalette        = cmap<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; reverse color map</i></div>
<div><i><br>
</i></div>
<div><i>  res@mpLimitMode    = &quot;LatLon&quot;<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; define plotted area by lats and lons, namely those of the selection (20-50N, 230-300E)</i></div>
<div><i>  res@mpMaxLatF      = 41.5</i></div>
<div><i>  res@mpMinLatF      = 25</i></div>
<div><i>  res@mpMaxLonF      = 267</i></div>
<div><i>  res@mpMinLonF      = 250</i></div>
<div><i><br>
</i></div>
<div><i>  res@mpOutlineBoundarySets = &quot;GeophysicalAndUSStates&quot;<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; lines and boundaries of USA and US States</i></div>
<div><i>  res@<wbr>mpGeophysicalLineThicknessF = 2     <span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>       <span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap"> </span>; thickness of the USA lines</i></div>
<div><i>  res@mpUSStateLineThicknessF     = 2<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>             <span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap"> </span>
; thickness of the state lines</i></div>
<div><i><br>
</i></div>
<div><i>  res@mpSpecifiedFillColors  = (/0,100/)      <span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>     <span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap"> </span>; fill with background color, works with gsn_map() 2 lines down</i></div>
<div><i><br>
</i></div>
<div><i>;  res@cnLevelSelectionMode = &quot;ManualLevels&quot;<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>             ; manually set the contour levels with the following 3 resources</i></div>
<div><i>;  res@cnMinLevelValF  = -2                      <span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>     <span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap"> </span>; set the minimum contour level</i></div>
<div><i>;  res@cnMaxLevelValF  = 4       <span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>                   <span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; set the maximum contour level</i></div>
<div><i>;  res@cnLevelSpacingF = 0.25        <span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>                   <span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; set the interval between contours</i></div>
<div><i><br>
</i></div>
<div><i><br>
</i></div>
<div><i>  ; ******************************<wbr>*****************</i></div>
<div><i>  ; PLOT MAP</i></div>
<div><i>  ; ******************************<wbr>*****************</i></div>
<div><i><br>
</i></div>
<div><i>  print (&quot;5 - Plot map&quot;)</i></div>
<div><i>  </i></div>
<div><i>  plot = gsn_csm_contour_map(wks,data_<wbr>mask, res)<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; universal map projection, define in res@mpProjection</i></div>
<div><i><br>
</i></div>
<div><i>  print(&quot;**** ALL DONE: target_month &quot; + target_month + &quot; ****&quot;)</i></div>
<div><i><br>
</i></div>
<div><i>  delete(bias_f)<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span> <span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap"> </span> ; delete before the next loop or program will fail</i></div>
<div><i>  delete(GFDL_bias_3D)<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; delete before the next loop or program will fail</i></div>
<div><i>  delete(GFDL_bias_2D)<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; delete before the next loop or program will fail</i></div>
<div><i>  delete(data_mask)   <span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; delete before the next loop or program will fail</i></div>
<div><i>  </i></div>
<div><i>end do<span class="m_3164076619572964805x_Apple-tab-span" style="white-space:pre-wrap">
</span>; end the loop through the 12 calendar months (1-12)</i></div>
<div><i><br>
</i></div>
<div><i>end</i></div>
</div><span class="">
<div><br>
</div>
<div>
<div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div><b style="color:rgb(51,51,153);background-color:rgb(255,255,255)">Toni Klemm</b><br style="color:rgb(51,51,153);background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,153);background-color:rgb(255,255,255)">Ph.D. Candidate</span><br style="color:rgb(51,51,153);background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,153);background-color:rgb(255,255,255)">The University of Oklahoma</span><br style="color:rgb(51,51,153);background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,153);background-color:rgb(255,255,255)">South Central Climate Science Center</span><br style="color:rgb(51,51,153);background-color:rgb(255,255,255)">
</div>
<div><span style="color:rgb(51,51,153);background-color:rgb(255,255,255)">phone: <a href="tel:(405)%20325-1272" value="+14053251272" target="_blank">405 325 1272</a></span></div>
<div><span style="color:rgb(51,51,153);background-color:rgb(255,255,255)"><a href="http://www.toni-klemm.de" target="_blank">www.toni-klemm.de</a></span></div>
<div><a href="https://www.eccforum.org" target="_blank">Early Career Climate Forum</a></div>
<div>Twitter: <a href="https://twitter.com/ToniKlemm" target="_blank">@toniklemm</a></div>
<div><br>
</div>
<div><br>
</div>
<div></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</span></div>
<div style="word-wrap:break-word">
<div>
<div id="m_3164076619572964805x_AppleMailSignature">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="word-wrap:break-word">
<div>
<div id="m_3164076619572964805x_AppleMailSignature">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div></div>
<div></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div><img src="cid:848bb57a-8d3f-4131-8b70-e31ed6753761@namprd03.prod.outlook.com">
</div><div><div class="h5">
<div style="word-wrap:break-word">
<div>
<div id="m_3164076619572964805x_AppleMailSignature">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div></div>
<div></div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<div style="word-wrap:break-word">
<div>
<div>
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="color:rgb(0,0,0);letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div></div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br class="m_3164076619572964805x_Apple-interchange-newline">
</div>
<br>
<div>
<blockquote type="cite">
<div>On May 24, 2017, at 12:35 PM, Rick Brownrigg &lt;<a href="mailto:brownrig@ucar.edu" target="_blank">brownrig@ucar.edu</a>&gt; wrote:</div>
<br class="m_3164076619572964805x_Apple-interchange-newline">
<div>
<div dir="ltr">
<div>
<div>
<div>Hi Toni,<br>
<br>
</div>
Sorry for the delay in response. There are several examples of using shapefiles to mask out data, if that&#39;s what are wanting to do. In particular, look at examples 4, 5, and 21 at:<br>
<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__ncl.ucar.edu_Applications_shapefiles.shtml&amp;d=DwMFaQ&amp;c=qKdtBuuu6dQK9MsRUVJ2DPXW6oayO8fu4TfEHS8sGNk&amp;r=trcSnQNnUT2ddBXcpd358A&amp;m=_2unS1RvDS7egGpkWknJW0V9KMHhv2GWDckbCG7ZOcQ&amp;s=VqnvWQCKomt1QM_SAC2MNal5QUSSlnZmBwXdI3_KjO0&amp;e=" target="_blank">http://ncl.ucar.edu/<wbr>Applications/shapefiles.shtml</a><br>
<br>
</div>
II think there&#39;s a utility script they make use that you&#39;ll need to download.  Hopefully this gets you at least started -- please post back the list if you have other questions.<br>
<br>
</div>
Rick<br>
</div>
<div class="m_3164076619572964805x_gmail_extra"><br>
<div class="m_3164076619572964805x_gmail_quote">On Mon, May 22, 2017 at 10:10 PM, Klemm, Toni <span dir="ltr">
&lt;<a href="mailto:toni@ou.edu" target="_blank">toni@ou.edu</a>&gt;</span> wrote:<br>
<blockquote class="m_3164076619572964805x_gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div style="word-wrap:break-word">Good evening,
<div><br>
</div>
<div>I am analyzing seasonal climate forecasts skill for the U.S. Great Plains, specifically Texas, Oklahoma, Kansas, and Colorado. So far I’ve been using lat/lon to define my study region. However, this rectangular box includes parts of Mexico and
 the Gulf of Mexico that are outside my study region and which have extreme outliers that distort my results.</div>
<div><br>
</div>
<div>To get more accurate results, I’d like to use a shapefile of my 4 states (<font face="Courier">TX_OK_KS_CO.shp</font>, created in QGIS 2.18 from a U.S. states shapefile) to define my study region. However, I’m not sure how to interpret
 and use the results I’m getting. I used   “<font face="Courier">ncl_convert2nc TX_OK_KS_CO.shp -nc2c</font>“  to create   “<font face="Courier">TX_OK_KS_CO.nc</font>“ .</div>
<div><br>
</div>
<div>“<font face="Courier">printVarSummary</font>(<span style="font-family:Courier">TX_OK_KS_CO.n<wbr>c)</span>” and ”<font face="Courier">PrintMinMax</font>“ of the x-coordinate (longitude) as well as y-coordinate
 (latitude) look like this:</div>
<div><br>
</div>
<div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span>Variable: shp</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span>Type: file</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span>File path:<span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap">
</span>/home/States_shapefile_data/GA<wbr>DM/TX_OK_KS_CO.nc</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span>Number of global attributes:<span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap">
</span>11</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span>Number of dimensions:<span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap">
</span>5</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span>Number of variables:<span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap">
</span>4</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span>(0)<span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap">
</span>min=0   max=0</span></div>
</div>
<div><br>
</div>
<div><font face="Courier">ncdump -h TX_OK_KS_CO.nc</font> returns this:</div>
<div><br>
</div>
<div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span>netcdf TX_OK_KS_CO {</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span>dimensions:</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span><span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>geometry = 2 ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span><span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>segments = 2 ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span><span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>num_features = 4 ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span><span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>num_segments = 262 ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span><span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>num_points = 102749 ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span>variables:</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span><span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>int geometry(num_features, geometry) ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span><span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>int segments(num_segments, segments) ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span><span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>double x(num_points) ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span><span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>double y(num_points) ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201);min-height:16px">
<span></span><br>
</div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span>// global attributes:</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span><span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>:segs_numPnts = 1 ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span><span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>:segs_xyzIndex = 0 ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span><span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>:geom_numSegs = 1 ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span><span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>:geom_segIndex = 0 ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span><span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>:geometry_type = &quot;polygon&quot; ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span><span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>:layer_name = &quot;TX_OK_KS_CO&quot; ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span><span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>:creation_date = &quot;Mon May 22 17:20:46 EDT 2017&quot; ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span><span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>:NCL_Version = &quot;6.4.0&quot; ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span><span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>:system = &quot;Linux
<a href="http://ou.edu/" target="_blank">ou.edu</a> x86_64 #1 SMP Fri Mar 3 00:04:05 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux&quot; ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span><span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>:Conventions = &quot;None&quot; ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span><span class="m_3164076619572964805x_m_-6640439190133930147Apple-tab-span" style="white-space:pre-wrap"></span>:title = &quot;NCL: convert-OGR-to-netCDF&quot; ;</span></div>
<div style="margin:0px;font-size:13px;line-height:normal;font-family:Courier;color:rgb(255,255,255);background-color:rgb(43,102,201)">
<span>}</span></div>
</div>
<div><br>
</div>
<div>I am not sure how to use this information, or if this is even the information I should be getting, to define the study region when extracting data from my global forecast dataset. I am fairly sure the shapefile is correct. Opening it again in
 QGIS showed the four states with their outlines and filling, and nothing else.</div>
<div><br>
</div>
<div>I appreciate any help!</div>
<div><br>
</div>
<div>Thank you very much,</div>
<div>Toni</div>
<span class="m_3164076619572964805x_HOEnZb"><font color="#888888">
<div><br>
</div>
<div><br>
<div>
<div>
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div style="letter-spacing:normal;text-align:start;text-indent:0px;text-transform:none;white-space:normal;word-spacing:0px;word-wrap:break-word">
<div><b style="color:rgb(51,51,153);background-color:rgb(255,255,255)">Toni Klemm</b><br style="color:rgb(51,51,153);background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,153);background-color:rgb(255,255,255)">Ph.D. Candidate</span><br style="color:rgb(51,51,153);background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,153);background-color:rgb(255,255,255)">The University of Oklahoma</span><br style="color:rgb(51,51,153);background-color:rgb(255,255,255)">
<span style="color:rgb(51,51,153);background-color:rgb(255,255,255)">South Central Climate Science Center</span><br style="color:rgb(51,51,153);background-color:rgb(255,255,255)">
</div>
<div><span style="color:rgb(51,51,153);background-color:rgb(255,255,255)">phone:
<a href="tel:(405)%20325-1272" value="+14053251272" target="_blank">405 325 1272</a></span></div>
<div><span style="color:rgb(51,51,153);background-color:rgb(255,255,255)"><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__www.toni-2Dklemm.de&amp;d=DwMFaQ&amp;c=qKdtBuuu6dQK9MsRUVJ2DPXW6oayO8fu4TfEHS8sGNk&amp;r=trcSnQNnUT2ddBXcpd358A&amp;m=_2unS1RvDS7egGpkWknJW0V9KMHhv2GWDckbCG7ZOcQ&amp;s=QAW2_xJ9gp71I8wBvMBw6JI7Kb7j7d8KF0tlyNuhEYE&amp;e=" target="_blank">www.toni-klemm.de</a></span></div>
<div><a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__www.eccforum.org&amp;d=DwMFaQ&amp;c=qKdtBuuu6dQK9MsRUVJ2DPXW6oayO8fu4TfEHS8sGNk&amp;r=trcSnQNnUT2ddBXcpd358A&amp;m=_2unS1RvDS7egGpkWknJW0V9KMHhv2GWDckbCG7ZOcQ&amp;s=BsFxGtcxiOomgvIRjvEfgPA7YppuvrO0n-TW0SLSiok&amp;e=" target="_blank">Early
 Career Climate Forum</a></div>
<div>Twitter: <a href="https://urldefense.proofpoint.com/v2/url?u=https-3A__twitter.com_ToniKlemm&amp;d=DwMFaQ&amp;c=qKdtBuuu6dQK9MsRUVJ2DPXW6oayO8fu4TfEHS8sGNk&amp;r=trcSnQNnUT2ddBXcpd358A&amp;m=_2unS1RvDS7egGpkWknJW0V9KMHhv2GWDckbCG7ZOcQ&amp;s=B5YLwKe0WRmXO4D2nzE_HgiPLcFnIFvPX6Z-kf3KSrw&amp;e=" target="_blank">@toniklemm</a></div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
<div><br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br class="m_3164076619572964805x_m_-6640439190133930147Apple-interchange-newline">
</div>
<br>
</div>
</div>
</font></span></div>
<br>
______________________________<wbr>_________________<br>
ncl-talk mailing list<br>
<a href="mailto:ncl-talk@ucar.edu" target="_blank">ncl-talk@ucar.edu</a><br>
List instructions, subscriber options, unsubscribe:<br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__mailman.ucar.edu_mailman_listinfo_ncl-2Dtalk&amp;d=DwMFaQ&amp;c=qKdtBuuu6dQK9MsRUVJ2DPXW6oayO8fu4TfEHS8sGNk&amp;r=trcSnQNnUT2ddBXcpd358A&amp;m=_2unS1RvDS7egGpkWknJW0V9KMHhv2GWDckbCG7ZOcQ&amp;s=g_J7lY2OPhdO6e1uZkyCAbj2G1XmDbXoRk01EanWTdI&amp;e=" rel="noreferrer" target="_blank">http://mailman.ucar.edu/mailma<wbr>n/listinfo/ncl-talk</a><br>
<br>
</blockquote>
</div>
<br>
</div>
</div>
</blockquote>
</div>
<br>
</div>
</div>
</div></div></div>

</blockquote></div><br></div>