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 6744 for branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/OPA_SRC/oce.F90 – NEMO

Ignore:
Timestamp:
2016-06-27T18:21:18+02:00 (8 years ago)
Author:
jpalmier
Message:

JPALM --27-06-2016 -- Update MEDUSA-atm coupling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/NERC/dev_r5518_NOC_MEDUSA_Stable/NEMOGCM/NEMO/OPA_SRC/oce.F90

    r5735 r6744  
    7272   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:)   ::   fraqsr_1lev        !: fraction of solar net radiation absorbed in the first ocean level [-] 
    7373 
     74!! Arrays used in coupling when MEDUSA is present. These arrays need to be declared 
     75!! even if MEDUSA is not active, to allow compilation, in which case they will not be allocated. 
     76!! --------------------- 
     77REAL(wp), PUBLIC, ALLOCATABLE, SAVE :: CO2Flux_out_cpl(:,:)   ! Output coupling CO2 flux  
     78REAL(wp), PUBLIC, ALLOCATABLE, SAVE :: DMS_out_cpl(:,:)       ! Output coupling DMS  
     79REAL(wp), PUBLIC, ALLOCATABLE, SAVE :: PCO2a_in_cpl(:,:)      ! Input coupling CO2 partial pressure 
     80REAL(wp), PUBLIC, ALLOCATABLE, SAVE :: Dust_in_cpl(:,:)       ! Input coupling dust 
     81 
     82#if defined key_medusa 
     83LOGICAL, PUBLIC, PARAMETER :: ln_medusa=.TRUE.                ! Medusa switched on or off. 
     84#else 
     85LOGICAL, PUBLIC, PARAMETER :: ln_medusa=.FALSE.               ! Medusa switched on or off. 
     86#endif 
    7487   !!---------------------------------------------------------------------- 
    7588   !! NEMO/OPA 4.0 , NEMO Consortium (2011) 
     
    119132      ALLOCATE( fraqsr_1lev(jpi,jpj) , STAT=ierr(4) ) 
    120133         ! 
     134#if defined key_oasis3 
     135      IF (ln_medusa) THEN 
     136         ! We only actually need these arrays to be allocated if coupling and MEDUSA 
     137         ! are enabled 
     138         ALLOCATE( CO2Flux_out_cpl(jpi,jpj),DMS_out_cpl(jpi,jpj),               & 
     139                   PCO2a_in_cpl(jpi,jpj), Dust_in_cpl(jpi,jpj),    STAT=ierr(5) ) 
     140 
     141         ! RSRH Temporarily initialise output coupling fields while we await clarification 
     142         ! of exactly how these will be initialised at model startup! 
     143         DMS_out_cpl(:,:) = 0.0 
     144         CO2Flux_out_cpl(:,:) = 0.0 
     145      ENDIF 
     146#endif 
    121147      oce_alloc = MAXVAL( ierr ) 
    122148      IF( oce_alloc /= 0 )   CALL ctl_warn('oce_alloc: failed to allocate arrays') 
Note: See TracChangeset for help on using the changeset viewer.