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

Changeset 2999 for branches


Ignore:
Timestamp:
2011-10-26T14:47:41+02:00 (13 years ago)
Author:
mlelod
Message:

Bug fix fot non-vvl compilation. see ticket/863?

Location:
branches/2011/dev_r2739_LOCEAN8_ZTC/NEMOGCM
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2011/dev_r2739_LOCEAN8_ZTC/NEMOGCM/CONFIG/ORCA2_LIM/cpp_ORCA2_LIM.fcm

    r2996 r2999  
    1  bld::tool::fppkeys key_trabbl key_vectopt_loop key_orca_r2 key_lim2  key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_dtatem key_dtasal key_tradmp key_zdftke key_zdfddm key_zdftmx key_iomput key_vvl key_dynspg_ts 
     1 bld::tool::fppkeys key_trabbl key_vectopt_loop key_orca_r2 key_lim2  key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_dtatem key_dtasal key_tradmp key_zdftke key_zdfddm key_zdftmx key_iomput key_dynspg_flt  key_vvl 
  • branches/2011/dev_r2739_LOCEAN8_ZTC/NEMOGCM/NEMO/OPA_SRC/DOM/domvvl.F90

    r2996 r2999  
    88   !!            3.3  !  2011-10  (M. Leclair) totally rewrote domvvl: 
    99   !!                                          vvl option includes z_star and z_tilde coordinates 
    10 #if defined key_vvl 
    1110   !!---------------------------------------------------------------------- 
    1211   !!   'key_vvl'                              variable volume 
     
    4039 
    4140   !!* Namelist nam_vvl 
    42    LOGICAL , PUBLIC                                      :: ln_vvl_zstar  = .TRUE.    ! zstar  vertical coordinate 
     41   LOGICAL , PUBLIC                                      :: ln_vvl_zstar  = .FALSE.   ! zstar  vertical coordinate 
    4342   LOGICAL , PUBLIC                                      :: ln_vvl_ztilde = .FALSE.   ! ztilde vertical coordinate 
    4443   LOGICAL , PUBLIC                                      :: ln_vvl_layer  = .FALSE.   ! level  vertical coordinate 
    4544   LOGICAL , PUBLIC                                      :: ln_vvl_kepe   = .FALSE.   ! kinetic/potential energy transfer 
    4645   !                                                                                  ! conservation: not used yet 
    47    REAL(wp), PUBLIC                                      :: ahe3          =  0.e0     ! thickness diffusion coefficient 
     46   REAL(wp)                                              :: ahe3          =  0.e0     ! thickness diffusion coefficient 
    4847 
    4948   !! * Module variables 
    50    INTEGER                                               :: nvvl                      ! choice of vertical coordinate 
    5149   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: un_td, vn_td              ! thickness diffusion transport 
    5250   REAL(wp)        , ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: hdiv_lf                   ! low frequency part of hz divergence 
    5351   REAL(wp)        , ALLOCATABLE, SAVE, DIMENSION(:,:,:) :: e3t_t_b, e3t_t_n, e3t_t_a ! baroclinic scale factors 
    54    REAL(wp)        , ALLOCATABLE, SAVE, DIMENSION(:,:)   :: frq_restore_e3t           ! retoring period for scale factors 
    55    REAL(wp)        , ALLOCATABLE, SAVE, DIMENSION(:,:)   :: frq_restore_hdv           ! retoring period for low freq. divergence 
     52   REAL(wp)        , ALLOCATABLE, SAVE, DIMENSION(:,:)   :: frq_rst_e3t               ! retoring period for scale factors 
     53   REAL(wp)        , ALLOCATABLE, SAVE, DIMENSION(:,:)   :: frq_rst_hdv               ! retoring period for low freq. divergence 
    5654 
    5755 
     
    7876      ENDIF 
    7977      IF( ln_vvl_ztilde ) THEN 
    80          ALLOCATE( frq_restore_e3t(jpi,jpj) , frq_restore_hdv(jpi,jpj) , hdiv_lf(jpi,jpj,jpk) , STAT= dom_vvl_alloc ) 
     78         ALLOCATE( frq_rst_e3t(jpi,jpj) , frq_rst_hdv(jpi,jpj) , hdiv_lf(jpi,jpj,jpk) , STAT= dom_vvl_alloc ) 
    8179         IF( lk_mpp             )   CALL mpp_sum ( dom_vvl_alloc ) 
    8280         IF( dom_vvl_alloc /= 0 )   CALL ctl_warn('dom_vvl_alloc: failed to allocate arrays') 
     
    103101      !!                        fse3(u/v)w_n       
    104102      !!                        fsdept_n, fsdepw_n and fsde3w_n 
    105       !!                        h(u/v) and h(u/v)r 
    106       !!              - ht_0 and ht1_0 
     103      !!              - h(t/u/v)_0 
     104      !!              - frq_rst_e3t and frq_rst_hdv 
    107105      !! 
    108106      !! Reference  : Leclair, M., and G. Madec, 2011, Ocean Modelling. 
     
    172170      ! ============================================ 
    173171      IF( ln_vvl_ztilde ) THEN 
    174          ! - ML - In the future, this should be tunable by the user 
    175          ! DO jj = 1, jpj 
    176          !    DO ji = 1, jpi 
    177          !       frq_restore_hdv(ji,jj) = 2.e0 * rpi / 86400.e0 / 5.e0   & 
    178          !          &                     * MAX( SIN( ABS( gphit(ji,jj) ) / .5e0, 1.e0 / 6.e0) ) 
    179          !    END DO 
    180          ! END DO 
    181          ! frq_restore_e3t(:,:) = ( 1.e0 / 6.e0 ) * frq_restore_hdv(:,:) 
    182          frq_restore_e3t(:,:) = 2.e0 * rpi / ( 30.e0 * 86400.e0 ) 
    183          frq_restore_hdv(:,:) = 2.e0 * rpi / (  5.e0 * 86400.e0 ) 
    184          ! frq_restore_hdv(:,:) = 2.e0 * rpi / (  2.e0 * 86400.e0 ) 
     172         ! - ML - In the future, this should be tunable by the user (namelist) 
     173         ! frq_rst_hdv(:,:) = 2.e0 * rpi / 86400.e0 / 5.e0 * MAX( SIN( ABS( gphit(:,:) ) / .5e0, 1.e0 / 6.e0) ) 
     174         ! frq_rst_e3t(:,:) = ( 1.e0 / 6.e0 ) * frq_rst_hdv(:,:) 
     175         frq_rst_e3t(:,:) = 2.e0 * rpi / ( 30.e0 * 86400.e0 ) 
     176         frq_rst_hdv(:,:) = 2.e0 * rpi / (  5.e0 * 86400.e0 ) 
     177         ! frq_rst_hdv(:,:) = 2.e0 * rpi / (  2.e0 * 86400.e0 ) 
    185178      ENDIF 
    186179 
     
    270263            IF( kt .GT. nit000 ) THEN 
    271264               DO jk = 1, jpkm1 
    272                   hdiv_lf(:,:,jk) = hdiv_lf(:,:,jk) - rdt * frq_restore_hdv(:,:)   & 
     265                  hdiv_lf(:,:,jk) = hdiv_lf(:,:,jk) - rdt * frq_rst_hdv(:,:)   & 
    273266                     &          * ( hdiv_lf(:,:,jk) - fse3t_n(:,:,jk) * ( hdivn(:,:,jk) - zhdiv(:,:) ) ) 
    274267               END DO 
     
    296289         IF( ln_vvl_ztilde ) THEN 
    297290            DO jk = 1, jpk 
    298                e3t_t_a(:,:,jk) = e3t_t_a(:,:,jk) - frq_restore_e3t(:,:) * e3t_t_b(:,:,jk) 
     291               e3t_t_a(:,:,jk) = e3t_t_a(:,:,jk) - frq_rst_e3t(:,:) * e3t_t_b(:,:,jk) 
    299292            END DO 
    300293         END IF 
     
    737730      !!                  ***  ROUTINE dom_vvl_ctl  *** 
    738731      !!                 
    739       !! ** Purpose :   Control the consistency between namelist options for  
    740       !!                vertical coordinate and set nvvl 
     732      !! ** Purpose :   Control the consistency between namelist options 
     733      !!                for vertical coordinate 
    741734      !!---------------------------------------------------------------------- 
    742735      INTEGER ::   ioptio 
     
    769762      IF( ioptio /= 1 )   CALL ctl_stop( 'Choose ONE vertical coordinate in namelist nam_vvl' ) 
    770763 
    771       IF( ln_vvl_zstar  )   nvvl = 1 
    772       IF( ln_vvl_ztilde )   nvvl = 2 
    773       IF( ln_vvl_layer  )   nvvl = 3 
    774  
    775764      IF(lwp) THEN                   ! Print the choice 
    776765         WRITE(numout,*) 
    777          IF( nvvl ==  1        ) WRITE(numout,*) '              zstar vertical coordinate is used' 
    778          IF( nvvl ==  2        ) WRITE(numout,*) '              ztilde vertical coordinate is used' 
    779          IF( nvvl ==  3        ) WRITE(numout,*) '              layer vertical coordinate is used' 
     766         IF( ln_vvl_zstar      ) WRITE(numout,*) '              zstar vertical coordinate is used' 
     767         IF( ln_vvl_ztilde     ) WRITE(numout,*) '              ztilde vertical coordinate is used' 
     768         IF( ln_vvl_layer      ) WRITE(numout,*) '              layer vertical coordinate is used' 
    780769         ! - ML - Option not developed yet 
    781770         ! IF(       ln_vvl_kepe ) WRITE(numout,*) '              kinetic to potential energy transfer : option used' 
     
    785774   END SUBROUTINE dom_vvl_ctl 
    786775 
    787  
    788 #else 
    789  
    790  
    791    !!---------------------------------------------------------------------- 
    792    !!   Default option :                                      Empty routine 
    793    !!---------------------------------------------------------------------- 
    794    SUBROUTINE dom_vvl_init 
    795       WRITE(*,*) 'dom_vvl_init: You should not have seen this print! error?' 
    796    END SUBROUTINE dom_vvl_init 
    797    SUBROUTINE dom_vvl_sf_nxt( kt )  
    798       !! * Arguments 
    799       INTEGER, INTENT( in )  ::    kt 
    800       WRITE(*,*) 'dom_vvl_sf_nxt: You should not have seen this print! error?', kt 
    801    END SUBROUTINE dom_vvl_sf_nxt 
    802    SUBROUTINE dom_vvl_sf_swp( kt )  
    803       !! * Arguments 
    804       INTEGER, INTENT( in )  ::    kt 
    805       WRITE(*,*) 'dom_vvl_sf_swp: You should not have seen this print! error?', kt 
    806    END SUBROUTINE dom_vvl_sf_swp 
    807    SUBROUTINE dom_vvl_interpol( pe3_in, pe3_out, pout ) 
    808       REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( in    ) ::  pe3_in 
    809       REAL(wp), DIMENSION(jpi,jpj,jpk), INTENT( inout ) ::  pe3_out 
    810       CHARACTER(len=1), INTENT( in )                    ::  pout 
    811       WRITE(*,*) 'dom_vvl_interpol: You should not have seen this print! error?' 
    812    END SUBROUTINE dom_vvl_interpol 
    813  
    814  
    815 #endif 
    816  
    817776   !!====================================================================== 
    818777END MODULE domvvl 
Note: See TracChangeset for help on using the changeset viewer.