comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Error opening netCDF file
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Error opening netCDF file [message #86932] Fri, 13 December 2013 14:55 Go to previous message
dan.westervelt is currently offline  dan.westervelt
Messages: 4
Registered: December 2013
Junior Member
I am attempting to read in about ~100 or so netCDF files in a loop. I'm using ncdf_read.pro ( http://acmg.seas.harvard.edu/gamap/doc/by_alphabet/gamap_n.h tml#NCDF_READ). My code looks like this:

; read in met variables
ncdf_read, result_meteo, filename = dir1+sim4+dir4+dir3+'atmos.' $
+years(n)+'-'+string(fix(years(n))+4,format='(I4)')+'.ann.nc ', $
variables = ['netrad_toa']

; ; assign variables
net_rad_85(*,*)=result_meteo.netrad_toa
Undefine, result_meteo

I am getting this error at the assignment line above:
% Expression must be a structure in this context: RESULT_METEO.

Strangely, if I reset everything, and run again, the code gets a little further in the loop, and more of my 100 or so files are read in. If I repeat it enough times, I can get through the entire program without error, but it can take hours, which is not good.

Each file is about 18M, so I don't think I'm approaching a memory limit? My first guess was memory error or memory leak, but I've tried undefining everything, calling heap_gc, etc, with no luck. Any idea what I'm doing wrong here?

Thanks
Dan
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: PNG output quality degraded after RHEL6 patch
Next Topic: Issue with long integer arrays

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 13:31:25 PDT 2025

Total time taken to generate the page: 0.31707 seconds