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 6140 for trunk/NEMOGCM/NEMO/OPA_SRC/C1D/dyndmp.F90 – NEMO

Ignore:
Timestamp:
2015-12-21T12:35:23+01:00 (8 years ago)
Author:
timgraham
Message:

Merge of branches/2015/dev_merge_2015 back into trunk. Merge excludes NEMOGCM/TOOLS/OBSTOOLS/ for now due to issues with the change of file type. Will sort these manually with further commits.

Branch merged as follows:
In the working copy of branch ran:
svn merge svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk@HEAD
Small conflicts due to bug fixes applied to trunk since the dev_merge_2015 was copied. Bug fixes were applied to the branch as well so these were easy to resolve.
Branch committed at this stage

In working copy run:
svn switch svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/trunk
to switch working copy

Run:
svn merge --reintegrate svn+ssh://forge.ipsl.jussieu.fr/ipsl/forge/projets/nemo/svn/branches/2015/dev_merge_2015
to merge the branch into the trunk and then commit - no conflicts at this stage.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMOGCM/NEMO/OPA_SRC/C1D/dyndmp.F90

    r5215 r6140  
    2323   USE dtauvd         ! data: U & V current 
    2424   USE zdfmxl         ! vertical physics: mixed layer depth 
     25   ! 
    2526   USE in_out_manager ! I/O manager 
    2627   USE lib_mpp        ! MPP library 
     
    3637   PUBLIC   dyn_dmp      ! routine called by step_c1d.F90 
    3738 
    38    LOGICAL, PUBLIC ::   ln_dyndmp           ! Flag for Newtonian damping 
    39  
    40    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  utrdmp    ! damping U current trend (m/s2) 
    41    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  vtrdmp    ! damping V current trend (m/s2) 
    42    REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  resto_uv  ! restoring coeff. on U & V current 
     39   LOGICAL, PUBLIC ::   ln_dyndmp   !: Flag for Newtonian damping 
     40 
     41   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  utrdmp    !: damping U current trend (m/s2) 
     42   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  vtrdmp    !: damping V current trend (m/s2) 
     43   REAL(wp), PUBLIC, ALLOCATABLE, SAVE, DIMENSION(:,:,:) ::  resto_uv  !: restoring coeff. on U & V current 
    4344 
    4445   !! * Substitutions 
    45 #  include "domzgr_substitute.h90" 
    4646#  include "vectopt_loop_substitute.h90" 
    4747   !!---------------------------------------------------------------------- 
    48    !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
     48   !! NEMO/OPA 3.7 , NEMO Consortium (2015) 
    4949   !! $Id$  
    5050   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
     
    7575      !!              - calculate damping coefficient 
    7676      !!---------------------------------------------------------------------- 
     77      INTEGER ::   ios, imask   ! local integers 
     78      !! 
    7779      NAMELIST/namc1d_dyndmp/ ln_dyndmp 
    78       INTEGER :: ios 
    79       INTEGER :: imask 
    80       !!---------------------------------------------------------------------- 
    81  
     80      !!---------------------------------------------------------------------- 
     81      ! 
    8282      REWIND( numnam_ref )              ! Namelist namc1d_dyndmp in reference namelist :  
    8383      READ  ( numnam_ref, namc1d_dyndmp, IOSTAT = ios, ERR = 901) 
    84 901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d_dyndmp in reference namelist', lwp ) 
    85  
     84901   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namc1d_dyndmp in reference namelist', lwp ) 
     85      ! 
    8686      REWIND( numnam_cfg )              ! Namelist namc1d_dyndmp in configuration namelist : Parameters of the run 
    8787      READ  ( numnam_cfg, namc1d_dyndmp, IOSTAT = ios, ERR = 902 ) 
    88 902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namc1d_dyndmp in configuration namelist', lwp ) 
     88902   IF( ios /= 0 )   CALL ctl_nam ( ios , 'namc1d_dyndmp in configuration namelist', lwp ) 
    8989      IF(lwm) WRITE ( numond, namc1d_dyndmp ) 
    90  
     90      ! 
    9191      IF(lwp) THEN                           ! control print 
    9292         WRITE(numout,*) 
     
    101101         WRITE(numout,*) 
    102102      ENDIF 
    103  
     103      ! 
    104104      IF( ln_dyndmp ) THEN 
    105105         !                                   !==   allocate the data arrays   ==! 
     
    150150      !! ** Action  : - (ua,va)   momentum trends updated with the damping trend 
    151151      !!---------------------------------------------------------------------- 
    152       INTEGER, INTENT(in) ::   kt                        ! ocean time-step index 
    153       !! 
    154       INTEGER  ::   ji, jj, jk                           ! dummy loop indices 
    155       REAL(wp) ::   zua, zva                             ! local scalars 
    156       REAL(wp), POINTER, DIMENSION(:,:,:,:) ::  zuv_dta  ! Read in data  
     152      INTEGER, INTENT(in) ::   kt   ! ocean time-step index 
     153      !! 
     154      INTEGER  ::   ji, jj, jk   ! dummy loop indices 
     155      REAL(wp) ::   zua, zva     ! local scalars 
     156      REAL(wp), POINTER, DIMENSION(:,:,:,:) ::   zuv_dta   ! Read in data  
    157157      !!---------------------------------------------------------------------- 
    158158      ! 
    159159      IF( nn_timing == 1 )  CALL timing_start( 'dyn_dmp' ) 
    160160      ! 
    161       CALL wrk_alloc( jpi, jpj, jpk, 2,  zuv_dta ) 
     161      CALL wrk_alloc( jpi,jpj,jpk,2,   zuv_dta ) 
    162162      ! 
    163163      !                           !==   read and interpolate U & V current data at kt   ==! 
     
    204204            DO jj = 2, jpjm1 
    205205               DO ji = fs_2, fs_jpim1   ! vector opt. 
    206                   IF( fsdept(ji,jj,jk) >= hmlp (ji,jj) ) THEN 
     206                  IF( gdept_n(ji,jj,jk) >= hmlp (ji,jj) ) THEN 
    207207                     zua = resto_uv(ji,jj,jk) * ( zuv_dta(ji,jj,jk,1) - ub(ji,jj,jk) ) 
    208208                     zva = resto_uv(ji,jj,jk) * ( zuv_dta(ji,jj,jk,2) - vb(ji,jj,jk) ) 
     
    221221      END SELECT 
    222222      ! 
    223 !!gm      !                           ! Trend diagnostic 
    224 !!gm      IF( l_trddyn )   CALL trd_mod( utrdmp, vtrdmp, jpdyn_trd_dat, 'DYN', kt ) 
    225       ! 
    226223      !                           ! Control print 
    227224      IF( ln_ctl   )   CALL prt_ctl( tab3d_1=ua(:,:,:), clinfo1=' dmp  - Ua: ', mask1=umask,   & 
    228225         &                           tab3d_2=va(:,:,:), clinfo2=       ' Va: ', mask2=vmask, clinfo3='dyn' ) 
    229226      ! 
    230       CALL wrk_dealloc( jpi, jpj, jpk, 2,  zuv_dta ) 
     227      CALL wrk_dealloc( jpi,jpj,jpk,2,   zuv_dta ) 
    231228      ! 
    232229      IF( nn_timing == 1 )  CALL timing_stop( 'dyn_dmp') 
Note: See TracChangeset for help on using the changeset viewer.