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 10727 for utils/tools_AGRIF_CMEMS_2020/DOMAINcfg/src/domngb.F90 – NEMO

Ignore:
Timestamp:
2019-02-27T17:02:02+01:00 (5 years ago)
Author:
rblod
Message:

new nesting tools (attempt) and brutal cleaning of DOMAINcfg, see ticket #2129

File:
1 moved

Legend:

Unmodified
Added
Removed
  • utils/tools_AGRIF_CMEMS_2020/DOMAINcfg/src/domngb.F90

    r10725 r10727  
    1111   !!---------------------------------------------------------------------- 
    1212   USE dom_oce        ! ocean space and time domain 
     13   ! 
    1314   USE in_out_manager ! I/O manager 
    1415   USE lib_mpp        ! for mppsum 
    15    USE wrk_nemo       ! Memory allocation 
    16    USE timing         ! Timing 
    1716 
    1817   IMPLICIT NONE 
     
    2322   !!---------------------------------------------------------------------- 
    2423   !! NEMO/OCE 4.0 , NEMO Consortium (2018) 
    25    !! $Id: domngb.F90 6140 2015-12-21 11:35:23Z timgraham $  
    26    !! Software governed by the CeCILL licence     (./LICENSE) 
     24   !! $Id: domngb.F90 10425 2018-12-19 21:54:16Z smasson $  
     25   !! Software governed by the CeCILL license (see ./LICENSE) 
    2726   !!---------------------------------------------------------------------- 
    2827CONTAINS 
     
    4544      INTEGER , DIMENSION(2) ::   iloc 
    4645      REAL(wp)               ::   zlon, zmini 
    47       REAL(wp), POINTER, DIMENSION(:,:) ::  zglam, zgphi, zmask, zdist 
     46      REAL(wp), DIMENSION(jpi,jpj) ::   zglam, zgphi, zmask, zdist 
    4847      !!-------------------------------------------------------------------- 
    49       ! 
    50       IF( nn_timing == 1 )  CALL timing_start('dom_ngb') 
    51       ! 
    52       CALL wrk_alloc( jpi,jpj,   zglam, zgphi, zmask, zdist ) 
    5348      ! 
    5449      zmask(:,:) = 0._wp 
     
    6257      END SELECT 
    6358 
    64       IF (jphgr_msh /= 2 .AND. jphgr_msh /= 3) THEN 
    65          zlon       = MOD( plon       + 720., 360. )                                     ! plon between    0 and 360 
    66          zglam(:,:) = MOD( zglam(:,:) + 720., 360. )                                     ! glam between    0 and 360 
    67          IF( zlon > 270. )   zlon = zlon - 360.                                          ! zlon between  -90 and 270 
    68          IF( zlon <  90. )   WHERE( zglam(:,:) > 180. ) zglam(:,:) = zglam(:,:) - 360.   ! glam between -180 and 180 
    69          zglam(:,:) = zglam(:,:) - zlon 
    70       ELSE 
    71          zglam(:,:) = zglam(:,:) - plon 
    72       END IF 
     59      zlon       = MOD( plon       + 720., 360. )                                     ! plon between    0 and 360 
     60      zglam(:,:) = MOD( zglam(:,:) + 720., 360. )                                     ! glam between    0 and 360 
     61      IF( zlon > 270. )   zlon = zlon - 360.                                          ! zlon between  -90 and 270 
     62      IF( zlon <  90. )   WHERE( zglam(:,:) > 180. ) zglam(:,:) = zglam(:,:) - 360.   ! glam between -180 and 180 
     63      zglam(:,:) = zglam(:,:) - zlon 
    7364 
    7465      zgphi(:,:) = zgphi(:,:) - plat 
     
    7667       
    7768      IF( lk_mpp ) THEN   
    78          CALL mpp_minloc( zdist(:,:), zmask, zmini, kii, kjj) 
     69         CALL mpp_minloc( 'domngb', zdist(:,:), zmask, zmini, iloc) 
     70         kii = iloc(1) ; kjj = iloc(2) 
    7971      ELSE 
    8072         iloc(:) = MINLOC( zdist(:,:), mask = zmask(:,:) == 1.e0 ) 
     
    8375      ENDIF 
    8476      ! 
    85       CALL wrk_dealloc( jpi,jpj,   zglam, zgphi, zmask, zdist ) 
    86       ! 
    87       IF( nn_timing == 1 )  CALL timing_stop('dom_ngb') 
    88       ! 
    8977   END SUBROUTINE dom_ngb 
    9078 
Note: See TracChangeset for help on using the changeset viewer.