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 2690 for branches/dev_r2586_dynamic_mem/NEMOGCM/NEMO/OPA_SRC/DYN/dynspg_flt.F90 – NEMO

Ignore:
Timestamp:
2011-03-15T16:27:46+01:00 (13 years ago)
Author:
gm
Message:

dynamic mem: #785 ; homogeneization of the coding style associated with dyn allocation

File:
1 edited

Legend:

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

    r2674 r2690  
    6262   !! NEMO/OPA 3.3 , NEMO Consortium (2010) 
    6363   !! $Id$ 
    64    !! Software governed by the CeCILL licence (NEMOGCM/NEMO_CeCILL.txt) 
     64   !! Software governed by the CeCILL licence     (NEMOGCM/NEMO_CeCILL.txt) 
    6565   !!---------------------------------------------------------------------- 
    6666CONTAINS 
     
    103103      !! References : Roullet and Madec 1999, JGR. 
    104104      !!--------------------------------------------------------------------- 
    105       USE oce, ONLY :   zub   => ta   ! ta used as workspace 
    106       USE oce, ONLY :   zvb   => sa   ! ta used as workspace 
     105      USE oce, ONLY:   zub   => ta , zvb   => sa   ! (ta,sa) used as workspace 
    107106      !! 
    108107      INTEGER, INTENT(in   ) ::   kt       ! ocean time-step index 
    109108      INTEGER, INTENT(  out) ::   kindic   ! solver convergence flag (<0 if not converge) 
    110109      !!                                    
    111       INTEGER  ::   ji, jj, jk           ! dummy loop indices 
    112       REAL(wp) ::   z2dt, z2dtg          ! temporary scalars 
    113       REAL(wp) ::   zgcb, zbtd   !   -          - 
    114       REAL(wp) ::   ztdgu, ztdgv         !   -          - 
     110      INTEGER  ::   ji, jj, jk   ! dummy loop indices 
     111      REAL(wp) ::   z2dt, z2dtg, zgcb, zbtd, ztdgu, ztdgv   ! local scalars 
    115112      !!---------------------------------------------------------------------- 
    116113      ! 
     
    121118        
    122119         ! set to zero free surface specific arrays 
    123          spgu(:,:) = 0.e0                     ! surface pressure gradient (i-direction) 
    124          spgv(:,:) = 0.e0                     ! surface pressure gradient (j-direction) 
     120         spgu(:,:) = 0._wp                     ! surface pressure gradient (i-direction) 
     121         spgv(:,:) = 0._wp                     ! surface pressure gradient (j-direction) 
    125122 
    126123         ! read filtered free surface arrays in restart file 
     
    202199      DO jj = 2, jpjm1 
    203200         DO ji = fs_2, fs_jpim1   ! vector opt. 
    204             spgu(ji,jj) = 0.e0 
    205             spgv(ji,jj) = 0.e0 
     201            spgu(ji,jj) = 0._wp 
     202            spgv(ji,jj) = 0._wp 
    206203         END DO 
    207204      END DO 
     
    279276      ncut = 0 
    280277      ! if rnorme is 0, the solution is 0, the solver is not called 
    281       IF( rnorme == 0.e0 ) THEN 
    282          gcx(:,:) = 0.e0 
    283          res   = 0.e0 
     278      IF( rnorme == 0._wp ) THEN 
     279         gcx(:,:) = 0._wp 
     280         res   = 0._wp 
    284281         niter = 0 
    285282         ncut  = 999 
     
    353350 
    354351   SUBROUTINE flt_rst( kt, cdrw ) 
    355      !!--------------------------------------------------------------------- 
    356      !!                   ***  ROUTINE ts_rst  *** 
    357      !! 
    358      !! ** Purpose : Read or write filtered free surface arrays in restart file 
    359      !!---------------------------------------------------------------------- 
    360      INTEGER         , INTENT(in) ::   kt         ! ocean time-step 
    361      CHARACTER(len=*), INTENT(in) ::   cdrw       ! "READ"/"WRITE" flag 
    362      !!---------------------------------------------------------------------- 
    363  
    364      IF( TRIM(cdrw) == 'READ' ) THEN 
    365         IF( iom_varid( numror, 'gcx', ldstop = .FALSE. ) > 0 ) THEN 
     352      !!--------------------------------------------------------------------- 
     353      !!                   ***  ROUTINE ts_rst  *** 
     354      !! 
     355      !! ** Purpose : Read or write filtered free surface arrays in restart file 
     356      !!---------------------------------------------------------------------- 
     357      INTEGER         , INTENT(in) ::   kt         ! ocean time-step 
     358      CHARACTER(len=*), INTENT(in) ::   cdrw       ! "READ"/"WRITE" flag 
     359      !!---------------------------------------------------------------------- 
     360      ! 
     361      IF( TRIM(cdrw) == 'READ' ) THEN 
     362         IF( iom_varid( numror, 'gcx', ldstop = .FALSE. ) > 0 ) THEN 
    366363! Caution : extra-hallow 
    367364! gcx and gcxb are defined as: DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj) 
    368            CALL iom_get( numror, jpdom_autoglo, 'gcx' , gcx (1:jpi,1:jpj) ) 
    369            CALL iom_get( numror, jpdom_autoglo, 'gcxb', gcxb(1:jpi,1:jpj) ) 
    370            IF( neuler == 0 )   gcxb(:,:) = gcx (:,:) 
    371         ELSE 
    372            gcx (:,:) = 0.e0 
    373            gcxb(:,:) = 0.e0 
    374         ENDIF 
    375      ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN 
     365            CALL iom_get( numror, jpdom_autoglo, 'gcx' , gcx (1:jpi,1:jpj) ) 
     366            CALL iom_get( numror, jpdom_autoglo, 'gcxb', gcxb(1:jpi,1:jpj) ) 
     367            IF( neuler == 0 )   gcxb(:,:) = gcx (:,:) 
     368         ELSE 
     369            gcx (:,:) = 0.e0 
     370            gcxb(:,:) = 0.e0 
     371         ENDIF 
     372      ELSEIF( TRIM(cdrw) == 'WRITE' ) THEN 
    376373! Caution : extra-hallow 
    377374! gcx and gcxb are defined as: DIMENSION(1-jpr2di:jpi+jpr2di,1-jpr2dj:jpj+jpr2dj) 
    378         CALL iom_rstput( kt, nitrst, numrow, 'gcx' , gcx (1:jpi,1:jpj) ) 
    379         CALL iom_rstput( kt, nitrst, numrow, 'gcxb', gcxb(1:jpi,1:jpj) ) 
    380      ENDIF 
    381      ! 
     375         CALL iom_rstput( kt, nitrst, numrow, 'gcx' , gcx (1:jpi,1:jpj) ) 
     376         CALL iom_rstput( kt, nitrst, numrow, 'gcxb', gcxb(1:jpi,1:jpj) ) 
     377      ENDIF 
     378      ! 
    382379   END SUBROUTINE flt_rst 
    383380 
Note: See TracChangeset for help on using the changeset viewer.