New URL for NEMO forge!   http://forge.nemo-ocean.eu

Since March 2022 along with NEMO 4.2 release, the code development moved to a self-hosted GitLab.
This present forge is now archived and remained online for history.
Changeset 7037 for branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90 – NEMO

Ignore:
Timestamp:
2016-10-18T15:32:04+02:00 (8 years ago)
Author:
mocavero
Message:

ORCA2_LIM_PISCES hybrid version update

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/OPA_SRC/DIA/diawri.F90

    r6748 r7037  
    181181 
    182182      IF ( iom_use("taubot") ) THEN                ! bottom stress 
     183!$OMP PARALLEL 
     184!$OMP WORKSHARE 
    183185         z2d(:,:) = 0._wp 
    184 !$OMP PARALLEL DO schedule(static) private(jj, ji, zztmpx,zztmpy) 
     186!$OMP END WORKSHARE 
     187!$OMP DO schedule(static) private(jj, ji, zztmpx,zztmpy) 
    185188         DO jj = 2, jpjm1 
    186189            DO ji = fs_2, fs_jpim1   ! vector opt. 
     
    193196            ENDDO 
    194197         ENDDO 
     198!$OMP END DO NOWAIT 
     199!$OMP END PARALLEL 
    195200         CALL lbc_lnk( z2d, 'T', 1. ) 
    196201         CALL iom_put( "taubot", z2d )            
     
    226231      IF( iom_use('w_masstr') .OR. iom_use('w_masstr2') ) THEN   ! vertical mass transport & its square value 
    227232         ! Caution: in the VVL case, it only correponds to the baroclinic mass transport. 
     233!$OMP PARALLEL 
     234!$OMP WORKSHARE 
    228235         z2d(:,:) = rau0 * e1e2t(:,:) 
    229 !$OMP PARALLEL DO schedule(static) private(jk) 
     236!$OMP END WORKSHARE 
     237!$OMP DO schedule(static) private(jk) 
    230238         DO jk = 1, jpk 
    231239            z3d(:,:,jk) = wn(:,:,jk) * z2d(:,:)  
    232240         END DO 
     241!$OMP END DO NOWAIT 
     242!$OMP END PARALLEL 
    233243         CALL iom_put( "w_masstr" , z3d )   
    234244         IF( iom_use('w_masstr2') )   CALL iom_put( "w_masstr2", z3d(:,:,:) * z3d(:,:,:) ) 
     
    255265         CALL lbc_lnk( z2d, 'T', 1. ) 
    256266         CALL iom_put( "sstgrad2",  z2d               )    ! square of module of sst gradient 
    257          z2d(:,:) = SQRT( z2d(:,:) ) 
     267!$OMP PARALLEL DO schedule(static) private(jj, ji) 
     268         DO jj = 1, jpj 
     269            DO ji = 1, jpi 
     270               z2d(ji,jj) = SQRT( z2d(ji,jj) ) 
     271            END DO 
     272         END DO 
    258273         CALL iom_put( "sstgrad" ,  z2d               )    ! module of sst gradient 
    259274      ENDIF 
     
    261276      ! clem: heat and salt content 
    262277      IF( iom_use("heatc") ) THEN 
     278!$OMP PARALLEL 
     279!$OMP WORKSHARE 
    263280         z2d(:,:)  = 0._wp  
    264 !$OMP PARALLEL DO schedule(static) private(jk, jj, ji) 
     281!$OMP END WORKSHARE 
     282!$OMP DO schedule(static) private(jk, jj, ji) 
    265283         DO jk = 1, jpkm1 
    266284            DO jj = 1, jpj 
     
    270288            END DO 
    271289         END DO 
     290!$OMP END DO NOWAIT 
     291!$OMP END PARALLEL 
    272292         CALL iom_put( "heatc", (rau0 * rcp) * z2d )    ! vertically integrated heat content (J/m2) 
    273293      ENDIF 
    274294 
    275295      IF( iom_use("saltc") ) THEN 
     296!$OMP PARALLEL 
     297!$OMP WORKSHARE 
    276298         z2d(:,:)  = 0._wp  
    277 !$OMP PARALLEL DO schedule(static) private(jk, jj, ji) 
     299!$OMP END WORKSHARE 
     300!$OMP DO schedule(static) private(jk, jj, ji) 
    278301         DO jk = 1, jpkm1 
    279302            DO jj = 1, jpj 
     
    283306            END DO 
    284307         END DO 
     308!$OMP END DO NOWAIT 
     309!$OMP END PARALLEL 
    285310         CALL iom_put( "saltc", rau0 * z2d )   ! vertically integrated salt content (PSU*kg/m2) 
    286311      ENDIF 
    287312      ! 
    288313      IF ( iom_use("eken") ) THEN 
     314!$OMP PARALLEL 
     315!$OMP WORKSHARE 
    289316         rke(:,:,jk) = 0._wp                               !      kinetic energy  
    290 !$OMP PARALLEL DO schedule(static) private(jk, jj, ji, zztmp, zztmpx, zztmpy) 
     317!$OMP END WORKSHARE 
     318!$OMP DO schedule(static) private(jk, jj, ji, zztmp, zztmpx, zztmpy) 
    291319         DO jk = 1, jpkm1 
    292320            DO jj = 2, jpjm1 
     
    306334            ENDDO 
    307335         ENDDO 
     336!$OMP END DO NOWAIT 
     337!$OMP END PARALLEL 
    308338         CALL lbc_lnk( rke, 'T', 1. ) 
    309339         CALL iom_put( "eken", rke )            
     
    313343      ! 
    314344      IF( iom_use("u_masstr") .OR. iom_use("u_heattr") .OR. iom_use("u_salttr") ) THEN 
     345!$OMP PARALLEL 
     346!$OMP WORKSHARE 
    315347         z3d(:,:,jpk) = 0.e0 
    316 !$OMP PARALLEL DO schedule(static) private(jk) 
     348!$OMP END WORKSHARE 
     349!$OMP DO schedule(static) private(jk) 
    317350         DO jk = 1, jpkm1 
    318351            z3d(:,:,jk) = rau0 * un(:,:,jk) * e2u(:,:) * e3u_n(:,:,jk) * umask(:,:,jk) 
    319352         END DO 
     353!$OMP END DO NOWAIT 
     354!$OMP END PARALLEL 
    320355         CALL iom_put( "u_masstr", z3d )                  ! mass transport in i-direction 
    321356      ENDIF 
    322357       
    323358      IF( iom_use("u_heattr") ) THEN 
     359!$OMP PARALLEL 
     360!$OMP WORKSHARE 
    324361         z2d(:,:) = 0.e0  
    325 !$OMP PARALLEL DO schedule(static) private(jk, jj, ji) 
     362!$OMP END WORKSHARE 
     363!$OMP DO schedule(static) private(jk, jj, ji) 
    326364         DO jk = 1, jpkm1 
    327365            DO jj = 2, jpjm1 
     
    331369            END DO 
    332370         END DO 
     371!$OMP END DO NOWAIT 
     372!$OMP END PARALLEL 
    333373         CALL lbc_lnk( z2d, 'U', -1. ) 
    334374         CALL iom_put( "u_heattr", (0.5 * rcp) * z2d )    ! heat transport in i-direction 
     
    336376 
    337377      IF( iom_use("u_salttr") ) THEN 
     378!$OMP PARALLEL 
     379!$OMP WORKSHARE 
    338380         z2d(:,:) = 0.e0  
    339 !$OMP PARALLEL DO schedule(static) private(jk, jj, ji) 
     381!$OMP END WORKSHARE 
     382!$OMP DO schedule(static) private(jk, jj, ji) 
    340383         DO jk = 1, jpkm1 
    341384            DO jj = 2, jpjm1 
     
    345388            END DO 
    346389         END DO 
     390!$OMP END DO NOWAIT 
     391!$OMP END PARALLEL 
    347392         CALL lbc_lnk( z2d, 'U', -1. ) 
    348393         CALL iom_put( "u_salttr", 0.5 * z2d )            ! heat transport in i-direction 
     
    351396       
    352397      IF( iom_use("v_masstr") .OR. iom_use("v_heattr") .OR. iom_use("v_salttr") ) THEN 
     398!$OMP PARALLEL 
     399!$OMP WORKSHARE 
    353400         z3d(:,:,jpk) = 0.e0 
    354 !$OMP PARALLEL DO schedule(static) private(jk) 
     401!$OMP END WORKSHARE 
     402!$OMP DO schedule(static) private(jk) 
    355403         DO jk = 1, jpkm1 
    356404            z3d(:,:,jk) = rau0 * vn(:,:,jk) * e1v(:,:) * e3v_n(:,:,jk) * vmask(:,:,jk) 
    357405         END DO 
     406!$OMP END DO NOWAIT 
     407!$OMP END PARALLEL 
    358408         CALL iom_put( "v_masstr", z3d )                  ! mass transport in j-direction 
    359409      ENDIF 
    360410       
    361411      IF( iom_use("v_heattr") ) THEN 
     412!$OMP PARALLEL 
     413!$OMP WORKSHARE 
    362414         z2d(:,:) = 0.e0  
    363 !$OMP PARALLEL DO schedule(static) private(jk, jj, ji) 
     415!$OMP END WORKSHARE 
     416!$OMP DO schedule(static) private(jk, jj, ji) 
    364417         DO jk = 1, jpkm1 
    365418            DO jj = 2, jpjm1 
     
    369422            END DO 
    370423         END DO 
     424!$OMP END DO NOWAIT 
     425!$OMP END PARALLEL 
    371426         CALL lbc_lnk( z2d, 'V', -1. ) 
    372427         CALL iom_put( "v_heattr", (0.5 * rcp) * z2d )    !  heat transport in j-direction 
     
    374429 
    375430      IF( iom_use("v_salttr") ) THEN 
     431!$OMP PARALLEL 
     432!$OMP WORKSHARE 
    376433         z2d(:,:) = 0.e0  
    377 !$OMP PARALLEL DO schedule(static) private(jk, jj, ji) 
     434!$OMP END WORKSHARE 
     435!$OMP DO schedule(static) private(jk, jj, ji) 
    378436         DO jk = 1, jpkm1 
    379437            DO jj = 2, jpjm1 
     
    383441            END DO 
    384442         END DO 
     443!$OMP END DO NOWAIT 
     444!$OMP END PARALLEL 
    385445         CALL lbc_lnk( z2d, 'V', -1. ) 
    386446         CALL iom_put( "v_salttr", 0.5 * z2d )            !  heat transport in j-direction 
     
    758818      ENDIF 
    759819      IF( .NOT.ln_linssh ) THEN 
     820!$OMP PARALLEL WORKSHARE 
    760821         zw3d(:,:,:) = ( ( e3t_n(:,:,:) - e3t_0(:,:,:) ) / e3t_0(:,:,:) * 100 * tmask(:,:,:) ) ** 2 
     822!$OMP END PARALLEL WORKSHARE 
    761823         CALL histwrite( nid_T, "vovvle3t", it, e3t_n (:,:,:) , ndim_T , ndex_T  )   ! level thickness 
    762824         CALL histwrite( nid_T, "vovvldep", it, gdept_n(:,:,:) , ndim_T , ndex_T  )   ! t-point depth 
     
    770832                                                                                  ! in linear free surface case) 
    771833      IF( ln_linssh ) THEN 
     834!$OMP PARALLEL WORKSHARE 
    772835         zw2d(:,:) = emp (:,:) * tsn(:,:,1,jp_tem) 
     836!$OMP END PARALLEL WORKSHARE 
    773837         CALL histwrite( nid_T, "sosst_cd", it, zw2d, ndim_hT, ndex_hT )          ! c/d term on sst 
     838!$OMP PARALLEL WORKSHARE 
    774839         zw2d(:,:) = emp (:,:) * tsn(:,:,1,jp_sal) 
     840!$OMP END PARALLEL WORKSHARE 
    775841         CALL histwrite( nid_T, "sosss_cd", it, zw2d, ndim_hT, ndex_hT )          ! c/d term on sss 
    776842      ENDIF 
     
    808874         CALL histwrite( nid_T, "sohefldp", it, qrp           , ndim_hT, ndex_hT )   ! heat flux damping 
    809875         CALL histwrite( nid_T, "sowafldp", it, erp           , ndim_hT, ndex_hT )   ! freshwater flux damping 
    810          IF( ln_ssr ) zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 
     876         IF( ln_ssr ) THEN 
     877!$OMP PARALLEL WORKSHARE 
     878            zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 
     879!$OMP END PARALLEL WORKSHARE 
     880         END IF 
    811881         CALL histwrite( nid_T, "sosafldp", it, zw2d          , ndim_hT, ndex_hT )   ! salt flux damping 
    812882      ENDIF 
     
    814884         CALL histwrite( nid_T, "sohefldp", it, qrp           , ndim_hT, ndex_hT )   ! heat flux damping 
    815885         CALL histwrite( nid_T, "sowafldp", it, erp           , ndim_hT, ndex_hT )   ! freshwater flux damping 
    816          IF( ln_ssr ) zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 
     886         IF( ln_ssr ) THEN 
     887!$OMP PARALLEL WORKSHARE 
     888            zw2d(:,:) = erp(:,:) * tsn(:,:,1,jp_sal) * tmask(:,:,1) 
     889!$OMP END PARALLEL WORKSHARE 
     890         END IF 
    817891         CALL histwrite( nid_T, "sosafldp", it, zw2d          , ndim_hT, ndex_hT )   ! salt flux damping 
    818892      ENDIF 
Note: See TracChangeset for help on using the changeset viewer.