16 subroutine sfc_diag_post_run (im, lsm, lsm_noahmp, opt_diag, dry, lssav, dtf, con_eps, con_epsm1, pgr,&
17 vegtype,t2mmp,q2mp, t2m, q2m, u10m, v10m, tmpmin, tmpmax, spfhmin, spfhmax, &
18 wind10mmax, u10mmax, v10mmax, dpt2m, errmsg, errflg)
20 use machine,
only: kind_phys, kind_dbl_prec
24 integer,
intent(in) :: im, lsm, lsm_noahmp,opt_diag
25 integer,
dimension(:),
intent(in) :: vegtype
26 logical,
intent(in) :: lssav
27 real(kind=kind_phys),
intent(in) :: dtf, con_eps, con_epsm1
28 logical ,
dimension(:),
intent(in) :: dry
29 real(kind=kind_phys),
dimension(:),
intent(in) :: pgr, u10m, v10m
30 real(kind=kind_phys),
dimension(:),
intent(inout) :: t2m, q2m, tmpmin, tmpmax, spfhmin, spfhmax
31 real(kind=kind_phys),
dimension(:),
intent(in),
optional :: t2mmp, q2mp
32 real(kind=kind_phys),
dimension(:),
intent(inout) :: wind10mmax, u10mmax, v10mmax, dpt2m
34 character(len=*),
intent(out) :: errmsg
35 integer,
intent(out) :: errflg
38 real(kind=kind_dbl_prec) :: tem
44 if (lsm == lsm_noahmp)
then
48 if (vegtype(i) == 6 .or. vegtype(i) == 7 &
49 .or. vegtype(i) == 16)
then
56 if (opt_diag == 2 .or. opt_diag == 3)
then
68 tmpmax(i) = max(tmpmax(i),t2m(i))
69 tmpmin(i) = min(tmpmin(i),t2m(i))
70 spfhmax(i) = max(spfhmax(i),q2m(i))
71 spfhmin(i) = min(spfhmin(i),q2m(i))
75 tem = sqrt(u10m(i)*u10m(i) + v10m(i)*v10m(i))
76 if (tem > wind10mmax(i))
then
82 tem = max(pgr(i) * q2m(i) / ( con_eps - con_epsm1 *q2m(i)), 1.d-8)
83 dpt2m(i) = 243.5_kind_dbl_prec / &
84 ( ( 17.67_kind_dbl_prec / log(tem/611.2_kind_dbl_prec) ) - 1.) + 273.14
subroutine sfc_diag_post_run(im, lsm, lsm_noahmp, opt_diag, dry, lssav, dtf, con_eps, con_epsm1, pgr, vegtype, t2mmp, q2mp, t2m, q2m, u10m, v10m, tmpmin, tmpmax, spfhmin, spfhmax, wind10mmax, u10mmax, v10mmax, dpt2m, errmsg, errflg)
This module contains code related to the surface diagnostic scheme.