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 14986 for NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/SBC/sbcrnf.F90 – NEMO

Ignore:
Timestamp:
2021-06-14T13:34:08+02:00 (3 years ago)
Author:
sparonuz
Message:

Merge trunk -r14984:HEAD

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r14116_HPC-10_mcastril_Mixed_Precision_implementation/src/OCE/SBC/sbcrnf.F90

    r14072 r14986  
    131131             IF( ln_rnf_icb ) THEN 
    132132                fwficb(:,:) = rn_rfact * ( sf_i_rnf(1)%fnow(:,:,1) ) * tmask(:,:,1)  ! updated runoff value at time step kt 
    133                 CALL iom_put( 'iceberg_cea'  , fwficb(:,:)  )         ! output iceberg flux 
    134                 CALL iom_put( 'hflx_icb_cea' , fwficb(:,:) * rLfus )   ! output Heat Flux into Sea Water due to Iceberg Thermodynamics --> 
     133                rnf(:,:) = rnf(:,:) + fwficb(:,:) 
     134                qns(:,:) = qns(:,:) - fwficb(:,:) * rLfus 
     135                !!qns_tot(:,:) = qns_tot(:,:) - fwficb(:,:) * rLfus                 
     136                !!qns_oce(:,:) = qns_oce(:,:) - fwficb(:,:) * rLfus                 
     137                CALL iom_put( 'iceberg_cea'  ,  fwficb(:,:)  )          ! output iceberg flux 
     138                CALL iom_put( 'hflx_icb_cea' , -fwficb(:,:) * rLfus )   ! output Heat Flux into Sea Water due to Iceberg Thermodynamics --> 
    135139             ENDIF 
    136140         ENDIF 
     
    152156                                         CALL iom_put( 'runoffs'     , rnf(:,:)                         )   ! output runoff mass flux 
    153157         IF( iom_use('hflx_rnf_cea') )   CALL iom_put( 'hflx_rnf_cea', rnf_tsc(:,:,jp_tem) * rho0 * rcp )   ! output runoff sensible heat (W/m2) 
     158         IF( iom_use('sflx_rnf_cea') )   CALL iom_put( 'sflx_rnf_cea', rnf_tsc(:,:,jp_sal) * rho0       )   ! output runoff salt flux (g/m2/s) 
    154159      ENDIF 
    155160      ! 
     
    206211      IF( ln_rnf_depth .OR. ln_rnf_depth_ini ) THEN      !==   runoff distributed over several levels   ==! 
    207212         IF( ln_linssh ) THEN    !* constant volume case : just apply the runoff input flow 
    208             DO_2D( 1, 1, 1, 1 ) 
     213            DO_2D_OVR( nn_hls-1, nn_hls, nn_hls-1, nn_hls ) 
    209214               DO jk = 1, nk_rnf(ji,jj) 
    210215                  phdivn(ji,jj,jk) = phdivn(ji,jj,jk) - ( rnf(ji,jj) + rnf_b(ji,jj) ) * zfact * r1_rho0 / h_rnf(ji,jj) 
     
    212217            END_2D 
    213218         ELSE                    !* variable volume case 
    214             DO_2D( 1, 1, 1, 1 )              ! update the depth over which runoffs are distributed 
     219            DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls )         ! update the depth over which runoffs are distributed 
    215220               h_rnf(ji,jj) = 0._wp 
    216221               DO jk = 1, nk_rnf(ji,jj)                             ! recalculates h_rnf to be the depth in metres 
     
    224229         ENDIF 
    225230      ELSE                       !==   runoff put only at the surface   ==! 
    226          h_rnf (:,:)   = e3t (:,:,1,Kmm)        ! update h_rnf to be depth of top box 
    227          phdivn(:,:,1) = phdivn(:,:,1) - ( rnf(:,:) + rnf_b(:,:) ) * zfact * r1_rho0 / e3t(:,:,1,Kmm) 
     231         DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls ) 
     232            h_rnf (ji,jj)   = e3t (ji,jj,1,Kmm)        ! update h_rnf to be depth of top box 
     233            phdivn(ji,jj,1) = phdivn(ji,jj,1) - ( rnf(ji,jj) + rnf_b(ji,jj) ) * zfact * r1_rho0 / e3t(ji,jj,1,Kmm) 
     234         END_2D 
    228235      ENDIF 
    229236      ! 
     
    358365         ! 
    359366         nk_rnf(:,:) = 0                               ! set the number of level over which river runoffs are applied 
    360          DO_2D( 1, 1, 1, 1 ) 
     367         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    361368            IF( h_rnf(ji,jj) > 0._wp ) THEN 
    362369               jk = 2 
     
    371378            ENDIF 
    372379         END_2D 
    373          DO_2D( 1, 1, 1, 1 )                           ! set the associated depth 
     380         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )                           ! set the associated depth 
    374381            h_rnf(ji,jj) = 0._wp 
    375382            DO jk = 1, nk_rnf(ji,jj) 
     
    401408         WHERE( zrnfcl(:,:,1) > 0._wp )  h_rnf(:,:) = zacoef * zrnfcl(:,:,1)   ! compute depth for all runoffs 
    402409         ! 
    403          DO_2D( 1, 1, 1, 1 )                ! take in account min depth of ocean rn_hmin 
     410         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )                ! take in account min depth of ocean rn_hmin 
    404411            IF( zrnfcl(ji,jj,1) > 0._wp ) THEN 
    405412               jk = mbkt(ji,jj) 
     
    409416         ! 
    410417         nk_rnf(:,:) = 0                       ! number of levels on which runoffs are distributed 
    411          DO_2D( 1, 1, 1, 1 ) 
     418         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    412419            IF( zrnfcl(ji,jj,1) > 0._wp ) THEN 
    413420               jk = 2 
     
    420427         END_2D 
    421428         ! 
    422          DO_2D( 1, 1, 1, 1 )                          ! set the associated depth 
     429         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )                          ! set the associated depth 
    423430            h_rnf(ji,jj) = 0._wp 
    424431            DO jk = 1, nk_rnf(ji,jj) 
Note: See TracChangeset for help on using the changeset viewer.