MODULE in_out_manager !!====================================================================== !! *** MODULE in_out_manager *** !! Ocean physics: vertical mixing coefficient compute from the tke !! turbulent closure parameterization !!===================================================================== !! History : 8.5 ! 02-06 (G. Madec) original code !! 9.0 ! 06-07 (S. Masson) iom, add ctl_stop, ctl_warn !!---------------------------------------------------------------------- !!---------------------------------------------------------------------- !! ctl_stop : update momentum and tracer Kz from a tke scheme !! ctl_warn : initialization, namelist read, and parameters control !!---------------------------------------------------------------------- USE par_kind USE par_oce USE lib_print ! formated print library PUBLIC !!---------------------------------------------------------------------- !! namrun namelist parameters !!---------------------------------------------------------------------- CHARACTER (len=16) :: cexper = "exp0" !: experiment name used for output filename LOGICAL :: ln_rstart = .FALSE. , & !: start from (F) rest or (T) a restart file & ln_ctl = .FALSE. !: run control for debugging INTEGER :: no = 0 , & !: job number & nrstdt = 0 , & !: control of the time step (0, 1 or 2) & nit000 = 1 , & !: index of the first time step & nitend = 10 , & !: index of the last time step & ndate0 = 961115 , & !: initial calendar date aammjj & nleapy = 0 , & !: Leap year calendar flag (0/1 or 30) & ninist = 0 , & !: initial state output flag (0/1) & nbench = 0 !: benchmark parameter (0/1) !!---------------------------------------------------------------------- !! output monitoring !!---------------------------------------------------------------------- INTEGER :: nstock = 10 , & !: restart file frequency & nprint = 0 , & !: level of print (0 no print) & nwrite = 10 , & !: restart file frequency & nictls = 0 , & !: Start i indice for the SUM control & nictle = 0 , & !: End i indice for the SUM control & njctls = 0 , & !: Start j indice for the SUM control & njctle = 0 , & !: End j indice for the SUM control & isplt = 1 , & !: number of processors following i & jsplt = 1 , & !: number of processors following j & ijsplt = 1 !: nb of local domain = nb of processors !!---------------------------------------------------------------------- !! logical units !!---------------------------------------------------------------------- INTEGER :: numstp = 1 , & !: logical unit for time step & numout = 2 , & !: logical unit for output print & numnam = 3 , & !: logical unit for namelist & numnam_ice = 4 , & !: logical unit for ice namelist & numevo_ice = 17 , & !: logical unit for ice variables (temp. evolution) & numsol = 25 , & !: logical unit for solver statistics & numwri = 40 , & !: logical unit for output write & numisp = 41 , & !: logical unit for island statistics & numgap = 45 , & !: logical unit for differences diagnostic & numbol = 67 , & !: logical unit for "bol" diagnostics & numptr = 68 , & !: logical unit for Poleward TRansports & numflo = 69 !: logical unit for drifting floats !!---------------------------------------------------------------------- !! Run control !!---------------------------------------------------------------------- INTEGER :: nstop = 0 , & !: error flag (=number of reason for a premature stop run) & nwarn = 0 !: warning flag (=number of warning found during the run) CHARACTER(LEN=100) :: ctmp1, ctmp2, ctmp3 !: temporary character CHARACTER (len=64) :: cform_err="(/,' ===>>> : E R R O R', /,' ===========',/)" , & !: & cform_war="(/,' ===>>> : W A R N I N G', /,' ===============',/)" !: LOGICAL :: lwp , & !: boolean : true on the 1st processor only & lsp_area = .TRUE. !: to make a control print over a specific area !!---------------------------------------------------------------------- !! OPA 9.0 , LOCEAN-IPSL (2005) !! $Header$ !! Software governed by the CeCILL licence (modipsl/doc/NEMO_CeCILL.txt) !!---------------------------------------------------------------------- CONTAINS SUBROUTINE ctl_stop( cd1, cd2, cd3, cd4, cd5, & & cd6, cd7, cd8, cd9, cd10 ) !!----------------------------------------------------------------------- !! *** ROUTINE stop_opa *** !! !! ** Purpose : ??? blah blah.... !!----------------------------------------------------------------------- CHARACTER(len=*), INTENT(in), OPTIONAL :: cd1, cd2, cd3, cd4, cd5, & & cd6, cd7, cd8, cd9, cd10 !!----------------------------------------------------------------------- ! nstop = nstop + 1 IF(lwp) THEN WRITE(numout,"(/,' ===>>> : E R R O R', /,' ===========',/)") IF( PRESENT(cd1 ) ) WRITE(numout,*) cd1 IF( PRESENT(cd2 ) ) WRITE(numout,*) cd2 IF( PRESENT(cd3 ) ) WRITE(numout,*) cd3 IF( PRESENT(cd4 ) ) WRITE(numout,*) cd4 IF( PRESENT(cd5 ) ) WRITE(numout,*) cd5 IF( PRESENT(cd6 ) ) WRITE(numout,*) cd6 IF( PRESENT(cd7 ) ) WRITE(numout,*) cd7 IF( PRESENT(cd8 ) ) WRITE(numout,*) cd8 IF( PRESENT(cd9 ) ) WRITE(numout,*) cd9 IF( PRESENT(cd10) ) WRITE(numout,*) cd10 ENDIF CALL FLUSH(numout) ! END SUBROUTINE ctl_stop SUBROUTINE ctl_warn( cd1, cd2, cd3, cd4, cd5, & & cd6, cd7, cd8, cd9, cd10 ) !!----------------------------------------------------------------------- !! *** ROUTINE stop_warn *** !! !! ** Purpose : ??? blah blah.... !!----------------------------------------------------------------------- CHARACTER(len=*), INTENT(in), OPTIONAL :: cd1, cd2, cd3, cd4, cd5, & & cd6, cd7, cd8, cd9, cd10 !!----------------------------------------------------------------------- ! nwarn = nwarn + 1 IF(lwp) THEN WRITE(numout,"(/,' ===>>> : W A R N I N G', /,' ===============',/)") IF( PRESENT(cd1 ) ) WRITE(numout,*) cd1 IF( PRESENT(cd2 ) ) WRITE(numout,*) cd2 IF( PRESENT(cd3 ) ) WRITE(numout,*) cd3 IF( PRESENT(cd4 ) ) WRITE(numout,*) cd4 IF( PRESENT(cd5 ) ) WRITE(numout,*) cd5 IF( PRESENT(cd6 ) ) WRITE(numout,*) cd6 IF( PRESENT(cd7 ) ) WRITE(numout,*) cd7 IF( PRESENT(cd8 ) ) WRITE(numout,*) cd8 IF( PRESENT(cd9 ) ) WRITE(numout,*) cd9 IF( PRESENT(cd10) ) WRITE(numout,*) cd10 ENDIF CALL FLUSH(numout) ! END SUBROUTINE ctl_warn !!===================================================================== END MODULE in_out_manager