; szss96_qtch4z_test.pro -- translated by f2idl ; using argument information from qtch4z_test.f and qtch4z_test_f.c ; and documentation information from qtch4z_test.f ;+ ; NAME: ; szss96_qtch4z_test ; ; PURPOSE: ; to To calculate the cooling rate for CH4 7.6 micron band ; CALLING SEQUENCE: ; szss96_qtch4z_test,TEM,PRE,RHO,QT,KM,MODE,GAMN4,IYELLE ; ; INPUTS: ; ; TEM - Temperature (K) [km] ; PRE - Pressure (Pascal) [km] ; RHO - Methane mass mixing ratio (unitless) [km] ; MODE - 1 to call input6, > 1 if input6 has already been called ; 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 ; init_atm,ZM,TEM,PRE,RHO,RHO1,RHO2,DN,DN1,BNS,BNS1,KM,MODE ; ICONT = 1L ; IYELLE = 2L ; init_panda ; QTCH4Z_TEST,TEM,PRE,RHO1,QT1,KM,ICONT,GAMN4,IYELLE ; MODIFICATION HISTORY: ; Fortran Zhu 2007 Nov 14. IDL wrapper LAY 2007 Aug 28 ; : ; ;- PRO szss96_qtch4z_test,TEM,PRE,RHO,QT,KM,MODE,GAMN4,IYELLE ; -------------------- This function name fcn = 'szss96_qtch4z_test' ; -------------------- assign parameters (including dimensions) MCH4 = 2 KMX = 106 ;------------------------- ; setup the output variables that will be passed to the fortran ; routine QT = make_array(KM,type= 5) GAMN4 = make_array(KM,type= 5) ;------------------------- ; check all variables if n_params() ne 8 then begin print,'szss96_qtch4z_test: wrong number of arguments' return endif if size(TEM,/type) ne 5 then begin print,'szss96_qtch4z_test: TEM of wrong data type' return endif if size(TEM,/n_dim) ne 1 then begin print,'szss96_qtch4z_test: TEM of wrong n_dim' return endif if not array_equal(size(TEM,/dim), [KM] ) then begin print,'szss96_qtch4z_test: TEM of wrong dim' return endif if size(PRE,/type) ne 5 then begin print,'szss96_qtch4z_test: PRE of wrong data type' return endif if size(PRE,/n_dim) ne 1 then begin print,'szss96_qtch4z_test: PRE of wrong n_dim' return endif if not array_equal(size(PRE,/dim), [KM] ) then begin print,'szss96_qtch4z_test: PRE of wrong dim' return endif if size(RHO,/type) ne 5 then begin print,'szss96_qtch4z_test: RHO of wrong data type' return endif if size(RHO,/n_dim) ne 1 then begin print,'szss96_qtch4z_test: RHO of wrong n_dim' return endif if not array_equal(size(RHO,/dim), [KM] ) then begin print,'szss96_qtch4z_test: RHO of wrong dim' return endif if size(QT,/type) ne 5 then begin print,'szss96_qtch4z_test: QT of wrong data type' return endif if size(QT,/n_dim) ne 1 then begin print,'szss96_qtch4z_test: QT of wrong n_dim' return endif if not array_equal(size(QT,/dim), [KM] ) then begin print,'szss96_qtch4z_test: QT of wrong dim' return endif if size(KM,/type) ne 3 then begin print,'szss96_qtch4z_test: KM of wrong data type' return endif if size(KM,/n_dim) ne 0 then begin print,'szss96_qtch4z_test: KM of wrong n_dim' return endif if size(MODE,/type) ne 3 then begin print,'szss96_qtch4z_test: MODE of wrong data type' return endif if size(MODE,/n_dim) ne 0 then begin print,'szss96_qtch4z_test: MODE of wrong n_dim' return endif if size(GAMN4,/type) ne 5 then begin print,'szss96_qtch4z_test: GAMN4 of wrong data type' return endif if size(GAMN4,/n_dim) ne 1 then begin print,'szss96_qtch4z_test: GAMN4 of wrong n_dim' return endif if not array_equal(size(GAMN4,/dim), [KM] ) then begin print,'szss96_qtch4z_test: GAMN4 of wrong dim' return endif if size(IYELLE,/type) ne 3 then begin print,'szss96_qtch4z_test: IYELLE of wrong data type' return endif if size(IYELLE,/n_dim) ne 0 then begin print,'szss96_qtch4z_test: IYELLE 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_qtch4z_test__' RESULT = CALL_EXTERNAL( lib_name, ENTRY_NAME, $ TEM,PRE,RHO,QT,KM,MODE,GAMN4,IYELLE, $ /verbose ) end