Changeset 10745
- Timestamp:
- 2019-03-12T17:14:33+01:00 (4 years ago)
- Location:
- branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/IOM/in_out_manager.F90
r6491 r10745 99 99 !!---------------------------------------------------------------------- 100 100 LOGICAL :: ln_ctl !: run control for debugging 101 TYPE :: sn_ctl !: optional use structure for finer control over output selection 102 LOGICAL :: l_config = .FALSE. !: activate/deactivate finer control 103 ! Note if l_config is True then ln_ctl is ignored. 104 ! Otherwise setting ln_ctl True is equivalent to setting 105 ! all the following logicals in this structure True 106 LOGICAL :: l_runstat = .FALSE. !: Produce/do not produce run.stat file (T/F) 107 LOGICAL :: l_trcstat = .FALSE. !: Produce/do not produce tracer.stat file (T/F) 108 LOGICAL :: l_oceout = .FALSE. !: Produce all ocean.outputs (T) or just one (F) 109 LOGICAL :: l_layout = .FALSE. !: Produce all layout.dat files (T) or just one (F) 110 LOGICAL :: l_mppout = .FALSE. !: Produce/do not produce mpp.output_XXXX files (T/F) 111 LOGICAL :: l_mpptop = .FALSE. !: Produce/do not produce mpp.top.output_XXXX files (T/F) 112 ! Optional subsetting of processor report files 113 ! Default settings of 0/1000000/1 should ensure all areas report. 114 ! Set to a more restrictive range to select specific areas 115 INTEGER :: procmin = 0 !: Minimum narea to output 116 INTEGER :: procmax = 1000000 !: Maximum narea to output 117 INTEGER :: procincr = 1 !: narea increment to output 118 INTEGER :: ptimincr = 1 !: timestep increment to output (time.step and run.stat) 119 END TYPE 120 TYPE(sn_ctl) :: sn_cfctl !: run control structure for selective output 101 121 INTEGER :: nn_timing !: run control for timing 102 122 INTEGER :: nn_print !: level of print (0 no print) … … 109 129 INTEGER :: nn_bench !: benchmark parameter (0/1) 110 130 INTEGER :: nn_bit_cmp = 0 !: bit reproducibility (0/1) 111 112 131 ! 113 132 INTEGER :: nprint, nictls, nictle, njctls, njctle, isplt, jsplt, nbench !: OLD namelist names -
branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/SOL/solver.F90
r6498 r10745 59 59 ! 60 60 61 IF(lwp ) THEN!* open elliptic solver statistics file (only on the printing processors)61 IF(lwp .AND. ln_ctl .OR. sn_cfctl%l_runstat) THEN !* open elliptic solver statistics file (only on the printing processors) 62 62 CALL ctl_opn( numsol, 'solver.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 63 63 ENDIF -
branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
r10149 r10745 248 248 CHARACTER(len=80), DIMENSION(16) :: cltxt 249 249 ! 250 NAMELIST/namctl/ ln_ctl , nn_print, nn_ictls, nn_ictle, &250 NAMELIST/namctl/ ln_ctl ,sn_cfctl, nn_print, nn_ictls, nn_ictle, & 251 251 & nn_isplt, nn_jsplt, nn_jctls, nn_jctle, & 252 252 & nn_bench, nn_timing … … 326 326 #endif 327 327 narea = narea + 1 ! mynode return the rank of proc (0 --> jpnij -1 ) 328 329 IF( sn_cfctl%l_config ) THEN 330 ! Activate finer control of report outputs 331 ! optionally switch off output from selected areas (note this only 332 ! applies to output which does not involve global communications) 333 IF( ( narea < sn_cfctl%procmin .OR. narea > sn_cfctl%procmax ) .OR. & 334 & ( MOD( narea - sn_cfctl%procmin, sn_cfctl%procincr ) /= 0 ) ) & 335 & CALL nemo_set_cfctl( sn_cfctl, .FALSE., .FALSE. ) 336 ELSE 337 ! Use ln_ctl to turn on or off all options. 338 CALL nemo_set_cfctl( sn_cfctl, ln_ctl, .TRUE. ) 339 ENDIF 328 340 329 341 lwm = (narea == 1) ! control of output namelists … … 520 532 WRITE(numout,*) ' Namelist namctl' 521 533 WRITE(numout,*) ' run control (for debugging) ln_ctl = ', ln_ctl 534 WRITE(numout,*) ' finer control over o/p sn_cfctl%l_config = ', sn_cfctl%l_config 535 WRITE(numout,*) ' sn_cfctl%l_runstat = ', sn_cfctl%l_runstat 536 WRITE(numout,*) ' sn_cfctl%l_trcstat = ', sn_cfctl%l_trcstat 537 WRITE(numout,*) ' sn_cfctl%l_oceout = ', sn_cfctl%l_oceout 538 WRITE(numout,*) ' sn_cfctl%l_layout = ', sn_cfctl%l_layout 539 WRITE(numout,*) ' sn_cfctl%l_mppout = ', sn_cfctl%l_mppout 540 WRITE(numout,*) ' sn_cfctl%l_mpptop = ', sn_cfctl%l_mpptop 541 WRITE(numout,*) ' sn_cfctl%procmin = ', sn_cfctl%procmin 542 WRITE(numout,*) ' sn_cfctl%procmax = ', sn_cfctl%procmax 543 WRITE(numout,*) ' sn_cfctl%procincr = ', sn_cfctl%procincr 544 WRITE(numout,*) ' sn_cfctl%ptimincr = ', sn_cfctl%ptimincr 522 545 WRITE(numout,*) ' level of print nn_print = ', nn_print 523 546 WRITE(numout,*) ' Start i indice for SUM control nn_ictls = ', nn_ictls … … 691 714 END SUBROUTINE nemo_alloc 692 715 716 SUBROUTINE nemo_set_cfctl(sn_cfctl, setto, for_all ) 717 !!---------------------------------------------------------------------- 718 !! *** ROUTINE nemo_set_cfctl *** 719 !! 720 !! ** Purpose : Set elements of the output control structure to setto. 721 !! for_all should be .false. unless all areas are to be 722 !! treated identically. 723 !! 724 !! ** Method : Note this routine can be used to switch on/off some 725 !! types of output for selected areas but any output types 726 !! that involve global communications (e.g. mpp_max, glob_sum) 727 !! should be protected from selective switching by the 728 !! for_all argument 729 !!---------------------------------------------------------------------- 730 LOGICAL :: setto, for_all 731 TYPE(sn_ctl) :: sn_cfctl 732 !!---------------------------------------------------------------------- 733 IF( for_all ) THEN 734 sn_cfctl%l_runstat = setto 735 sn_cfctl%l_trcstat = setto 736 ENDIF 737 sn_cfctl%l_oceout = setto 738 sn_cfctl%l_layout = setto 739 sn_cfctl%l_mppout = setto 740 sn_cfctl%l_mpptop = setto 741 END SUBROUTINE nemo_set_cfctl 693 742 694 743 SUBROUTINE nemo_partition( num_pes ) -
branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/stpctl.F90
r9276 r10745 61 61 ! values and warn if they're out of Range 62 62 INTEGER, DIMENSION(3) :: ilocu ! 63 INTEGER, DIMENSION(2) :: ilocs ! 63 INTEGER, DIMENSION(2) :: ilocs ! 64 LOGICAL :: ll_wrtstp, ll_colruns, ll_wrtruns 64 65 !!---------------------------------------------------------------------- 65 66 ll_wrtstp = ( MOD( kt, sn_cfctl%ptimincr ) == 0 ) .OR. ( kt == nitend ) 67 ll_colruns = ll_wrtstp .AND. ( ln_ctl .OR. sn_cfctl%l_runstat ) 68 ll_wrtruns = ll_colruns .AND. lwm 66 69 IF( kt == nit000 .AND. lwp ) THEN 67 70 WRITE(numout,*) … … 74 77 clfname = 'time.step' 75 78 ENDIF 76 CALL ctl_opn( numstp, TRIM(clfname), 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 77 ENDIF 78 79 IF(lwp) WRITE ( numstp, '(1x, i8)' ) kt !* save the current time step in numstp 80 IF(lwp) REWIND( numstp ) ! -------------------------- 79 IF( lwm ) & 80 & CALL ctl_opn( numstp, TRIM(clfname), 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 81 ENDIF 82 83 IF(lwp .AND. ll_wrtstp) THEN 84 WRITE ( numstp, '(1x, i8)' ) kt !* save the current time step in numstp 85 REWIND( numstp ) ! -------------------------- 86 ENDIF 81 87 82 88 ! !* Test maximum of velocity (zonal only) … … 93 99 IF( lk_mpp ) CALL mpp_max( zumax ) ! max over the global domain 94 100 ! 95 IF( MOD( kt, nwrite ) == 1 .AND. lwp) WRITE(numout,*) ' ==>> time-step= ',kt,' abs(U) max: ', zumax101 IF( ll_colruns ) WRITE(numout,*) ' ==>> time-step= ',kt,' abs(U) max: ', zumax 96 102 ! 97 103 IF( zumax > 20.e0 ) THEN … … 212 218 IF( lk_dynspg_flt ) THEN ! elliptic solver statistics (if required) 213 219 ! 214 IF(l wp) WRITE(numsol,9200) kt, niter, res, SQRT(epsr)/eps ! Solver220 IF(ll_wrtruns) WRITE(numsol,9200) kt, niter, res, SQRT(epsr)/eps ! Solver 215 221 ! 216 222 IF( kindic < 0 .AND. zsmin > 0.e0 .AND. zumax <= 20.e0 ) THEN ! create a abort file if problem found … … 226 232 ! 227 233 ELSE !* ssh statistics (and others...) 228 IF( kt == nit000 .AND. lwp ) THEN ! open ssh statistics file (put in solver.stat file)234 IF( kt == nit000 .AND. lwp .AND. ln_ctl .OR. sn_cfctl%l_runstat) THEN ! open ssh statistics file (put in solver.stat file) 229 235 CALL ctl_opn( numsol, 'solver.stat', 'REPLACE', 'FORMATTED', 'SEQUENTIAL', -1, numout, lwp, narea ) 230 236 ENDIF 231 237 ! 232 zssh2 = SUM( sshn(:,:) * sshn(:,:) * tmask_i(:,:) ) 233 IF( lk_mpp ) CALL mpp_sum( zssh2 ) ! sum over the global domain 234 ! 235 IF(lwp) WRITE(numsol,9300) kt, zssh2, zumax, zsmin ! ssh statistics 238 IF( ll_wrtruns ) THEN 239 zssh2 = SUM( sshn(:,:) * sshn(:,:) * tmask_i(:,:) ) 240 IF( lk_mpp ) CALL mpp_sum( zssh2 ) ! sum over the global domain 241 ! 242 WRITE(numsol,9300) kt, zssh2, zumax, zsmin ! ssh statistics 243 ENDIF 236 244 ! 237 245 ENDIF -
branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/OPA_SRC/trc_oce.F90
r6486 r10745 188 188 zchl = zrgb(1,jc) 189 189 irgb = NINT( 41 + 20.* LOG10( zchl ) + 1.e-15 ) 190 IF(lwp ) WRITE(numout,*) ' jc =', jc, ' Chl = ', zchl, ' irgb = ', irgb190 IF(lwp .AND. nprint >= 1 ) WRITE(numout,*) ' jc =', jc, ' Chl = ', zchl, ' irgb = ', irgb 191 191 IF( irgb /= jc ) THEN 192 192 IF(lwp) WRITE(numout,*) ' jc =', jc, ' Chl = ', zchl, ' Chl class = ', irgb -
branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/TOP_SRC/trcini.F90
r10149 r10745 123 123 CALL trc_ice_ini ! Tracers in sea ice 124 124 125 IF( ln_ctl ) THEN 126 ! 127 IF (narea == 1) THEN 128 ! The tracer.stat file only contains global tracer sum values, if 129 ! it contains anything at all. Hence it only needs to be opened 130 ! and written to on the master PE, not on all PEs. 131 CALL ctl_opn( numstr, 'tracer.stat', 'REPLACE','FORMATTED', & 132 'SEQUENTIAL', -1, numout, lwp , narea ) 133 ENDIF 134 ! 135 ENDIF 125 ! 126 IF (lwm .AND. sn_cfctl%l_trcstat) THEN 127 ! The tracer.stat file only contains global tracer sum values, if 128 ! it contains anything at all. Hence it only needs to be opened 129 ! and written to on the master PE, not on all PEs. 130 CALL ctl_opn( numstr, 'tracer.stat', 'REPLACE','FORMATTED', & 131 'SEQUENTIAL', -1, numout, lwp , narea ) 132 ENDIF 133 ! 136 134 137 135 IF( ln_trcdta ) THEN -
branches/UKMO/dev_r5518_GO6_package_text_diagnostics/NEMOGCM/NEMO/TOP_SRC/trcstp.F90
r9237 r10745 62 62 INTEGER :: jk, jn ! dummy loop indices 63 63 REAL(wp) :: ztrai 64 LOGICAL :: ll_trcstat ! local logical 64 65 CHARACTER (len=25) :: charout 65 66 !!------------------------------------------------------------------- … … 67 68 IF( nn_timing == 1 ) CALL timing_start('trc_stp') 68 69 ! 70 ll_trcstat = ( ln_ctl .OR. sn_cfctl%l_trcstat ) .AND. & 71 & ( ( MOD( kt, sn_cfctl%ptimincr ) == 0 ) .OR. ( kt == nitend ) ) 69 72 IF( kt == nittrc000 .AND. lk_trdmxl_trc ) CALL trd_mxl_trc_init ! trends: Mixed-layer 70 73 ! … … 120 123 ENDIF 121 124 ! 122 IF (l n_ctl) THEN125 IF (ll_trcstat) THEN 123 126 ! The following code is very expensive since it involves multiple 124 127 ! reproducible global sums over all tracer fields and is potentially
Note: See TracChangeset
for help on using the changeset viewer.