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 1408 for branches/dev_004_VVL/NEMO/OPA_SRC/DYN/dynspg_flt.F90 – NEMO

Ignore:
Timestamp:
2009-04-17T11:59:49+02:00 (15 years ago)
Author:
rblod
Message:

dev_004_VVL: cosmetic changes and code review

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/dev_004_VVL/NEMO/OPA_SRC/DYN/dynspg_flt.F90

    r1390 r1408  
    44   !! Ocean dynamics:  surface pressure gradient trend 
    55   !!====================================================================== 
    6    !! History    8.0  !  98-05  (G. Roullet)  free surface 
    7    !!                 !  98-10  (G. Madec, M. Imbard)  release 8.2 
    8    !!            8.5  !  02-08  (G. Madec)  F90: Free form and module 
    9    !!            " "  !  02-11  (C. Talandier, A-M Treguier) Open boundaries 
    10    !!            9.0  !  04-08  (C. Talandier) New trends organization 
    11    !!            " "  !  05-11  (V. Garnier) Surface pressure gradient organization 
    12    !!            " "  !  06-07  (S. Masson)  distributed restart using iom 
    13    !!            " "  !  05-01  (J.Chanut, A.Sellar) Calls to BDY routines.  
     6   !! History    OPA  !  1998-05  (G. Roullet)  free surface 
     7   !!                 !  1998-10  (G. Madec, M. Imbard)  release 8.2 
     8   !!   NEMO     O.1  !  2002-08  (G. Madec)  F90: Free form and module 
     9   !!             -   !  2002-11  (C. Talandier, A-M Treguier) Open boundaries 
     10   !!            1.0  !  2004-08  (C. Talandier) New trends organization 
     11   !!             -   !  2005-11  (V. Garnier) Surface pressure gradient organization 
     12   !!            2.0  !  2006-07  (S. Masson)  distributed restart using iom 
     13   !!             -   !  2006-08  (J.Chanut, A.Sellar) Calls to BDY routines.  
     14   !!            3.2  !  2009-03  (G. Madec, M. Leclair, R. Benshila) introduce sshwzv module 
    1415   !!---------------------------------------------------------------------- 
    1516#if defined key_dynspg_flt   ||   defined key_esopa   
    1617   !!---------------------------------------------------------------------- 
    1718   !!   'key_dynspg_flt'                              filtered free surface 
    18    !!---------------------------------------------------------------------- 
    1919   !!---------------------------------------------------------------------- 
    2020   !!   dyn_spg_flt  : update the momentum trend with the surface pressure 
     
    5353   PRIVATE 
    5454 
    55    PUBLIC dyn_spg_flt  ! routine called by step.F90 
    56    PUBLIC flt_rst      ! routine called by istate.F90 
     55   PUBLIC   dyn_spg_flt  ! routine called by step.F90 
     56   PUBLIC   flt_rst      ! routine called by istate.F90 
    5757 
    5858   !! * Substitutions 
     
    6060#  include "vectopt_loop_substitute.h90" 
    6161   !!---------------------------------------------------------------------- 
    62    !!   OPA 9.0 , LOCEAN-IPSL (2005)  
     62   !! NEMO/OPA 3.2 , LOCEAN-IPSL (2009)  
    6363   !! $Id$ 
    6464   !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt)  
     
    8080      !!         spgv = 1/rau0 d/dy(ps) =  1/e2v dj( sshn + rnu btda ) 
    8181      !!      where sshn is the free surface elevation and btda is the after 
    82       !!      of the free surface elevation 
     82      !!      time derivative of the free surface elevation 
    8383      !!       -1- evaluate the surface presure trend (including the addi- 
    8484      !!      tional force) in three steps: 
     
    104104      !! References : Roullet and Madec 1999, JGR. 
    105105      !!--------------------------------------------------------------------- 
    106       !! * Modules used 
    107       USE oce    , ONLY :   zub   => ta,             &  ! ta used as workspace 
    108                             zvb   => sa                 ! sa   "          " 
    109  
    110       INTEGER, INTENT( in )  ::   kt         ! ocean time-step index 
    111       INTEGER, INTENT( out ) ::   kindic     ! solver convergence flag (<0 if not converge) 
     106      USE oce, ONLY :   zub   => ta   ! ta used as workspace 
     107      USE oce, ONLY :   zvb   => sa   ! ta used as workspace 
     108      !! 
     109      INTEGER, INTENT( in )  ::   kt       ! ocean time-step index 
     110      INTEGER, INTENT( out ) ::   kindic   ! solver convergence flag (<0 if not converge) 
    112111      !!                                    
    113112      INTEGER  ::   ji, jj, jk                          ! dummy loop indices 
    114       REAL(wp) ::   z2dt, z2dtg, zraur, znugdt,      &  ! temporary scalars 
    115          &          znurau, zgcb, zbtd,              &  !   "          " 
    116          &          ztdgu, ztdgv                        !   "          " 
     113      REAL(wp) ::   z2dt, z2dtg, zraur, znugdt          ! temporary scalars 
     114      REAL(wp) ::   znurau, zgcb, zbtd                  !   "          " 
     115      REAL(wp) ::   ztdgu, ztdgv                        !   "          " 
    117116      !!---------------------------------------------------------------------- 
    118117      ! 
     
    130129         ! when using agrif, sshn, gcx have to be read in istate 
    131130         IF (.NOT. lk_agrif) CALL flt_rst( nit000, 'READ' )       ! read or initialize the following fields: 
    132          !                                                        ! gcx, gcxb, sshb, sshn 
     131         !                                                        ! gcx, gcxb 
    133132      ENDIF 
    134133 
     
    354353         DO jj = 2, jpjm1 
    355354            DO ji = fs_2, fs_jpim1   ! vector opt. 
    356                ua(ji,jj,jk) = (ua(ji,jj,jk) + spgu(ji,jj)) * umask(ji,jj,jk) 
    357                va(ji,jj,jk) = (va(ji,jj,jk) + spgv(ji,jj)) * vmask(ji,jj,jk) 
     355               ua(ji,jj,jk) = ( ua(ji,jj,jk) + spgu(ji,jj) ) * umask(ji,jj,jk) 
     356               va(ji,jj,jk) = ( va(ji,jj,jk) + spgv(ji,jj) ) * vmask(ji,jj,jk) 
    358357            END DO 
    359358         END DO 
     
    363362      ! -------------------------------------------------- 
    364363      IF( lrst_oce ) CALL flt_rst( kt, 'WRITE' ) 
    365  
    366       ! print sum trends (used for debugging) 
    367       IF(ln_ctl)     CALL prt_ctl( tab2d_1=sshn, clinfo1=' spg  - ssh: ', mask1=tmask ) 
    368364      ! 
    369365   END SUBROUTINE dyn_spg_flt 
     
    386382           CALL iom_get( numror, jpdom_autoglo, 'gcx' , gcx (1:jpi,1:jpj) ) 
    387383           CALL iom_get( numror, jpdom_autoglo, 'gcxb', gcxb(1:jpi,1:jpj) ) 
    388            IF( neuler == 0 ) THEN 
    389               gcxb(:,:) = gcx (:,:) 
    390            ENDIF 
     384           IF( neuler == 0 )   gcxb(:,:) = gcx (:,:) 
    391385        ELSE 
    392386           gcx (:,:) = 0.e0 
     
    396390! Caution : extra-hallow 
    397391! gcx and gcxb are defined as: DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj) 
    398         CALL iom_rstput( kt, nitrst, numrow, 'gcx' , gcx( 1:jpi,1:jpj) ) 
     392        CALL iom_rstput( kt, nitrst, numrow, 'gcx' , gcx (1:jpi,1:jpj) ) 
    399393        CALL iom_rstput( kt, nitrst, numrow, 'gcxb', gcxb(1:jpi,1:jpj) ) 
    400394     ENDIF 
Note: See TracChangeset for help on using the changeset viewer.