Changeset 13616 for NEMO/trunk/tests/STATION_ASF
- Timestamp:
- 2020-10-15T17:58:33+02:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
NEMO/trunk/tests/STATION_ASF/MY_SRC/stpctl.F90
r13458 r13616 65 65 REAL(wp) :: zzz ! local real 66 66 REAL(wp), DIMENSION(4) :: zmax, zmaxlocal 67 LOGICAL :: ll_wrtstp, ll_colruns, ll_wrtruns 67 LOGICAL :: ll_wrtstp, ll_colruns, ll_wrtruns, ll_0oce 68 68 LOGICAL, DIMENSION(jpi,jpj) :: llmsk 69 69 CHARACTER(len=20) :: clname … … 115 115 llmsk(:,Nje1: jpj) = .FALSE. 116 116 ! 117 llmsk(Nis0:Nie0,Njs0:Nje0) = tmask(Nis0:Nie0,Njs0:Nje0,1) == 1._wp ! test only the inner domain 118 IF( COUNT( llmsk(:,:) ) > 0 ) THEN ! avoid huge values sent back for land processors... 119 zmax(1) = MAXVAL( taum(:,:) , mask = llmsk ) ! max wind stress module 120 zmax(2) = MAXVAL( ABS( qns(:,:) ) , mask = llmsk ) ! max non-solar heat flux 121 zmax(3) = MAXVAL( ABS( emp(:,:) ) , mask = llmsk ) ! max E-P 122 ELSE 123 IF( ll_colruns ) THEN ! default value: must not be kept when calling mpp_max -> must be as small as possible 124 zmax(1:3) = -HUGE(1._wp) 125 ELSE ! default value: must not give true for any of the tests bellow (-> avoid manipulating HUGE...) 126 zmax(1:3) = 0._wp 127 ENDIF 128 ENDIF 129 zmax(4) = REAL( nstop, wp ) ! stop indicator 117 llmsk(Nis0:Nie0,Njs0:Nje0) = tmask(Nis0:Nie0,Njs0:Nje0,1) == 1._wp ! test only the inner domain 118 ! 119 ll_0oce = .NOT. ANY( llmsk(:,:) ) ! no ocean point in the inner domain? 120 ! 121 zmax(1) = MAXVAL( taum(:,:) , mask = llmsk ) ! max wind stress module 122 zmax(2) = MAXVAL( ABS( qns(:,:) ), mask = llmsk ) ! max non-solar heat flux 123 zmax(3) = MAXVAL( ABS( emp(:,:) ), mask = llmsk ) ! max E-P 124 zmax(4) = REAL( nstop, wp ) ! stop indicator 125 ! 130 126 ! !== get global extrema ==! 131 127 ! !== done by all processes if writting run.stat ==! … … 134 130 CALL mpp_max( "stpctl", zmax ) ! max over the global domain 135 131 nstop = NINT( zmax(4) ) ! update nstop indicator (now sheared among all local domains) 136 ENDIF 132 ELSE 133 ! if no ocean point: MAXVAL returns -HUGE => we must overwrite this value to avoid error handling bellow. 134 IF( ll_0oce ) zmax(1:3) = 0._wp ! default "valid" values... 135 ENDIF 136 ! !== error handling ==! 137 137 ! !== write "run.stat" files ==! 138 138 ! !== done only by 1st subdomain at writting timestep ==! 139 139 IF( ll_wrtruns ) THEN 140 140 WRITE(numrun,9500) kt, zmax(1), zmax(2), zmax(3) 141 istatus = NF90_PUT_VAR( nrunid, nvarid(1), (/ zmax(1)/), (/kt/), (/1/) )142 istatus = NF90_PUT_VAR( nrunid, nvarid(2), (/ zmax(2)/), (/kt/), (/1/) )143 istatus = NF90_PUT_VAR( nrunid, nvarid(3), (/ zmax(3)/), (/kt/), (/1/) )141 DO ji = 1, 3 142 istatus = NF90_PUT_VAR( nrunid, nvarid(ji), (/zmax(ji)/), (/kt/), (/1/) ) 143 END DO 144 144 IF( kt == nitend ) istatus = NF90_CLOSE(nrunid) 145 145 END IF
Note: See TracChangeset
for help on using the changeset viewer.