Subject: I have attempted to run the following script which would generate a 3D plot from the input (Oceanic Temperature) Netcdf file:
To: William Hobbs:
From: John McCormick
Date: 02/16/2010
Subject: 3D plot from the input (Oceanic Temperature) Netcdf file gives overflow system message:
######################################################################
### Script to run in attempting to get a 3-D Plot of Temperature in the
### Northern Gulf (off the coast of Louisiana)....
###
#####################################################################
;*************************************************
;
;************************************************
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/wind_rose.ncl"
;load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/ccm_func.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/popRemap.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_code.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/gsn_csm.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/contributed.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/shea_util.ncl"
load "$NCARG_ROOT/lib/ncarg/nclscripts/csm/diagnostics_cam.ncl"
begin
NX = 318 ; Longitude Dimension (x) -- 318
NY = 191 ; Latitude Dimension (y) -- 191
x = new((/NX/),float)
y = new((/NY/),float)
t2 = new((/NX,NY/),float)
; x = (/0.00, 1.00, 2.00/)
; y = (/0.00, 1.00, 2.00/)
;*************************************************
; Read in Temperature Values at depth of 50 meters
;************************************************
nc_file_in ="/home/mccormik/GulfBreeze/Data/TemperatureOceanFiles/20090916_20090918/t3d_2009091600.nc"
; a = addfile("/home/mccormik/GulfBreeze/t3d_2009061100_nc_ascii.nc","r")
; a = addfile("/amber/home/mccormik/GulfBreeze/t3d_2009061100_nc_ascii.nc","r")
a = addfile(nc_file_in,"r")
idepth = 1
T = a->Temperature(0,idepth,:,:) ; (time,lev,lat,lon)
lon = a->Longitude
lat = a->Latitude
dep = a->Depth
;print(T)
;print(lon)
;print(lat)
do i = 0,317 ; Longitude (x from 0 thru 317)
x(i) = (i)*1.0
do j = 0,190 ; Latitude
y(j) = (j)*1.0
t2(i,j)=T(j,i)*1.0
end do
end do
; print(x)
; print(y)
; print(t2)
; Create the output grid.
xmin = -2.0
ymin = -2.0
zmin = -2.0
xmax = 2.0
ymax = 2.0
zmax = 2.0
; ii = fspan(0,20.,21)
; xo = xmin + (ii/(NX-1)) * (xmax-xmin)
; yo = ymin + (ii/(NY-1)) * (ymax-ymin)
; zo = zmin + (ii/(NZ-1)) * (zmax-zmin)
;print(x)
;print(y)
;print(z)
wks = gsn_open_wks("x11","test")
rho = 2.5
theta = -136.
phi = -127.
;
; Interpolate. "output" will be a 3-dimensional grid dimensioned 21x21x21.
;
tdez2d(wks, x, y, t2, rho, theta, phi, -6)
frame(wks)
end