forrest@0
|
1 |
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
|
forrest@0
|
2 |
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
|
forrest@0
|
3 |
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
|
forrest@0
|
4 |
|
forrest@0
|
5 |
begin
|
forrest@0
|
6 |
nlat = 3600
|
forrest@0
|
7 |
mlon = 7200
|
forrest@0
|
8 |
|
forrest@0
|
9 |
diri = "/fis/cgd/cseg/people/jeff/clamp_data/"
|
forrest@0
|
10 |
fili = "MOD15A2_GEO_2000001.nc"
|
forrest@0
|
11 |
a = addfile(diri+fili,"r")
|
forrest@0
|
12 |
|
forrest@0
|
13 |
y = a->Lai_0_05deg ; byte
|
forrest@0
|
14 |
y@_FillValue = inttobyte(253)
|
forrest@0
|
15 |
y@_FillValue = inttobyte(255)
|
forrest@0
|
16 |
|
forrest@0
|
17 |
x = byte2flt(y)
|
forrest@0
|
18 |
|
forrest@0
|
19 |
x@_FillValue = 1.e+36 ; new fill
|
forrest@0
|
20 |
|
forrest@0
|
21 |
lat = latGlobeFo(nlat, "lat", "latitude", "degrees_north")
|
forrest@0
|
22 |
lat = (/ lat(::-1) /) ; make N->S
|
forrest@0
|
23 |
lon = lonGlobeFo(mlon, "lon", "longitude", "degrees_east")
|
forrest@0
|
24 |
lon = (/ lon - 180. /) ; subtract 180 from all values
|
forrest@0
|
25 |
lon&lon = lon ; update coordinates
|
forrest@0
|
26 |
|
forrest@0
|
27 |
x!0 = "lat"
|
forrest@0
|
28 |
x!1 = "lon"
|
forrest@0
|
29 |
x&lat= lat
|
forrest@0
|
30 |
x&lon= lon
|
forrest@0
|
31 |
|
forrest@0
|
32 |
y!0 = "lat"
|
forrest@0
|
33 |
y!1 = "lon"
|
forrest@0
|
34 |
y&lat= lat
|
forrest@0
|
35 |
y&lon= lon
|
forrest@0
|
36 |
|
forrest@0
|
37 |
iy = new (dimsizes(y), "integer", -999)
|
forrest@0
|
38 |
iy = y
|
forrest@0
|
39 |
|
forrest@0
|
40 |
iy!0 = "lat"
|
forrest@0
|
41 |
iy!1 = "lon"
|
forrest@0
|
42 |
iy&lat= lat
|
forrest@0
|
43 |
iy&lon= lon
|
forrest@0
|
44 |
|
forrest@0
|
45 |
print(y(:,{130})+" "+ iy(:,{130})+" "+x(:,{130}))
|
forrest@0
|
46 |
|
forrest@0
|
47 |
|
forrest@0
|
48 |
|
forrest@0
|
49 |
; diro = "/fis/cgd/cseg/people/jeff/clamp_data/"
|
forrest@0
|
50 |
; filo = "LAI_2000001_2.nc"
|
forrest@0
|
51 |
; c = addfile(diro+filo,"c")
|
forrest@0
|
52 |
; c->LAI = x
|
forrest@0
|
53 |
end
|
forrest@0
|
54 |
|