Changeset 6120 for LMDZ6/trunk/libf


Ignore:
Timestamp:
Mar 23, 2026, 11:29:20 PM (9 days ago)
Author:
lguez
Message:

Set ncid_climoz to OpenMP threadprivate

Set ncid_climoz to OpenMP threadprivate in procedure
physiq. ncid_climoz is only used by the master thread of root MPI
process so we can set it to threadprivate and define it only for the
master thread of root MPI process.

Location:
LMDZ6/trunk/libf/phylmd
Files:
2 edited

Legend:

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

    r5268 r6120  
    2525! and in strictly ascending order.
    2626!-------------------------------------------------------------------------------
    27 ! Arguments (OpenMP shared):
    2827  INTEGER, INTENT(OUT):: ncid      !--- "climoz_LMDZ.nc" identifier
     28  ! Following arguments are OpenMP shared:
    2929  REAL, allocatable, intent(out):: press_in_cen(:) !--- at cells centers
    3030  REAL, allocatable, INTENT(OUT):: press_in_edg(:) !--- at the interfaces (pressure intervals)
  • LMDZ6/trunk/libf/phylmd/physiq_mod.F90

    r6119 r6120  
    10691069    !     2: read two ozone climatologies, the average day and night
    10701070    !     climatology and the daylight climatology
    1071     !$OMP THREADPRIVATE(read_climoz)
     1071    INTEGER,SAVE :: ncid_climoz                ! NetCDF file identifier
     1072    !$OMP THREADPRIVATE(read_climoz, ncid_climoz)
    10721073
    10731074    !  Following variables are OpenMP shared
    1074     INTEGER,SAVE :: ncid_climoz                ! NetCDF file identifier
    10751075    REAL, ALLOCATABLE, SAVE :: press_cen_climoz(:) ! Pressure levels
    10761076    REAL, ALLOCATABLE, SAVE :: press_edg_climoz(:) ! Edges of pressure intervals
     
    21242124       ENDIF
    21252125
    2126        !$omp single
     2126       !$omp master
    21272127       IF (read_climoz >= 1) CALL open_climoz(ncid_climoz, press_cen_climoz,   &
    21282128            press_edg_climoz, time_climoz, ok_daily_climoz, adjust_tropopause)
    2129        !$omp end single
     2129       !$omp end master
    21302130       !
    21312131       !IM betaCRF
Note: See TracChangeset for help on using the changeset viewer.