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 5026 for branches/2015/dev_r5021_UKMO1_CICE_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90 – NEMO

Ignore:
Timestamp:
2015-01-14T12:48:38+01:00 (9 years ago)
Author:
timgraham
Message:

First set of changes for multicategory coupling with CICE

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2015/dev_r5021_UKMO1_CICE_coupling/NEMOGCM/NEMO/OPA_SRC/SBC/sbccpl.F90

    r5009 r5026  
    4343#if defined key_cpl_carbon_cycle 
    4444   USE p4zflx, ONLY : oce_co2 
    45 #endif 
    46 #if defined key_cice 
    47    USE ice_domain_size, only: ncat 
    4845#endif 
    4946   IMPLICIT NONE 
     
    367364      CASE default              ;   CALL ctl_stop( 'sbc_cpl_init: wrong definition of sn_rcv_emp%cldes' ) 
    368365      END SELECT 
    369  
     366      !Set the number of categories for coupling of sublimation 
     367      IF ( TRIM( sn_rcv_emp%clcat ) == 'yes' ) srcv(jpr_ievp)%nct = jpl 
     368      ! 
    370369      !                                                      ! ------------------------- ! 
    371370      !                                                      !     Runoffs & Calving     !    
     
    11261125         tprecip(:,:) = frcv(jpr_rain)%z3(:,:,1) + sprecip (:,:) ! May need to ensure positive here 
    11271126         emp_tot(:,:) = frcv(jpr_tevp)%z3(:,:,1) - tprecip(:,:) 
     1127#if defined key_cice 
     1128         IF ( TRIM(sn_rcv_emp%clcat) == 'yes' ) THEN 
     1129            ! emp_ice is the sum of frcv(jpr_ievp)%z3(:,:,1) over all layers - snow 
     1130            emp_ice(:,:) = - frcv(jpr_snow)%z3(:,:,1) 
     1131            DO jl=1,jpl 
     1132               emp_ice(:,:   ) = emp_ice(:,:) + frcv(jpr_ievp)%z3(:,:,jl) 
     1133            ENDDO 
     1134            ! latent heat coupled for each category in CICE 
     1135            qla_ice(:,:,1:jpl) = - frcv(jpr_ievp)%z3(:,:,1:jpl) * lsub 
     1136         ELSE 
     1137            ! If CICE has multicategories it still expects coupling fields for 
     1138            ! each even if we treat as a single field 
     1139            ! The latent heat flux is split between the ice categories according 
     1140            ! to the fraction of the ice in each category 
     1141            emp_ice(:,:) = frcv(jpr_ievp)%z3(:,:,1) - frcv(jpr_snow)%z3(:,:,1) 
     1142            WHERE ( zicefr(:,:) /= 0._wp )  
     1143               ztmp(:,:) = 1./zicefr(:,:) 
     1144            ELSEWHERE  
     1145               ztmp(:,:) = 0.e0 
     1146            END WHERE   
     1147            DO jl=1,jpl 
     1148               qla_ice(:,:,jl) = - a_i(:,:,jl) * ztmp(:,:) * frcv(jpr_ievp)%z3(:,:,1) * lsub  
     1149            END DO 
     1150            WHERE ( zicefr(:,:) == 0._wp )  qla_ice(:,:,1) = -frcv(jpr_ievp)%z3(:,:,1) * lsub  
     1151         ENDIF 
     1152#else 
    11281153         emp_ice(:,:) = frcv(jpr_ievp)%z3(:,:,1) - frcv(jpr_snow)%z3(:,:,1) 
     1154#endif 
    11291155            CALL iom_put( 'rain'         , frcv(jpr_rain)%z3(:,:,1)              )   ! liquid precipitation  
    11301156         IF( iom_use('hflx_rain_cea') )   & 
Note: See TracChangeset for help on using the changeset viewer.