In my code, the following function is not being recognised:
ELEMENTAL REAL(kind=dp) FUNCTION k_3rd(temp,cair,k0_300K,n,kinf_300K,m,fc)
INTRINSIC LOG10
REAL(kind=dp), INTENT(IN) :: temp ! temperature [K]
REAL(kind=dp), INTENT(IN) :: cair ! air concentration [molecules/cm3]
REAL, INTENT(IN) :: k0_300K ! low pressure limit at 300 K
REAL, INTENT(IN) :: n ! exponent for low pressure limit
REAL, INTENT(IN) :: kinf_300K ! high pressure limit at 300 K
REAL, INTENT(IN) :: m ! exponent for high pressure limit
REAL, INTENT(IN) :: fc ! broadening factor (usually fc=0.6)
REAL(kind=dp) :: zt_help, k0_T, kinf_T, k_ratio
zt_help = 300._dp/temp
k0_T = k0_300K * zt_help** * cair ! k_0 at current T
kinf_T = kinf_300K * zt_help**(m) ! k_inf at current T
k_ratio = k0_T/kinf_T
k_3rd = k0_T/(1._dp+k_ratio)*fc**(1._dp/(1._dp+LOG10(k_ratio)**2))
END FUNCTION k_3rd
but this one is
KPP_REAL FUNCTION ARR( A0,B0,C0 )
REAL A0,B0,C0
ARR = DBLE(A0) * EXP(-DBLE(B0)/TEMP) * (TEMP/300.0_dp)**DBLE(C0)
END FUNCTION ARR
Any idea why g95 does not recognise the first one as a function?
Anoop
ELEMENTAL REAL(kind=dp) FUNCTION k_3rd(temp,cair,k0_300K,n,kinf_300K,m,fc)
INTRINSIC LOG10
REAL(kind=dp), INTENT(IN) :: temp ! temperature [K]
REAL(kind=dp), INTENT(IN) :: cair ! air concentration [molecules/cm3]
REAL, INTENT(IN) :: k0_300K ! low pressure limit at 300 K
REAL, INTENT(IN) :: n ! exponent for low pressure limit
REAL, INTENT(IN) :: kinf_300K ! high pressure limit at 300 K
REAL, INTENT(IN) :: m ! exponent for high pressure limit
REAL, INTENT(IN) :: fc ! broadening factor (usually fc=0.6)
REAL(kind=dp) :: zt_help, k0_T, kinf_T, k_ratio
zt_help = 300._dp/temp
k0_T = k0_300K * zt_help** * cair ! k_0 at current T
kinf_T = kinf_300K * zt_help**(m) ! k_inf at current T
k_ratio = k0_T/kinf_T
k_3rd = k0_T/(1._dp+k_ratio)*fc**(1._dp/(1._dp+LOG10(k_ratio)**2))
END FUNCTION k_3rd
but this one is
KPP_REAL FUNCTION ARR( A0,B0,C0 )
REAL A0,B0,C0
ARR = DBLE(A0) * EXP(-DBLE(B0)/TEMP) * (TEMP/300.0_dp)**DBLE(C0)
END FUNCTION ARR
Any idea why g95 does not recognise the first one as a function?
Anoop