; szss96_htch4.pro -- translated by f2idl ; using argument information from plutot.f and plutot_f.c ; and documentation information from plutot_d.f ;+ ; NAME: ; szss96_htch4 ; ; PURPOSE: ; ; To calculate the globally averaged solar heating rate in [K s^-1] by ; CH4 nu3 band at Pluto. ; CALLING SEQUENCE: ; szss96_htch4,HT,AN,BN,TEM,PRE,KM,MODE,IYELLE,GAMN4,IZHU ; ; INPUTS: ; ; AN - CH4 number density (m^-3) [km] ; BN - CH4 column number density (m^-2) [km] ; TEM - Temperature (K) [km] ; PRE - Pressure (Pascal) [km] ; KM - length of tem, pre, rho arrays ; MODE - 1 to call input4, > 1 if input4 has already been called ; IYELLE - 1 to use optically thin (as in Yelle and Lunine 1992) ; IZHU - 1 to use vibration-to-vibration cascade ; GAMN4 - Escape to space function (used in heating calculations) ; OUTPUTS: ; ; HT - Heating rate (K/s) ; EXAMPLE: ; ; MODE = 2L ; init_atm,ZM,TEM,PRE,RHO,RHO1,RHO2,DN,DN1,BNS,BNS1,KM,MODE ; ICONT = 1L ; IYELLE = 2L ; IZHU = 1L ; HTCH4,HT,DN1,BNS1,TEM,PRE,KM,ICONT,IYELLE,GAMN4,IZHU ; MODIFICATION HISTORY: ; Fortran Zhu 2007 Nov 14. IDL wrapper LAY 2007 Aug 28 ; : ; ;- PRO szss96_htch4,HT,AN,BN,TEM,PRE,KM,MODE,IYELLE,GAMN4,IZHU ; -------------------- This function name fcn = 'szss96_htch4' ; -------------------- assign parameters (including dimensions) JM = 30 LM = 4 KMAX = 200 MM = 4 ;------------------------- ; setup the output variables that will be passed to the fortran ; routine HT = make_array(KM,type= 5) ;------------------------- ; check all variables if n_params() ne 10 then begin print,'szss96_htch4: wrong number of arguments' return endif if size(HT,/type) ne 5 then begin print,'szss96_htch4: HT of wrong data type' return endif if size(HT,/n_dim) ne 1 then begin print,'szss96_htch4: HT of wrong n_dim' return endif if not array_equal(size(HT,/dim), [KM] ) then begin print,'szss96_htch4: HT of wrong dim' return endif if size(AN,/type) ne 5 then begin print,'szss96_htch4: AN of wrong data type' return endif if size(AN,/n_dim) ne 1 then begin print,'szss96_htch4: AN of wrong n_dim' return endif if not array_equal(size(AN,/dim), [KM] ) then begin print,'szss96_htch4: AN of wrong dim' return endif if size(BN,/type) ne 5 then begin print,'szss96_htch4: BN of wrong data type' return endif if size(BN,/n_dim) ne 1 then begin print,'szss96_htch4: BN of wrong n_dim' return endif if not array_equal(size(BN,/dim), [KM] ) then begin print,'szss96_htch4: BN of wrong dim' return endif if size(TEM,/type) ne 5 then begin print,'szss96_htch4: TEM of wrong data type' return endif if size(TEM,/n_dim) ne 1 then begin print,'szss96_htch4: TEM of wrong n_dim' return endif if not array_equal(size(TEM,/dim), [KM] ) then begin print,'szss96_htch4: TEM of wrong dim' return endif if size(PRE,/type) ne 5 then begin print,'szss96_htch4: PRE of wrong data type' return endif if size(PRE,/n_dim) ne 1 then begin print,'szss96_htch4: PRE of wrong n_dim' return endif if not array_equal(size(PRE,/dim), [KM] ) then begin print,'szss96_htch4: PRE of wrong dim' return endif if size(KM,/type) ne 3 then begin print,'szss96_htch4: KM of wrong data type' return endif if size(KM,/n_dim) ne 0 then begin print,'szss96_htch4: KM of wrong n_dim' return endif if size(MODE,/type) ne 3 then begin print,'szss96_htch4: MODE of wrong data type' return endif if size(MODE,/n_dim) ne 0 then begin print,'szss96_htch4: MODE of wrong n_dim' return endif if size(IYELLE,/type) ne 3 then begin print,'szss96_htch4: IYELLE of wrong data type' return endif if size(IYELLE,/n_dim) ne 0 then begin print,'szss96_htch4: IYELLE of wrong n_dim' return endif if size(GAMN4,/type) ne 5 then begin print,'szss96_htch4: GAMN4 of wrong data type' return endif if size(GAMN4,/n_dim) ne 1 then begin print,'szss96_htch4: GAMN4 of wrong n_dim' return endif if not array_equal(size(GAMN4,/dim), [KM] ) then begin print,'szss96_htch4: GAMN4 of wrong dim' return endif if size(IZHU,/type) ne 3 then begin print,'szss96_htch4: IZHU of wrong data type' return endif if size(IZHU,/n_dim) ne 0 then begin print,'szss96_htch4: IZHU 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_htch4_' RESULT = CALL_EXTERNAL( lib_name, ENTRY_NAME, $ HT,AN,BN,TEM,PRE,KM,MODE,IYELLE,GAMN4,IZHU, $ /verbose ) end