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 7508 for branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/LIM_SRC_2/limthd_2.F90 – NEMO

Ignore:
Timestamp:
2016-12-19T13:15:59+01:00 (7 years ago)
Author:
mocavero
Message:

changes on code duplication and workshare construct

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_r6519_HPC_4/NEMOGCM/NEMO/LIM_SRC_2/limthd_2.F90

    r7037 r7508  
    7676      INTEGER, INTENT(in) ::   kt     ! number of iteration 
    7777      ! 
    78       INTEGER  ::   ji, jj               ! dummy loop indices 
     78      INTEGER  ::   ji, jj, jk           ! dummy loop indices 
    7979      INTEGER  ::   nbpb                 ! nb of icy pts for thermo. cal. 
    8080      INTEGER  ::   nbpac                ! nb of pts for lateral accretion  
     
    121121       
    122122!!gm needed?  yes at least for some of these arrays  
     123      ztr_fram     = 0.e0   ! sea-ice transport through Fram strait 
    123124!$OMP PARALLEL 
    124 !$OMP WORKSHARE 
    125       zdvosif(:,:) = 0.e0   ! variation of ice volume at surface 
    126       zdvobif(:,:) = 0.e0   ! variation of ice volume at bottom 
    127       zdvolif(:,:) = 0.e0   ! total variation of ice volume 
    128       zdvonif(:,:) = 0.e0   ! transformation of snow to sea-ice volume 
    129       zlicegr(:,:) = 0.e0   ! lateral variation of ice volume 
    130       zdvomif(:,:) = 0.e0   ! variation of ice volume at bottom due to melting only 
    131       ztr_fram     = 0.e0   ! sea-ice transport through Fram strait 
    132       fstric (:,:) = 0.e0   ! part of solar radiation absorbing inside the ice 
    133       fscmbq (:,:) = 0.e0   ! linked with fstric 
    134       ffltbif(:,:) = 0.e0   ! linked with fstric 
    135       qfvbq  (:,:) = 0.e0   ! linked with fstric 
    136       rdm_snw(:,:) = 0.e0   ! variation of snow mass over 1 time step 
    137       rdq_snw(:,:) = 0.e0   ! heat content associated with rdm_snw 
    138       rdm_ice(:,:) = 0.e0   ! variation of ice mass over 1 time step 
    139       rdq_ice(:,:) = 0.e0   ! heat content associated with rdm_ice 
    140       zmsk (:,:,:) = 0.e0 
    141 !$OMP END WORKSHARE NOWAIT 
     125!$OMP DO schedule(static) private(jj,ji) 
     126      DO jj = 1, jpj 
     127         DO ji = 1, jpi 
     128            zdvosif(ji,jj) = 0.e0   ! variation of ice volume at surface 
     129            zdvobif(ji,jj) = 0.e0   ! variation of ice volume at bottom 
     130            zdvolif(ji,jj) = 0.e0   ! total variation of ice volume 
     131            zdvonif(ji,jj) = 0.e0   ! transformation of snow to sea-ice volume 
     132            zlicegr(ji,jj) = 0.e0   ! lateral variation of ice volume 
     133            zdvomif(ji,jj) = 0.e0   ! variation of ice volume at bottom due to melting only 
     134            fstric (ji,jj) = 0.e0   ! part of solar radiation absorbing inside the ice 
     135            fscmbq (ji,jj) = 0.e0   ! linked with fstric 
     136            ffltbif(ji,jj) = 0.e0   ! linked with fstric 
     137            qfvbq  (ji,jj) = 0.e0   ! linked with fstric 
     138            rdm_snw(ji,jj) = 0.e0   ! variation of snow mass over 1 time step 
     139            rdq_snw(ji,jj) = 0.e0   ! heat content associated with rdm_snw 
     140            rdm_ice(ji,jj) = 0.e0   ! variation of ice mass over 1 time step 
     141            rdq_ice(ji,jj) = 0.e0   ! heat content associated with rdm_ice 
     142         END DO 
     143      END DO 
     144!$OMP END DO NOWAIT 
     145!$OMP DO schedule(static) private(jk,jj,ji) 
     146      DO jk = 1, jpk 
     147         DO jj = 1, jpj 
     148            DO ji = 1, jpi 
     149               zmsk (ji,jj,jk) = 0.e0 
     150            END DO 
     151         END DO 
     152      END DO 
     153!$OMP END DO NOWAIT 
    142154 
    143155      ! set to zero snow thickness smaller than epsi04 
     
    434446            fr_i  (ji,jj) = 1.0 - frld(ji,jj)   
    435447            hicifp(ji,jj) = hicif(ji,jj) * fr_i(ji,jj) - hicifp(ji,jj) 
     448            ztmp(ji,jj) = 1. - pfrld(ji,jj)                              ! fraction of ice after the dynamic, before the thermodynamic 
    436449         END DO 
    437450      END DO 
     
    439452      ! Outputs 
    440453      !-------------------------------------------------------------------------------- 
    441       ztmp(:,:) = 1. - pfrld(:,:)                                ! fraction of ice after the dynamic, before the thermodynamic 
    442454      IF( iom_use('ist_cea'    ) )   CALL iom_put( 'ist_cea', (sist(:,:) - rt0) * ztmp(:,:) )   ! Ice surface temperature   [Celius] 
    443455      IF( iom_use('qsr_ai_cea' ) )   CALL iom_put( 'qsr_ai_cea', qsr_ice(:,:,1) * ztmp(:,:) )   ! Solar flux over the ice     [W/m2] 
Note: See TracChangeset for help on using the changeset viewer.