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 14450 for NEMO/branches/UKMO/NEMO_4.0.4_ocean_mean_fluxes – NEMO

Ignore:
Timestamp:
2021-02-15T10:35:14+01:00 (4 years ago)
Author:
dancopsey
Message:

Avoid conflicts and don't use a_i_last_couple on incoming fields twice.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.4_ocean_mean_fluxes/src/OCE/SBC/sbccpl.F90

    r14424 r14450  
    213213#if defined key_si3 || defined key_cice 
    214214   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::   a_i_last_couple !: Ice fractional area at last coupling time 
    215    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   leads_last_couple !: Leads fractional area at last coupling time 
    216215#endif 
    217216 
    218217   REAL(wp) ::   rpref = 101000._wp   ! reference atmospheric pressure[N/m2]  
    219218   REAL(wp) ::   r1_grau              ! = 1.e0 / (grav * rau0)  
     219 
     220   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:) ::   leads_last_couple !: Leads fractional area at last coupling time 
    220221 
    221222   INTEGER , ALLOCATABLE, SAVE, DIMENSION(:) ::   nrcvinfo           ! OASIS info argument 
     
    234235      !!             ***  FUNCTION sbc_cpl_alloc  *** 
    235236      !!---------------------------------------------------------------------- 
    236       INTEGER :: ierr(6) 
     237      INTEGER :: ierr(5) 
    237238      !!---------------------------------------------------------------------- 
    238239      ierr(:) = 0 
    239240      ! 
    240241      ALLOCATE( alb_oce_mix(jpi,jpj), nrcvinfo(jprcv),  STAT=ierr(1) ) 
     242 
     243      ALLOCATE( leads_last_couple(jpi,jpj) , STAT=ierr(1) ) 
    241244       
    242245#if ! defined key_si3 && ! defined key_cice 
     
    246249#if defined key_si3 || defined key_cice 
    247250      ALLOCATE( a_i_last_couple(jpi,jpj,jpl) , STAT=ierr(4) ) 
    248       ALLOCATE( leads_last_couple(jpi,jpj) , STAT=ierr(5) ) 
    249251#endif 
    250252      ! 
    251       IF( .NOT. ln_apr_dyn ) ALLOCATE( ssh_ib(jpi,jpj), ssh_ibb(jpi,jpj), apr(jpi, jpj), STAT=ierr(6) ) 
     253      IF( .NOT. ln_apr_dyn ) ALLOCATE( ssh_ib(jpi,jpj), ssh_ibb(jpi,jpj), apr(jpi, jpj), STAT=ierr(5) ) 
    252254 
    253255      sbc_cpl_alloc = MAXVAL( ierr ) 
     
    18981900         ! Calculate the total non solar heat flux. The ocean only non solar heat flux (zqns_oce) will be recalculated after this CASE 
    18991901         ! statement to be consistent with other coupling methods even though .zqns_oce = frcv(jpr_qnsoce)%z3(:,:,1) 
    1900          zqns_tot(:,:) = frcv(jpr_qnsoce)%z3(:,:,1) * leads_last_couple(:,:) + SUM( zqns_ice(:,:,:) * a_i_last_couple(:,:,:), dim=3 ) 
     1902         zqns_tot(:,:) = frcv(jpr_qnsoce)%z3(:,:,1) * leads_last_couple(:,:) + SUM( zqns_ice(:,:,:) * a_i(:,:,:), dim=3 ) 
    19011903          
    19021904      CASE( 'conservative' )     ! the required fields are directly provided 
Note: See TracChangeset for help on using the changeset viewer.