1 | !WRF:MODEL_LAYER:PHYSICS |
---|
2 | ! |
---|
3 | MODULE module_sf_sfcdiags |
---|
4 | |
---|
5 | CONTAINS |
---|
6 | |
---|
7 | SUBROUTINE SFCDIAGS(HFX,QFX,TSK,QSFC,CHS2,CQS2,T2,TH2,Q2, & |
---|
8 | PSFC,CP,R_d,ROVCP, & |
---|
9 | ids,ide, jds,jde, kds,kde, & |
---|
10 | ims,ime, jms,jme, kms,kme, & |
---|
11 | its,ite, jts,jte, kts,kte ) |
---|
12 | !------------------------------------------------------------------- |
---|
13 | IMPLICIT NONE |
---|
14 | !------------------------------------------------------------------- |
---|
15 | INTEGER, INTENT(IN ) :: ids,ide, jds,jde, kds,kde, & |
---|
16 | ims,ime, jms,jme, kms,kme, & |
---|
17 | its,ite, jts,jte, kts,kte |
---|
18 | REAL, DIMENSION( ims:ime, jms:jme ) , & |
---|
19 | INTENT(IN) :: HFX, & |
---|
20 | QFX, & |
---|
21 | TSK, & |
---|
22 | QSFC |
---|
23 | REAL, DIMENSION( ims:ime, jms:jme ) , & |
---|
24 | INTENT(INOUT) :: Q2, & |
---|
25 | TH2, & |
---|
26 | T2 |
---|
27 | REAL, DIMENSION( ims:ime, jms:jme ) , & |
---|
28 | INTENT(IN) :: PSFC, & |
---|
29 | CHS2, & |
---|
30 | CQS2 |
---|
31 | REAL, INTENT(IN ) :: CP,R_d,ROVCP |
---|
32 | ! LOCAL VARS |
---|
33 | INTEGER :: I,J |
---|
34 | REAL :: RHO |
---|
35 | |
---|
36 | DO J=jts,jte |
---|
37 | DO I=its,ite |
---|
38 | RHO = PSFC(I,J)/(R_d * TSK(I,J)) |
---|
39 | Q2(I,J) = QSFC(I,J) - QFX(I,J)/(RHO*CQS2(I,J)) |
---|
40 | T2(I,J) = TSK(I,J) - HFX(I,J)/(RHO*CP*CHS2(I,J)) |
---|
41 | TH2(I,J) = T2(I,J)*(1.E5/PSFC(I,J))**ROVCP |
---|
42 | ENDDO |
---|
43 | ENDDO |
---|
44 | |
---|
45 | END SUBROUTINE SFCDIAGS |
---|
46 | |
---|
47 | END MODULE module_sf_sfcdiags |
---|