[ncl-talk] Please correct me: Extracting data of USA

amit timilsina timilsinaamit87 at huskers.unl.edu
Thu Nov 6 07:47:43 MST 2014


I have used the following commands to extract data of USA (print c, in this case). Please suggest me whether I am wrong or right. If print(c) covers the whole USA, I tried to write extracted file with command and created fout.nc file. Is this is proper way to save my work? Moreover, Can we get the middle co-ordinates of each grid cell?
Thanks in advance

Commands:
>ncl 3> a = addfile("tasmax_Amon_MPI-ESM-LR_decadal1980_r1i1p1_198101-201012.nc","r")
>ncl 4> b =a->tasmax                                                                  
>ncl 5> c =a->tasmax(:,{25:50},{235:285})
>ncl 6> print(c)
>ncl>7>d = c
 >ncl>ncdf = addfile("fout.nc"."c")
>ncl>filedimdef(ncdf,"time",-1,True)
>ncl>ncdf->c = d


Output of print(b)

Variable: b
Type: float
Total Size: 26542080 bytes
            6635520 values
Number of Dimensions: 3
Dimensions and sizes:   [time | 360] x [lat | 96] x [lon | 192]
Coordinates: 
            time: [15.5..10941.5]
            lat: [-88.57216644287109..88.57216644287109]
            lon: [   0..358.125]


Output of print(c)

Variable: c
Type: float
Total Size: 544320 bytes
            136080 values
Number of Dimensions: 3
Dimensions and sizes:   [time | 360] x [lat | 14] x [lon | 27]
Coordinates: 
            time: [15.5..10941.5]
            lat: [25.18098640441895..49.42915344238281]
            lon: [236.25.. 285]
Number Of Attributes: 11
  standard_name :       air_temperature
  long_name :   Daily Maximum Near-Surface Air Temperature
  comment :     monthly mean of the daily-maximum near-surface air temperature.
  units :       K
  cell_methods :        time: maximum within days time: mean over days
  cell_measures :       area: areacella
  history :     2011-11-09T08:48:40Z altered by CMOR: Treated scalar dimension: 'height'.
  coordinates : height
  missing_value :       1e+20
  _FillValue :  1e+20
  associated_files :    baseURL: http://cmip-pcmdi.llnl.gov/CMIP5/dataLocation gridspecFile: gridspec_atmos_fx_MPI-ESM-LR_decadal1980_r0i0p0.nc areacella: areacella_fx_MPI-ESM-LR_decadal1980_r0i0p0.nc
(0,0,0) 291.8939
(0,0,1) 291.681
(0,0,2) 292.1985
(0,0,3) 293.3919
(0,0,4) 294.4564
(0,0,5) 295.4993







More information about the ncl-talk mailing list