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 9819 for branches/UKMO/dev_merge_2017_CICE_interface/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90 – NEMO

Ignore:
Timestamp:
2018-06-21T12:48:26+02:00 (6 years ago)
Author:
dancopsey
Message:

Added a bunch of fixes and a nemo2cice print statement.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_merge_2017_CICE_interface/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r9803 r9819  
    12461246      !                                                      !   ice skin temp.   ! 
    12471247      !                                                      ! ================== ! 
    1248 #if defined key_lim3 
     1248#if defined key_lim3 || defined key_cice 
    12491249      ! needed by Met Office 
    12501250      IF( srcv(jpr_ts_ice)%laction ) THEN  
     
    17151715      REAL(wp), DIMENSION(jpi,jpj)     ::   zemp_tot, zemp_ice, zemp_oce, ztprecip, zsprecip  , zevap_oce, zdevap_ice 
    17161716      REAL(wp), DIMENSION(jpi,jpj)     ::   zqns_tot, zqns_oce, zqsr_tot, zqsr_oce, zqprec_ice, zqemp_oce, zqemp_ice 
    1717       REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zqns_ice, zqsr_ice, zdqns_ice, zqevap_ice, zevap_ice    !!gm , zfrqsr_tr_i 
     1717      REAL(wp), DIMENSION(jpi,jpj,jpl) ::   zqns_ice, zqsr_ice, zdqns_ice, zqevap_ice    !!gm , zfrqsr_tr_i 
     1718      REAL(wp), DIMENSION(jpi,jpj)     ::   ztmp 
    17181719      !!---------------------------------------------------------------------- 
    17191720      ! 
     
    17351736         ztprecip(:,:) =   frcv(jpr_rain)%z3(:,:,1) + zsprecip(:,:)  ! May need to ensure positive here 
    17361737         zemp_tot(:,:) =   frcv(jpr_tevp)%z3(:,:,1) - ztprecip(:,:) 
     1738          
     1739#if defined key_cice 
     1740         IF ( TRIM(sn_rcv_emp%clcat) == 'yes' ) THEN 
     1741            ! zemp_ice is the sum of frcv(jpr_ievp)%z3(:,:,1) over all layers - snow 
     1742            zemp_ice(:,:) = - frcv(jpr_snow)%z3(:,:,1) 
     1743            DO jl=1,jpl 
     1744               zemp_ice(:,:   ) = zemp_ice(:,:) + frcv(jpr_ievp)%z3(:,:,jl) 
     1745            ENDDO 
     1746            ! latent heat coupled for each category in CICE 
     1747            zevap_ice(:,:,1:jpl) = - frcv(jpr_ievp)%z3(:,:,1:jpl) 
     1748         ELSE 
     1749            ! If CICE has multicategories it still expects coupling fields for 
     1750            ! each even if we treat as a single field 
     1751            ! The latent heat flux is split between the ice categories according 
     1752            ! to the fraction of the ice in each category 
     1753            zemp_ice(:,:) = frcv(jpr_ievp)%z3(:,:,1) - frcv(jpr_snow)%z3(:,:,1) 
     1754            WHERE ( ziceld(:,:) /= 0._wp )  
     1755               ztmp(:,:) = 1./ziceld(:,:) 
     1756            ELSEWHERE  
     1757               ztmp(:,:) = 0.e0 
     1758            END WHERE   
     1759            DO jl=1,jpl 
     1760               zevap_ice(:,:,jl) = - a_i(:,:,jl) * ztmp(:,:) * frcv(jpr_ievp)%z3(:,:,1) 
     1761            END DO 
     1762            WHERE ( ziceld(:,:) == 0._wp )  zevap_ice(:,:,1) = -frcv(jpr_ievp)%z3(:,:,1) 
     1763         ENDIF 
     1764          
     1765#else              
    17371766         zemp_ice(:,:) = ( frcv(jpr_ievp)%z3(:,:,1) - frcv(jpr_snow)%z3(:,:,1) ) * picefr(:,:) 
     1767#endif 
     1768 
    17381769      CASE( 'oce and ice'   )   ! received fields: jpr_sbpr, jpr_semp, jpr_oemp, jpr_ievp 
    17391770         zemp_tot(:,:) = ziceld(:,:) * frcv(jpr_oemp)%z3(:,:,1) + picefr(:,:) * frcv(jpr_sbpr)%z3(:,:,1) 
     
    19611992      ELSE 
    19621993         qns_tot(:,:  ) = zqns_tot(:,:  ) 
    1963          qns_ice(:,:,:) = zqns_ice(:,:,:) 
     1994         IF ( TRIM( sn_rcv_qsr%cldes ) /= 'oce only' ) qns_ice(:,:,:) = zqns_ice(:,:,:) 
    19641995      ENDIF 
    19651996 
     
    20432074      ELSE 
    20442075         qsr_tot(:,:  ) = zqsr_tot(:,:  ) 
    2045          IF ( TRIM( sn_rcv_qsr%cldes ) /= 'oce only' ) THEN 
    2046             qsr_ice(:,:,:) = zqsr_ice(:,:,:) 
    2047          ENDIF 
     2076         IF ( TRIM( sn_rcv_qsr%cldes ) /= 'oce only' ) qsr_ice(:,:,:) = zqsr_ice(:,:,:) 
    20482077      ENDIF 
    20492078 
     
    20702099      ENDIF 
    20712100 
    2072 #if defined key_lim3       
     2101#if defined key_lim3 || defined key_cice 
    20732102      !                                                      ! ========================= ! 
    20742103      SELECT CASE( TRIM( sn_rcv_iceflx%cldes ) )             !  ice topmelt and botmelt  ! 
Note: See TracChangeset for help on using the changeset viewer.