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 8365 for branches – NEMO

Changeset 8365 for branches


Ignore:
Timestamp:
2017-07-24T11:31:30+02:00 (7 years ago)
Author:
frrh
Message:

Apply CORRECT intent to fields previously prescribed as OUT.

These should be INOUT fields because they are initialised to
zero prior to calls to the offending routines. The application
of OUT effectively renders them undefined unless ALL elements
are explicitily set in the relevant subroutines, which they
are not.

It so happens that Cray (and no doubt other compilers) are quite
unfussy about this, but when explicitly useing preset NaNs?, things
go badly wrong. Further use of the incorrect intent, while it
may work in virtually all practical circumstances, is not truly
portable!

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_r5518_fix_NaNs/NEMOGCM/NEMO/OPA_SRC/TRA/eosbn2.F90

    r7993 r8365  
    312312      REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(in   ) ::   pts    ! 1 : potential temperature  [Celcius] 
    313313      !                                                                ! 2 : salinity               [psu] 
    314       REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(  out) ::   prd    ! in situ density            [-] 
    315       REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(  out) ::   prhop  ! potential density (surface referenced) 
     314      REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(inout) ::   prd    ! in situ density            [-] 
     315      REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(inout) ::   prhop  ! potential density (surface referenced) 
    316316      REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(in   ) ::   pdep   ! depth                      [m] 
    317317      ! 
     
    902902      REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(in   ) ::  pts   ! pot. temperature and salinity   [Celcius,psu] 
    903903      REAL(wp), DIMENSION(jpi,jpj,jpk,jpts), INTENT(in   ) ::  pab   ! thermal/haline expansion coef.  [Celcius-1,psu-1] 
    904       REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(  out) ::  pn2   ! Brunt-Vaisala frequency squared [1/s^2] 
     904      REAL(wp), DIMENSION(jpi,jpj,jpk     ), INTENT(inout) ::  pn2   ! Brunt-Vaisala frequency squared [1/s^2] 
    905905      ! 
    906906      INTEGER  ::   ji, jj, jk      ! dummy loop indices 
Note: See TracChangeset for help on using the changeset viewer.