Changeset 2651 for trunk/LMDZ.MARS
- Timestamp:
- Mar 28, 2022, 3:46:04 PM (3 years ago)
- Location:
- trunk/LMDZ.MARS
- Files:
-
- 6 edited
- 2 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/README
r2646 r2651 3676 3676 dedicated flag to avoid calls to mod() with a zero argument which causes 3677 3677 recent gfortran (9+) to complain about a division by zero when in debug mode. 3678 3679 == 28/03/2022 == JL+EM 3680 - turn sugwd.F to sugwd.F90 with extra comments 3681 - turn yoegwd.h into a module -
trunk/LMDZ.MARS/libf/phymars/gwprofil_mod.F90
r2642 r2651 29 29 30 30 use dimradmars_mod, only: ndomainsz 31 use yoegwd_h, only: gkdrag, grcrit, gssec, gtsec 32 31 33 implicit none 32 #include "yoegwd.h" ! why begin with #, needs ask Ehouarn Millour33 34 34 35 ! 0. DECLARATIONS: -
trunk/LMDZ.MARS/libf/phymars/gwstress_mod.F90
r2642 r2651 25 25 26 26 use dimradmars_mod, only: ndomainsz 27 use yoegwd_h, only: gkdrag, gtsec, gvcrit 28 27 29 implicit none 28 include "yoegwd.h"29 30 30 31 ! 0. DECLARATIONS: -
trunk/LMDZ.MARS/libf/phymars/nonoro_gwd_ran_mod.F90
r2641 r2651 50 50 use xios_output_mod, only: send_xios_field 51 51 #endif 52 52 53 implicit none 53 include "yoegwd.h"54 54 include "callkeys.h" 55 55 -
trunk/LMDZ.MARS/libf/phymars/orodrag_mod.F90
r2642 r2651 38 38 USE gwprofil_mod, ONLY: gwprofil 39 39 USE comcstfi_h, ONLY: g, cpp 40 USE yoegwd_h, ONLY: gkwake 40 41 41 42 implicit none 42 include "yoegwd.h"43 43 44 44 ! 0. DECLARATIONS: -
trunk/LMDZ.MARS/libf/phymars/orosetup.F90
r2642 r2651 21 21 !----------------------------------------------------------------------- 22 22 use dimradmars_mod, only: ndomainsz 23 USE comcstfi_h 23 use comcstfi_h, only: cpp, g, r, pi 24 use yoegwd_h, only: gfrcrit, grcrit, gsigcr, gssec, gtsec, gvsec 25 use yoegwd_h, only: nktopg 26 24 27 implicit none 25 include "yoegwd.h"26 28 27 29 ! 0. DECLARATIONS: -
trunk/LMDZ.MARS/libf/phymars/sugwd.F90
r2650 r2651 1 SUBROUTINE SUGWD(NLEV,PSIG) 2 C 3 C**** *SUGWD* INITIALIZE COMMON YOEGWD CONTROLLING GRAVITY WAVE DRAG 4 C 5 C PURPOSE. 6 C -------- 7 C INITIALIZE YOEGWD, THE COMMON THAT CONTROLS THE 8 C GRAVITY WAVE DRAG PARAMETRIZATION. 9 C 10 C EXPLICIT ARGUMENTS : 11 C -------------------- 12 C 13 C INPUT : 14 C 15 C PSIG : VERTICAL COORDINATE TABLE 16 C NLEV : NUMBER OF MODEL LEVELS 17 C 18 C OUTPUT : 19 C 20 C NONE 21 C 22 C IMPLICIT ARGUMENTS : 23 C -------------------- 24 C COMMON YOEGWD 25 C 26 C METHOD. 27 C ------- 28 C SEE DOCUMENTATION 29 C 30 C EXTERNALS. 31 C ---------- 32 C NONE 33 C 34 C REFERENCE. 35 C ---------- 36 C ECMWF Research Department documentation of the IFS 37 C 38 C AUTHOR. 39 C ------- 40 C MARTIN MILLER *ECMWF* 41 C 42 C MODIFICATIONS. 43 C -------------- 44 C ORIGINAL : 90-01-01 45 C ------------------------------------------------------------------ 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 46 20 implicit none 47 C48 C -----------------------------------------------------------------49 c !-*- include 'yoegwd.h'50 #include "yoegwd.h"51 c !-*-52 C ----------------------------------------------------------------53 C54 integer nlev55 REAL PSIG(NLEV+1)56 21 57 real zsigt,zpr,zpm1r 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 ? 58 33 integer jk 59 C 60 C * 1. SET THE VALUES OF THE PARAMETERS 61 C -------------------------------- 62 C 63 100 CONTINUE 64 C 65 c PRINT *,' Dans sugwd nlev=',NLEV,' SIG=',PSIG 34 35 !------------------------------------------------------------------------------- 36 ! 1. Set the values of the parameters 37 !------------------------------------------------------------------------------- 38 ! PRINT *,' Dans sugwd nlayer=',nlayer,' SIG=',sigtest 66 39 GHMAX=10000. 67 C 68 c old ZSIGT=0.94 69 c old ZPR=80000. 70 ZSIGT=0.85 71 ZPR=100000. 72 C 73 DO 110 JK=1,NLEV-1 74 ZPM1R=0.5*ZPR*(PSIG(JK)+PSIG(JK+1)) 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)) 75 50 IF((ZPM1R/ZPR).GE.ZSIGT)THEN 76 NKTOPG=JK 51 NKTOPG=JK 77 52 ENDIF 78 110 CONTINUE53 ENDDO 79 54 WRITE(*,*) 'In sugwd NKTOPG=',NKTOPG 80 C 81 GSIGCR=0.80 82 C 83 GKDRAG= 0.1 ! used to be 0.1 for mcd Version 1 and 2 (before 10/2000) 84 GRCRIT=0.25 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 85 59 GFRCRIT=1.0 86 GKWAKE=1.0 87 88 C 60 GKWAKE=1.0 ! The G in equation (16) 61 GRCRIT=0.25 ! Critical value for Mean flow richardson number(OROSETUP) 89 62 GKDRAGL=4.*GKDRAG 90 63 GRAHILO=1. 91 GVCRIT =0.0 92 C 93 C 94 C ---------------------------------------------------------------- 95 C 96 C * 2. SET VALUES OF SECURITY PARAMETERS 97 C --------------------------------- 98 C 99 200 CONTINUE 100 C 101 GVSEC=0.10 102 GSSEC=1.E-12 103 C 104 GTSEC=1.E-07 105 C 106 C ---------------------------------------------------------------- 107 C 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 108 72 RETURN 109 73 END -
trunk/LMDZ.MARS/libf/phymars/yoegwd_h.F90
r2650 r2651 1 module yoegwd_h 1 2 ! ----------------------------------------------------------------- 2 3 !* *COMMON* *YOEGWD* - PARAMETERS FOR GRAVITY WAVE DRAG CALCULATIONS 3 4 ! ----------------------------------------------------------------- 4 ! 5 real :: GFRCRIT,GRCRIT,GVCRIT,GKDRAG,GKDRAGL,GHMAX 6 real :: GRAHILO,GSIGCR,GSSEC, GTSEC, GVSEC, GKWAKE 7 integer :: NKTOPG 8 COMMON/YOEGWD/ GFRCRIT,GRCRIT,GVCRIT,GKDRAG,GKDRAGL,GHMAX & 9 & ,GRAHILO,GSIGCR,NKTOPG,GSSEC, GTSEC, GVSEC,GKWAKE 10 !$OMP THREADPRIVATE(/YOEGWD/) 5 implicit none 11 6 7 real,save :: GFRCRIT 8 real,save :: GRCRIT 9 real,save :: GVCRIT 10 !$OMP THREADPRIVATE(GFRCRIT,GRCRIT,GVCRIT) 11 real,save :: GKDRAG 12 real,save :: GKDRAGL 13 real,save :: GHMAX 14 !$OMP THREADPRIVATE(GKDRAG,GKDRAGL,GHMAX) 15 real,save :: GRAHILO 16 real,save :: GSIGCR 17 real,save :: GSSEC 18 !$OMP THREADPRIVATE(GRAHILO,GSIGCR,GSSEC) 19 real,save :: GTSEC 20 real,save :: GVSEC 21 real,save :: GKWAKE 22 !$OMP THREADPRIVATE(GTSEC,GVSEC,GKWAKE) 23 integer :: NKTOPG 24 !$OMP THREADPRIVATE(NKTOPG) 12 25 26 end module yoegwd_h 13 27
Note: See TracChangeset
for help on using the changeset viewer.