Go to the documentation of this file.00001
00002
00003 subroutine cycalc( aparkk, vm, atheta, btheta, par, &
00004 gammas, resp_can, rrkk, omss, c3, c4, &
00005 pco2i, assimn, assim)
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024 use kinds
00025
00026 implicit none
00027
00028
00029 real(kind=dbl_kind),intent(in) ::
00030 aparkk,
00031 vm,
00032 atheta,
00033 btheta,
00034 gammas,
00035 par,
00036 resp_can,
00037 rrkk,
00038 omss,
00039 c3,
00040 c4,
00041 pco2i
00042
00043
00044 real(kind=dbl_kind),intent(out) ::
00045 assimn,
00046 assim
00047
00048
00049 real(kind=dbl_kind) ::
00050 ome,
00051 omc,
00052 omp,
00053 oms,
00054 sqrtin
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065 omc = vm *(pco2i-gammas)/(pco2i + rrkk)*c3 &
00066 + vm * c4
00067 ome = par*(pco2i-gammas)/(pco2i+2.*gammas)*c3 &
00068 + par * c4
00069 sqrtin= MAX( 0.0_dbl_kind, ( (ome+omc)**2 - 4.*atheta*ome*omc ) )
00070 omp = ( ( ome+omc ) - SQRT( sqrtin ) ) / ( 2.*atheta )
00071 oms = omss * c3 + omss*pco2i * c4
00072 sqrtin= MAX( 0.0_dbl_kind, ( (omp+oms)**2 - 4.*btheta*omp*oms ) )
00073 assim = (( ( oms+omp ) - SQRT( sqrtin ) ) / ( 2.*btheta ))*aparkk
00074 assimn = assim - resp_can
00075
00076 return
00077 end subroutine cycalc