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

Home » Public Forums » archive » The good way to use cdfid's
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: The good way to use cdfid's [message #76646 is a reply to message #76410] Mon, 20 June 2011 07:18 Go to previous messageGo to previous message
Fabzou is currently offline  Fabzou
Messages: 76
Registered: November 2010
Member
Hi,

Thanks for your reply. In my case, it is not occurring randomly but
after a certain number of open/close :

IDL> print, !VERSION
{ x86_64 linux unix linux 7.1.1 Aug 21 2009 64 64}
IDL> crash_ncdf
% Compiled module: CRASH_NCDF.
theError = 0
/tmp/sample_hand.nc
% Loaded DLM: NCDF.
theError = -1005
i = 32766
ncdf_fid = -2147483648
% CRASH_NCDF: NCDF_CLOSE: -2147483648 is not a valid cdfid.
% Execution halted at: CRASH_NCDF 24
/home/fab/disk/IDLWorkspace/ze_Dev/crash_ncdf.pro
% $MAIN$

Well... I've given up using IDL for low-level NCDF tools anyway
(post-processing, etc.) but I'll be happy to find a solution to this.

We will switch to CDO, but I now that some very big organizations (e.g.
http://oceancolor.gsfc.nasa.gov/) use IDL to generate some
post-processed products in NCDF format. Probably they a stable version
of IDL working...

Fabzou




On 06/20/2011 03:42 PM, Jos de Laat wrote:
> pro create_hand_sample, file
> compile_opt idl2, logical_predicate
> print, file
> sample_var = dindgen( 4, 3 )
> ncid = ncdf_create(file, /CLOBBER)
> dimidx = ncdf_dimdef( ncid, 'x', 4 )
> dimidy = ncdf_dimdef( ncid, 'y', 3 )
> varid = ncdf_vardef( ncid, 'variable', /double )
> ncdf_control, ncid, /ENDEF
> ncdf_varput, ncid, varid, sample_var
> ncdf_close, ncid
>
> end
>
> pro crash_ncdf
> compile_opt idl2, logical_predicate
>
> catch, theError
> print, 'theError = ',theError
> if theError ne 0 then begin
> Catch, /cancel
> print, "i = ", i
> print, "ncdf_fid = ", ncdf_fid
> message, !ERROR_STATE.msg
> endif
>
> file = '/tmp/sample_hand.nc'
> create_hand_sample, file
>
> long_iteration = 19000000L
>
> for i = 0l, long_iteration do begin
> ncdf_fid = ncdf_open( file, write = 0 )
> ncdf_close, ncdf_fid
> endfor
>
> print, 'Successfully completed first iterations'
> window, /free
> wdelete
>
> for i = 0l, long_iteration do begin
> ncdf_fid = ncdf_open( file, write = 0 )
> ncdf_close, ncdf_fid
> endfor
>
> print, 'Successfully completed second iterations'
>
> end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: point inside/outside of 3D object.
Next Topic: Re: Venn Diagram in IDL?

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

Current Time: Sun Oct 12 02:22:48 PDT 2025

Total time taken to generate the page: 0.88128 seconds