| 1 | MODULE sugwd_mod |
|---|
| 2 | |
|---|
| 3 | IMPLICIT NONE |
|---|
| 4 | |
|---|
| 5 | CONTAINS |
|---|
| 6 | |
|---|
| 7 | SUBROUTINE SUGWD(nlayer,sigtest) |
|---|
| 8 | ! ============================================================================== |
|---|
| 9 | ! Initialize common variables in yoegwd.h to control the orographic |
|---|
| 10 | ! gravity wave drag parameterization. That means, all the tunable parameters |
|---|
| 11 | ! for oro-GW scheme are in this subroutine. |
|---|
| 12 | ! MARTIN MILLER *ECMWF* ORIGINAL : 90-01-01 |
|---|
| 13 | ! Update: Jiandong Liu 2022/03/15 Rewirite into .F90 and |
|---|
| 14 | ! comment. |
|---|
| 15 | ! REFERENCE. |
|---|
| 16 | ! ---------- |
|---|
| 17 | ! ECMWF Research Department documentation of the IFS |
|---|
| 18 | !=============================================================================== |
|---|
| 19 | |
|---|
| 20 | USE yoegwd_h, ONLY: GFRCRIT, GRCRIT, GVCRIT |
|---|
| 21 | USE yoegwd_h, ONLY: GKDRAG, GKDRAGL, GHMAX |
|---|
| 22 | USE yoegwd_h, ONLY: GRAHILO, GSIGCR, GSSEC |
|---|
| 23 | USE yoegwd_h, ONLY: GTSEC, GVSEC, GKWAKE |
|---|
| 24 | USE yoegwd_h, ONLY: NKTOPG |
|---|
| 25 | |
|---|
| 26 | implicit none |
|---|
| 27 | |
|---|
| 28 | ! 0.1 Inputs: |
|---|
| 29 | integer,intent(in):: nlayer ! Number of model levels |
|---|
| 30 | REAL,intent(in):: sigtest(nlayer+1) ! Vertical coordinate table |
|---|
| 31 | |
|---|
| 32 | ! 0.2 Outputs: |
|---|
| 33 | ! None. |
|---|
| 34 | |
|---|
| 35 | ! 0.3 Local variables |
|---|
| 36 | real zsigt ! Top of the sigma coordinates? |
|---|
| 37 | real zpr ! Reference pressure ? |
|---|
| 38 | real zpm1r ! Pressure at full layer ? |
|---|
| 39 | integer jk |
|---|
| 40 | |
|---|
| 41 | !------------------------------------------------------------------------------- |
|---|
| 42 | ! 1. Set the values of the parameters |
|---|
| 43 | !------------------------------------------------------------------------------- |
|---|
| 44 | ! PRINT *,' Dans sugwd nlayer=',nlayer,' SIG=',sigtest |
|---|
| 45 | GHMAX=10000. |
|---|
| 46 | |
|---|
| 47 | ! old ZSIGT=0.94 |
|---|
| 48 | ! old ZPR=80000. |
|---|
| 49 | ZSIGT=0.85 ! Sigmal levels |
|---|
| 50 | ZPR=100000. ! Surface (Reference) Pressure? |
|---|
| 51 | |
|---|
| 52 | ! ! Condition to find NKTOPG layer, which NKTOPG is a condition to set |
|---|
| 53 | ! 1*pvar and 2*pvar layers (OROSETUP) |
|---|
| 54 | DO JK=1,nlayer-1 |
|---|
| 55 | ZPM1R=0.5*ZPR*(sigtest(JK)+sigtest(JK+1)) |
|---|
| 56 | IF((ZPM1R/ZPR).GE.ZSIGT)THEN |
|---|
| 57 | NKTOPG=JK |
|---|
| 58 | ENDIF |
|---|
| 59 | ENDDO |
|---|
| 60 | WRITE(*,*) 'In sugwd NKTOPG=',NKTOPG |
|---|
| 61 | |
|---|
| 62 | GSIGCR=0.80 ! Sigmal levels to found the top of low level flow height (OROSETUP) |
|---|
| 63 | GKDRAG= 0.1 ! used to be 0.1 for mcd Version 1 and 2 (before 10/2000) (OROSETUP) |
|---|
| 64 | |
|---|
| 65 | GFRCRIT=1.0 |
|---|
| 66 | GKWAKE=1.0 ! The G in equation (16) |
|---|
| 67 | GRCRIT=0.25 ! Critical value for Mean flow richardson number(OROSETUP) |
|---|
| 68 | GKDRAGL=4.*GKDRAG |
|---|
| 69 | GRAHILO=1. |
|---|
| 70 | GVCRIT =0.0 |
|---|
| 71 | !------------------------------------------------------------------------------- |
|---|
| 72 | ! 2. Set values of security parameters |
|---|
| 73 | !------------------------------------------------------------------------------- |
|---|
| 74 | GVSEC=0.10 ! Security values for For normal wind (pu^2+pv^2)^0.5(OROSETUP,GWSTRESS) |
|---|
| 75 | GSSEC=1.E-12 ! Security values for Brunt–Väisälä frequency N^2 (OROSETUP) |
|---|
| 76 | GTSEC=1.E-07 ! Security values for Sub-grid scale anisotropy(OROSETUP,GWSTRESS) |
|---|
| 77 | |
|---|
| 78 | END SUBROUTINE SUGWD |
|---|
| 79 | |
|---|
| 80 | END MODULE sugwd_mod |
|---|