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 14058 for NEMO/branches/2020/dev_r13723_KERNEL-01_Amy_Mike_newHPGschemes/tests/BENCH/MY_SRC/usrdef_istate.F90 – NEMO

Ignore:
Timestamp:
2020-12-03T16:53:41+01:00 (3 years ago)
Author:
ayoung
Message:

Updating to trunk revision 14057. No conflicts since last sette test. Ticket #2480.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • NEMO/branches/2020/dev_r13723_KERNEL-01_Amy_Mike_newHPGschemes/tests/BENCH/MY_SRC/usrdef_istate.F90

    r13295 r14058  
    2626   PRIVATE 
    2727 
    28    PUBLIC   usr_def_istate   ! called by istate.F90 
     28   PUBLIC   usr_def_istate       ! called by istate.F90 
     29   PUBLIC   usr_def_istate_ssh   ! called by domqco.F90 
    2930 
    3031   !! * Substitutions 
     
    3738CONTAINS 
    3839   
    39    SUBROUTINE usr_def_istate( pdept, ptmask, pts, pu, pv, pssh ) 
     40   SUBROUTINE usr_def_istate( pdept, ptmask, pts, pu, pv ) !!st, pssh ) 
    4041      !!---------------------------------------------------------------------- 
    4142      !!                   ***  ROUTINE usr_def_istate  *** 
     
    5253      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(  out) ::   pu      ! i-component of the velocity  [m/s]  
    5354      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(  out) ::   pv      ! j-component of the velocity  [m/s]  
    54       REAL(wp), DIMENSION(jpi,jpj)         , INTENT(  out) ::   pssh    ! sea-surface height 
     55!!st      REAL(wp), DIMENSION(jpi,jpj)         , INTENT(  out) ::   pssh    ! sea-surface height 
    5556      ! 
    5657      REAL(wp), DIMENSION(jpi,jpj) ::   z2d   ! 2D workspace 
     
    7980      ! 
    8081      ! sea level: 
    81       pssh(:,:) = z2d(:,:)                                                ! +/- 0.05 m 
     82!!st      pssh(:,:) = z2d(:,:)                                                ! +/- 0.05 m 
    8283      ! 
    8384      DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 
     
    9596      pv( :,:,jpk  ) = 0._wp 
    9697      ! 
    97       CALL lbc_lnk('usrdef_istate', pssh, 'T',  1. )            ! apply boundary conditions 
     98!!st      CALL lbc_lnk('usrdef_istate', pssh, 'T',  1. )            ! apply boundary conditions 
    9899      CALL lbc_lnk('usrdef_istate',  pts, 'T',  1. )            ! apply boundary conditions 
    99100      CALL lbc_lnk('usrdef_istate',   pu, 'U', -1. )            ! apply boundary conditions 
     
    102103   END SUBROUTINE usr_def_istate 
    103104 
     105 
     106   SUBROUTINE usr_def_istate_ssh( ptmask, pssh ) 
     107      !!---------------------------------------------------------------------- 
     108      !!                   ***  ROUTINE usr_def_istate_ssh  *** 
     109      !!  
     110      !! ** Purpose :   Initialization of ssh 
     111      !!                Here BENCH configuration  
     112      !! 
     113      !! ** Method  :   Set ssh 
     114      !!---------------------------------------------------------------------- 
     115      REAL(wp), DIMENSION(jpi,jpj,jpk)     , INTENT(in   ) ::   ptmask  ! t-point ocean mask   [m] 
     116      REAL(wp), DIMENSION(jpi,jpj)         , INTENT(  out) ::   pssh    ! sea-surface height   [m] 
     117      ! 
     118      INTEGER  ::   ji, jj 
     119      INTEGER  ::   igloi, igloj   ! to be removed in the future, see usr_def_istate comment  
     120      !!---------------------------------------------------------------------- 
     121      ! 
     122      IF(lwp) WRITE(numout,*) 
     123      IF(lwp) WRITE(numout,*) 'usr_def_istate_ssh : BENCH configuration, analytical definition of initial ssh' 
     124      ! 
     125      igloi = Ni0glo + 2 * COUNT( (/ jperio == 1 .OR. jperio == 4 .OR. jperio == 6 .OR. jperio == 7 /) ) 
     126      igloj = Nj0glo + 2 * COUNT( (/ jperio == 2 .OR. jperio == 7 /) ) + 1 * COUNT( (/ jperio >= 4 .AND. jperio <= 6 /) ) 
     127      ! sea level:  +/- 0.05 m 
     128      DO_2D( 0, 0, 0, 0 ) 
     129         pssh(ji,jj) = 0.1 * ( 0.5 - REAL( mig0_oldcmp(ji) + (mjg0_oldcmp(jj)-1) * igloi, wp ) / REAL( igloi * igloj, wp ) ) 
     130      END_2D 
     131      ! 
     132      CALL lbc_lnk('usrdef_istate', pssh, 'T',  1. )            ! apply boundary conditions 
     133      ! 
     134   END SUBROUTINE usr_def_istate_ssh 
     135    
    104136   !!====================================================================== 
    105137END MODULE usrdef_istate 
Note: See TracChangeset for help on using the changeset viewer.