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
######################################################################
### After running this script on a Linux 2.6.18-164.11.1.el5 OS, (Dell Precision Hardware Station)
### I got the following message below:
###
#####################################################################
iris1.rtpnc.epa.gov:/home/mccormik/GulfBreeze/Software02/Iso-Plots% ncl 20100212_3d_Test00.ncl
Copyright (C) 1995-2009 - All Rights Reserved
University Corporation for Atmospheric Research
NCAR Command Language Version 5.1.1
The use of this software is governed by a License Agreement.
See
http://www.ncl.ucar.edu/ for more details.
Triangle list overflow in TDSTRI
iris1.rtpnc.epa.gov:/home/mccormik/GulfBreeze/Software02/Iso-Plots%
######################################################################
### However, one observation that I had noticed about this program is that when I reduced the indices (sizes)
### to about 80 or 90 (for all three dimensions), it ran okay. The above problem occurred when I set the following:
### NX = 318
### NY = 191
###
### Also, where the system error message says: "Triangle list overflow in TDSTRI", could that mean that I'm not using the
### correct function ?? I have been assuming that the function would accept values from unit-cubes (as grids) and not triangles.
###
#####################################################################
John W. McCormick, Systems Programmer / DBA
High Performance Computing & Scientific Visualization
Lockheed Martin Information Technology, Supporting the EPA
Research Triangle Park, NC
919-541-0890
Federal Infrastructure Contact - Ravi Nair
919-541-5467 -
nair.ravi@epa.govFederal Infrastructure Contact - Joe Retzer, Ph.D.
919-541-4190 -
retzer.joseph@epa.gov############################################
### Work Information ###
############################################
John W. McCormick, Systems Programmer, MD: N127-01
Lockheed Martin, Contractor to US-EPA
US-EPA, Bldg NCC, Rm N135B
Durham, NC 27711
Office: 919-541-0890
Fax : 919-541-0056
Work Email:
mccormick.johnw@epa.gov