Ignore:
Timestamp:
Feb 12, 2018, 10:01:04 AM (6 years ago)
Author:
Laurent Fairhead
Message:

Inclusion of r3198 from trunk
Retour vers l'insensibilite au decoupage en sous domaine.
Les routines gwd_rando incluait le calcul de niveaux de reference
sur la base d'un profile pris au milieu du domaine (en klon/2).
Rempace par un test en presnivs.

Une autre intercation entre routines concernant la tke a fait apparaitre
que la tke n'?\195?\169tait pas passee correctement au niveau klev+1 au moment
du regroupement des mailles sous les sous surface.

Ces changements garantissent la convergence numerique si
addtkeoro=0
iflag_pbl<12
et
ok_gwd_rando=n
La convergence n'est pas garantie pour les dernieres versions des physiq.def
mais les differences devraient etre mineures.

FH

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/IPSLCM6.0.15/libf/phylmd/acama_gwd_rando_m.F90

    r2665 r3200  
    2020    use dimphy, only: klon, klev
    2121    use assert_m, only: assert
     22    USE ioipsl_getin_p_mod, ONLY : getin_p
     23    USE vertical_layers_mod, ONLY : presnivs
     24
    2225    include "YOMCST.h"
    2326    include "clesphys.h"
     
    111114    REAL BV(KLON, KLEV + 1) ! Brunt Vaisala freq. (BVF) at 1/2 levels
    112115    REAL BVSEC ! Security to avoid negative BVF
     116
     117    REAL, DIMENSION(klev+1) ::HREF
     118    LOGICAL, SAVE :: gwd_reproductibilite_mpiomp=.true.
     119    LOGICAL, SAVE :: firstcall = .TRUE.
     120  !$OMP THREADPRIVATE(firstcall,gwd_reproductibilite_mpiomp)
     121
     122    CHARACTER (LEN=20) :: modname='flott_gwd_rando'
     123    CHARACTER (LEN=80) :: abort_message
     124
     125
     126
     127  IF (firstcall) THEN
     128    ! Cle introduite pour resoudre un probleme de non reproductibilite
     129    ! Le but est de pouvoir tester de revenir a la version precedenete
     130    ! A eliminer rapidement
     131    CALL getin_p('gwd_reproductibilite_mpiomp',gwd_reproductibilite_mpiomp)
     132    IF (NW+4*(NA-1)+NA>=KLEV) THEN
     133       abort_message = 'NW+3*NA>=KLEV Probleme pour generation des ondes'
     134       CALL abort_physic (modname,abort_message,1)
     135    ENDIF
     136    firstcall=.false.
     137!    CALL iophys_ini
     138  ENDIF
    113139
    114140    !-----------------------------------------------------------------
     
    205231    ! Launching altitude
    206232
     233    IF (gwd_reproductibilite_mpiomp) THEN
     234       ! Reprend la formule qui calcule PH en fonction de PP=play
     235       DO LL = 2, KLEV
     236          HREF(LL) = EXP((LOG(presnivs(LL)) + LOG(presnivs(LL - 1))) / 2.)
     237       end DO
     238       HREF(KLEV + 1) = 0.
     239       HREF(1) = 2. * presnivs(1) - HREF(2)
     240    ELSE
     241       HREF(1:KLEV)=PH(KLON/2,1:KLEV)
     242    ENDIF
     243
    207244    LAUNCH=0
    208245    LTROP =0
    209246    DO LL = 1, KLEV
    210        IF (PH(KLON / 2, LL) / PH(KLON / 2, 1) > XLAUNCH) LAUNCH = LL
     247       IF (HREF(LL) / HREF(1) > XLAUNCH) LAUNCH = LL
    211248    ENDDO
    212249    DO LL = 1, KLEV
    213        IF (PH(KLON / 2, LL) / PH(KLON / 2, 1) > XTROP) LTROP = LL
     250       IF (HREF(LL) / HREF(1) > XTROP) LTROP = LL
    214251    ENDDO
    215252
     
    293330
    294331    JW = 0
    295     DO JP = 1, NP
    296        DO JK = 1, NK
    297           DO JO = 1, NO
    298              JW = JW + 1
     332    DO JW = 1, NW
    299333             ! Angle
    300334             DO II = 1, KLON
     
    340374                ! RUW0(JW, II) = RUWFRT
    341375             ENDDO
    342           end DO
    343        end DO
    344376    end DO
    345377
Note: See TracChangeset for help on using the changeset viewer.