[ncl-talk] Sub: Region selection

dale zuri dalezuri at gmail.com
Tue Nov 21 03:17:54 MST 2017


Hi,
Please help me to select the same region from the two different files.
I want to have the region1 selection for both the files. I am not able to
set the same region1 for Merra data.
Thanks

begin
;************************************************
; create pointer to file and read in temperature
;************************************************
   diri = "./"
   fili1 = "MERRA2_300.tavg1_2d_int_Nx.20040926.nc4"
   fili = "tmp2m.2012050218.time.nc"
   in  = addfile(diri+fili,"r")
   in1  = addfile(diri+fili1,"r")
print(in1)
lat_min =-180;;wrong region selection
  lat_max =180
  lon_min = 0
  lon_max = 138
;;;;Region1;;;;;;;;;;;;
lat_min =15
lat_max =40
 lon_min = 180
 lon_max =  255
   tmp1  = in1->SWNETTOA(:,lat_min:lat_max,lon_min:lon_max)
   tmp  = in->TMP_P0_L103_GGA0(:,lat_min:lat_max,lon_min:lon_max)
printVarSummary(tmp1)
;   ts   = tmp(time|0:0,lat|:,lon|:)               ; reorder variable
;printVarSummary(ts)
 ts = dim_avg_n_Wrap(tmp, 0 )
 ts1 = dim_avg_n_Wrap(tmp1, 0 )

Variable: tmp1
Type: float
Total Size: 19961856 bytes
            4990464 values
Number of Dimensions: 3
Dimensions and sizes:    [time | 24] x [lat | 361] x [lon | 576]
Coordinates:
            time: [0..1380]
            lat: [ -90..  90]
            lon: [-180..179.375]
Number Of Attributes: 11
  long_name :    toa_net_downward_shortwave_flux
  units :    W m-2
  _FillValue :    1e+15
  missing_value :    1e+15
  fmissing_value :    1e+15
  scale_factor :     1
  add_offset :     0
  standard_name :    toa_net_downward_shortwave_flux
  vmax :    1e+15
  vmin :    -1e+15
  valid_range :    ( -1e+15, 1e+15 )
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-talk/attachments/20171121/dda13dc1/attachment.html>


More information about the ncl-talk mailing list