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/SBC/sbcrnf.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/SBC/sbcrnf.F90

    r6460 r7037  
    124124         !                                                     ! set temperature & salinity content of runoffs 
    125125         IF( ln_rnf_tem ) THEN                                       ! use runoffs temperature data 
     126!$OMP PARALLEL WORKSHARE 
    126127            rnf_tsc(:,:,jp_tem) = ( sf_t_rnf(1)%fnow(:,:,1) ) * rnf(:,:) * r1_rau0 
     128!$OMP END PARALLEL WORKSHARE 
    127129            CALL eos_fzp( sss_m(:,:), ztfrz(:,:) ) 
     130!$OMP PARALLEL WORKSHARE 
    128131            WHERE( sf_t_rnf(1)%fnow(:,:,1) == -999._wp )             ! if missing data value use SST as runoffs temperature 
    129132               rnf_tsc(:,:,jp_tem) = sst_m(:,:) * rnf(:,:) * r1_rau0 
     
    132135               rnf_tsc(:,:,jp_tem) = ztfrz(:,:) * rnf(:,:) * r1_rau0 - rnf(:,:) * rlfusisf * r1_rau0_rcp 
    133136            END WHERE 
     137!$OMP END PARALLEL WORKSHARE 
    134138         ELSE                                                        ! use SST as runoffs temperature 
     139!$OMP PARALLEL WORKSHARE 
    135140            rnf_tsc(:,:,jp_tem) = sst_m(:,:) * rnf(:,:) * r1_rau0 
     141!$OMP END PARALLEL WORKSHARE 
    136142         ENDIF 
    137143         !                                                           ! use runoffs salinity data 
    138          IF( ln_rnf_sal )   rnf_tsc(:,:,jp_sal) = ( sf_s_rnf(1)%fnow(:,:,1) ) * rnf(:,:) * r1_rau0 
     144         IF( ln_rnf_sal ) THEN 
     145!$OMP PARALLEL WORKSHARE 
     146            rnf_tsc(:,:,jp_sal) = ( sf_s_rnf(1)%fnow(:,:,1) ) * rnf(:,:) * r1_rau0 
     147!$OMP END PARALLEL WORKSHARE 
     148         END IF 
    139149         !                                                           ! else use S=0 for runoffs (done one for all in the init) 
    140150         CALL iom_put( "runoffs", rnf )         ! output runoffs arrays 
     
    152162         ELSE                                                   !* no restart: set from nit000 values 
    153163            IF(lwp) WRITE(numout,*) '          nit000-1 runoff forcing fields set to nit000' 
     164!$OMP PARALLEL WORKSHARE 
    154165            rnf_b    (:,:  ) = rnf    (:,:  ) 
    155166            rnf_tsc_b(:,:,:) = rnf_tsc(:,:,:) 
     167!$OMP END PARALLEL WORKSHARE 
    156168         ENDIF 
    157169      ENDIF 
     
    197209            DO jj = 1, jpj 
    198210               DO ji = 1, jpi 
     211!$OMP PARALLEL DO schedule(static) private(jk) 
    199212                  DO jk = 1, nk_rnf(ji,jj) 
    200213                     phdivn(ji,jj,jk) = phdivn(ji,jj,jk) - ( rnf(ji,jj) + rnf_b(ji,jj) ) * zfact * r1_rau0 / h_rnf(ji,jj) 
     
    203216            END DO 
    204217         ELSE                    !* variable volume case 
     218!$OMP PARALLEL 
    205219            DO jj = 1, jpj                   ! update the depth over which runoffs are distributed 
    206220               DO ji = 1, jpi 
    207221                  h_rnf(ji,jj) = 0._wp 
     222!$OMP DO schedule(static) private(jk) 
    208223                  DO jk = 1, nk_rnf(ji,jj)                           ! recalculates h_rnf to be the depth in metres 
    209224                     h_rnf(ji,jj) = h_rnf(ji,jj) + e3t_n(ji,jj,jk)   ! to the bottom of the relevant grid box 
    210225                  END DO 
    211226                  !                          ! apply the runoff input flow 
     227!$OMP DO schedule(static) private(jk) 
    212228                  DO jk = 1, nk_rnf(ji,jj) 
    213229                     phdivn(ji,jj,jk) = phdivn(ji,jj,jk) - ( rnf(ji,jj) + rnf_b(ji,jj) ) * zfact * r1_rau0 / h_rnf(ji,jj) 
    214230                  END DO 
     231!$OMP END DO NOWAIT 
    215232               END DO 
    216233            END DO 
     234!$OMP END PARALLEL 
    217235         ENDIF 
    218236      ELSE                       !==   runoff put only at the surface   ==! 
     237!$OMP PARALLEL WORKSHARE 
    219238         h_rnf (:,:)   = e3t_n (:,:,1)        ! update h_rnf to be depth of top box 
    220239         phdivn(:,:,1) = phdivn(:,:,1) - ( rnf(:,:) + rnf_b(:,:) ) * zfact * r1_rau0 / e3t_n(:,:,1) 
     240!$OMP END PARALLEL WORKSHARE 
    221241      ENDIF 
    222242      ! 
     
    256276         ln_rnf_mouth  = .FALSE.                   ! default definition needed for example by sbc_ssr or by tra_adv_muscl 
    257277         nkrnf         = 0 
     278!$OMP PARALLEL WORKSHARE 
    258279         rnf     (:,:) = 0.0_wp 
    259280         rnf_b   (:,:) = 0.0_wp 
    260281         rnfmsk  (:,:) = 0.0_wp 
    261282         rnfmsk_z(:)   = 0.0_wp 
     283!$OMP END PARALLEL WORKSHARE 
    262284         RETURN 
    263285      ENDIF 
     
    357379            DO ji = 1, jpi 
    358380               h_rnf(ji,jj) = 0._wp 
     381!$OMP PARALLEL DO schedule(static) private(jk) 
    359382               DO jk = 1, nk_rnf(ji,jj) 
    360383                  h_rnf(ji,jj) = h_rnf(ji,jj) + e3t_n(ji,jj,jk) 
     
    415438            DO ji = 1, jpi 
    416439               h_rnf(ji,jj) = 0._wp 
     440!$OMP PARALLEL DO schedule(static) private(jk) 
    417441               DO jk = 1, nk_rnf(ji,jj) 
    418442                  h_rnf(ji,jj) = h_rnf(ji,jj) + e3t_n(ji,jj,jk) 
     
    432456      ENDIF 
    433457      ! 
     458!$OMP PARALLEL WORKSHARE 
    434459      rnf(:,:) =  0._wp                         ! runoff initialisation 
    435460      rnf_tsc(:,:,:) = 0._wp                    ! runoffs temperature & salinty contents initilisation 
     461!$OMP END PARALLEL WORKSHARE 
    436462      ! 
    437463      !                                   ! ======================== 
Note: See TracChangeset for help on using the changeset viewer.