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 15808 for NEMO/branches/UKMO/NEMO_4.0.4_MEDUSA_externals_GC5/src/OCE/oce.F90 – NEMO

Ignore:
Timestamp:
2022-05-03T16:56:01+02:00 (2 years ago)
Author:
jpalmier
Message:

cpl fix -- define and alloc cpl var back in oce

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/UKMO/NEMO_4.0.4_MEDUSA_externals_GC5/src/OCE/oce.F90

    r14075 r15808  
    6868   !! Energy budget of the leads (open water embedded in sea ice) 
    6969   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   fraqsr_1lev        !: fraction of solar net radiation absorbed in the first ocean level [-] 
     70  
     71   !! Arrays used in coupling when MEDUSA is present. These arrays need to be declared 
     72   !! even if MEDUSA is not active, to allow compilation, in which case they will not be allocated.  
     73   !! --------------------- 
     74   REAL(wp), PUBLIC, ALLOCATABLE, SAVE :: CO2Flux_out_cpl(:,:)  ! Output coupling CO2 flux   
     75   REAL(wp), PUBLIC, ALLOCATABLE, SAVE :: DMS_out_cpl(:,:)      ! Output coupling DMS   
     76   REAL(wp), PUBLIC, ALLOCATABLE, SAVE :: chloro_out_cpl(:,:)   ! Output coupling chlorophyll  
     77                                                                ! (expected in Kg/M3)   
     78 
     79   REAL(wp), PUBLIC, ALLOCATABLE, SAVE :: PCO2a_in_cpl(:,:)     ! Input coupling CO2 partial pressure  
     80   REAL(wp), PUBLIC, ALLOCATABLE, SAVE :: Dust_in_cpl(:,:)      ! Input coupling dust  
    7081 
    7182   !!---------------------------------------------------------------------- 
     
    114125#endif 
    115126         ! 
     127#if defined key_oasis3 .AND. key_top 
     128         ! We only actually need these arrays to be allocated if coupling and MEDUSA  
     129         ! are enabled 
     130         ! jpalm -- 03-05-2022 -- 
     131         !       -- from NEMOv4, there is no more key_medusa, and ln_medusa is not yet read. 
     132         !          allocate if key_top and key_oasis3 (it is in MEDUSA branch so should be safe enough) 
     133         ALLOCATE( CO2Flux_out_cpl(jpi,jpj), DMS_out_cpl(jpi,jpj),               & 
     134                   chloro_out_cpl(jpi,jpj),                                      & 
     135                   PCO2a_in_cpl(jpi,jpj), Dust_in_cpl(jpi,jpj),     STAT=ierr(5) ) 
     136#endif 
     137         ! 
    116138      oce_alloc = MAXVAL( ierr ) 
    117139      IF( oce_alloc /= 0 )   CALL ctl_stop( 'STOP', 'oce_alloc: failed to allocate arrays' ) 
Note: See TracChangeset for help on using the changeset viewer.