;+ ; NAME: ; rt_szss96_CH4cool77 ; PURPOSE: (one line) ; calculate CH4 cooling at 7.7 micorn ; DESCRIPTION: ; calculate CH4 cooling at 7.7 micorn ; CATEGORY: ; RT ; CALLING SEQUENCE: ; ; INPUTS: ; atm = atmosphere structure (as returned by rt_szss96_atmread) ; OPTIONAL INPUT PARAMETERS: ; KEYWORD INPUT PARAMETERS: ; codetype ; 'FORTRAN' - call routines from plutot.f ; 'FORTEST' - native IDL routines that reproduce the fortran ; 'IDL' - idl code, without the restriction of needing to reproduce fortran ; KEYWORD OUTPUT PARAMETERS: ; none ; OUTPUTS: ; returns an atmosphere structure, with the following fields ; nz number of atmospheric levels ; ns number of species ; z altitudes [nz] (cm) ; p pressures [nz] (cm) ; t temperatures [nz] (K) ; n number density [nz,ns] (cm^-3) ; ncol number column density [nz,ns] (cm^-2) ; COMMON BLOCKS: ; SIDE EFFECTS: ; RESTRICTIONS: ; Modifies atm ; PROCEDURE: ; ; EXAMPLE: ; ; atm = rt_szss96_atmread('pluto.restart', 3.d) ; t = atm.t ; p = atm.p ; n_ch4 = atm.n[*,1] ; l77 = rt_szss96_CH4cool77(t, p, n_ch4) ; MODIFICATION HISTORY: ; Written 2004 May 8, Leslie Young SwRI ; based on atmread2.f, written by Roger Yelle, 1990 ;- function rt_szss96_CH4cool77, t, p, n_ch4, gamn4=gamn4 fcn = 'rt_szss96__CH4cool77' if not keyword_set(codetype) then codetype = 'FORTRAN' case codetype of 'FORTRAN': begin get_ch4all,GG,WW,TREF if tref[0] ne 40.d then begin input6 endif get_parair, R00,WTMOL if WTMOL lt 1. then begin R00 = 1150.0D3 WTMOL = 28.0D set_parair,R00, WTMOL endif get_panda, ZKVTOUT,XA2OUT,XA3OUT,XA4OUT,XP2OUT,XP3OUT,XP4OUT if XA2OUT lt 1.d then begin init_panda endif ; convert from standard atm structure to ; fortran's expected format TEM = t PRE = p / 10.d BC = 1.3804D-23 DN1 = n_ch4 * 1d6 DN = PRE/(BC * TEM) RHO = ( DN1/ DN ) * (16/28.) KM = n_elements(PRE) ICONT = 1L IYELLE = 2L qtch4z,TEM,PRE,RHO,QT,KM,ICONT,GAMN4,IYELLE ;convert from K/s to erg/cm^3/s RAIR=8314.0D0/WTMOL ; gas constant CP=RAIR*7.0D0/2.0D0 ; specific heat at the constant pressure RHO = PRE/(RAIR*TEM) ; kg m**(-3) FACTX1=CP*RHO*10.0D0 ; To convert K/sec to erg cm**(-3) s**(-1) QT1CGS = QT * FACTX1 qt = QT1CGS return, qt end 'FORTEST': begin print, fcn, ': code type ', codetype, ' not implemented' end else: begin print, fcn, ': code type ', codetype, ' not implemented' return, -1 end endcase end