1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/co2/11.test.ncl Mon Jan 26 22:08:20 2009 -0500
1.3 @@ -0,0 +1,44 @@
1.4 +; ***********************************************
1.5 +; xy_4.ncl
1.6 +; ***********************************************
1.7 +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
1.8 +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
1.9 +load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
1.10 +;************************************************
1.11 +begin
1.12 +;************************************************
1.13 +; read in data: observed
1.14 +;************************************************
1.15 + diri = "/fis/cgd/cseg/people/jeff/clamp_data/co2/"
1.16 + fili = "co2_globalView_222.nc"
1.17 + g = addfile (diri+fili,"r")
1.18 + a = g->CO2_SEAS
1.19 + lon = g->LON
1.20 + lat = g->LAT
1.21 +
1.22 + ncase = dimsizes(lat)
1.23 + print (ncase)
1.24 +
1.25 + lat_tmp = lat
1.26 + lat_tmp@_FillValue = 1.e+36
1.27 +
1.28 + do n = 0,ncase-1
1.29 + if (.not. ismissing(lat_tmp(n))) then
1.30 + indexes = ind(lat(n) .eq. lat .and. lon(n) .eq. lon)
1.31 + if (dimsizes(indexes) .gt. 1) then
1.32 + lat_tmp(indexes(1:)) = lat_tmp@_FillValue
1.33 + end if
1.34 + delete (indexes)
1.35 + end if
1.36 + end do
1.37 +
1.38 + indexes = ind(.not. ismissing(lat_tmp))
1.39 + print (indexes)
1.40 +
1.41 + lat_new = lat(indexes)
1.42 + lon_new = lon(indexes)
1.43 + print (lat_new +"/"+lon_new)
1.44 +
1.45 +exit
1.46 +
1.47 +end