Changeset 13952
- Timestamp:
- 2020-12-01T19:19:12+01:00 (4 years ago)
- Location:
- NEMO/branches/2020/dev_r13312_AGRIF-03-04_jchanut_vinterp_tstep/tests
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/branches/2020/dev_r13312_AGRIF-03-04_jchanut_vinterp_tstep/tests/DOME/EXPREF/1_namelist_cfg
r13930 r13952 36 36 !----------------------------------------------------------------------- 37 37 ln_linssh = .true. 38 rn_Dt = 480. ! time step for the dynamics (and tracer if nn_acc=0)38 rn_Dt = 240. ! time step for the dynamics (and tracer if nn_acc=0) 39 39 rn_atfp = 0.1 ! asselin time filter parameter 40 40 ln_meshmask = .false. ! =T create a mesh file … … 75 75 &namdrg ! top/bottom drag coefficient (default: NO selection) 76 76 !----------------------------------------------------------------------- 77 ln_ OFF= .false. ! free-slip : Cd = 0 (F => fill namdrg_bot77 ln_drg_OFF = .false. ! free-slip : Cd = 0 (F => fill namdrg_bot 78 78 ln_lin = .false. ! linear drag: Cd = Cd0 Uc0 & namdrg_top) 79 79 ln_non_lin = .true. ! non-linear drag: Cd = Cd0 |U| -
NEMO/branches/2020/dev_r13312_AGRIF-03-04_jchanut_vinterp_tstep/tests/DOME/EXPREF/AGRIF_FixedGrids.in
r13930 r13952 1 1 1 2 118 178 40 80 1 1 12 118 178 40 80 2 2 2 3 3 0 -
NEMO/branches/2020/dev_r13312_AGRIF-03-04_jchanut_vinterp_tstep/tests/DOME/EXPREF/namelist_cfg
r13930 r13952 64 64 &namdrg ! top/bottom drag coefficient (default: NO selection) 65 65 !----------------------------------------------------------------------- 66 ln_ OFF= .false. ! free-slip : Cd = 0 (F => fill namdrg_bot66 ln_drg_OFF = .false. ! free-slip : Cd = 0 (F => fill namdrg_bot 67 67 ln_lin = .false. ! linear drag: Cd = Cd0 Uc0 & namdrg_top) 68 68 ln_non_lin = .true. ! non-linear drag: Cd = Cd0 |U| -
NEMO/branches/2020/dev_r13312_AGRIF-03-04_jchanut_vinterp_tstep/tests/DOME/MY_SRC/stpctl.F90
r13930 r13952 38 38 !!---------------------------------------------------------------------- 39 39 !! NEMO/OCE 4.0 , NEMO Consortium (2018) 40 !! $Id: stpctl.F90 13 216 2020-07-02 09:25:49Z rblod$40 !! $Id: stpctl.F90 13942 2020-12-01 16:14:18Z jchanut $ 41 41 !! Software governed by the CeCILL license (see ./LICENSE) 42 42 !!---------------------------------------------------------------------- … … 50 50 !! 51 51 !! ** Method : - Save the time step in numstp 52 !! - Print it each 50 time steps53 52 !! - Stop the run IF problem encountered by setting nstop > 0 54 53 !! Problems checked: |ssh| maximum larger than 10 m … … 69 68 REAL(wp) :: zzz ! local real 70 69 REAL(wp), DIMENSION(9) :: zmax, zmaxlocal 71 LOGICAL :: ll_wrtstp, ll_colruns, ll_wrtruns 70 LOGICAL :: ll_wrtstp, ll_colruns, ll_wrtruns, ll_0oce 72 71 LOGICAL, DIMENSION(jpi,jpj,jpk) :: llmsk 73 72 CHARACTER(len=20) :: clname … … 120 119 ! !== test of local extrema ==! 121 120 ! !== done by all processes at every time step ==! 122 llmsk(:,:,1) = ssmask(:,:) == 1._wp 121 ! 122 llmsk( 1:Nis1,:,:) = .FALSE. ! exclude halos from the checked region 123 llmsk(Nie1: jpi,:,:) = .FALSE. 124 llmsk(:, 1:Njs1,:) = .FALSE. 125 llmsk(:,Nje1: jpj,:) = .FALSE. 126 ! 127 llmsk(Nis0:Nie0,Njs0:Nje0,1) = ssmask(Nis0:Nie0,Njs0:Nje0) == 1._wp ! define only the inner domain 128 ! 129 ll_0oce = .NOT. ANY( llmsk(:,:,1) ) ! no ocean point in the inner domain? 130 ! 123 131 IF( ll_wd ) THEN 124 132 zmax(1) = MAXVAL( ABS( ssh(:,:,Kmm) + ssh_ref ), mask = llmsk(:,:,1) ) ! ssh max … … 126 134 zmax(1) = MAXVAL( ABS( ssh(:,:,Kmm) ), mask = llmsk(:,:,1) ) ! ssh max 127 135 ENDIF 128 llmsk( :,:,:) = umask(:,:,:) == 1._wp136 llmsk(Nis0:Nie0,Njs0:Nje0,:) = umask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp ! define only the inner domain 129 137 zmax(2) = MAXVAL( ABS( uu(:,:,:,Kmm) ), mask = llmsk ) ! velocity max (zonal only) 130 llmsk( :,:,:) = tmask(:,:,:) == 1._wp138 llmsk(Nis0:Nie0,Njs0:Nje0,:) = tmask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp ! define only the inner domain 131 139 IF ( ln_seos.AND.(rn_lambda2==0._wp) ) THEN ! Discard checks on salinity 132 140 zmax(3) = -99._wp 133 141 zmax(4) = 99._wp 134 ELSE 142 ELSE 135 143 zmax(3) = MAXVAL( -ts(:,:,:,jp_sal,Kmm), mask = llmsk ) ! minus salinity max 136 144 zmax(4) = MAXVAL( ts(:,:,:,jp_sal,Kmm), mask = llmsk ) ! salinity max … … 149 157 zmax(5:8) = 0._wp 150 158 ENDIF 151 zmax(9) = REAL( nstop, wp ) ! stop indicator 159 zmax(9) = REAL( nstop, wp ) ! stop indicator 160 ! 152 161 ! !== get global extrema ==! 153 162 ! !== done by all processes if writting run.stat ==! 154 163 IF( ll_colruns ) THEN 155 164 zmaxlocal(:) = zmax(:) 156 CALL mpp_max( "stpctl", zmax ) ! max over the global domain 165 CALL mpp_max( "stpctl", zmax ) ! max over the global domain: ok even of ll_0oce = .true. 157 166 nstop = NINT( zmax(9) ) ! update nstop indicator (now sheared among all local domains) 158 ENDIF 167 ELSE 168 ! if no ocean point: MAXVAL returns -HUGE => we must overwrite this value to avoid error handling bellow. 169 IF( ll_0oce ) zmax(1:4) = (/ 0._wp, 0._wp, -1._wp, 1._wp /) ! default "valid" values... 170 ENDIF 171 ! 172 zmax(3) = -zmax(3) ! move back from max(-zz) to min(zz) : easier to manage! 173 zmax(5) = -zmax(5) ! move back from max(-zz) to min(zz) : easier to manage! 174 IF( ll_colruns ) THEN 175 zmaxlocal(3) = -zmaxlocal(3) ! move back from max(-zz) to min(zz) : easier to manage! 176 zmaxlocal(5) = -zmaxlocal(5) ! move back from max(-zz) to min(zz) : easier to manage! 177 ENDIF 178 ! 159 179 ! !== write "run.stat" files ==! 160 180 ! !== done only by 1st subdomain at writting timestep ==! 161 181 IF( ll_wrtruns ) THEN 162 WRITE(numrun,9500) kt, zmax(1), zmax(2), -zmax(3), zmax(4) 163 istatus = NF90_PUT_VAR( nrunid, nvarid(1), (/ zmax(1)/), (/kt/), (/1/) ) 164 istatus = NF90_PUT_VAR( nrunid, nvarid(2), (/ zmax(2)/), (/kt/), (/1/) ) 165 istatus = NF90_PUT_VAR( nrunid, nvarid(3), (/-zmax(3)/), (/kt/), (/1/) ) 166 istatus = NF90_PUT_VAR( nrunid, nvarid(4), (/ zmax(4)/), (/kt/), (/1/) ) 167 istatus = NF90_PUT_VAR( nrunid, nvarid(5), (/-zmax(5)/), (/kt/), (/1/) ) 168 istatus = NF90_PUT_VAR( nrunid, nvarid(6), (/ zmax(6)/), (/kt/), (/1/) ) 169 IF( ln_zad_Aimp ) THEN 170 istatus = NF90_PUT_VAR( nrunid, nvarid(7), (/ zmax(7)/), (/kt/), (/1/) ) 171 istatus = NF90_PUT_VAR( nrunid, nvarid(8), (/ zmax(8)/), (/kt/), (/1/) ) 172 ENDIF 182 WRITE(numrun,9500) kt, zmax(1), zmax(2), zmax(3), zmax(4) 183 DO ji = 1, 6 + 2 * COUNT( (/ln_zad_Aimp/) ) 184 istatus = NF90_PUT_VAR( nrunid, nvarid(ji), (/zmax(ji)/), (/kt/), (/1/) ) 185 END DO 173 186 IF( kt == nitend ) istatus = NF90_CLOSE(nrunid) 174 187 END IF … … 176 189 ! !== done by all processes at every time step ==! 177 190 ! 178 IF( 179 & 180 & zmax(3) >= 0._wp .OR. & ! negative or zero sea surface salinity181 & 182 & 183 & 184 & 191 IF( zmax(1) > 20._wp .OR. & ! too large sea surface height ( > 20 m ) 192 & zmax(2) > 10._wp .OR. & ! too large velocity ( > 10 m/s) 193 & zmax(3) <= 0._wp .OR. & ! negative or zero sea surface salinity 194 & zmax(4) >= 100._wp .OR. & ! too large sea surface salinity ( > 100 ) 195 & zmax(4) < 0._wp .OR. & ! too large sea surface salinity (keep this line for sea-ice) 196 & ISNAN( zmax(1) + zmax(2) + zmax(3) ) .OR. & ! NaN encounter in the tests 197 & ABS( zmax(1) + zmax(2) + zmax(3) ) > HUGE(1._wp) ) THEN ! Infinity encounter in the tests 185 198 ! 186 199 iloc(:,:) = 0 … … 189 202 IF( lwm .AND. kt /= nitend ) istatus = NF90_CLOSE(nrunid) 190 203 ! get global loc on the min/max 191 CALL mpp_maxloc( 'stpctl', ABS(ssh(:,:, Kmm)), ssmask(:,: ), zzz, iloc(1:2,1) ) ! mpp_maxloc ok if mask = F 192 CALL mpp_maxloc( 'stpctl', ABS( uu(:,:,:, Kmm)), umask(:,:,:), zzz, iloc(1:3,2) ) 193 CALL mpp_minloc( 'stpctl', ts(:,:,:,jp_sal,Kmm) , tmask(:,:,:), zzz, iloc(1:3,3) ) 194 CALL mpp_maxloc( 'stpctl', ts(:,:,:,jp_sal,Kmm) , tmask(:,:,:), zzz, iloc(1:3,4) ) 204 llmsk(Nis0:Nie0,Njs0:Nje0,1) = ssmask(Nis0:Nie0,Njs0:Nje0 ) == 1._wp ! define only the inner domain 205 CALL mpp_maxloc( 'stpctl', ABS(ssh(:,:, Kmm)), llmsk(:,:,1), zzz, iloc(1:2,1) ) ! mpp_maxloc ok if mask = F 206 llmsk(Nis0:Nie0,Njs0:Nje0,:) = umask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp ! define only the inner domain 207 CALL mpp_maxloc( 'stpctl', ABS( uu(:,:,:, Kmm)), llmsk(:,:,:), zzz, iloc(1:3,2) ) 208 llmsk(Nis0:Nie0,Njs0:Nje0,:) = tmask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp ! define only the inner domain 209 CALL mpp_minloc( 'stpctl', ts(:,:,:,jp_sal,Kmm) , llmsk(:,:,:), zzz, iloc(1:3,3) ) 210 CALL mpp_maxloc( 'stpctl', ts(:,:,:,jp_sal,Kmm) , llmsk(:,:,:), zzz, iloc(1:3,4) ) 195 211 ! find which subdomain has the max. 196 212 iareamin(:) = jpnij+1 ; iareamax(:) = 0 ; iareasum(:) = 0 … … 205 221 ELSE ! find local min and max locations: 206 222 ! if we are here, this means that the subdomain contains some oce points -> no need to test the mask used in maxloc 207 iloc(1:2,1) = MAXLOC( ABS( ssh(:,:, Kmm)), mask = ssmask(:,: ) == 1._wp ) + (/ nimpp - 1, njmpp - 1 /) 208 iloc(1:3,2) = MAXLOC( ABS( uu(:,:,:, Kmm)), mask = umask(:,:,:) == 1._wp ) + (/ nimpp - 1, njmpp - 1, 0 /) 209 iloc(1:3,3) = MINLOC( ts(:,:,:,jp_sal,Kmm) , mask = tmask(:,:,:) == 1._wp ) + (/ nimpp - 1, njmpp - 1, 0 /) 210 iloc(1:3,4) = MAXLOC( ts(:,:,:,jp_sal,Kmm) , mask = tmask(:,:,:) == 1._wp ) + (/ nimpp - 1, njmpp - 1, 0 /) 223 llmsk(Nis0:Nie0,Njs0:Nje0,1) = ssmask(Nis0:Nie0,Njs0:Nje0 ) == 1._wp ! define only the inner domain 224 iloc(1:2,1) = MAXLOC( ABS( ssh(:,:, Kmm)), mask = llmsk(:,:,1) ) 225 llmsk(Nis0:Nie0,Njs0:Nje0,:) = umask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp ! define only the inner domain 226 iloc(1:3,2) = MAXLOC( ABS( uu(:,:,:, Kmm)), mask = llmsk(:,:,:) ) 227 llmsk(Nis0:Nie0,Njs0:Nje0,:) = tmask(Nis0:Nie0,Njs0:Nje0,:) == 1._wp ! define only the inner domain 228 iloc(1:3,3) = MINLOC( ts(:,:,:,jp_sal,Kmm) , mask = llmsk(:,:,:) ) 229 iloc(1:3,4) = MAXLOC( ts(:,:,:,jp_sal,Kmm) , mask = llmsk(:,:,:) ) 230 DO ji = 1, 4 ! local domain indices ==> global domain indices, excluding halos 231 iloc(1:2,ji) = (/ mig0(iloc(1,ji)), mjg0(iloc(2,ji)) /) 232 END DO 211 233 iareamin(:) = narea ; iareamax(:) = narea ; iareasum(:) = 1 ! this is local information 212 234 ENDIF 213 235 ! 214 236 WRITE(ctmp1,*) ' stp_ctl: |ssh| > 20 m or |U| > 10 m/s or S <= 0 or S >= 100 or NaN encounter in the tests' 215 CALL wrt_line( ctmp2, kt, '|ssh| max', 216 CALL wrt_line( ctmp3, kt, '|U| max', 217 CALL wrt_line( ctmp4, kt, 'Sal min', -zmax(3), iloc(:,3), iareasum(3), iareamin(3), iareamax(3) )218 CALL wrt_line( ctmp5, kt, 'Sal max', 237 CALL wrt_line( ctmp2, kt, '|ssh| max', zmax(1), iloc(:,1), iareasum(1), iareamin(1), iareamax(1) ) 238 CALL wrt_line( ctmp3, kt, '|U| max', zmax(2), iloc(:,2), iareasum(2), iareamin(2), iareamax(2) ) 239 CALL wrt_line( ctmp4, kt, 'Sal min', zmax(3), iloc(:,3), iareasum(3), iareamin(3), iareamax(3) ) 240 CALL wrt_line( ctmp5, kt, 'Sal max', zmax(4), iloc(:,4), iareasum(4), iareamin(4), iareamax(4) ) 219 241 IF( Agrif_Root() ) THEN 220 242 WRITE(ctmp6,*) ' ===> output of last computed fields in output.abort* files' -
NEMO/branches/2020/dev_r13312_AGRIF-03-04_jchanut_vinterp_tstep/tests/OVERFLOW/EXPREF/AGRIF/1_namelist_cfg
r13936 r13952 81 81 &namdrg ! top/bottom drag coefficient (default: NO selection) 82 82 !----------------------------------------------------------------------- 83 ln_ OFF= .true. ! free-slip : Cd = 0 (F => fill namdrg_bot83 ln_drg_OFF = .true. ! free-slip : Cd = 0 (F => fill namdrg_bot 84 84 ln_lin = .false. ! linear drag: Cd = Cd0 Uc0 & namdrg_top) 85 85 ln_non_lin = .false. ! non-linear drag: Cd = Cd0 |U| 86 ln_loglayer = .false. 86 ln_loglayer = .false. ! logarithmic drag: Cd = vkarmn/log(z/z0) |U| 87 87 ! 88 88 ln_drgimp = .true. ! implicit top/bottom friction flag -
NEMO/branches/2020/dev_r13312_AGRIF-03-04_jchanut_vinterp_tstep/tests/OVERFLOW/EXPREF/AGRIF/namelist_cfg
r13936 r13952 75 75 &namdrg ! top/bottom drag coefficient (default: NO selection) 76 76 !----------------------------------------------------------------------- 77 ln_ OFF= .true. ! free-slip : Cd = 0 (F => fill namdrg_bot77 ln_drg_OFF = .true. ! free-slip : Cd = 0 (F => fill namdrg_bot 78 78 ln_lin = .false. ! linear drag: Cd = Cd0 Uc0 & namdrg_top) 79 79 ln_non_lin = .false. ! non-linear drag: Cd = Cd0 |U| 80 ln_loglayer = .false. 80 ln_loglayer = .false. ! logarithmic drag: Cd = vkarmn/log(z/z0) |U| 81 81 ! 82 82 ln_drgimp = .true. ! implicit top/bottom friction flag
Note: See TracChangeset
for help on using the changeset viewer.