Ignore:
Timestamp:
Mar 5, 2026, 2:30:00 PM (4 days ago)
Author:
rkazeroni
Message:

Edit call_gwd routine to enable automatic GPU porting with GPUM:

  • add "nogpu directive" for call to diagnostic
  • replace Forall statement not supported by GPUM by DO-loop
  • move array operation before call instead of inside a call because it is not supproted on GPU
File:
1 edited

Legend:

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

    r6068 r6090  
    1 !$gpum horizontal klon, nbsrf
     1!$gpum horizontal klon
    22MODULE lmdz_call_gwd
    33
     
    144144      REAL, DIMENSION(klon, klev) :: dtadd, duadd, dvadd, exner
    145145      REAL, DIMENSION(klon, klev) :: d_t_oro_tke, d_u_oro_tke, d_v_oro_tke
     146      REAL, DIMENSION(klon) :: fall
    146147
    147148!===================================================================
     
    373374      IF (ok_gwd_rando) THEN
    374375
     376         fall = rain_fall + snow_fall
    375377         CALL flott_gwd_rando(klon, klev, phys_tstep, pplay, presnivs, t_seri, u_seri, v_seri, &
    376                               rain_fall + snow_fall, zustr_precip, zvstr_precip, &
     378                              fall, zustr_precip, zvstr_precip, &
    377379                              d_u_precip, d_v_precip, east_gwstress, west_gwstress)
    378380
     
    415417         !  Mountain-induced torque and angular momentum calculation
    416418         !-------------------------------------------------------------------------------------
     419         !$gpum nocall
    417420         CALL aaam_bud(27, klon, klev, jD_cur - jD_ref, jH_cur, &
    418421                       ra, rg, romega, &
     
    486489         ! TKE update from subgrid temperature and wind tendencies
    487490         !----------------------------------------------------------
    488          forall (k=1:klev) exner(:, k) = (pplay(:, k)/paprs(:, 1))**rkappa
     491         DO k = 1, klev
     492            exner(:, k) = (pplay(:, k)/paprs(:, 1))**rkappa
     493         END DO
    489494
    490495         CALL tend_to_tke(phys_tstep, klon, klev, nbsrf, is_ave, paprs, exner, t_seri, u_seri, v_seri, dtadd, duadd, dvadd, pctsrf, tke)
Note: See TracChangeset for help on using the changeset viewer.