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 685 for trunk/NEMO/OPA_SRC/geo2ocean.F90 – NEMO

Ignore:
Timestamp:
2007-06-29T18:41:37+02:00 (17 years ago)
Author:
rblod
Message:

nemo_v2_bugfix_055: RB : adapt geo2ocean to AGRIF (change function to subroutine) and suppress useless dummy argument

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/NEMO/OPA_SRC/geo2ocean.F90

    r672 r685  
    3838   !!--------------------------------------------------------------------------------- 
    3939   !!   OPA 9.0 , LOCEAN-IPSL (2005)  
    40    !! $Header$  
     40   !! $Header: /home/opalod/NEMOCVSROOT/NEMO/OPA_SRC/geo2ocean.F90,v 1.7 2007/06/29 14:23:06 opalod Exp $  
    4141   !! This software is governed by the CeCILL licence see modipsl/doc/NEMO_CeCILL.txt  
    4242   !!--------------------------------------------------------------------------------- 
     
    4545 
    4646   SUBROUTINE repcmo ( pxu1, pyu1, pxv1, pyv1,   & 
    47                        px2 , py2 , kt ) 
     47                       px2 , py2 ) 
    4848      !!---------------------------------------------------------------------- 
    4949      !!                  ***  ROUTINE repcmo  *** 
     
    6262      !!---------------------------------------------------------------------- 
    6363      !! * Arguments  
    64       INTEGER,  INTENT( in ) ::   & 
    65          kt                ! ocean time-step 
    6664      REAL(wp), INTENT( in ), DIMENSION(jpi,jpj) ::   &  
    6765         pxu1, pyu1,     & ! geographic vector componantes at u-point 
     
    7573      ! ---------------------------------------------- 
    7674       
    77       px2(:,:) = rot_rep( pxu1, pyu1, 'U', 'en->i' ) 
    78       py2(:,:) = rot_rep( pxv1, pyv1, 'V', 'en->j' ) 
     75      CALL rot_rep( pxu1, pyu1, 'U', 'en->i',px2 ) 
     76      CALL rot_rep( pxv1, pyv1, 'V', 'en->j',py2 ) 
    7977       
    8078   END SUBROUTINE repcmo 
    8179 
    8280 
    83    FUNCTION rot_rep ( pxin, pyin, cd_type, cdtodo ) 
     81   SUBROUTINE rot_rep ( pxin, pyin, cd_type, cdtodo, prot ) 
    8482      !!---------------------------------------------------------------------- 
    8583      !!                  ***  ROUTINE rot_rep  *** 
     
    10098      !!                                                           ! 'ij->e' model i-j componantes to east componante 
    10199      !!                                                           ! 'ij->n' model i-j componantes to east componante 
    102       REAL(wp), DIMENSION(jpi,jpj) ::   rot_rep       
     100      REAL(wp), DIMENSION(jpi,jpj), INTENT(out) ::   prot       
    103101 
    104102      !!---------------------------------------------------------------------- 
     
    120118      CASE ('en->i')      ! 'en->i' est-north componantes to model i componante 
    121119         SELECT CASE (cd_type) 
    122          CASE ('T')   ;   rot_rep(:,:) = pxin(:,:) * gcost(:,:) + pyin(:,:) * gsint(:,:) 
    123          CASE ('U')   ;   rot_rep(:,:) = pxin(:,:) * gcosu(:,:) + pyin(:,:) * gsinu(:,:) 
    124          CASE ('V')   ;   rot_rep(:,:) = pxin(:,:) * gcosv(:,:) + pyin(:,:) * gsinv(:,:) 
    125          CASE ('F')   ;   rot_rep(:,:) = pxin(:,:) * gcosf(:,:) + pyin(:,:) * gsinf(:,:) 
     120         CASE ('T')   ;   prot(:,:) = pxin(:,:) * gcost(:,:) + pyin(:,:) * gsint(:,:) 
     121         CASE ('U')   ;   prot(:,:) = pxin(:,:) * gcosu(:,:) + pyin(:,:) * gsinu(:,:) 
     122         CASE ('V')   ;   prot(:,:) = pxin(:,:) * gcosv(:,:) + pyin(:,:) * gsinv(:,:) 
     123         CASE ('F')   ;   prot(:,:) = pxin(:,:) * gcosf(:,:) + pyin(:,:) * gsinf(:,:) 
    126124         CASE DEFAULT   ;   CALL ctl_stop( 'Only T, U, V and F grid points are coded' ) 
    127125         END SELECT 
    128126      CASE ('en->j')      ! 'en->j' est-north componantes to model j componante 
    129127         SELECT CASE (cd_type) 
    130          CASE ('T')   ;   rot_rep(:,:) = pyin(:,:) * gcost(:,:) - pxin(:,:) * gsint(:,:) 
    131          CASE ('U')   ;   rot_rep(:,:) = pyin(:,:) * gcosu(:,:) - pxin(:,:) * gsinu(:,:) 
    132          CASE ('V')   ;   rot_rep(:,:) = pyin(:,:) * gcosv(:,:) - pxin(:,:) * gsinv(:,:)    
    133          CASE ('F')   ;   rot_rep(:,:) = pyin(:,:) * gcosf(:,:) - pxin(:,:) * gsinf(:,:)    
     128         CASE ('T')   ;   prot(:,:) = pyin(:,:) * gcost(:,:) - pxin(:,:) * gsint(:,:) 
     129         CASE ('U')   ;   prot(:,:) = pyin(:,:) * gcosu(:,:) - pxin(:,:) * gsinu(:,:) 
     130         CASE ('V')   ;   prot(:,:) = pyin(:,:) * gcosv(:,:) - pxin(:,:) * gsinv(:,:)    
     131         CASE ('F')   ;   prot(:,:) = pyin(:,:) * gcosf(:,:) - pxin(:,:) * gsinf(:,:)    
    134132         CASE DEFAULT   ;   CALL ctl_stop( 'Only T, U, V and F grid points are coded' ) 
    135133         END SELECT 
    136134      CASE ('ij->e')      ! 'ij->e' model i-j componantes to est componante 
    137135         SELECT CASE (cd_type) 
    138          CASE ('T')   ;   rot_rep(:,:) = pxin(:,:) * gcost(:,:) - pyin(:,:) * gsint(:,:) 
    139          CASE ('U')   ;   rot_rep(:,:) = pxin(:,:) * gcosu(:,:) - pyin(:,:) * gsinu(:,:) 
    140          CASE ('V')   ;   rot_rep(:,:) = pxin(:,:) * gcosv(:,:) - pyin(:,:) * gsinv(:,:) 
    141          CASE ('F')   ;   rot_rep(:,:) = pxin(:,:) * gcosf(:,:) - pyin(:,:) * gsinf(:,:) 
     136         CASE ('T')   ;   prot(:,:) = pxin(:,:) * gcost(:,:) - pyin(:,:) * gsint(:,:) 
     137         CASE ('U')   ;   prot(:,:) = pxin(:,:) * gcosu(:,:) - pyin(:,:) * gsinu(:,:) 
     138         CASE ('V')   ;   prot(:,:) = pxin(:,:) * gcosv(:,:) - pyin(:,:) * gsinv(:,:) 
     139         CASE ('F')   ;   prot(:,:) = pxin(:,:) * gcosf(:,:) - pyin(:,:) * gsinf(:,:) 
    142140         CASE DEFAULT   ;   CALL ctl_stop( 'Only T, U, V and F grid points are coded' ) 
    143141         END SELECT 
    144142      CASE ('ij->n')      ! 'ij->n' model i-j componantes to est componante 
    145143         SELECT CASE (cd_type) 
    146          CASE ('T')   ;   rot_rep(:,:) = pyin(:,:) * gcost(:,:) + pxin(:,:) * gsint(:,:) 
    147          CASE ('U')   ;   rot_rep(:,:) = pyin(:,:) * gcosu(:,:) + pxin(:,:) * gsinu(:,:) 
    148          CASE ('V')   ;   rot_rep(:,:) = pyin(:,:) * gcosv(:,:) + pxin(:,:) * gsinv(:,:) 
    149          CASE ('F')   ;   rot_rep(:,:) = pyin(:,:) * gcosf(:,:) + pxin(:,:) * gsinf(:,:) 
     144         CASE ('T')   ;   prot(:,:) = pyin(:,:) * gcost(:,:) + pxin(:,:) * gsint(:,:) 
     145         CASE ('U')   ;   prot(:,:) = pyin(:,:) * gcosu(:,:) + pxin(:,:) * gsinu(:,:) 
     146         CASE ('V')   ;   prot(:,:) = pyin(:,:) * gcosv(:,:) + pxin(:,:) * gsinv(:,:) 
     147         CASE ('F')   ;   prot(:,:) = pyin(:,:) * gcosf(:,:) + pxin(:,:) * gsinf(:,:) 
    150148         CASE DEFAULT   ;   CALL ctl_stop( 'Only T, U, V and F grid points are coded' ) 
    151149         END SELECT 
     
    153151      END SELECT 
    154152       
    155    END FUNCTION rot_rep 
     153   END SUBROUTINE rot_rep 
    156154 
    157155 
     
    438436      SELECT CASE (kchoix) 
    439437      CASE ( 1)      ! change from geographic to model grid. 
    440          px2(:,:) = rot_rep( px1, py1, cl_type, 'en->i' ) 
    441          py2(:,:) = rot_rep( px1, py1, cl_type, 'en->j' ) 
     438         CALL rot_rep( px1, py1, cl_type, 'en->i', px2 ) 
     439         CALL rot_rep( px1, py1, cl_type, 'en->j', py2 ) 
    442440      CASE (-1)      ! change from model to geographic grid 
    443          px2(:,:) = rot_rep( px1, py1, cl_type, 'ij->e' ) 
    444          py2(:,:) = rot_rep( px1, py1, cl_type, 'ij->n' ) 
     441         CALL rot_rep( px1, py1, cl_type, 'ij->e', px2 ) 
     442         CALL rot_rep( px1, py1, cl_type, 'ij->n', py2 ) 
    445443      CASE DEFAULT   ;   CALL ctl_stop( 'repere: Syntax Error in the definition of kchoix (1 OR -1' ) 
    446444      END SELECT 
Note: See TracChangeset for help on using the changeset viewer.