Changeset 8784
- Timestamp:
- 2017-11-22T12:32:41+01:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2017/dev_r7881_ENHANCE09_RK3/NEMOGCM/NEMO/OPA_SRC/stpctl.F90
r8769 r8784 57 57 INTEGER :: iih, ijh ! local integers 58 58 INTEGER :: iiu, iju, iku ! - - 59 INTEGER :: iis, ijs 59 INTEGER :: iis, ijs, iks ! - - 60 60 REAL(wp) :: zzz ! local real 61 INTEGER , DIMENSION(3) :: ilocu 62 INTEGER , DIMENSION(2) :: iloc s, iloch61 INTEGER , DIMENSION(3) :: ilocu, ilocs 62 INTEGER , DIMENSION(2) :: iloch 63 63 REAL(wp), DIMENSION(3) :: zmax 64 64 !!---------------------------------------------------------------------- … … 82 82 zmax(1) = MAXVAL( ABS( sshn(:,:) ) ) ! ssh max 83 83 zmax(2) = MAXVAL( ABS( un(:,:,:) ) ) ! velocity max (zonal only) 84 zmax(3) = MAXVAL( -tsn(:,:, 1,jp_sal) , mask = tmask(:,:,1) == 1._wp ) ! minus surfacesalinity max84 zmax(3) = MAXVAL( -tsn(:,:,:,jp_sal) , mask = tmask(:,:,:) == 1._wp ) ! minus salinity max 85 85 ! 86 86 IF( lk_mpp ) CALL mpp_max_multiple( zmax(:), 3 ) ! max over the global domain … … 88 88 IF( MOD( kt, nwrite ) == 1 .AND. lwp ) THEN 89 89 WRITE(numout,*) ' ==>> time-step= ', kt, ' |ssh| max: ', zmax(1), ' |U| max: ', zmax(2), & 90 & ' S SS min: ', - zmax(3)90 & ' S min: ' , - zmax(3) 91 91 ENDIF 92 92 ! … … 96 96 & ISNAN( zmax(1) + zmax(2) + zmax(3) ) ) THEN ! NaN encounter in the tests 97 97 IF( lk_mpp ) THEN 98 CALL mpp_maxloc( ABS(sshn) , tmask(:,:,1), zzz, iih, ijh )99 CALL mpp_maxloc( ABS(un) , umask (:,:,:), zzz, iiu, iju, iku )100 CALL mpp_minloc( tsn(:,:, 1,jp_sal), tmask(:,:,1), zzz, iis, ijs )98 CALL mpp_maxloc( ABS(sshn) , ssmask(:,:) , zzz, iih, ijh ) 99 CALL mpp_maxloc( ABS(un) , umask (:,:,:), zzz, iiu, iju, iku ) 100 CALL mpp_minloc( tsn(:,:,:,jp_sal), tmask (:,:,:), zzz, iis, ijs, iks ) 101 101 ELSE 102 iloch = MINLOC( ABS( sshn(:,:) ))103 ilocu = MAXLOC( ABS( un (:,:,:) ))104 ilocs = MINLOC( tsn(:,:, 1,jp_sal), mask = tmask(:,:,1) == 1._wp )102 iloch = MINLOC( ABS( sshn(:,:) ) ) 103 ilocu = MAXLOC( ABS( un (:,:,:) ) ) 104 ilocs = MINLOC( tsn(:,:,:,jp_sal) , mask = tmask(:,:,:) == 1._wp ) 105 105 iih = iloch(1) + nimpp - 1 ; ijh = iloch(2) + njmpp - 1 106 106 iiu = ilocu(1) + nimpp - 1 ; iju = ilocu(2) + njmpp - 1 ; iku = ilocu(3) 107 iis = ilocs(1) + nimpp - 1 ; ijs = ilocs(2) + njmpp - 1 107 iis = ilocs(1) + nimpp - 1 ; ijs = ilocs(2) + njmpp - 1 ; iks = ilocu(3) 108 108 ENDIF 109 109 IF(lwp) THEN 110 110 WRITE(numout,cform_err) 111 WRITE(numout,*) ' stpctl: |ssh| > 10 m or |U| > 10 m/s or S SS< 0 or NaN encounter in the tests'111 WRITE(numout,*) ' stpctl: |ssh| > 10 m or |U| > 10 m/s or S < 0 or NaN encounter in the tests' 112 112 WRITE(numout,*) ' ====== ' 113 113 WRITE(numout,9100) kt, zmax(1), iih, ijh 114 114 WRITE(numout,9200) kt, zmax(2), iiu, iju, iku 115 WRITE(numout,9300) kt, - zmax(3), iis, ijs 115 WRITE(numout,9300) kt, - zmax(3), iis, ijs, iks 116 116 WRITE(numout,*) 117 117 WRITE(numout,*) ' output of last computed fields in output.abort.nc file' … … 121 121 9100 FORMAT (' kt=',i8,' |ssh| max: ',1pg11.4,', at i j : ',2i5) 122 122 9200 FORMAT (' kt=',i8,' |U| max: ',1pg11.4,', at i j k: ',3i5) 123 9300 FORMAT (' kt=',i8,' S SSmin: ',1pg11.4,', at i j : ',2i5)123 9300 FORMAT (' kt=',i8,' S min: ',1pg11.4,', at i j : ',2i5) 124 124 ! 125 125 ! !== run statistics ==! ("run.stat" file) 126 126 IF(lwp) WRITE(numrun,9400) kt, zmax(1), zmax(2), - zmax(3) 127 127 ! 128 9400 FORMAT(' it :', i8, ' |ssh|_max: ', e16.10, ' |U|_max: ',e16.10,' S SS_min: ',e16.10)128 9400 FORMAT(' it :', i8, ' |ssh|_max: ', e16.10, ' |U|_max: ',e16.10,' S_min: ',e16.10) 129 129 ! 130 130 END SUBROUTINE stp_ctl
Note: See TracChangeset
for help on using the changeset viewer.