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
Re: Error opening netCDF file [message #86949 is a reply to message #86932] Mon, 16 December 2013 15:58 Go to previous messageGo to previous message
dan.westervelt is currently offline  dan.westervelt
Messages: 4
Registered: December 2013
Junior Member
To follow up, this is with IDL 8.0.1 and netcdf 4.2. I define the net_rad_85 array earlier in the program (not shown) to have the same dimensions as netrad_toa variable in the structure.

On Friday, December 13, 2013 5:55:53 PM UTC-5, Dan Westervelt wrote:
> 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 15:26:54 PDT 2025

Total time taken to generate the page: 0.00452 seconds