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 6808 for branches/NERC/dev_r5549_BDY_ZEROGRAD/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90 – NEMO

Ignore:
Timestamp:
2016-07-19T10:38:35+02:00 (8 years ago)
Author:
jamesharle
Message:

merge with trunk@6232 for consistency with SSB code

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/NERC/dev_r5549_BDY_ZEROGRAD/NEMOGCM/NEMO/OPA_SRC/SBC/sbcfwb.F90

    r5120 r6808  
    1212 
    1313   !!---------------------------------------------------------------------- 
    14    !!   sbc_fwb      : freshwater budget for global ocean configurations 
    15    !!                  in free surface and forced mode 
    16    !!---------------------------------------------------------------------- 
    17    USE oce             ! ocean dynamics and tracers 
    18    USE dom_oce         ! ocean space and time domain 
    19    USE sbc_oce         ! surface ocean boundary condition 
    20    USE phycst          ! physical constants 
    21    USE sbcrnf          ! ocean runoffs 
    22    USE sbcisf          ! ice shelf melting contribution 
    23    USE sbcssr          ! SS damping terms 
    24    USE in_out_manager  ! I/O manager 
    25    USE lib_mpp         ! distribued memory computing library 
    26    USE wrk_nemo        ! work arrays 
    27    USE timing          ! Timing 
    28    USE lbclnk          ! ocean lateral boundary conditions 
    29    USE lib_fortran 
     14   !!   sbc_fwb       : freshwater budget for global ocean configurations (free surface & forced mode) 
     15   !!---------------------------------------------------------------------- 
     16   USE oce            ! ocean dynamics and tracers 
     17   USE dom_oce        ! ocean space and time domain 
     18   USE sbc_oce        ! surface ocean boundary condition 
     19   USE phycst         ! physical constants 
     20   USE sbcrnf         ! ocean runoffs 
     21   USE sbcisf         ! ice shelf melting contribution 
     22   USE sbcssr         ! Sea-Surface damping terms 
     23   ! 
     24   USE in_out_manager ! I/O manager 
     25   USE lib_mpp        ! distribued memory computing library 
     26   USE wrk_nemo       ! work arrays 
     27   USE timing         ! Timing 
     28   USE lbclnk         ! ocean lateral boundary conditions 
     29   USE lib_fortran    !  
    3030 
    3131   IMPLICIT NONE 
     
    4040 
    4141   !! * Substitutions 
    42 #  include "domzgr_substitute.h90" 
    4342#  include "vectopt_loop_substitute.h90" 
    4443   !!---------------------------------------------------------------------- 
     
    108107         ! 
    109108         IF( MOD( kt-1, kn_fsbc ) == 0 ) THEN 
    110             z_fwf = glob_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + rdivisf * fwfisf(:,:) - snwice_fmass(:,:) ) ) / area   ! sum over the global domain 
     109            z_fwf = glob_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf(:,:) - snwice_fmass(:,:) ) ) / area   ! sum over the global domain 
    111110            zcoef = z_fwf * rcp 
    112111            emp(:,:) = emp(:,:) - z_fwf              * tmask(:,:,1) 
     
    129128         ENDIF    
    130129         !                                         ! Update fwfold if new year start 
    131          ikty = 365 * 86400 / rdttra(1)    !!bug  use of 365 days leap year or 360d year !!!!!!! 
     130         ikty = 365 * 86400 / rdt                  !!bug  use of 365 days leap year or 360d year !!!!!!! 
    132131         IF( MOD( kt, ikty ) == 0 ) THEN 
    133132            a_fwb_b = a_fwb                           ! mean sea level taking into account the ice+snow 
     
    162161            zsurf_pos = glob_sum( e1e2t(:,:)*ztmsk_pos(:,:) ) 
    163162            !                                                  ! fwf global mean (excluding ocean to ice/snow exchanges)  
    164             z_fwf     = glob_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + rdivisf * fwfisf(:,:) - snwice_fmass(:,:) ) ) / area 
     163            z_fwf     = glob_sum( e1e2t(:,:) * ( emp(:,:) - rnf(:,:) + fwfisf(:,:) - snwice_fmass(:,:) ) ) / area 
    165164            !             
    166165            IF( z_fwf < 0._wp ) THEN         ! spread out over >0 erp area to increase evaporation 
Note: See TracChangeset for help on using the changeset viewer.