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/dynspg.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/dynspg.F90

    r474 r503  
    44   !! Ocean dynamics:  surface pressure gradient control 
    55   !!====================================================================== 
     6   !! History :  9.0  !  05-12  (C. Talandier, G. Madec)  Original code 
     7   !!            9.0  !  05-12  (V. Garnier)  dyn_spg_ctl: Original code 
     8   !!---------------------------------------------------------------------- 
    69 
    710   !!---------------------------------------------------------------------- 
     
    912   !!   dyn_spg_ctl : initialization, namelist read, and parameters control 
    1013   !!---------------------------------------------------------------------- 
    11    !! * Modules used 
    1214   USE oce            ! ocean dynamics and tracers variables 
    1315   USE dom_oce        ! ocean space and time domain variables 
     
    2931   PRIVATE 
    3032 
    31    !! * Accessibility 
    3233   PUBLIC dyn_spg         ! routine called by step module 
    3334 
    3435   !! * module variables 
    35    INTEGER ::                        & 
    36       nspg = 0                         ! type of surface pressure gradient scheme 
    37       !                                ! defined from lk_dynspg_...  
     36   INTEGER ::   nspg = 0   ! type of surface pressure gradient scheme defined from lk_dynspg_...  
    3837 
    3938   !! * Substitutions 
     
    4342   !!   OPA 9.0 , LOCEAN-IPSL (2005)  
    4443   !! $Header$  
    45    !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt  
     44   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) 
    4645   !!---------------------------------------------------------------------- 
    4746 
     
    5352      !! 
    5453      !! ** Purpose :   compute the lateral ocean dynamics physics. 
    55       !! 
    56       !! History : 
    57       !!   9.0  !  05-12  (C. Talandier, G. Madec)  Original code 
    58       !!---------------------------------------------------------------------- 
    59       !! * Arguments 
     54      !!---------------------------------------------------------------------- 
    6055      INTEGER, INTENT( in  ) ::   kt     ! ocean time-step index 
    6156      INTEGER, INTENT( out ) ::   kindic ! solver flag 
    62  
    63       !! * local declarations 
     57      !! 
    6458      REAL(wp) ::   z2dt                      ! temporary scalar 
    65       REAL(wp), DIMENSION(jpi,jpj,jpk) ::   & 
    66          ztrdu, ztrdv                         ! 3D temporary workspace 
     59      REAL(wp), DIMENSION(jpi,jpj,jpk) ::   ztrdu, ztrdv   ! 3D workspace 
    6760      !!---------------------------------------------------------------------- 
    6861 
     
    7568 
    7669      SELECT CASE ( nspg )                       ! compute surf. pressure gradient trend and add it to the general trend 
     70      !                                                      ! k-j-i loops 
     71      CASE (  0 )   ;   CALL dyn_spg_exp    ( kt )              ! explicit 
     72      CASE (  1 )   ;   CALL dyn_spg_ts     ( kt )              ! time-splitting 
     73      CASE (  2 )   ;   CALL dyn_spg_flt    ( kt, kindic )      ! filtered 
     74      CASE (  3 )   ;   CALL dyn_spg_rl     ( kt, kindic )      ! rigid lid 
     75      !                                                      ! j-k-i loops 
     76      CASE ( 10 )   ;   CALL dyn_spg_exp_jki( kt )              ! explicit with j-k-i loop 
     77      CASE ( 11 )   ;   CALL dyn_spg_ts_jki ( kt )              ! time-splitting with j-k-i loop 
     78      CASE ( 12 )   ;   CALL dyn_spg_flt_jki( kt, kindic )      ! filtered with j-k-i loop 
     79      ! 
    7780      CASE ( -1 )                                       ! esopa: test all possibility with control print 
    78          CALL dyn_spg_exp    ( kt ) 
    79          IF(ln_ctl)   CALL prt_ctl( tab3d_1=ua, clinfo1=' spg0 - Ua: ', mask1=umask, & 
    80                &                    tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
    81          CALL dyn_spg_ts     ( kt ) 
    82          IF(ln_ctl)   CALL prt_ctl( tab3d_1=ua, clinfo1=' spg1 - Ua: ', mask1=umask, & 
    83                &                    tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
    84          CALL dyn_spg_flt  ( kt, kindic ) 
    85          IF(ln_ctl)   CALL prt_ctl( tab3d_1=ua, clinfo1=' spg2 - Ua: ', mask1=umask, & 
    86                &                    tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
    87          CALL dyn_spg_exp_jki( kt ) 
    88          IF(ln_ctl)   CALL prt_ctl( tab3d_1=ua, clinfo1=' spg10- Ua: ', mask1=umask, & 
    89                &                    tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
    90          CALL dyn_spg_ts_jki ( kt ) 
    91          IF(ln_ctl)   CALL prt_ctl( tab3d_1=ua, clinfo1=' spg12- Ua: ', mask1=umask, & 
    92                &                    tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
    93          CALL dyn_spg_flt_jki( kt, kindic ) 
    94          IF(ln_ctl)   CALL prt_ctl( tab3d_1=ua, clinfo1=' spg13- Ua: ', mask1=umask, & 
    95                &                    tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
    96       CASE (  0 )                                       ! explicit 
    97          CALL dyn_spg_exp    ( kt ) 
    98       CASE (  1 )                                       ! time-splitting 
    99          CALL dyn_spg_ts     ( kt ) 
    100       CASE (  2 )                                       ! filtered 
    101          CALL dyn_spg_flt    ( kt, kindic ) 
    102       CASE (  3 )                                       ! rigid lid 
    103          CALL dyn_spg_rl     ( kt, kindic ) 
    104  
    105       CASE ( 10 )                                       ! explicit with j-k-i loop 
    106          CALL dyn_spg_exp_jki( kt ) 
    107       CASE ( 11 )                                       ! time-splitting with j-k-i loop 
    108          CALL dyn_spg_ts_jki ( kt ) 
    109       CASE ( 12 )                                       ! filtered with j-k-i loop 
    110          CALL dyn_spg_flt_jki( kt, kindic ) 
     81         ;              CALL dyn_spg_exp    ( kt ) 
     82         ;              CALL prt_ctl( tab3d_1=ua, clinfo1=' spg0 - Ua: ', mask1=umask, & 
     83            &                         tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
     84         ;              CALL dyn_spg_ts     ( kt ) 
     85         ;              CALL prt_ctl( tab3d_1=ua, clinfo1=' spg1 - Ua: ', mask1=umask, & 
     86            &                         tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
     87         ;              CALL dyn_spg_flt  ( kt, kindic ) 
     88         ;              CALL prt_ctl( tab3d_1=ua, clinfo1=' spg2 - Ua: ', mask1=umask, & 
     89            &                         tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
     90         ;              CALL dyn_spg_exp_jki( kt ) 
     91         ;              CALL prt_ctl( tab3d_1=ua, clinfo1=' spg10- Ua: ', mask1=umask, & 
     92            &                         tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
     93         ;              CALL dyn_spg_ts_jki ( kt ) 
     94         ;              CALL prt_ctl( tab3d_1=ua, clinfo1=' spg12- Ua: ', mask1=umask, & 
     95            &                         tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
     96         ;              CALL dyn_spg_flt_jki( kt, kindic ) 
     97         ;              CALL prt_ctl( tab3d_1=ua, clinfo1=' spg13- Ua: ', mask1=umask, & 
     98            &                         tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
    11199      END SELECT 
    112  
    113       !                                          ! save the horizontal diffusive trends for further diagnostics 
    114       IF( l_trddyn )   THEN 
     100      !                     
     101      IF( l_trddyn )   THEN                      ! save the horizontal diffusive trends for further diagnostics 
    115102         SELECT CASE ( nspg ) 
    116103         CASE ( 0, 1, 3, 10, 11 ) 
     
    123110            ztrdv(:,:,:) = ( va(:,:,:) - vb(:,:,:) ) / z2dt - ztrdv(:,:,:) 
    124111         END SELECT 
    125          CALL trd_mod( ztrdu, ztrdv, jpdtdspg, 'DYN', kt ) 
    126       ENDIF 
    127  
     112         CALL trd_mod( ztrdu, ztrdv, jpdyn_trd_spg, 'DYN', kt ) 
     113      ENDIF 
    128114      !                                          ! print mean trends (used for debugging) 
    129115      IF(ln_ctl)   CALL prt_ctl( tab3d_1=ua, clinfo1=' spg  - Ua: ', mask1=umask, & 
    130116         &                       tab3d_2=va, clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
    131  
     117      ! 
    132118   END SUBROUTINE dyn_spg 
    133119 
     
    139125      !! ** Purpose :   Control the consistency between cpp options for  
    140126      !!      surface pressure gradient schemes 
    141       !! 
    142       !! History : 
    143       !!   9.0  !  05-10  (V. Garnier)  Original code : spg re-organization 
    144127      !!---------------------------------------------------------------------- 
    145128      !! * Local declarations 
Note: See TracChangeset for help on using the changeset viewer.