subroutine calc_cpp_mugaz !================================================================== ! Purpose ! ------- ! Compute the atmospheric specific heat capacity. ! Compute the atmospheric mean molar mass. ! ! Authors ! ------- ! Robin Wordsworth (2009) ! !================================================================== use gases_h implicit none #include "comcstfi.h" !#include "callkeys.h" integer igas cpp=0.0 mugaz=0.0 do igas=1,ngasmx if(igas.eq.vgas)then ! ignore variable gas in cpp calculation else ! all values at 300 K from Engineering Toolbox if(gnom(igas).eq.'CO2')then cpp = cpp + 0.846*gfrac(igas) mugaz = mugaz + 44.01*gfrac(igas) elseif(gnom(igas).eq.'N2_')then cpp = cpp + 1.040*gfrac(igas) mugaz = mugaz + 28.01*gfrac(igas) elseif(gnom(igas).eq.'H2_')then cpp = cpp + 14.31*gfrac(igas) mugaz = mugaz + 2.01*gfrac(igas) elseif(gnom(igas).eq.'H2O')then cpp = cpp + 1.864*gfrac(igas) mugaz = mugaz + 18.02*gfrac(igas) elseif(gnom(igas).eq.'CH4')then cpp = cpp + 2.226*gfrac(igas) mugaz = mugaz + 16.04*gfrac(igas) elseif(gnom(igas).eq.'NH3')then cpp = cpp + 2.175*gfrac(igas) mugaz = mugaz + 17.03*gfrac(igas) print*,'WARNING, cpp for NH3 may be for liquid' else print*,'Error in calc_cpp_mugaz: Gas species not recognised!' call abort endif endif enddo cpp=1000.0*cpp print*,'Cp in calc_cpp_mugaz is ',cpp,'J kg^-1 K^-1' print*,'Mg in calc_cpp_mugaz is ',mugaz,'amu' R = 8.314511E+0 *1000.E+0/mugaz rcp = R/cpp return end subroutine calc_cpp_mugaz