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

Ignore:
Timestamp:
2019-05-01T11:27:03+02:00 (5 years ago)
Author:
dancopsey
Message:

Use ice fractions from the last coupling time to calculate grid box means of coupled fluxes.

File:
1 edited

Legend:

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

    r10736 r10920  
    5454   USE lib_fortran, ONLY: glob_sum 
    5555 
     56#if defined key_oasis3 
     57   USE mod_oasis, ONLY : OASIS_Sent, OASIS_ToRest, OASIS_SentOut, OASIS_ToRestOut 
     58#else 
     59   INTEGER                    ::   OASIS_Sent        = -1 
     60   INTEGER                    ::   OASIS_SentOut     = -1 
     61   INTEGER                    ::   OASIS_ToRest      = -1 
     62   INTEGER                    ::   OASIS_ToRestOut   = -1 
     63#endif 
     64 
    5665   IMPLICIT NONE 
    5766   PRIVATE 
     
    200209      !!             ***  FUNCTION sbc_cpl_alloc  *** 
    201210      !!---------------------------------------------------------------------- 
    202       INTEGER :: ierr(3) 
     211      INTEGER :: ierr(4) 
    203212      !!---------------------------------------------------------------------- 
    204213      ierr(:) = 0 
     
    212221      ! Hardwire only two models as nn_cplmodel has not been read in 
    213222      ! from the namelist yet. 
    214       ALLOCATE( xcplmask(jpi,jpj,0:2) , STAT=ierr(3) )    
     223      ALLOCATE( xcplmask(jpi,jpj,0:2) , STAT=ierr(3) )  
     224#if defined key_cice 
     225      ALLOCATE( a_i_last_couple(jpi,jpj,jpl) , STAT=ierr(4) )  
     226#endif 
    215227      ! 
    216228      sbc_cpl_alloc = MAXVAL( ierr ) 
     
    17601772            zemp_ice(:,:) = - frcv(jpr_snow)%z3(:,:,1) * zicefr(:,:) 
    17611773            DO jl=1,jpl 
    1762                zemp_ice(:,:   ) = zemp_ice(:,:) + frcv(jpr_ievp)%z3(:,:,jl) * a_i(:,:,jl) 
     1774               zemp_ice(:,:   ) = zemp_ice(:,:) + frcv(jpr_ievp)%z3(:,:,jl) * a_i_last_couple(:,:,jl) 
    17631775            ENDDO 
    17641776            ! latent heat coupled for each category in CICE 
     
    22692281         END SELECT 
    22702282         IF( ssnd(jps_fice)%laction )   CALL cpl_snd( jps_fice, isec, ztmp3, info ) 
     2283 
     2284         ! If this coupling was successful then save ice fraction for use between coupling points. 
     2285         ! This is needed for some calculations where the ice fraction at the last coupling point 
     2286         ! is needed. 
     2287         IF( info == OASIS_Sent     .OR. info == OASIS_ToRest .OR.   & 
     2288                     & info == OASIS_SentOut  .OR. info == OASIS_ToRestOut ) THEN 
     2289           IF ( sn_snd_thick%clcat == 'yes' ) THEN 
     2290             a_i_last_couple(:,:,:) = a_i(:,:,:) 
     2291           ENDIF 
     2292         ENDIF 
     2293          
    22712294      ENDIF 
    22722295       
Note: See TracChangeset for help on using the changeset viewer.