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 6900 for branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/OVERFLOW/MY_SRC/usrdef_hgr.F90 – NEMO

Ignore:
Timestamp:
2016-08-29T17:55:22+02:00 (8 years ago)
Author:
flavoni
Message:

#1692 and ROBUST-3 : Update OVERFLOW configuration, and some cleaning

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2016/dev_r6409_SIMPLIF_2_usrdef/NEMOGCM/CONFIG/OVERFLOW/MY_SRC/usrdef_hgr.F90

    r6895 r6900  
    22   !!============================================================================== 
    33   !!                       ***  MODULE usrdef_hgr   *** 
    4    !! User defined module: used like example to define domain, init, sbc, ... 
     4   !! 
     5   !!                     ===  OVERFLOW configuration  === 
     6   !! 
     7   !! User defined : horizontal mesh    
    58   !!============================================================================== 
    6    !! History :  NEMO ! 2016-03  (S. Flavoni)  
     9   !! History :  NEMO  ! 2016-08  (S. Flavoni, G. Madec)  Original code 
    710   !!---------------------------------------------------------------------- 
    811 
    912   !!---------------------------------------------------------------------- 
    10    !!   usr_def_hgr   : initialize the horizontal mesh  
     13   !!   usr_def_hgr    : initialize the horizontal mesh for OVERFLOW configuration 
    1114   !!---------------------------------------------------------------------- 
    12    USE dom_oce  , ONLY: nimpp, njmpp       ! ocean space and time domain 
    13    USE par_oce        ! ocean space and time domain 
    14    USE phycst         ! physical constants 
    15    USE usrdef_nam     ! 
     15   USE dom_oce  ,  ONLY: nimpp, njmpp       ! ocean space and time domain 
     16   USE par_oce         ! ocean space and time domain 
     17   USE phycst          ! physical constants 
     18   USE usrdef_nam, ONLY: rn_dx   ! horizontal resolution in meters 
    1619   ! 
    17    USE in_out_manager ! I/O manager 
    18    USE lib_mpp        ! MPP library 
    19    USE timing         ! Timing 
     20   USE in_out_manager  ! I/O manager 
     21   USE lib_mpp         ! MPP library 
     22   USE timing          ! Timing 
    2023    
    2124   IMPLICIT NONE 
     
    4346      !! 
    4447      !! ** Method  :   set all intent(out) argument to a proper value 
    45       !! 
    46       !!                Here OVERFLOW configuration : 
    47       !!           periodic domain (north/south) over an overflow bathymetry 
    48       !!          - on a beta-plane 
    49       !!          - with NO Coriolis  
     48      !!                OVERFLOW configuration : uniform grid spacing (1km) 
     49      !!                without Coriolis force (f=0) 
    5050      !! 
    5151      !! ** Action  : - define longitude & latitude of t-, u-, v- and f-points (in degrees)  
     
    6363      REAL(wp), DIMENSION(:,:), INTENT(out) ::   pe1e2u, pe1e2v               ! u- & v-surfaces (if reduction in strait)   [m2] 
    6464      ! 
    65       INTEGER  ::   ji, jj               ! dummy loop indices 
    66       REAL(wp) ::   zlam1, zlam0, zcos_alpha, zim1 , zjm1 , ze1  , ze1deg, zf0 ! local scalars 
    67       REAL(wp) ::   zphi1, zphi0, zsin_alpha, zim05, zjm05, zbeta, znorme      !   -      - 
     65      INTEGER  ::   ji, jj   ! dummy loop indices 
     66      REAL(wp) ::   zfact      ! local scalars 
    6867      !!------------------------------------------------------------------------------- 
    6968      ! 
    7069      IF( nn_timing == 1 )  CALL timing_start('usr_def_hgr') 
    7170      ! 
    72       !     !==  beta-plane with regular grid-spacing and rotated domain ==!  (OVERFLOW configuration) 
     71      IF(lwp) WRITE(numout,*) 
     72      IF(lwp) WRITE(numout,*) 'usr_def_hgr : OVERFLOW configuration bassin' 
     73      IF(lwp) WRITE(numout,*) '~~~~~~~~~~~   uniform 1km grid spacing WITHOUT Coriolis force (f=0)' 
    7374      ! 
    74       IF(lwp) WRITE(numout,*) 
    75       IF(lwp) WRITE(numout,*) 'usr_def_hgr : OVERFLOW configuration bassin on beta-plane with NO Coriolis)' 
    76       IF(lwp) WRITE(numout,*) '~~~~~~~~~~~' 
    77       ! 
    78       ! 
    79       !                       !==  grid point position  ==! 
    80       !                       !==  f-plane with regular grid-spacing  ==! 
    81       ! 
    82       IF(lwp) WRITE(numout,*) 
    83       IF(lwp) WRITE(numout,*) ' OVERFLOW f-plane with regular grid-spacing' 
    84       ! 
    85       ! Position coordinates  
    86       !                          ========== 
     75      !                       !==  grid point position  ==!   (in kilometers) 
     76      zfact = rn_dx * 1.e-3         ! conversion in km 
    8777      DO jj = 1, jpj 
    88          DO ji = 1, jpi 
    89             ! glamt(i,j) longitude at T-point 
    90             pglamt(ji,jj) = - 0.5 + ( REAL( ji - 1 + nimpp - 1 )       ) 
    91             ! glamu(i,j) longitude at U-point 
    92             pglamu(ji,jj) = - 0.5 + ( REAL( ji - 1 + nimpp - 1 ) + 0.5 ) 
    93             ! glamv(i,j) longitude at V-point 
     78         DO ji = 1, jpi             ! longitude 
     79            pglamt(ji,jj) = zfact * (  - 0.5 + ( REAL( ji-1 + nimpp-1 )       , wp )  ) 
     80            pglamu(ji,jj) = zfact * (  - 0.5 + ( REAL( ji-1 + nimpp-1 ) + 0.5 , wp )  ) 
    9481            pglamv(ji,jj) = pglamt(ji,jj) 
    95             ! glamf(i,j) longitude at F-point 
    9682            pglamf(ji,jj) = pglamu(ji,jj) 
    97             ! 
    98             !gphit(i,j) latitude at T-point 
    99             pgphit(ji,jj) = - 0.5 + ( REAL( jj - 1 + njmpp - 1 )       ) 
    100             !gphiu(i,j) latitude at U-point 
     83            !                       ! latitude 
     84            pgphit(ji,jj) = zfact * (  - 0.5 + ( REAL( jj-1 + njmpp-1 )       , wp )  ) 
    10185            pgphiu(ji,jj) = pgphit(ji,jj) 
    102             !gphiv(i,j) latitude at V-point 
    103             pgphiv(ji,jj) = - 0.5 + ( REAL( jj - 1 + njmpp - 1 ) + 0.5 ) 
    104             !gphif(i,j) latitude at F-point 
     86            pgphiv(ji,jj) = zfact * (  - 0.5 + ( REAL( jj-1 + njmpp-1 ) + 0.5 , wp )  ) 
    10587            pgphif(ji,jj) = pgphiv(ji,jj) 
    10688         END DO 
    10789      END DO 
    10890      ! 
    109       ! Horizontal scale factors (in meters) 
    110       !                              ====== 
    111       pe1t(:,:) = 1000      ;      pe2t(:,:) = 1000 
    112       pe1u(:,:) = 1000      ;      pe2u(:,:) = 1000 
    113       pe1v(:,:) = 1000      ;      pe2v(:,:) = 1000 
    114       pe1f(:,:) = 1000      ;      pe2f(:,:) = 1000 
     91      !                       !==  Horizontal scale factors  ==!   (in meters)  
     92      pe1t(:,:) = rn_dx   ;   pe2t(:,:) = rn_dx 
     93      pe1u(:,:) = rn_dx   ;   pe2u(:,:) = rn_dx 
     94      pe1v(:,:) = rn_dx   ;   pe2v(:,:) = rn_dx 
     95      pe1f(:,:) = rn_dx   ;   pe2f(:,:) = rn_dx 
    11596      ! 
    116       !                                         ! NO reduction of grid size in some straits  
    117       ke1e2u_v = 0                              !    ==>> u_ & v_surfaces will be computed in dom_ghr routine 
     97      !                             ! NO reduction of grid size in some straits  
     98      ke1e2u_v = 0                  !    ==>> u_ & v_surfaces will be computed in dom_ghr routine 
    11899      ! 
    119100      ! 
    120101      !                       !==  Coriolis parameter  ==! 
    121       kff = 1                                            !  indicate not to compute ff afterward 
     102      kff = 1                       !  indicate not to compute Coriolis parameter afterward 
    122103      ! 
    123       pff_f(:,:) = 0 
    124       pff_t(:,:) = 0 
    125       ! 
    126       IF(lwp) WRITE(numout,*) '                           beta-plane used. beta = ', zbeta, ' 1/(s.m)' 
     104      pff_f(:,:) = 0._wp            ! here No earth rotation: f=0 
     105      pff_t(:,:) = 0._wp 
    127106      ! 
    128107      IF( nn_timing == 1 )  CALL timing_stop('usr_def_hgr') 
Note: See TracChangeset for help on using the changeset viewer.