; szss96_qtcoz.pro -- translated by f2idl ; using argument information from plutot.f and plutot_f.c ; and documentation information from plutot_d.f ;+ ; NAME: ; szss96_qtcoz ; ; PURPOSE: ; to To calculate the cooling rate QJ [K s^-1] for CO rotational lines ; CALLING SEQUENCE: ; szss96_qtcoz,TEM,PRE,RHO,QT,KM,MODE ; ; INPUTS: ; ; TEM - Temperature (K) [km] ; PRE - Pressure (Pascal) [km] ; RHO - Methane mass mixing ratio (unitless) [km] ; KM - length of tem, pre, rho arrays ; MODE - 1 to fill GAM212, FRENG common blocks, > 1 if already been filled ; IYELLE - 1 to use optically thin (as in Yelle and Lunine 1992) ; OUTPUTS: ; ; QT - Cooling rate (K/s) ; GAMN4 - Escape to space function (used in heating calculations) ; EXAMPLE: ; ; MODE = 2L ; szss96_init_atm,ZM,TEM,PRE,RHO,RHO1,RHO2,DN,DN1,BNS,BNS1,KM,MODE ; ICONT = 1L ; IYELLE = 2L ; szss96_init_panda ; SZSS96_QTCOZ,TEM,PRE,RHO,QT2,KM,ICONT ; MODIFICATION HISTORY: ; Fortran Zhu 2007 Nov 14. IDL wrapper LAY 2007 Aug 28 ; : ; ;- PRO szss96_qtcoz,TEM,PRE,RHO,QT,KM,MODE ; -------------------- This function name fcn = 'szss96_qtcoz' ; -------------------- assign parameters (including dimensions) MCO = 25 KMX = 106 ;------------------------- ; setup the output variables that will be passed to the fortran ; routine QT = make_array(KM,type= 5) ;------------------------- ; check all variables if n_params() ne 6 then begin print,'szss96_qtcoz: wrong number of arguments' return endif if size(TEM,/type) ne 5 then begin print,'szss96_qtcoz: TEM of wrong data type' return endif if size(TEM,/n_dim) ne 1 then begin print,'szss96_qtcoz: TEM of wrong n_dim' return endif if not array_equal(size(TEM,/dim), [KM] ) then begin print,'szss96_qtcoz: TEM of wrong dim' return endif if size(PRE,/type) ne 5 then begin print,'szss96_qtcoz: PRE of wrong data type' return endif if size(PRE,/n_dim) ne 1 then begin print,'szss96_qtcoz: PRE of wrong n_dim' return endif if not array_equal(size(PRE,/dim), [KM] ) then begin print,'szss96_qtcoz: PRE of wrong dim' return endif if size(RHO,/type) ne 5 then begin print,'szss96_qtcoz: RHO of wrong data type' return endif if size(RHO,/n_dim) ne 1 then begin print,'szss96_qtcoz: RHO of wrong n_dim' return endif if not array_equal(size(RHO,/dim), [KM] ) then begin print,'szss96_qtcoz: RHO of wrong dim' return endif if size(QT,/type) ne 5 then begin print,'szss96_qtcoz: QT of wrong data type' return endif if size(QT,/n_dim) ne 1 then begin print,'szss96_qtcoz: QT of wrong n_dim' return endif if not array_equal(size(QT,/dim), [KM] ) then begin print,'szss96_qtcoz: QT of wrong dim' return endif if size(KM,/type) ne 3 then begin print,'szss96_qtcoz: KM of wrong data type' return endif if size(KM,/n_dim) ne 0 then begin print,'szss96_qtcoz: KM of wrong n_dim' return endif if size(MODE,/type) ne 3 then begin print,'szss96_qtcoz: MODE of wrong data type' return endif if size(MODE,/n_dim) ne 0 then begin print,'szss96_qtcoz: MODE of wrong n_dim' return endif ;------------------------- ; Find root directory for library tname findpro, fcn, dirlist=dirlist, /noprint if dirlist[0] eq '' then root = '.' else root = dirlist[0] ;------------------------- ; CALL lib_name = root + '/szss96.so' entry_name = 'idl_ce_call_qtcoz_' RESULT = CALL_EXTERNAL( lib_name, ENTRY_NAME, $ TEM,PRE,RHO,QT,KM,MODE, $ /verbose ) end