Changeset 5499
- Timestamp:
- Jan 21, 2025, 11:18:55 AM (14 hours ago)
- Location:
- LMDZ6/trunk/libf/phylmd
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/calwake.f90
r5285 r5499 1 2 1 ! $Id$ 2 MODULE calwake_mod 3 PRIVATE 4 5 LOGICAL, SAVE, ALLOCATABLE :: first(:) ! first(klon) : first calwake computation on columns 6 !$OMP THREADPRIVATE(first) 7 8 LOGICAL, SAVE :: first_first=.TRUE. ! fisrt call to calwake 9 !$OMP THREADPRIVATE(first_first) 10 11 PUBLIC calwake_first, calwake 12 13 CONTAINS 14 15 SUBROUTINE calwake_first(dtime) 16 USE dimphy, ONLY : klon,klev 17 USE lmdz_wake, ONLY : wake_first 18 REAL, INTENT(IN) :: dtime 19 20 IF (first_first) THEN 21 ALLOCATE(first(klon)) 22 first(:)=.TRUE. 23 24 CALL wake_first(klev, dtime) 25 26 first_first=.FALSE. 27 ENDIF 28 29 END SUBROUTINE calwake_first 30 3 31 4 32 SUBROUTINE calwake(iflag_wake_tend, paprs, pplay, dtime, & … … 28 56 USE phys_state_var_mod, ONLY: pctsrf 29 57 USE indice_sol_mod, ONLY: is_oce 30 USE print_control_mod, ONLY: mydebug=>debug ,lunout, prt_level58 USE print_control_mod, ONLY: lunout, prt_level 31 59 USE lmdz_wake, ONLY : wake 32 60 USE yomcst_mod_h … … 76 104 ! Variable internes 77 105 ! ----------------- 78 LOGICAL, SAVE :: first = .TRUE.79 !$OMP THREADPRIVATE(first)80 106 INTEGER :: i, l 81 107 INTEGER, DIMENSION(klon) :: znatsurf ! 0 if pctsrf(is_oce)>0.1; 1 else. … … 318 344 ENDIF ! (iflag_wake_tend .EQ. 0) 319 345 ! 320 IF (first) THEN321 DO i = 1,klon346 DO i = 1,klon 347 IF (first(i)) THEN 322 348 IF (wake_dens(i) < -1.) THEN 323 349 wake_dens(i) = wdens(i) 324 350 ENDIF 325 ENDDO 326 first=.false. 327 ENDIF ! (first) 351 first(i)=.FALSE. 352 ENDIF 353 ENDDO 354 328 355 !>jyg 329 356 IF (prt_level >= 10) THEN … … 334 361 END SUBROUTINE calwake 335 362 336 363 END MODULE calwake_mod -
LMDZ6/trunk/libf/phylmd/lmdz_wake.f90
r5451 r5499 4 4 5 5 IMPLICIT NONE; PRIVATE 6 PUBLIC wake 6 7 LOGICAL, PARAMETER :: phys_sub=.false. 8 LOGICAL :: first_call=.true. 9 !$OMP THREADPRIVATE(first_call) 10 11 PUBLIC wake, wake_first 7 12 8 13 CONTAINS 14 15 SUBROUTINE wake_first(klev, dtime) 16 USE lmdz_wake_ini , ONLY : wk_nsub 17 IMPLICIT NONE 18 INTEGER, INTENT(IN) :: klev 19 REAL, INTENT(IN) :: dtime 20 REAL :: dtimesub 21 22 dtimesub = dtime/wk_nsub 23 ! 24 IF (first_call) THEN 25 IF (CPPKEY_IOPHYS_WK) THEN 26 IF (phys_sub) THEN 27 call iophys_ini(dtimesub,klev) 28 ELSE 29 call iophys_ini(dtime,klev) 30 ENDIF 31 END IF 32 first_call = .false. 33 ENDIF !(first_call) 34 35 END SUBROUTINE wake_first 9 36 10 37 SUBROUTINE wake(klon,klev,znatsurf, p, ph, pi, dtime, & … … 306 333 REAL, DIMENSION(klon) :: wdens_in, awdens_in ! pour les prints 307 334 308 !!! LOGICAL :: phys_sub=.true.309 LOGICAL :: phys_sub=.false.310 311 LOGICAL :: first_call=.true.312 313 314 335 !!-- variables liees au nouveau calcul de ptop et hw 315 336 REAL, DIMENSION (klon, klev) :: int_dth … … 350 371 ! alpk = 0.05 351 372 ! 352 igout = klon/2+1/klon 373 igout = klon/2+1/klon 353 374 ! 354 375 ! sub-time-stepping parameters 355 376 dtimesub = dtime/wk_nsub 356 377 ! 357 IF (first_call) THEN358 IF (CPPKEY_IOPHYS_WK) THEN359 IF (phys_sub) THEN360 call iophys_ini(dtimesub,klev)361 ELSE362 call iophys_ini(dtime,klev)363 ENDIF364 END IF365 first_call = .false.366 ENDIF !(first_call)367 368 378 IF (iflag_wk_pop_dyn == 0) THEN 369 379 ! Initialisation de toutes des densites a wdens_ref. -
LMDZ6/trunk/libf/phylmd/physiq_mod.F90
r5491 r5499 79 79 USE lmdz_lscp_old, ONLY : fisrtilp, fisrtilp_first 80 80 USE lmdz_call_blowing_snow, ONLY : call_blowing_snow_sublim_sedim 81 USE calwake_mod, ONLY : calwake, calwake_first 81 82 USE lmdz_wake_ini, ONLY : wake_ini 82 83 USE lmdz_surf_wind_ini, ONLY : surf_wind_ini, iflag_surf_wind … … 3517 3518 ! 3518 3519 !calcul caracteristiques de la poche froide 3520 CALL calWAKE_first(phys_tstep) 3519 3521 CALL calWAKE (iflag_wake_tend, paprs, pplay, phys_tstep, & 3520 3522 t_seri, q_seri, omega, &
Note: See TracChangeset
for help on using the changeset viewer.