Changeset 13177


Ignore:
Timestamp:
2020-06-29T18:50:21+02:00 (5 weeks ago)
Author:
smueller
Message:

Replacement of hard-coded constants with model variables and modification of the adjustment-update synchronization in option 2 of the freshwater-budget adjustment mechanism (see ticket #2487)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/ticket2487/src/OCE/SBC/sbcfwb.F90

    r10570 r13177  
    125125            IF(lwp)WRITE(numout,*)'          year = ',iyear-1, ' freshwater budget read       = ', a_fwb 
    126126            IF(lwp)WRITE(numout,*)'          year = ',iyear-2, ' freshwater budget read       = ', a_fwb_b 
    127          ENDIF    
    128          !                                         ! Update fwfold if new year start 
    129          ikty = 365 * 86400 / rdt                  !!bug  use of 365 days leap year or 360d year !!!!!!! 
    130          IF( MOD( kt, ikty ) == 0 ) THEN 
     127         ELSEIF( ( nday_year == 1 ) .AND. ( nsec_day == NINT( 0.5_wp * rdt ) ) ) THEN   ! Update fwfold at the start of 1 January 
    131128            a_fwb_b = a_fwb                           ! mean sea level taking into account the ice+snow 
    132129                                                      ! sum over the global domain 
    133130            a_fwb   = glob_sum( 'sbcfwb', e1e2t(:,:) * ( sshn(:,:) + snwice_mass(:,:) * r1_rau0 ) ) 
    134             a_fwb   = a_fwb * 1.e+3 / ( area * rday * 365. )     ! convert in Kg/m3/s = mm/s 
    135 !!gm        !                                                      !!bug 365d year  
     131            a_fwb   = a_fwb * rau0 / ( area * rday * nyear_len(1) )   ! convert in kg/m3/s 
    136132            fwfold =  a_fwb                           ! current year freshwater budget correction 
    137133            !                                         ! estimate from the previous year budget 
Note: See TracChangeset for help on using the changeset viewer.