Ignore:
Timestamp:
Apr 1, 2019 4:35:16 PM (5 years ago)
Author:
knoop
Message:

Bugfix: added proper OpenACC support to disturb_field

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SOURCE/init_3d_model.f90

    r3761 r3849  
    668668        ONLY :  init_surface_arrays, init_surfaces, surf_def_h, surf_lsm_h,    &
    669669                surf_usm_h, get_topography_top_index_ji
     670
     671#if defined( _OPENACC )
     672    USE surface_mod,                                                           &
     673        ONLY :  bc_h
     674#endif
    670675
    671676    USE surface_data_output_mod,                                               &
     
    21692174         TRIM( initializing_actions ) /= 'cyclic_fill' )  THEN
    21702175
     2176!
     2177!--    Needed for both disturb_field and pres
     2178!$ACC DATA &
     2179!$ACC CREATE(tend(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) &
     2180!$ACC COPY(u(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) &
     2181!$ACC COPY(v(nzb:nzt+1,nysg:nyng,nxlg:nxrg))
     2182
    21712183       CALL location_message( 'creating initial disturbances', .FALSE. )
    21722184       CALL disturb_field( 'u', tend, u )
    21732185       CALL disturb_field( 'v', tend, v )
    21742186       CALL location_message( 'finished', .TRUE. )
     2187
     2188!$ACC DATA &
     2189!$ACC CREATE(d(nzb+1:nzt,nys:nyn,nxl:nxr)) &
     2190!$ACC COPY(w(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) &
     2191!$ACC COPY(p(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) &
     2192!$ACC COPYIN(rho_air(nzb:nzt+1), rho_air_zw(nzb:nzt+1)) &
     2193!$ACC COPYIN(ddzu(1:nzt+1), ddzw(1:nzt+1)) &
     2194!$ACC COPYIN(wall_flags_0(nzb:nzt+1,nysg:nyng,nxlg:nxrg)) &
     2195!$ACC COPYIN(bc_h(0:1)) &
     2196!$ACC COPYIN(bc_h(0)%i(1:bc_h(0)%ns)) &
     2197!$ACC COPYIN(bc_h(0)%j(1:bc_h(0)%ns)) &
     2198!$ACC COPYIN(bc_h(0)%k(1:bc_h(0)%ns)) &
     2199!$ACC COPYIN(bc_h(1)%i(1:bc_h(1)%ns)) &
     2200!$ACC COPYIN(bc_h(1)%j(1:bc_h(1)%ns)) &
     2201!$ACC COPYIN(bc_h(1)%k(1:bc_h(1)%ns))
    21752202
    21762203       CALL location_message( 'calling pressure solver', .FALSE. )
     
    21792206       n_sor = nsor
    21802207       CALL location_message( 'finished', .TRUE. )
     2208
     2209!$ACC END DATA
     2210!$ACC END DATA
    21812211
    21822212    ENDIF
Note: See TracChangeset for help on using the changeset viewer.