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 991 for branches/dev_003_CPL/NEMO/LIM_SRC_2/limthd_zdf_2.F90 – NEMO

Ignore:
Timestamp:
2008-05-23T17:55:55+02:00 (16 years ago)
Author:
smasson
Message:

dev_003_CPL: preliminary draft (not working), see ticket #155

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev_003_CPL/NEMO/LIM_SRC_2/limthd_zdf_2.F90

    r888 r991  
    213213          zghe     = ( 1.0 - zihe ) * zheshth * ( 2.0 - zheshth )   & 
    214214             &     +         zihe   * 0.5 * ( 1.5 + LOG( 2.0 * zheshth ) ) 
    215 #if defined key_lim_cp3 
    216           zghe = 1.0 
    217 #endif  
    218215 
    219216          !---effective conductivities  
     
    297294       DO ji = kideb, kiut 
    298295          !---computation of the derivative of energy balance function  
    299 #if defined key_coupled 
    300 #   if defined key_lim_cp2 
    301           zdfts   =   zksndh(ji)   & ! contribution of the conductive heat flux 
    302              &      + zrcpdt(ji)   & ! contribution of hsu * rcp / dt 
    303              &      - dqns_ice_1d(ji)      ! contribution of the total non solar radiation  
    304 #   else 
    305           zdfts   =   zksndh(ji)   & ! contribution of the conductive heat flux 
    306              &      + zrcpdt(ji)    ! contribution of hsu * rcp / dt 
    307 #   endif 
    308  
    309 #else 
    310296          zdfts    =  zksndh(ji)   & ! contribution of the conductive heat flux 
    311297             &      + zrcpdt(ji)   & ! contribution of hsu * rcp / dt 
    312298             &      - dqns_ice_1d (ji)     ! contribution of the total non solar radiation  
    313 #endif 
    314299          !---computation of the energy balance function  
    315300          zfts    = - z1mi0 (ji) * qsr_ice_1d(ji)   & ! net absorbed solar radiation 
     
    318303          !---computation of surface temperature increment   
    319304          zdts    = -zfts / zdfts 
    320 #if defined key_lim_cp3 
    321           zdts = zdts / 3.0 
    322 #endif 
    323305          !---computation of the new surface temperature  
    324306          sist_1d(ji) = sist_1d(ji) + zdts 
     
    340322       DO ji = kideb, kiut 
    341323          sist_1d(ji) = MIN( ztsmlt(ji) , sist_1d(ji) ) 
    342 #if ! defined key_coupled 
    343           qns_ice_1d(ji) = qns_ice_1d(ji) + dqns_ice_1d(ji) * ( sist_1d(ji) - zts_old(ji) ) 
    344           qla_ice_1d (ji) = qla_ice_1d (ji) + dqla_ice_1d(ji) * ( sist_1d(ji) - zts_old(ji) ) 
    345 #endif 
     324          IF ( .NOT. lk_cpl ) THEN 
     325             qns_ice_1d(ji) = qns_ice_1d(ji) + dqns_ice_1d(ji) * ( sist_1d(ji) - zts_old(ji) ) 
     326             qla_ice_1d(ji) = qla_ice_1d(ji) + dqla_ice_1d(ji) * ( sist_1d(ji) - zts_old(ji) ) 
     327          ENDIF 
    346328          zfcsu(ji)  = zksndh(ji) * ( ztbif(ji) - sist_1d(ji) ) 
    347329       END DO 
     
    542524          !----------------------------------------------------------------------- 
    543525          !----change in snow and ice thicknesses due to sublimation or evaporation 
    544           zdhssub  = parsub * ( qla_ice_1d(ji) / ( rhosn * xsn ) ) * rdt_ice  
     526          IF ( .NOT. lk_cpl ) THEN  
     527             zdhssub  = parsub * ( qla_ice_1d(ji) / ( rhosn * xsn ) ) * rdt_ice  
     528          ELSE IF (parsub == 1) THEN  
     529             CALL ctl_stop( 'In coupled mode, use parsub = 0 or send dqla' )  
     530          ELSE 
     531             zdhssub  = 0.0 
     532          ENDIF 
    545533          zhsn     = h_snow_1d(ji) - zdhssub 
    546534          zdhisub  = MAX( zzero , -zhsn ) * rhosn/rhoic 
Note: See TracChangeset for help on using the changeset viewer.