Changeset 14223 for NEMO/trunk/tests/BENCH
- Timestamp:
- 2020-12-19T11:22:45+01:00 (3 years ago)
- Location:
- NEMO/trunk/tests/BENCH/MY_SRC
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/tests/BENCH/MY_SRC/usrdef_hgr.F90
r13295 r14223 74 74 ! Position coordinates (in grid points) 75 75 ! ========== 76 DO_2D( 1, 1, 1, 1)76 DO_2D( nn_hls, nn_hls, nn_hls, nn_hls ) 77 77 78 zti = REAL( mig0 _oldcmp(ji) - 1, wp ) ! start at i=0in the global grid without halos79 ztj = REAL( mjg0 _oldcmp(jj) - 1, wp ) ! start at j=0in the global grid without halos78 zti = REAL( mig0(ji), wp ) - 0.5_wp ! start at i=0.5 in the global grid without halos 79 ztj = REAL( mjg0(jj), wp ) - 0.5_wp ! start at j=0.5 in the global grid without halos 80 80 81 81 plamt(ji,jj) = zti -
NEMO/trunk/tests/BENCH/MY_SRC/usrdef_istate.F90
r14053 r14223 53 53 REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT( out) :: pu ! i-component of the velocity [m/s] 54 54 REAL(wp), DIMENSION(jpi,jpj,jpk) , INTENT( out) :: pv ! j-component of the velocity [m/s] 55 !!st REAL(wp), DIMENSION(jpi,jpj) , INTENT( out) :: pssh ! sea-surface height56 55 ! 57 56 REAL(wp), DIMENSION(jpi,jpj) :: z2d ! 2D workspace 58 57 REAL(wp) :: zfact 59 58 INTEGER :: ji, jj, jk 60 INTEGER :: igloi, igloj ! to be removed in the future, see comment bellow61 59 !!---------------------------------------------------------------------- 62 60 ! … … 67 65 ! define unique value on each point of the inner global domain. z2d ranging from 0.05 to -0.05 68 66 ! 69 ! WARNING: to keep compatibility with the trunk that was including periodocity into the input data, 70 ! we must define z2d as bellow. 71 ! Once we decide to forget trunk compatibility, we must simply define z2d as: 72 !!$ DO_2D( 0, 0, 0, 0 ) 73 !!$ z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig0_oldcmp(ji) + (mjg0_oldcmp(jj)-1) * Ni0glo, wp ) / REAL( Ni0glo * Nj0glo, wp ) ) 74 !!$ END_2D 75 igloi = Ni0glo + 2 * COUNT( (/ jperio == 1 .OR. jperio == 4 .OR. jperio == 6 .OR. jperio == 7 /) ) 76 igloj = Nj0glo + 2 * COUNT( (/ jperio == 2 .OR. jperio == 7 /) ) + 1 * COUNT( (/ jperio >= 4 .AND. jperio <= 6 /) ) 77 DO_2D( 0, 0, 0, 0 ) 78 z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig0_oldcmp(ji) + (mjg0_oldcmp(jj)-1) * igloi, wp ) / REAL( igloi * igloj, wp ) ) 67 DO_2D( 0, 0, 0, 0 ) ! +/- 0.05 68 z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig0(ji) + (mjg0(jj)-1) * Ni0glo, wp ) / REAL( Ni0glo * Nj0glo, wp ) ) 79 69 END_2D 80 !81 ! sea level:82 !!st pssh(:,:) = z2d(:,:) ! +/- 0.05 m83 70 ! 84 71 DO_3D( 0, 0, 0, 0, 1, jpkm1 ) 85 72 zfact = REAL(jk-1,wp) / REAL(jpk-1,wp) ! 0 to 1 to add a basic stratification 86 73 ! temperature choosen to lead to ~50% ice at the beginning if rn_thres_sst = 0.5 87 pts(:,:,jk,jp_tem) = 20._wp*z2d(:,:) - 1._wp - 0.5_wp * zfact ! -1 to -1.5 +/- 1.0 degG74 pts(:,:,jk,jp_tem) = 20._wp*z2d(:,:) - 1._wp - 0.5_wp * zfact ! -1 to -1.5 +/- 1.0 degG 88 75 ! salinity: 89 pts(:,:,jk,jp_sal) = 30._wp + 1._wp * zfact + z2d(:,:) ! 30 to 31 +/- 0.05 psu76 pts(:,:,jk,jp_sal) = 30._wp + 1._wp * zfact + z2d(:,:) ! 30 to 31 +/- 0.05 psu 90 77 ! velocities: 91 78 pu(:,:,jk) = z2d(:,:) * 0.1_wp * umask(:,:,jk) ! +/- 0.005 m/s … … 96 83 pv( :,:,jpk ) = 0._wp 97 84 ! 98 !!st CALL lbc_lnk('usrdef_istate', pssh, 'T', 1. ) ! apply boundary conditions99 85 CALL lbc_lnk('usrdef_istate', pts, 'T', 1. ) ! apply boundary conditions 100 86 CALL lbc_lnk('usrdef_istate', pu, 'U', -1. ) ! apply boundary conditions … … 117 103 ! 118 104 INTEGER :: ji, jj 119 INTEGER :: igloi, igloj ! to be removed in the future, see usr_def_istate comment120 105 !!---------------------------------------------------------------------- 121 106 ! … … 123 108 IF(lwp) WRITE(numout,*) 'usr_def_istate_ssh : BENCH configuration, analytical definition of initial ssh' 124 109 ! 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 ) ) 110 DO_2D( 0, 0, 0, 0 ) ! sea level: +/- 0.05 m 111 pssh(ji,jj) = 0.1 * ( 0.5 - REAL( mig0(ji) + (mjg0(jj)-1) * Ni0glo, wp ) / REAL( Ni0glo * Nj0glo, wp ) ) 130 112 END_2D 131 113 ! 132 CALL lbc_lnk('usrdef_istate', pssh, 'T', 1. ) 114 CALL lbc_lnk('usrdef_istate', pssh, 'T', 1. ) ! apply boundary conditions 133 115 ! 134 116 END SUBROUTINE usr_def_istate_ssh -
NEMO/trunk/tests/BENCH/MY_SRC/usrdef_sbc.F90
r13472 r14223 99 99 REAL(wp), DIMENSION(jpi,jpj) :: z2d ! 2D workspace 100 100 INTEGER :: ji, jj 101 INTEGER :: igloi, igloj ! to be removed in the future, see comment bellow102 101 !!--------------------------------------------------------------------- 103 102 #if defined key_si3 … … 106 105 ! define unique value on each point. z2d ranging from 0.05 to -0.05 107 106 ! 108 ! WARNING: to keep compatibility with the trunk that was including periodocity into the input data,109 ! we must define z2d as bellow.110 ! Once we decide to forget trunk compatibility, we must simply define z2d as:111 !!$ DO_2D( 0, 0, 0, 0 )112 !!$ z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig0_oldcmp(ji) + (mjg0_oldcmp(jj)-1) * Ni0glo, wp ) / REAL( Ni0glo * Nj0glo, wp ) )113 !!$ END_2D114 igloi = Ni0glo + 2 * COUNT( (/ jperio == 1 .OR. jperio == 4 .OR. jperio == 6 .OR. jperio == 7 /) )115 igloj = Nj0glo + 2 * COUNT( (/ jperio == 2 .OR. jperio == 7 /) ) + 1 * COUNT( (/ jperio >= 4 .AND. jperio <= 6 /) )116 107 DO_2D( 0, 0, 0, 0 ) 117 z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig0 _oldcmp(ji) + (mjg0_oldcmp(jj)-1) * igloi, wp ) / REAL( igloi * igloj, wp ) )108 z2d(ji,jj) = 0.1 * ( 0.5 - REAL( mig0(ji) + (mjg0(jj)-1) * Ni0glo, wp ) / REAL( Ni0glo * Nj0glo, wp ) ) 118 109 END_2D 119 110 utau_ice(:,:) = 0.1_wp + z2d(:,:)
Note: See TracChangeset
for help on using the changeset viewer.