; szss96_htch5.pro -- translated by f2idl ; using argument information from plutot.f and plutot_f.c ; and documentation information from plutot_d.f ;+ ; NAME: ; szss96_htch5 ; ; PURPOSE: ; ; To calculate the globally averaged solar heating rate in [K s^-1] by ; CH4 2.3 micron band at Pluto. ; CALLING SEQUENCE: ; szss96_htch5,HT,AN,BN,TEM,PRE,KM,MODE,GAMN4 ; ; 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 ; 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 ; HTCH5,HT,AN,BN,TEM,PRE,KM,MODE,GAMN4 ; MODIFICATION HISTORY: ; Fortran Zhu 2007 Nov 14. IDL wrapper LAY 2008 Nov 10 ; : ; ;- PRO szss96_htch5,HT,AN,BN,TEM,PRE,KM,MODE,GAMN4 ; -------------------- This function name fcn = 'szss96_htch5' ; -------------------- 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 8 then begin print,'szss96_htch5: wrong number of arguments' return endif if size(HT,/type) ne 5 then begin print,'szss96_htch5: HT of wrong data type' return endif if size(HT,/n_dim) ne 1 then begin print,'szss96_htch5: HT of wrong n_dim' return endif if not array_equal(size(HT,/dim), [KM] ) then begin print,'szss96_htch5: HT of wrong dim' return endif if size(AN,/type) ne 5 then begin print,'szss96_htch5: AN of wrong data type' return endif if size(AN,/n_dim) ne 1 then begin print,'szss96_htch5: AN of wrong n_dim' return endif if not array_equal(size(AN,/dim), [KM] ) then begin print,'szss96_htch5: AN of wrong dim' return endif if size(BN,/type) ne 5 then begin print,'szss96_htch5: BN of wrong data type' return endif if size(BN,/n_dim) ne 1 then begin print,'szss96_htch5: BN of wrong n_dim' return endif if not array_equal(size(BN,/dim), [KM] ) then begin print,'szss96_htch5: BN of wrong dim' return endif if size(TEM,/type) ne 5 then begin print,'szss96_htch5: TEM of wrong data type' return endif if size(TEM,/n_dim) ne 1 then begin print,'szss96_htch5: TEM of wrong n_dim' return endif if not array_equal(size(TEM,/dim), [KM] ) then begin print,'szss96_htch5: TEM of wrong dim' return endif if size(PRE,/type) ne 5 then begin print,'szss96_htch5: PRE of wrong data type' return endif if size(PRE,/n_dim) ne 1 then begin print,'szss96_htch5: PRE of wrong n_dim' return endif if not array_equal(size(PRE,/dim), [KM] ) then begin print,'szss96_htch5: PRE of wrong dim' return endif if size(KM,/type) ne 3 then begin print,'szss96_htch5: KM of wrong data type' return endif if size(KM,/n_dim) ne 0 then begin print,'szss96_htch5: KM of wrong n_dim' return endif if size(MODE,/type) ne 3 then begin print,'szss96_htch5: MODE of wrong data type' return endif if size(MODE,/n_dim) ne 0 then begin print,'szss96_htch5: MODE of wrong n_dim' return endif if size(GAMN4,/type) ne 5 then begin print,'szss96_htch5: GAMN4 of wrong data type' return endif if size(GAMN4,/n_dim) ne 1 then begin print,'szss96_htch5: GAMN4 of wrong n_dim' return endif if not array_equal(size(GAMN4,/dim), [KM] ) then begin print,'szss96_htch5: GAMN4 of wrong 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_htch5_' RESULT = CALL_EXTERNAL( lib_name, ENTRY_NAME, $ HT,AN,BN,TEM,PRE,KM,MODE,GAMN4, $ /verbose ) end