Changeset 13321


Ignore:
Timestamp:
2020-07-17T12:37:48+02:00 (3 months ago)
Author:
jwhile
Message:

Changed the way I use keys in stopack as per review

File:
1 edited

Legend:

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

    r13320 r13321  
    624624      !!---------------------------------------------------------------------- 
    625625   INTEGER, INTENT( in ) :: kt 
    626 #if defined key_traldf_c3d 
    627    REAL(wp), INTENT( inout ), DIMENSION(jpi,jpj,jpk) :: coeff 
    628    REAL(wp), POINTER, DIMENSION(:,:,:) ::   gauss 
    629 #elif defined key_traldf_c2d 
    630626   REAL(wp), INTENT( inout ), DIMENSION(jpi,jpj) :: coeff 
    631    REAL(wp), POINTER, DIMENSION(:,:) ::   gauss 
    632 #else 
    633    ! These variables must be defined in for the routine interface, 
    634    ! but are not used. 
    635    REAL(wp), INTENT( inout ), DIMENSION(jpk) :: coeff 
    636    REAL(wp), POINTER, DIMENSION(:) ::   gauss 
    637 #endif 
    638627   INTEGER, INTENT( in ) ::  nn_type 
    639628   REAL(wp), INTENT( in ) :: rn_sd 
    640629   INTEGER, INTENT( in ) ::  kspp 
    641630   INTEGER, INTENT( in ), OPTIONAL ::  klev 
     631   REAL(wp), POINTER, DIMENSION(:,:) ::   gauss 
    642632   REAL(wp) :: zsd,xme,mm 
    643633   CHARACTER (LEN=99) :: cstrng 
    644634   INTEGER :: jklev 
    645635 
    646 #if defined key_traldf_c2d || key_traldf_c3d 
     636#if defined key_traldf_c3d || key_traldf_c3d 
     637 
    647638   CALL wrk_alloc(jpi,jpj,gauss) 
    648639 
     
    706697 
    707698#else 
    708    CALL ctl_stop( 'spp_gen: parameter perturbation will only work with '// & 
    709                   'key_traldf_c2d or key_traldf_c3d') 
    710 #endif 
    711  
     699   CALL ctl_stop('key_traldf_c1d is not a valid key for STO') 
     700#endif 
    712701 
    713702   END SUBROUTINE 
     
    721710   IMPLICIT NONE 
    722711   INTEGER, INTENT(IN) :: mt,kp,kl 
    723 #if defined key_traldf_c3d 
    724    REAL(wp), INTENT( inout ), DIMENSION(jpi,jpj,jpk) :: rcf 
    725 #elif defined key_traldf_c2d 
    726    REAL(wp), INTENT( inout ), DIMENSION(jpi,jpj) :: rcf 
    727 #else 
    728    ! This variable must be defined for for the routine interface, 
    729    ! but are not used. 
    730    REAL(wp), INTENT( inout ), DIMENSION(jpk) :: rcf 
    731 #endif 
     712   REAL(wp), INTENT(IN) :: rcf(jpi,jpj) 
    732713   REAL(wp) :: mi,ma 
    733714   CHARACTER(LEN=16) :: cstr = '                ' 
     
    935916#elif defined key_traldf_c2d 
    936917   REAL(wp), INTENT( inout ), DIMENSION(jpi,jpj) :: coeff 
     918#elif defined key_traldf_c1d 
     919   REAL(wp), INTENT( inout ), DIMENSION(jpk) :: coeff 
    937920#else 
    938    ! This variable must be defined for for the routine interface, 
    939    ! but are not used. 
    940    REAL(wp), INTENT( inout ), DIMENSION(jpk) :: coeff 
     921   REAL(wp), INTENT( inout ) :: coeff 
    941922#endif 
    942923   INTEGER, INTENT( in ) ::  kspp 
     
    946927   REAL(wp) :: zsd,xme 
    947928   INTEGER :: jk 
     929 
     930#if defined key_traldf_c3d || key_traldf_c2d 
    948931 
    949932   CALL wrk_alloc(jpi,jpj,gauss) 
     
    990973   ENDIF 
    991974 
    992 #if defined key_traldf_c2d || key_traldf_c3d 
    993975   IF( ln_stopack_diags ) THEN 
    994976     CALL spp_stats(kt,kspp,0,coeff) 
    995977   ENDIF 
     978 
     979#else 
     980   CALL ctl_stop('key_traldf_c1d is not a valid key for STO') 
     981 
    996982#endif 
    997983 
     
    10241010   REAL(wp) :: zsd,xme 
    10251011   INTEGER :: jk 
     1012 
     1013#if defined key_dynldf_c3d || key_dynldf_c2d 
    10261014 
    10271015   CALL wrk_alloc(jpi,jpj,gauss) 
     
    10681056   ENDIF 
    10691057 
    1070 #if defined key_traldf_c2d || key_traldf_c3d 
    10711058   IF( ln_stopack_diags ) THEN 
    10721059     CALL spp_stats(kt,kspp,0,coeff) 
    10731060   ENDIF 
    1074 #endif 
    10751061 
    10761062   CALL wrk_dealloc(jpi,jpj,gauss) 
     1063 
     1064#else 
     1065   CALL ctl_stop('key_traldf_c1d is not a valid key for STO') 
     1066#endif 
    10771067 
    10781068   END SUBROUTINE 
Note: See TracChangeset for help on using the changeset viewer.