source: trunk/LMDZ.MARS/libf/phymars/sugwd.F90 @ 3325

Last change on this file since 3325 was 2651, checked in by emillour, 3 years ago

Mars GCM:

  • turn sugwd.F to sugwd.F90 with extra comments
  • turn yoegwd.h into a module

JL+EM

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