Changeset 5650


Ignore:
Timestamp:
May 13, 2025, 5:41:30 PM (4 weeks ago)
Author:
dcugnet
Message:

Bug fix: Coriolis parameters should be computed for each task and not broadcasted from the master.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/tropopause_m.f90

    r5607 r5650  
    2222  USE assert_eq_m,  ONLY: assert_eq
    2323  USE dimphy,       ONLY: klon, klev
    24   USE geometry_mod, ONLY: latitude_deg, longitude_deg
     24  USE geometry_mod, ONLY: latitude
    2525  USE strings_mod,  ONLY: maxlen
    26   USE yomcst_mod_h, ONLY: ROMEGA, RPI, RKAPPA, RG
     26  USE yomcst_mod_h, ONLY: ROMEGA, RKAPPA, RG
    2727  USE vertical_layers_mod,    ONLY: aps, bps, preff
    2828  USE lmdz_reprobus_wrappers, ONLY: itroprep
     
    7676  IF(lFirst) THEN
    7777     ALLOCATE(fac(klon), w(ns+1, ns+1))
     78
     79     !--- COMPUTE THE CORIOLIS PARAMETER FOR PV ALCULATION ROUTINE "potentialVorticity"
     80     DO i = 1, klon
     81        fac(i) = 2. * ROMEGA * SIN(latitude(i))
     82     END DO
    7883!$OMP BARRIER
     84
    7985     IF(is_master) THEN
    8086
     
    8288       !--- NOTE: "k0" DEPENDS ON VERTICAL DISCRETIZATION ONLY (VIA HYBRID COEFFS aps, bps) AND IS NOT SIMULATION-DEPENDENT
    8389        DO k0 = 1, klev; IF( aps(k0) / preff + bps(k0) < sg0 ) EXIT; END DO     !--- START INDEX FOR BOTTOM->TOP PV SEARCH LOOP
    84 
    85         !--- COMPUTE THE CORIOLIS PARAMETER FOR PV ALCULATION ROUTINE "potentialVorticity"
    86         DO i = 1, klon
    87            fac(:) = 2. * ROMEGA * SIN(latitude_deg(:) * RPI/180.)
    88         END DO
    8990
    9091        !--- COMPUTE THE WEIGHTS FOR THE VERTICAL SMOOTHING ROUTINE "smooth"
     
    100101     END IF
    101102     CALL bcast(k0)
    102      CALL bcast(fac)
    103103     CALL bcast(w)
    104104     CALL bcast(lFirst)
Note: See TracChangeset for help on using the changeset viewer.