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 15574 for NEMO/branches/2021/dev_r14318_RK3_stage1/src/OCE/SBC/sbcrnf.F90 – NEMO

Ignore:
Timestamp:
2021-12-03T20:32:50+01:00 (3 years ago)
Author:
techene
Message:

#2605 #2715 trunk merged into dev_r14318_RK3_stage1

Location:
NEMO/branches/2021/dev_r14318_RK3_stage1
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2021/dev_r14318_RK3_stage1

    • Property svn:externals
      •  

        old new  
        99 
        1010# SETTE 
        11 ^/utils/CI/sette@14244        sette 
         11^/utils/CI/sette@HEAD        sette 
         12 
  • NEMO/branches/2021/dev_r14318_RK3_stage1/src/OCE/SBC/sbcrnf.F90

    r14993 r15574  
    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 / 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 
    217222                  h_rnf(ji,jj) = h_rnf(ji,jj) + e3t(ji,jj,jk,Kmm)   ! to the bottom of the relevant grid box 
    218223               END DO 
    219                !                          ! apply the runoff input flow 
     224            END_2D 
     225            DO_2D_OVR( nn_hls-1, nn_hls, nn_hls-1, nn_hls )         ! apply the runoff input flow 
    220226               DO jk = 1, nk_rnf(ji,jj) 
    221227                  phdivn(ji,jj,jk) = phdivn(ji,jj,jk) - ( rnf(ji,jj) + rnf_b(ji,jj) ) * zfact / h_rnf(ji,jj) 
     
    224230         ENDIF 
    225231      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 / e3t(:,:,1,Kmm) 
     232         DO_2D_OVR( nn_hls, nn_hls, nn_hls, nn_hls ) 
     233            h_rnf (ji,jj)   = e3t(ji,jj,1,Kmm)        ! update h_rnf to be depth of top box 
     234         END_2D 
     235         DO_2D_OVR( nn_hls-1, nn_hls, nn_hls-1, nn_hls ) 
     236            phdivn(ji,jj,1) = phdivn(ji,jj,1) - ( rnf(ji,jj) + rnf_b(ji,jj) ) * zfact / e3t(ji,jj,1,Kmm) 
     237         END_2D 
    228238      ENDIF 
    229239      ! 
     
    358368         ! 
    359369         nk_rnf(:,:) = 0                               ! set the number of level over which river runoffs are applied 
    360          DO_2D( 1, 1, 1, 1 ) 
     370         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    361371            IF( h_rnf(ji,jj) > 0._wp ) THEN 
    362372               jk = 2 
     
    371381            ENDIF 
    372382         END_2D 
    373          DO_2D( 1, 1, 1, 1 )                           ! set the associated depth 
     383         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )                           ! set the associated depth 
    374384            h_rnf(ji,jj) = 0._wp 
    375385            DO jk = 1, nk_rnf(ji,jj) 
     
    401411         WHERE( zrnfcl(:,:,1) > 0._wp )  h_rnf(:,:) = zacoef * zrnfcl(:,:,1)   ! compute depth for all runoffs 
    402412         ! 
    403          DO_2D( 1, 1, 1, 1 )                ! take in account min depth of ocean rn_hmin 
     413         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )                ! take in account min depth of ocean rn_hmin 
    404414            IF( zrnfcl(ji,jj,1) > 0._wp ) THEN 
    405415               jk = mbkt(ji,jj) 
     
    409419         ! 
    410420         nk_rnf(:,:) = 0                       ! number of levels on which runoffs are distributed 
    411          DO_2D( 1, 1, 1, 1 ) 
     421         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 
    412422            IF( zrnfcl(ji,jj,1) > 0._wp ) THEN 
    413423               jk = 2 
     
    420430         END_2D 
    421431         ! 
    422          DO_2D( 1, 1, 1, 1 )                          ! set the associated depth 
     432         DO_2D( nn_hls, nn_hls, nn_hls, nn_hls )                          ! set the associated depth 
    423433            h_rnf(ji,jj) = 0._wp 
    424434            DO jk = 1, nk_rnf(ji,jj) 
     
    509519      ! 
    510520      cl_rnfile = TRIM( cn_dir )//TRIM( sn_cnf%clname ) 
    511       IF( .NOT. sn_cnf%ln_clim ) THEN   ;   WRITE(cl_rnfile, '(a,"_y",i4)' ) TRIM( cl_rnfile ), nyear    ! add year 
    512          IF( sn_cnf%clftyp == 'monthly' )   WRITE(cl_rnfile, '(a,"m",i2)' ) TRIM( cl_rnfile ), nmonth   ! add month 
     521      IF( .NOT. sn_cnf%ln_clim ) THEN   ;   WRITE(cl_rnfile, '(a,"_y",i4.4)' ) TRIM( cl_rnfile ), nyear    ! add year 
     522         IF( sn_cnf%clftyp == 'monthly' )   WRITE(cl_rnfile, '(a,"m" ,i2.2)' ) TRIM( cl_rnfile ), nmonth   ! add month 
    513523      ENDIF 
    514524      ! 
Note: See TracChangeset for help on using the changeset viewer.