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 7753 for trunk/NEMOGCM/NEMO/OPA_SRC/ICB – NEMO

Ignore:
Timestamp:
2017-03-03T12:46:59+01:00 (7 years ago)
Author:
mocavero
Message:

Reverting trunk to remove OpenMP

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/ICB/icbini.F90

    r7698 r7753  
    8585      first_width (:) = SQRT(  rn_initial_mass(:) / ( rn_LoW_ratio * rn_rho_bergs * rn_initial_thickness(:) )  ) 
    8686      first_length(:) = rn_LoW_ratio * first_width(:) 
    87 !$OMP PARALLEL 
    88 !$OMP DO schedule(static) private(jj, ji) 
    89       DO jj = 1, jpj 
    90          DO ji = 1, jpi 
    91             berg_grid%calving      (ji,jj)   = 0._wp 
    92             berg_grid%calving_hflx (ji,jj)   = 0._wp 
    93             berg_grid%stored_heat  (ji,jj)   = 0._wp 
    94             berg_grid%floating_melt(ji,jj)   = 0._wp 
    95             berg_grid%maxclass     (ji,jj)   = nclasses 
    96             berg_grid%tmp          (ji,jj)   = 0._wp 
    97             src_calving            (ji,jj)   = 0._wp 
    98             src_calving_hflx       (ji,jj)   = 0._wp 
    99          END DO 
    100       END DO 
    101       DO jn = 1, nclasses 
    102 !$OMP DO schedule(static) private(jj, ji) 
    103          DO jj = 1, jpj 
    104             DO ji = 1, jpi 
    105                berg_grid%stored_ice   (ji,jj,jn) = 0._wp 
    106             END DO 
    107          END DO 
    108       END DO 
    109 !$OMP END PARALLEL 
     87 
     88      berg_grid%calving      (:,:)   = 0._wp 
     89      berg_grid%calving_hflx (:,:)   = 0._wp 
     90      berg_grid%stored_heat  (:,:)   = 0._wp 
     91      berg_grid%floating_melt(:,:)   = 0._wp 
     92      berg_grid%maxclass     (:,:)   = nclasses 
     93      berg_grid%stored_ice   (:,:,:) = 0._wp 
     94      berg_grid%tmp          (:,:)   = 0._wp 
     95      src_calving            (:,:)   = 0._wp 
     96      src_calving_hflx       (:,:)   = 0._wp 
     97 
    11098      !                          ! domain for icebergs 
    11199      IF( lk_mpp .AND. jpni == 1 )   CALL ctl_stop( 'icbinit: having ONE processor in x currently does not work' ) 
     
    120108      nicbfldproc(:) = -1 
    121109 
    122 !$OMP PARALLEL DO schedule(static) private(jj, ji) 
    123110      DO jj = 1, jpj 
    124111         DO ji = 1, jpi 
     
    231218         CALL flush(numicb) 
    232219      ENDIF 
    233 !$OMP PARALLEL DO schedule(static) private(jj, ji) 
    234       DO jj = 1, jpj 
    235          DO ji = 1, jpi 
    236             src_calving     (ji,jj) = 0._wp 
    237             src_calving_hflx(ji,jj) = 0._wp 
    238          END DO 
    239       END DO 
     220       
     221      src_calving     (:,:) = 0._wp 
     222      src_calving_hflx(:,:) = 0._wp 
     223 
    240224      ! assign each new iceberg with a unique number constructed from the processor number 
    241225      ! and incremented by the total number of processors 
     
    252236         IF( ivar > 0 ) THEN 
    253237            CALL iom_get  ( inum, jpdom_data, 'maxclass', src_calving )   ! read the max distribution array 
    254 !$OMP PARALLEL 
    255 !$OMP DO schedule(static) private(jj, ji) 
    256             DO jj = 1, jpj 
    257                DO ji = 1, jpi 
    258                   berg_grid%maxclass(ji,jj) = INT( src_calving(ji,jj) ) 
    259                END DO 
    260             END DO 
    261 !$OMP DO schedule(static) private(jj, ji) 
    262             DO jj = 1, jpj 
    263                DO ji = 1, jpi 
    264                   src_calving(ji,jj) = 0._wp 
    265                END DO 
    266             END DO 
    267 !$OMP END PARALLEL 
     238            berg_grid%maxclass(:,:) = INT( src_calving ) 
     239            src_calving(:,:) = 0._wp 
    268240         ENDIF 
    269241         CALL iom_close( inum )                                     ! close file 
Note: See TracChangeset for help on using the changeset viewer.