; szss96_init_temrho.pro -- translated by f2idl ; using argument information from init_temrho.f and init_temrho_f.c ; and documentation information from init_temrho.f ;+ ; NAME: ; szss96_init_temrho ; ; PURPOSE: ; Return initial altitudes, temperature ; CALLING SEQUENCE: ; szss96_init_temrho,ZM,TEM,RHO1,RHO2,KMOUT,MODE ; ; INPUTS: ; ; mode - MODE=1 start from a constant T; MODE=2 read in from 'PLUTO.RESTART' ; OUTPUTS: ; ; zm - altitude [m, km array] ; tem - temperature [K, km array] ; rho1 - mass mixing ratio of CH4 [unitless] ; rho2 - mass mixing ratio of CO [unitless] ; kmout - number of layers ; MODIFICATION HISTORY: ; Written 2007 Feb 7, LAY ; : ; ;- PRO szss96_init_temrho,ZM,TEM,RHO1,RHO2,KMOUT,MODE ; -------------------- This function name fcn = 'szss96_init_temrho' ; -------------------- assign parameters (including dimensions) KM = 106 LM = 5 ;------------------------- ; setup the output variables that will be passed to the fortran ; routine ZM = make_array(KM,type= 5) TEM = make_array(KM,type= 5) RHO1 = make_array(KM,type= 5) RHO2 = make_array(KM,type= 5) KMOUT = 0L ;------------------------- ; check all variables if n_params() ne 6 then begin print,'szss96_init_temrho: wrong number of arguments' return endif if size(ZM,/type) ne 5 then begin print,'szss96_init_temrho: ZM of wrong data type' return endif if size(ZM,/n_dim) ne 1 then begin print,'szss96_init_temrho: ZM of wrong n_dim' return endif if not array_equal(size(ZM,/dim), [KM] ) then begin print,'szss96_init_temrho: ZM of wrong dim' return endif if size(TEM,/type) ne 5 then begin print,'szss96_init_temrho: TEM of wrong data type' return endif if size(TEM,/n_dim) ne 1 then begin print,'szss96_init_temrho: TEM of wrong n_dim' return endif if not array_equal(size(TEM,/dim), [KM] ) then begin print,'szss96_init_temrho: TEM of wrong dim' return endif if size(RHO1,/type) ne 5 then begin print,'szss96_init_temrho: RHO1 of wrong data type' return endif if size(RHO1,/n_dim) ne 1 then begin print,'szss96_init_temrho: RHO1 of wrong n_dim' return endif if not array_equal(size(RHO1,/dim), [KM] ) then begin print,'szss96_init_temrho: RHO1 of wrong dim' return endif if size(RHO2,/type) ne 5 then begin print,'szss96_init_temrho: RHO2 of wrong data type' return endif if size(RHO2,/n_dim) ne 1 then begin print,'szss96_init_temrho: RHO2 of wrong n_dim' return endif if not array_equal(size(RHO2,/dim), [KM] ) then begin print,'szss96_init_temrho: RHO2 of wrong dim' return endif if size(KMOUT,/type) ne 3 then begin print,'szss96_init_temrho: KMOUT of wrong data type' return endif if size(KMOUT,/n_dim) ne 0 then begin print,'szss96_init_temrho: KMOUT of wrong n_dim' return endif if size(MODE,/type) ne 3 then begin print,'szss96_init_temrho: MODE of wrong data type' return endif if size(MODE,/n_dim) ne 0 then begin print,'szss96_init_temrho: 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_init_temrho__' RESULT = CALL_EXTERNAL( lib_name, ENTRY_NAME, $ ZM, TEM, RHO1, RHO2, KMOUT, MODE, $ /verbose ) end