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 5486 – NEMO

Changeset 5486


Ignore:
Timestamp:
2015-06-25T10:22:19+02:00 (9 years ago)
Author:
clem
Message:

critical bug fix for coupling with LIM3. qsr_oce was not defined but used anyway in the ice thermodynamics

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r5410 r5486  
    780780      xcplmask(:,:,0) = 1. - SUM( xcplmask(:,:,1:nn_cplmodel), dim = 3 ) 
    781781      ! 
    782       ncpl_qsr_freq = cpl_freq( 'O_QsrOce' ) + cpl_freq( 'O_QsrMix' ) + cpl_freq( 'S_QsrOce' ) + cpl_freq( 'S_QsrMix' ) 
     782      ncpl_qsr_freq = cpl_freq( 'O_QsrOce' ) + cpl_freq( 'O_QsrMix' ) + cpl_freq( 'I_QsrOce' ) + cpl_freq( 'I_QsrMix' ) 
    783783      IF( ln_dm2dc .AND. ln_cpl .AND. ncpl_qsr_freq /= 86400 )   & 
    784784         &   CALL ctl_stop( 'sbc_cpl_init: diurnal cycle reconstruction (ln_dm2dc) needs daily couping for solar radiation' ) 
     
    13791379      REAL(wp), POINTER, DIMENSION(:,:  ) ::   zemp_tot, zemp_ice, zsprecip, ztprecip, zqns_tot, zqsr_tot 
    13801380      REAL(wp), POINTER, DIMENSION(:,:,:) ::   zqns_ice, zqsr_ice, zdqns_ice 
    1381       REAL(wp), POINTER, DIMENSION(:,:  ) ::   zevap, zsnw, zqns_oce, zqprec_ice, zqemp_oce ! for LIM3 
     1381      REAL(wp), POINTER, DIMENSION(:,:  ) ::   zevap, zsnw, zqns_oce, zqsr_oce, zqprec_ice, zqemp_oce ! for LIM3 
    13821382      !!---------------------------------------------------------------------- 
    13831383      ! 
     
    15561556 
    15571557      CALL wrk_dealloc( jpi,jpj, zevap, zsnw, zqns_oce, zqprec_ice, zqemp_oce )  
    1558  
    15591558#else 
    15601559 
     
    16241623         ENDDO 
    16251624      ENDIF 
     1625 
     1626#if defined key_lim3 
     1627      CALL wrk_alloc( jpi,jpj, zqsr_oce )  
     1628      ! --- solar flux over ocean --- ! 
     1629      !         note: p_frld cannot be = 0 since we limit the ice concentration to amax 
     1630      zqsr_oce = 0._wp 
     1631      WHERE( p_frld /= 0._wp )  zqsr_oce(:,:) = ( zqsr_tot(:,:) - SUM( a_i * zqsr_ice, dim=3 ) ) / p_frld(:,:) 
     1632 
     1633      IF( ln_mixcpl ) THEN   ;   qsr_oce(:,:) = qsr_oce(:,:) * xcplmask(:,:,0) +  zqsr_oce(:,:)* zmsk(:,:) 
     1634      ELSE                   ;   qsr_oce(:,:) = zqsr_oce(:,:)   ;   ENDIF 
     1635 
     1636      CALL wrk_dealloc( jpi,jpj, zqsr_oce )  
     1637#endif 
    16261638 
    16271639      IF( ln_mixcpl ) THEN 
Note: See TracChangeset for help on using the changeset viewer.