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 2528 for trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf.F90 – NEMO

Ignore:
Timestamp:
2010-12-27T18:33:53+01:00 (13 years ago)
Author:
rblod
Message:

Update NEMOGCM from branch nemo_v3_3_beta

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/DYN/dynldf.F90

    • Property svn:eol-style deleted
    • Property svn:executable deleted
    r1152 r2528  
    88 
    99   !!---------------------------------------------------------------------- 
    10    !!   dyn_ldf     : update the dynamics trend with the lateral diffusion 
    11    !!   dyn_ldf_ctl : initialization, namelist read, and parameters control 
     10   !!   dyn_ldf      : update the dynamics trend with the lateral diffusion 
     11   !!   dyn_ldf_init : initialization, namelist read, and parameters control 
    1212   !!---------------------------------------------------------------------- 
    1313   USE oce            ! ocean dynamics and tracers 
     
    3030   PRIVATE 
    3131 
    32    PUBLIC   dyn_ldf   ! called by step module  
    33  
    34    INTEGER ::   nldf = 0   ! type of lateral diffusion used defined from ln_dynldf_... namlist logicals) 
     32   PUBLIC   dyn_ldf       ! called by step module  
     33   PUBLIC   dyn_ldf_init  ! called by opa  module  
     34 
     35   INTEGER ::   nldf = -2   ! type of lateral diffusion used defined from ln_dynldf_... namlist logicals) 
    3536 
    3637   !! * Substitutions 
    3738#  include "domzgr_substitute.h90" 
    3839#  include "vectopt_loop_substitute.h90" 
    39    !!--------------------------------------------------------------------------------- 
    40    !!   OPA 9.0 , LOCEAN-IPSL (2005)  
     40   !!---------------------------------------------------------------------- 
     41   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
    4142   !! $Id$ 
    42    !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
     43   !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
    4344   !!---------------------------------------------------------------------- 
    4445 
     
    5556      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   ztrdu, ztrdv   ! 3D workspace 
    5657      !!---------------------------------------------------------------------- 
    57  
    58       IF( kt == nit000 )   CALL dyn_ldf_ctl      ! initialisation & control of options 
    5958 
    6059      IF( l_trddyn )   THEN                      ! temporary save of ta and sa trends 
     
    6968      CASE ( 2 )    ;   CALL dyn_ldf_bilap  ( kt )      ! iso-level bilaplacian 
    7069      CASE ( 3 )    ;   CALL dyn_ldf_bilapg ( kt )      ! s-coord. horizontal bilaplacian 
     70      CASE ( 4 )                                        ! iso-level laplacian + bilaplacian 
     71         CALL dyn_ldf_lap    ( kt ) 
     72         CALL dyn_ldf_bilap  ( kt ) 
     73      CASE ( 5 )                                        ! rotated laplacian + bilaplacian (s-coord) 
     74         CALL dyn_ldf_iso    ( kt ) 
     75         CALL dyn_ldf_bilapg ( kt ) 
    7176      ! 
    7277      CASE ( -1 )                                       ! esopa: test all possibility with control print 
     
    8388                        CALL prt_ctl( tab3d_1=ua, clinfo1=' ldf3 - Ua: ', mask1=umask,   & 
    8489            &                         tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
     90      ! 
     91      CASE ( -2 )                                       ! neither laplacian nor bilaplacian schemes used 
     92         IF( kt == nit000 ) THEN 
     93            IF(lwp) WRITE(numout,*) 
     94            IF(lwp) WRITE(numout,*) 'dyn_ldf : no lateral diffusion on momentum setup' 
     95            IF(lwp) WRITE(numout,*) '~~~~~~~ ' 
     96         ENDIF 
    8597      END SELECT 
    8698 
     
    97109 
    98110 
    99    SUBROUTINE dyn_ldf_ctl 
    100       !!---------------------------------------------------------------------- 
    101       !!                  ***  ROUTINE dyn_ldf_ctl  *** 
     111   SUBROUTINE dyn_ldf_init 
     112      !!---------------------------------------------------------------------- 
     113      !!                  ***  ROUTINE dyn_ldf_init  *** 
    102114      !!  
    103115      !! ** Purpose :   initializations of the horizontal ocean dynamics physics 
     
    110122      IF(lwp) THEN                        ! Namelist print 
    111123         WRITE(numout,*) 
    112          WRITE(numout,*) 'dyn_ldf_ctl : Choice of the lateral diffusive operator on dynamics' 
     124         WRITE(numout,*) 'dyn_ldf_init : Choice of the lateral diffusive operator on dynamics' 
    113125         WRITE(numout,*) '~~~~~~~~~~~' 
    114126         WRITE(numout,*) '       Namelist nam_dynldf : set lateral mixing parameters (type, direction, coefficients)' 
     
    124136      IF( ln_dynldf_lap   )   ioptio = ioptio + 1 
    125137      IF( ln_dynldf_bilap )   ioptio = ioptio + 1 
    126       IF( ioptio /= 1 ) CALL ctl_stop( '          use ONE of the 2 lap/bilap operator type on dynamics' ) 
     138      IF( ioptio <  1 ) CALL ctl_warn( '          neither laplacian nor bilaplacian operator set for dynamics' ) 
    127139      ioptio = 0 
    128140      IF( ln_dynldf_level )   ioptio = ioptio + 1 
     
    144156            IF ( ln_dynldf_iso   )   nldf = 1      ! isoneutral (   rotation) 
    145157         ENDIF 
    146          IF ( ln_sco ) THEN             ! z-coordinate 
     158         IF ( ln_sco ) THEN             ! s-coordinate 
    147159            IF ( ln_dynldf_level )   nldf = 0      ! iso-level  (no rotation) 
    148160            IF ( ln_dynldf_hor   )   nldf = 1      ! horizontal (   rotation) 
     
    162174            IF ( ln_dynldf_iso   )   ierr = 2      ! isoneutral (   rotation) 
    163175         ENDIF 
    164          IF ( ln_sco ) THEN             ! z-coordinate 
     176         IF ( ln_sco ) THEN             ! s-coordinate 
    165177            IF ( ln_dynldf_level )   nldf = 2      ! iso-level  (no rotation) 
    166178            IF ( ln_dynldf_hor   )   nldf = 3      ! horizontal (   rotation) 
     
    169181      ENDIF 
    170182       
     183      IF( ln_dynldf_lap .AND. ln_dynldf_bilap ) THEN  ! mixed laplacian and bilaplacian operators 
     184         IF ( ln_zco ) THEN                ! z-coordinate 
     185            IF ( ln_dynldf_level )   nldf = 4      ! iso-level  (no rotation) 
     186            IF ( ln_dynldf_hor   )   nldf = 4      ! horizontal (no rotation) 
     187            IF ( ln_dynldf_iso   )   ierr = 2      ! isoneutral (   rotation) 
     188         ENDIF 
     189         IF ( ln_zps ) THEN             ! z-coordinate 
     190            IF ( ln_dynldf_level )   ierr = 1      ! iso-level not allowed  
     191            IF ( ln_dynldf_hor   )   nldf = 4      ! horizontal (no rotation) 
     192            IF ( ln_dynldf_iso   )   ierr = 2      ! isoneutral (   rotation) 
     193         ENDIF 
     194         IF ( ln_sco ) THEN             ! s-coordinate 
     195            IF ( ln_dynldf_level )   nldf = 4      ! iso-level  (no rotation) 
     196            IF ( ln_dynldf_hor   )   nldf = 5      ! horizontal (   rotation) 
     197            IF ( ln_dynldf_iso   )   ierr = 2      ! isoneutral (   rotation) 
     198         ENDIF 
     199      ENDIF 
     200 
    171201      IF( lk_esopa )                 nldf = -1     ! esopa test 
    172202 
     
    179209      IF(lwp) THEN 
    180210         WRITE(numout,*) 
     211         IF( nldf == -2 )   WRITE(numout,*) '              neither laplacian nor bilaplacian schemes used' 
    181212         IF( nldf == -1 )   WRITE(numout,*) '              ESOPA test All scheme used' 
    182213         IF( nldf ==  0 )   WRITE(numout,*) '              laplacian operator' 
    183          IF( nldf ==  1 )   WRITE(numout,*) '              Rotated laplacian operator' 
     214         IF( nldf ==  1 )   WRITE(numout,*) '              rotated laplacian operator' 
    184215         IF( nldf ==  2 )   WRITE(numout,*) '              bilaplacian operator' 
    185          IF( nldf ==  3 )   WRITE(numout,*) '              Rotated bilaplacian' 
    186       ENDIF 
    187       ! 
    188    END SUBROUTINE dyn_ldf_ctl 
     216         IF( nldf ==  3 )   WRITE(numout,*) '              rotated bilaplacian' 
     217         IF( nldf ==  4 )   WRITE(numout,*) '              laplacian and bilaplacian operators' 
     218         IF( nldf ==  5 )   WRITE(numout,*) '              rotated laplacian and bilaplacian operators' 
     219      ENDIF 
     220      ! 
     221   END SUBROUTINE dyn_ldf_init 
    189222 
    190223   !!====================================================================== 
Note: See TracChangeset for help on using the changeset viewer.