set grid point to missing value

From: Jeanne Thibeault <jeanne.thibeault_at_nyahnyahspammersnyahnyah>
Date: Mon, 7 Sep 2009 07:37:00 -0400

Hello everyone,

I need to do some calculations in a small region using model output
with nlat = 3 and nlon = 2. One of these gridpoints doesn't meet
the criteria to be included in the calculations, so I would like to
be able to set the values for the grid point to the missing value. I
have been unable to find a good example of how I might do this. A
sample of my script is below. The grid point I want to leave out is
lat dim(0) and lon dim(1). Is there an easy way to do this? Thank
you for your help.

Jeanne

     llats = -19 ;lat and lon range
  llatn = -16
  llonw = 290
  llone = 293
;************************************************

  areaFdSel = fd20a1bCC(:,{llats:llatn},{llonw:llone})
  printVarSummary(areaFdSel)

  nlat = 3
  nlon = 2

areaFdSel(:,0,1) = -999
areaFDSel@_FillValue = -999
  print(areaFDSel)

Variable: areaFDSel
Type: float
Total Size: 4800 bytes
            1200 values
Number of Dimensions: 3
Dimensions and sizes: [time | 200] x [lat | 3] x [lon | 2]
Coordinates:
            time: [11132.5..36317.5]
            lat: [-18.9103572532454..-16.1088241568413]
            lon: [291.09375..292.5]
Number Of Attributes: 10
  comment : Added PCMDI-required metadata and renamed field
to CF 1.0 compliance
  history : Created using NCL code CCSM_A4_20thc.ncl on
machine mineral
  missing_value : 1e+20
  long_name : Total number of frost days
  original_units : days
  original_name : Total number of frost days
  cell_methods : time: mean (interval: 1 year)
  units : days
  standard_name : Total number of frost days
  _FillValue : 1e+20
(0,0,0) 0
(0,0,1) 32
(0,1,0) 4
(0,1,1) 1
(0,2,0) 2
(0,2,1) 0
(1,0,0) 1
(1,0,1) 38
(1,1,0) 2
(1,1,1) 2
(1,2,0) 1
(1,2,1) 0
(2,0,0) 3
(2,0,1) 56
(2,1,0) 17
(2,1,1) 11
(2,2,0) 9
(2,2,1) 1
(3,0,0) 5
(3,0,1) 48
(3,1,0) 19
(3,1,1) 6
(3,2,0) 8
(3,2,1) 0
(4,0,0) 2
(4,0,1) 60

_______________________________________________
ncl-talk mailing list
List instructions, subscriber options, unsubscribe:
http://mailman.ucar.edu/mailman/listinfo/ncl-talk
Received on Mon Sep 07 2009 - 05:37:00 MDT

This archive was generated by hypermail 2.2.0 : Tue Sep 08 2009 - 11:49:50 MDT