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 13320 for branches/UKMO/dev_1d_bugfixes_tocommit/NEMOGCM/NEMO – NEMO

Ignore:
Timestamp:
2020-07-17T09:58:03+02:00 (4 years ago)
Author:
jwhile
Message:

Changes for Matt's review

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/UKMO/dev_1d_bugfixes_tocommit/NEMOGCM/NEMO/OPA_SRC/STO/stopack.F90

    r13191 r13320  
    630630   REAL(wp), INTENT( inout ), DIMENSION(jpi,jpj) :: coeff 
    631631   REAL(wp), POINTER, DIMENSION(:,:) ::   gauss 
    632 #elif defined key_traldf_c1d 
     632#else 
     633   ! These variables must be defined in for the routine interface, 
     634   ! but are not used. 
    633635   REAL(wp), INTENT( inout ), DIMENSION(jpk) :: coeff 
    634636   REAL(wp), POINTER, DIMENSION(:) ::   gauss 
    635 #else 
    636    REAL(wp), INTENT( inout ) :: coeff 
    637    REAL(wp), POINTER ::   gauss 
    638637#endif 
    639638   INTEGER, INTENT( in ) ::  nn_type 
     
    641640   INTEGER, INTENT( in ) ::  kspp 
    642641   INTEGER, INTENT( in ), OPTIONAL ::  klev 
    643    REAL(wp), POINTER, DIMENSION(:,:) ::   gauss 
    644642   REAL(wp) :: zsd,xme,mm 
    645643   CHARACTER (LEN=99) :: cstrng 
     
    671669       gauss = gauss * rn_sd 
    672670       coeff = coeff * ( 1._wp + gauss ) 
    673 #if defined key_traldf_c3d || key_traldf_c2d || key_traldf_c1d 
    674671       WHERE( coeff > 1._wp ) coeff = 1._wp 
    675672       WHERE( coeff < 0._wp ) coeff = 0._wp 
    676 #else 
    677        IF( coeff > 1._wp ) coeff = 1._wp 
    678        IF( coeff < 0._wp ) coeff = 0._wp 
    679 #endif 
    680673   ELSEIF ( nn_type  == 5 ) THEN 
    681674       zsd = rn_sd 
     
    683676       gauss = gauss * zsd + xme 
    684677       coeff = exp(gauss) * coeff 
    685 #if defined key_traldf_c3d || key_traldf_c2d || key_traldf_c1d 
    686678       WHERE( coeff > 1._wp ) coeff = 1._wp 
    687679       WHERE( coeff < 0._wp ) coeff = 0._wp 
    688 #else 
    689        IF( coeff > 1._wp ) coeff = 1._wp 
    690        IF( coeff < 0._wp ) coeff = 0._wp 
    691 #endif 
    692680   ELSEIF ( nn_type == 6 ) THEN 
    693681       zsd = rn_sd 
     
    695683       gauss = gauss * zsd + xme 
    696684       coeff = exp(gauss) * coeff 
    697 #if defined key_traldf_c3d || key_traldf_c2d || key_traldf_c1d 
    698685       WHERE( coeff > 1._wp ) coeff = 1._wp 
    699686       WHERE( coeff < 0._wp ) coeff = 0._wp 
    700 #else 
    701        IF( coeff > 1._wp ) coeff = 1._wp 
    702        IF( coeff < 0._wp ) coeff = 0._wp 
    703 #endif 
    704687   ELSE 
    705688       CALL ctl_stop( 'spp dqdt wrong option') 
     
    742725#elif defined key_traldf_c2d 
    743726   REAL(wp), INTENT( inout ), DIMENSION(jpi,jpj) :: rcf 
    744 #elif defined key_traldf_c1d 
     727#else 
     728   ! This variable must be defined for for the routine interface, 
     729   ! but are not used. 
    745730   REAL(wp), INTENT( inout ), DIMENSION(jpk) :: rcf 
    746 #else 
    747    REAL(wp), INTENT( inout ) :: rcf 
    748731#endif 
    749732   REAL(wp) :: mi,ma 
     
    807790       CALL ctl_stop('Unrecognized SPP parameter: add it or turn off diagnostics') 
    808791   END SELECT 
    809 #if defined key_traldf_c3d || key_traldf_c2d || key_traldf_c1d 
    810792   mi = MINVAL(rcf) 
    811793   ma = MAXVAL(rcf) 
    812 #else 
    813    mi = rcf 
    814    ma = rcf 
    815 #endif 
    816794   IF(lk_mpp) CALL mpp_min(mi) 
    817795   IF(lk_mpp) CALL mpp_max(ma) 
     
    957935#elif defined key_traldf_c2d 
    958936   REAL(wp), INTENT( inout ), DIMENSION(jpi,jpj) :: coeff 
    959 #elif defined key_traldf_c1d 
     937#else 
     938   ! This variable must be defined for for the routine interface, 
     939   ! but are not used. 
    960940   REAL(wp), INTENT( inout ), DIMENSION(jpk) :: coeff 
    961 #else 
    962    REAL(wp), INTENT( inout ) :: coeff 
    963941#endif 
    964942   INTEGER, INTENT( in ) ::  kspp 
     
    1012990   ENDIF 
    1013991 
     992#if defined key_traldf_c2d || key_traldf_c3d 
    1014993   IF( ln_stopack_diags ) THEN 
    1015994     CALL spp_stats(kt,kspp,0,coeff) 
    1016995   ENDIF 
     996#endif 
    1017997 
    1018998   CALL wrk_dealloc(jpi,jpj,gauss) 
     
    10881068   ENDIF 
    10891069 
     1070#if defined key_traldf_c2d || key_traldf_c3d 
    10901071   IF( ln_stopack_diags ) THEN 
    10911072     CALL spp_stats(kt,kspp,0,coeff) 
    10921073   ENDIF 
     1074#endif 
    10931075 
    10941076   CALL wrk_dealloc(jpi,jpj,gauss) 
Note: See TracChangeset for help on using the changeset viewer.