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

Ignore:
Timestamp:
2006-09-27T10:52:29+02:00 (18 years ago)
Author:
opalod
Message:

nemo_v1_update_064 : CT : general trends update including the addition of mean windows analysis possibility in the mixed layer

File:
1 edited

Legend:

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

    r474 r503  
    44   !! Ocean physics:  lateral diffusivity trends  
    55   !!===================================================================== 
     6   !! History :  9.0  !  05-11  (G. Madec)  Original code (new step architecture) 
     7   !!---------------------------------------------------------------------- 
    68 
    79   !!---------------------------------------------------------------------- 
     
    911   !!   dyn_ldf_ctl : initialization, namelist read, and parameters control 
    1012   !!---------------------------------------------------------------------- 
    11    !! * Modules used 
    12    USE oce             ! ocean dynamics and tracers 
    13    USE dom_oce         ! ocean space and time domain 
    14    USE phycst          ! physical constants 
    15    USE ldfdyn_oce      ! ocean dynamics lateral physics 
    16    USE ldfslp          ! ??? 
    17    USE dynldf_bilapg   ! lateral mixing            (dyn_ldf_bilapg routine) 
    18    USE dynldf_bilap    ! lateral mixing             (dyn_ldf_bilap routine) 
    19    USE dynldf_iso      ! lateral mixing               (dyn_ldf_iso routine) 
    20    USE dynldf_lap      ! lateral mixing               (dyn_ldf_lap routine) 
    21    USE trdmod          ! ocean dynamics and tracer trends 
    22    USE trdmod_oce      ! ocean variables trends 
    23    USE prtctl          ! Print control 
    24    USE in_out_manager  ! I/O manager 
    25    USE lib_mpp         ! distribued memory computing library 
    26    USE lbclnk          ! ocean lateral boundary conditions (or mpp link) 
     13   USE oce            ! ocean dynamics and tracers 
     14   USE dom_oce        ! ocean space and time domain 
     15   USE phycst         ! physical constants 
     16   USE ldfdyn_oce     ! ocean dynamics lateral physics 
     17   USE ldfslp         ! lateral mixing: slopes of mixing orientation 
     18   USE dynldf_bilapg  ! lateral mixing            (dyn_ldf_bilapg routine) 
     19   USE dynldf_bilap   ! lateral mixing            (dyn_ldf_bilap  routine) 
     20   USE dynldf_iso     ! lateral mixing            (dyn_ldf_iso    routine) 
     21   USE dynldf_lap     ! lateral mixing            (dyn_ldf_lap    routine) 
     22   USE trdmod         ! ocean dynamics and tracer trends 
     23   USE trdmod_oce     ! ocean variables trends 
     24   USE prtctl         ! Print control 
     25   USE in_out_manager ! I/O manager 
     26   USE lib_mpp        ! distribued memory computing library 
     27   USE lbclnk         ! ocean lateral boundary conditions (or mpp link) 
    2728 
    2829   IMPLICIT NONE 
    2930   PRIVATE 
    3031 
    31    !! *  Routine accessibility 
    32    PUBLIC dyn_ldf      ! called by step.F90  
     32   PUBLIC   dyn_ldf   ! called by step module  
    3333 
    34    !! * module variables 
    35    INTEGER ::                        &  
    36       nldf = 0                         ! type of lateral diffusion used 
    37       !                                ! defined from ln_dynldf_... namlist logicals) 
     34   INTEGER ::   nldf = 0   ! type of lateral diffusion used defined from ln_dynldf_... namlist logicals) 
    3835 
    3936   !! * Substitutions 
     
    4239   !!--------------------------------------------------------------------------------- 
    4340   !!   OPA 9.0 , LOCEAN-IPSL (2005)  
    44    !!--------------------------------------------------------------------------------- 
     41   !! $Header$ 
     42   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
     43   !!---------------------------------------------------------------------- 
    4544 
    4645CONTAINS 
     
    5150      !!  
    5251      !! ** Purpose :   compute the lateral ocean dynamics physics. 
     52      !!---------------------------------------------------------------------- 
     53      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
    5354      !! 
    54       !!---------------------------------------------------------------------- 
    55       !! * Arguments 
    56       INTEGER, INTENT( in ) ::   kt     ! ocean time-step index 
    57  
    58       !! * local declarations 
    59       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   & 
    60          ztrdu, ztrdv                         ! 3D temporary workspace 
     55      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   ztrdu, ztrdv   ! 3D workspace 
    6156      !!---------------------------------------------------------------------- 
    6257 
     
    6964 
    7065      SELECT CASE ( nldf )                       ! compute lateral mixing trend and add it to the general trend 
     66      ! 
     67      CASE ( 0 )    ;   CALL dyn_ldf_lap    ( kt )      ! iso-level laplacian 
     68      CASE ( 1 )    ;   CALL dyn_ldf_iso    ( kt )      ! rotated laplacian (except dk[ dk[.] ] part) 
     69      CASE ( 2 )    ;   CALL dyn_ldf_bilap  ( kt )      ! iso-level bilaplacian 
     70      CASE ( 3 )    ;   CALL dyn_ldf_bilapg ( kt )      ! s-coord. horizontal bilaplacian 
     71      ! 
    7172      CASE ( -1 )                                       ! esopa: test all possibility with control print 
    72          CALL dyn_ldf_lap    ( kt ) 
    73          IF(ln_ctl) THEN         ! print sum trends (used for debugging) 
    74             CALL prt_ctl( tab3d_1=ua, clinfo1=' ldf0 - Ua: ', mask1=umask, & 
    75                &          tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
    76          ENDIF 
    77          CALL dyn_ldf_iso    ( kt ) 
    78          IF(ln_ctl) THEN         ! print sum trends (used for debugging) 
    79             CALL prt_ctl( tab3d_1=ua, clinfo1=' ldf1 - Ua: ', mask1=umask, & 
    80                &          tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
    81          ENDIF 
    82          CALL dyn_ldf_bilap  ( kt ) 
    83          IF(ln_ctl) THEN         ! print sum trends (used for debugging) 
    84             CALL prt_ctl( tab3d_1=ua, clinfo1=' ldf2 - Ua: ', mask1=umask, & 
    85                &          tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
    86          ENDIF 
    87          CALL dyn_ldf_bilapg ( kt ) 
    88          IF(ln_ctl) THEN         ! print sum trends (used for debugging) 
    89             CALL prt_ctl( tab3d_1=ua, clinfo1=' ldf3 - Ua: ', mask1=umask, & 
    90                &          tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
    91          ENDIF 
    92  
    93       CASE ( 0 )                                       ! iso-level laplacian 
    94          CALL dyn_ldf_lap    ( kt ) 
    95       CASE ( 1 )                                       ! rotated laplacian (except dk[ dk[.] ] part) 
    96          CALL dyn_ldf_iso    ( kt ) 
    97       CASE ( 2 )                                       ! iso-level bilaplacian 
    98          CALL dyn_ldf_bilap  ( kt ) 
    99       CASE ( 3 )                                       ! s-coord. horizontal bilaplacian 
    100          CALL dyn_ldf_bilapg ( kt ) 
     73         ;              CALL dyn_ldf_lap    ( kt ) 
     74         ;              CALL prt_ctl( tab3d_1=ua, clinfo1=' ldf0 - Ua: ', mask1=umask,   & 
     75            &                         tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
     76         ;              CALL dyn_ldf_iso    ( kt ) 
     77         ;              CALL prt_ctl( tab3d_1=ua, clinfo1=' ldf1 - Ua: ', mask1=umask,   & 
     78            &                         tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
     79         ;              CALL dyn_ldf_bilap  ( kt ) 
     80         ;              CALL prt_ctl( tab3d_1=ua, clinfo1=' ldf2 - Ua: ', mask1=umask,   & 
     81            &                         tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
     82         ;              CALL dyn_ldf_bilapg ( kt ) 
     83         ;              CALL prt_ctl( tab3d_1=ua, clinfo1=' ldf3 - Ua: ', mask1=umask,   & 
     84            &                         tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
    10185      END SELECT 
    10286 
    103       !                                          ! save the horizontal diffusive trends for further diagnostics 
    104       IF( l_trddyn )   THEN 
     87      IF( l_trddyn ) THEN                        ! save the horizontal diffusive trends for further diagnostics 
    10588         ztrdu(:,:,:) = ua(:,:,:) - ztrdu(:,:,:) 
    10689         ztrdv(:,:,:) = va(:,:,:) - ztrdv(:,:,:) 
    107          CALL trd_mod( ztrdu, ztrdv, jpdtdldf, 'DYN', kt ) 
     90         CALL trd_mod( ztrdu, ztrdv, jpdyn_trd_ldf, 'DYN', kt ) 
    10891      ENDIF 
    109  
    110       IF(ln_ctl) THEN                            ! print mean trends (used for debugging) 
    111          CALL prt_ctl( tab3d_1=ua, clinfo1=' ldf  - Ua: ', mask1=umask, & 
    112             &          tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
    113       ENDIF 
    114  
     92      !                                          ! print sum trends (used for debugging) 
     93      IF(ln_ctl)   CALL prt_ctl( tab3d_1=ua, clinfo1=' ldf  - Ua: ', mask1=umask,   & 
     94         &                       tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
     95      ! 
    11596   END SUBROUTINE dyn_ldf 
    11697 
     
    121102      !!  
    122103      !! ** Purpose :   initializations of the horizontal ocean dynamics physics 
    123       !! 
    124       !! ** Method : 
    125       !! 
    126       !! History : 
    127       !!   9.0  !  05-11  (G. Madec)  Original code 
    128104      !!---------------------------------------------------------------------- 
    129       !! * Local declarations 
    130105      INTEGER ::   ioptio, ierr         ! temporary integers  
    131106      !!---------------------------------------------------------------------- 
     107     
     108      !                                   ! Namelist nam_dynldf: already read in ldfdyn module 
    132109 
    133       !  Define the lateral dynamics physics parameters 
    134       ! ============================================= 
    135      
    136       ! Namelist nam_dynldf already read in ldfdyn module 
    137  
    138       IF(lwp) THEN 
     110      IF(lwp) THEN                        ! Namelist print 
    139111         WRITE(numout,*) 
    140          WRITE(numout,*) 'dyn:ldf_ctl : Choice of the lateral diffusive operator on dynamics' 
     112         WRITE(numout,*) 'dyn_ldf_ctl : Choice of the lateral diffusive operator on dynamics' 
    141113         WRITE(numout,*) '~~~~~~~~~~~' 
    142          WRITE(numout,*) '          Namelist nam_dynldf : set lateral mixing parameters (type, direction, coefficients)' 
    143          WRITE(numout,*) '             laplacian operator          ln_dynldf_lap   = ', ln_dynldf_lap 
    144          WRITE(numout,*) '             bilaplacian operator        ln_dynldf_bilap = ', ln_dynldf_bilap 
    145          WRITE(numout,*) '             iso-level                   ln_dynldf_level = ', ln_dynldf_level 
    146          WRITE(numout,*) '             horizontal (geopotential)   ln_dynldf_hor   = ', ln_dynldf_hor 
    147          WRITE(numout,*) '             iso-neutral                 ln_dynldf_iso   = ', ln_dynldf_iso 
     114         WRITE(numout,*) '       Namelist nam_dynldf : set lateral mixing parameters (type, direction, coefficients)' 
     115         WRITE(numout,*) '          laplacian operator          ln_dynldf_lap   = ', ln_dynldf_lap 
     116         WRITE(numout,*) '          bilaplacian operator        ln_dynldf_bilap = ', ln_dynldf_bilap 
     117         WRITE(numout,*) '          iso-level                   ln_dynldf_level = ', ln_dynldf_level 
     118         WRITE(numout,*) '          horizontal (geopotential)   ln_dynldf_hor   = ', ln_dynldf_hor 
     119         WRITE(numout,*) '          iso-neutral                 ln_dynldf_iso   = ', ln_dynldf_iso 
    148120      ENDIF 
    149121 
    150       ! control the consistency 
     122      !                                   ! control the consistency 
    151123      ioptio = 0 
    152124      IF( ln_dynldf_lap   )   ioptio = ioptio + 1 
     
    159131      IF( ioptio /= 1 ) CALL ctl_stop( '          use only ONE direction (level/hor/iso)' ) 
    160132 
    161       ! defined the type of lateral diffusion from ln_dynldf_... logicals 
     133      !                                   ! Set nldf, the type of lateral diffusion, from ln_dynldf_... logicals 
    162134      ierr = 0 
    163135      IF ( ln_dynldf_lap ) THEN      ! laplacian operator 
     
    196168         ENDIF 
    197169      ENDIF 
     170       
     171      IF( lk_esopa )                 nldf = -1     ! esopa test 
    198172 
    199       IF( ierr == 1 )   & 
    200            &   CALL ctl_stop( ' iso-level in z-coordinate - partial step, not allowed' ) 
    201       IF( ierr == 2 )   & 
    202            &   CALL ctl_stop( ' isoneutral bilaplacian operator does not exist' ) 
     173      IF( ierr == 1 )   CALL ctl_stop( 'iso-level in z-coordinate - partial step, not allowed' ) 
     174      IF( ierr == 2 )   CALL ctl_stop( 'isoneutral bilaplacian operator does not exist' ) 
    203175      IF( nldf == 1 .OR. nldf == 3 ) THEN      ! rotation 
    204          IF( .NOT.lk_ldfslp )   & 
    205            &   CALL ctl_stop(  '          the rotation of the diffusive tensor require key_ldfslp' ) 
    206       ENDIF 
    207  
    208       IF( lk_esopa ) THEN 
    209          IF(lwp ) WRITE(numout,*) '          esopa test: use all lateral physics options' 
    210          nldf = -1 
     176         IF( .NOT.lk_ldfslp )   CALL ctl_stop( 'the rotation of the diffusive tensor require key_ldfslp' ) 
    211177      ENDIF 
    212178 
     
    219185         IF( nldf ==  3 )   WRITE(numout,*) '              Rotated bilaplacian' 
    220186      ENDIF 
    221  
     187      ! 
    222188   END SUBROUTINE dyn_ldf_ctl 
    223189 
Note: See TracChangeset for help on using the changeset viewer.