[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
COMMON block question
- Subject: COMMON block question
- From: Paul van Delst <pvandelst(at)ncep.noaa.gov>
- Date: Tue, 30 Jan 2001 10:53:46 -0500
- Newsgroups: comp.lang.idl-pvwave
- Organization: CIMSS @ NOAA/NCEP
- Xref: news.doit.wisc.edu comp.lang.idl-pvwave:23310
Hey there,
I am doing the following in an initialisation function:
COMMON rtm_transmittance_data, predictor_index, $
transmittance_coefficients
result = read_transmittance_coefficients( 'transmittance_coefficients', $
predictor_index, $
transmittance_coefficients )
IF ( result NE SUCCESS ) THEN $
MESSAGE, 'Error reading transmittance coefficients.', $
/NONAME, /NOPRINT
If I run the function I see the following:
IDL> print, initialize_rtm()
% Compiled module: COMPUTE_ABSORBER_SPACE.
% Compiled module: READ_TRANSMITTANCE_COEFFICIENTS.
% Compiled module: OPEN_COEFFICIENT_FILE.
% Compiled module: READ_SPECTRAL_COEFFICIENTS.
1
IDL> common rtm_transmittance_data
IDL> help
% At $MAIN$
PREDICTOR_INDEX (RTM_TRANSMITTANCE_DATA)
LONG = Array[6, 142, 3]
TRANSMITTANCE_COEFFICIENTS (RTM_TRANSMITTANCE_DATA)
DOUBLE = Array[6, 301, 142, 3]
Compiled Procedures:
$MAIN$
Compiled Functions:
COMPUTE_ABSORBER_SPACE INITIALIZE_RTM OPEN_COEFFICIENT_FILE
READ_SPECTRAL_COEFFICIENTS READ_TRANSMITTANCE_COEFFICIENTS
How does IDL go about creating COMMON blocks when the size/type of the common block
elements are not known until, in this case, they're read in. Understand I'm coming from
Fortran-90 background where I declare everything up front in its own module (sort of like
a f77/IDL common block but better). Does IDL simply create pointers to the data elements
up front and then fills in the blanks after the data has actually been read in/defined?
The documentation doesn't give much info.
Thanks for any insights. All metphysical replies forwarded to DF. :o)
paulv
--
Paul van Delst A little learning is a dangerous thing;
CIMSS @ NOAA/NCEP Drink deep, or taste not the Pierian spring;
Ph: (301) 763-8000 x7274 There shallow draughts intoxicate the brain,
Fax: (301) 763-8545 And drinking largely sobers us again.
Email: pvandelst@ncep.noaa.gov Alexander Pope.