; szss96_zkintemat.pro -- translated by f2idl ; using argument information from zkintemat.f and zkintemat_f.c ; and documentation information from zkintemat.f ;+ ; NAME: ; szss96_zkintemat ; ; PURPOSE: ; interpolate k-coefficents of CH4 nu4 to the temperature ; CALLING SEQUENCE: ; szss96_zkintemat,TEM,KM,XKZ,ICON ; ; INPUTS: ; ; TEM - temperature (K) [KM] ; KM - number of atmospheric layers ; ICON - 1 for A band, 2 for B band ; OUTPUTS: ; ; XKZ - coefficients (m^2/kg) [KM,JM] ; ENDDOC GET_CH4ALL ; ------------------- ; SUBROUTINE ZKINTEMAT(TEM,KM,XKZ,ICON) ; IMPLICIT DOUBLE PRECISION (A-H,O-Z) ; PARAMETER(KMX=106,JM=30,LM=4) ; COMMON /CH4V4/ SIG4A(JM,LM),SIG4B(JM,LM) ; COMMON /CH4ALL/ GG(JM),WW(JM),TREF(LM) ; DIMENSION TEM(KM) ; DIMENSION XKZ(KMX,JM) ; ; DO 30 J=1,JM ; DO 20 K=1,KM ; XKZ(K,J)=ZKINTE(TEM(K),J,ICON) ; CONTINUE ; CONTINUE ; END ; ; MODIFICATION HISTORY: ; Written 2007 Sep 1, LAY ; : ; ;- PRO szss96_zkintemat,TEM,KM,XKZ,ICON ; -------------------- This function name fcn = 'szss96_zkintemat' ; -------------------- assign parameters (including dimensions) KMX = 106 JM = 30 LM = 4 ;------------------------- ; setup the output variables that will be passed to the fortran ; routine XKZ = make_array(KMX,JM,type= 5) ;------------------------- ; check all variables if n_params() ne 4 then begin print,'szss96_zkintemat: wrong number of arguments' return endif if size(TEM,/type) ne 5 then begin print,'szss96_zkintemat: TEM of wrong data type' return endif if size(TEM,/n_dim) ne 1 then begin print,'szss96_zkintemat: TEM of wrong n_dim' return endif if not array_equal(size(TEM,/dim), [KM] ) then begin print,'szss96_zkintemat: TEM of wrong dim' return endif if size(KM,/type) ne 3 then begin print,'szss96_zkintemat: KM of wrong data type' return endif if size(KM,/n_dim) ne 0 then begin print,'szss96_zkintemat: KM of wrong n_dim' return endif if size(XKZ,/type) ne 5 then begin print,'szss96_zkintemat: XKZ of wrong data type' return endif if size(XKZ,/n_dim) ne 2 then begin print,'szss96_zkintemat: XKZ of wrong n_dim' return endif if not array_equal(size(XKZ,/dim), [KMX,JM] ) then begin print,'szss96_zkintemat: XKZ of wrong dim' return endif if size(ICON,/type) ne 3 then begin print,'szss96_zkintemat: ICON of wrong data type' return endif if size(ICON,/n_dim) ne 0 then begin print,'szss96_zkintemat: ICON 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_zkintemat_' RESULT = CALL_EXTERNAL( lib_name, ENTRY_NAME, $ TEM,KM,XKZ,ICON, $ /verbose ) end