diff --git a/src/LIB/SURCOUCHE/src/modd_io.f90 b/src/LIB/SURCOUCHE/src/modd_io.f90 index a27528eebe0f92b06e94ef1464a3f3f11396d382..45afb97321a0d0a9d61aff382468ad7b1a8099d7 100644 --- a/src/LIB/SURCOUCHE/src/modd_io.f90 +++ b/src/LIB/SURCOUCHE/src/modd_io.f90 @@ -1,4 +1,4 @@ -!MNH_LIC Copyright 1994-2019 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 1994-2020 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. @@ -9,6 +9,7 @@ ! P. Wautelet 21/01/2019: add LIO_ALLOW_NO_BACKUP and LIO_NO_WRITE to modd_io_ll to allow to disable writes (for bench purposes) ! P. Wautelet 07/02/2019: force TYPE to a known value for IO_File_add2list ! P. Wautelet 12/03/2019: add TMAINFILE field in TFILEDATA +! P. Wautelet 17/01/2020: add 'BUD' category for Print_msg + corresponding namelist variables !----------------------------------------------------------------- MODULE MODD_IO @@ -41,6 +42,8 @@ LOGICAL, SAVE :: LLFIREAD = .FALSE. ! TRUE will force LFI read (instead of Net LOGICAL, SAVE :: LVERB_OUTLST = .TRUE. ! TRUE will PRINT_MSG in OUTPUT_LISTINGn files LOGICAL, SAVE :: LVERB_STDOUT = .FALSE. ! TRUE will also PRINT_MSG on standard output LOGICAL, SAVE :: LVERB_ALLPRC = .FALSE. ! FALSE: only process 0 do PRINT_MSG, TRUE: all processes +INTEGER, SAVE :: NBUD_VERB = NVERB_WARNING ! Verbosity level for budgets +INTEGER, SAVE :: NBUD_ABORT_LEVEL = NVERB_ERROR ! Level of budget error necessary to force stop of application INTEGER, SAVE :: NIO_VERB = NVERB_WARNING ! Verbosity level for IO INTEGER, SAVE :: NIO_ABORT_LEVEL = NVERB_ERROR ! Level of IO error necessary to force stop of application diff --git a/src/LIB/SURCOUCHE/src/mode_msg.f90 b/src/LIB/SURCOUCHE/src/mode_msg.f90 index 6532afab8cc57e2d8df00593cb0bd3b520c9408f..77d09b149fa0dbef764b362db727973b2d5e8f94 100644 --- a/src/LIB/SURCOUCHE/src/mode_msg.f90 +++ b/src/LIB/SURCOUCHE/src/mode_msg.f90 @@ -1,4 +1,4 @@ -!MNH_LIC Copyright 2017-2019 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 2017-2020 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. @@ -9,6 +9,7 @@ ! P. Wautelet 27/02/2019: module extracted from mode_io.f90 ! P. Wautelet 04/04/2019: force write on stderr for all processes in print_msg if abort ! P. Wautelet 02/07/2019: flush messages also for files opened with newunit (logical unit can be negative) +! P. Wautelet 17/01/2020: add 'BUD' category for Print_msg !----------------------------------------------------------------- MODULE MODE_MSG ! @@ -23,7 +24,7 @@ SUBROUTINE PRINT_MSG(KVERB,HDOMAIN,HSUBR,HMSG) USE ISO_FORTRAN_ENV, ONLY: ERROR_UNIT, OUTPUT_UNIT ! USE MODD_CONF, ONLY: CPROGRAM -USE MODD_IO, ONLY: NIO_VERB, NIO_ABORT_LEVEL, NGEN_VERB, NGEN_ABORT_LEVEL, & +USE MODD_IO, ONLY: NBUD_VERB, NBUD_ABORT_LEVEL, NIO_VERB, NIO_ABORT_LEVEL, NGEN_VERB, NGEN_ABORT_LEVEL, & LVERB_OUTLST, LVERB_STDOUT, LVERB_ALLPRC, TFILE_OUTPUTLISTING USE MODD_LUNIT, ONLY: TLUOUT0 USE MODD_VAR_ll, ONLY: IP, NMNH_COMM_WORLD @@ -67,6 +68,10 @@ ELSE END IF ! SELECT CASE(HDOMAIN) + CASE('BUD') + !Budget messages + IMAXVERB = NBUD_VERB + IABORTLEVEL = NBUD_ABORT_LEVEL CASE('IO') IMAXVERB = NIO_VERB IABORTLEVEL = NIO_ABORT_LEVEL diff --git a/src/LIB/SURCOUCHE/src/modn_confio.f90 b/src/LIB/SURCOUCHE/src/modn_confio.f90 index 8505a61f96ad0b37b485f5f7fe850abe34a72ec9..7c89947c1c47d3cd7a3b31dd8872df2d19bea917 100644 --- a/src/LIB/SURCOUCHE/src/modn_confio.f90 +++ b/src/LIB/SURCOUCHE/src/modn_confio.f90 @@ -1,4 +1,4 @@ -!MNH_LIC Copyright 2014-2019 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 2014-2020 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. @@ -29,15 +29,16 @@ !! MODIFICATIONS !! ------------- !! Original 31/03/2014 -!! Philippe Wautelet: 05/2016-04/2018: new data structures and calls for I/O -!! Philippe Wautelet: 21/01/2019: add LIO_ALLOW_NO_BACKUP and LIO_NO_WRITE to modd_io_ll to allow to disable writes (for bench purposes) +! P. Wautelet 05/2016-04/2018: new data structures and calls for I/O +! P. Wautelet 21/01/2019: add LIO_ALLOW_NO_BACKUP and LIO_NO_WRITE to modd_io_ll to allow to disable writes (for bench purposes) +! P. Wautelet 17/01/2020: add 'BUD' category for Print_msg + corresponding namelist variables !------------------------------------------------------------------------------- ! !* 0. DECLARATIONS ! ------------ ! USE MODD_IO, ONLY : LVERB_OUTLST, LVERB_STDOUT, LVERB_ALLPRC, & - NIO_VERB, NIO_ABORT_LEVEL, NGEN_VERB, NGEN_ABORT_LEVEL, & + NBUD_VERB, NBUD_ABORT_LEVEL, NIO_VERB, NIO_ABORT_LEVEL, NGEN_VERB, NGEN_ABORT_LEVEL, & CIO_DIR, LIO_ALLOW_NO_BACKUP, LIO_NO_WRITE ! IMPLICIT NONE @@ -49,6 +50,7 @@ LOGICAL,SAVE :: LLFIREAD = .FALSE. ! TRUE : enable LFI reading (disable NetCDF4 NAMELIST/NAM_CONFIO/LCDF4, LLFIOUT, LLFIREAD, & LVERB_OUTLST, LVERB_STDOUT, LVERB_ALLPRC, & + NBUD_VERB, NBUD_ABORT_LEVEL, & NIO_VERB, NIO_ABORT_LEVEL, & NGEN_VERB, NGEN_ABORT_LEVEL, CIO_DIR, & LIO_ALLOW_NO_BACKUP, LIO_NO_WRITE diff --git a/src/MNH/budget.f90 b/src/MNH/budget.f90 index c68bd5fb72e976d919350ea0730ba75993b0773f..fcb6592244ac8611d467f2e9bd0ed90ed8b9e56e 100644 --- a/src/MNH/budget.f90 +++ b/src/MNH/budget.f90 @@ -1,4 +1,4 @@ -!MNH_LIC Copyright 1994-2019 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 1994-2020 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. @@ -219,7 +219,7 @@ SELECT CASE (KBUDN) IBUSV WRITE(UNIT=ILUOUT0,FMT='("CHECK FOR THE CALL BUDGET OF THAT VARIABLE")') !callabortstop - CALL PRINT_MSG(NVERB_FATAL,'GEN','BUDGET','') + CALL PRINT_MSG(NVERB_FATAL,'BUD','BUDGET','') END IF END SELECT ! @@ -329,7 +329,7 @@ CONTAINS WRITE(UNIT=ILUOUT0,FMT='("PLEASE CHECK THE CALL BUDGET OF THE VARIABLE")') WRITE(UNIT=ILUOUT0,FMT='("AND THE BUDGET PROCESS ORDER IN INI_BUDGET !")') !callabortstop - CALL PRINT_MSG(NVERB_FATAL,'GEN','BUDGET','') + CALL PRINT_MSG(NVERB_FATAL,'BUD','BUDGET','') END IF END IF ! diff --git a/src/MNH/ch_init_budgetn.f90 b/src/MNH/ch_init_budgetn.f90 index d84ff1f7584f5f3346a4691330d6b43a9ad0cdee..5f64490410f01cae1581577c943051601aff7e59 100644 --- a/src/MNH/ch_init_budgetn.f90 +++ b/src/MNH/ch_init_budgetn.f90 @@ -1,4 +1,4 @@ -!MNH_LIC Copyright 2016-2019 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 2016-2020 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. @@ -120,7 +120,7 @@ IF (YWORKSTR /= '') THEN END IF END DO IF (GCHECKFAILED) THEN - call Print_msg( NVERB_FATAL, 'GEN', 'CH_INIT_BUDGET_n', 'wrong (misspelled) CSPEC_BUDGET encountered' ) + call Print_msg( NVERB_FATAL, 'BUD', 'CH_INIT_BUDGET_n', 'wrong (misspelled) CSPEC_BUDGET encountered' ) END IF ELSE DEALLOCATE(CNAMES_BUDGET) diff --git a/src/MNH/ini_budget.f90 b/src/MNH/ini_budget.f90 index e41784b011e08b4c6c14d8c602d4e0d7e6679e4e..dda75ce4bc567674f04040ecec1abd02b61c88a8 100644 --- a/src/MNH/ini_budget.f90 +++ b/src/MNH/ini_budget.f90 @@ -1,4 +1,4 @@ -!MNH_LIC Copyright 1995-2019 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 1995-2020 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. @@ -2736,7 +2736,7 @@ IF (CBUTYPE=='MASK') THEN WRITE(UNIT=KLUOUT, FMT= '("BUMASK = ",I4.4)' ) NBUMASK END IF IF (GERROR) THEN - call Print_msg( NVERB_FATAL, 'GEN', 'INI_BUDGET', '' ) + call Print_msg( NVERB_FATAL, 'BUD', 'INI_BUDGET', '' ) ENDIF !------------------------------------------------------------------------------- !* 5. ALLOCATE MEMORY FOR BUDGET STORAGE ARRAYS diff --git a/src/MNH/write_budget.f90 b/src/MNH/write_budget.f90 index 5f6ab614abb31fa60272858b172864075c98f021..0d7caf60d02cd3f4fd499b69ac1ef10b064a1df5 100644 --- a/src/MNH/write_budget.f90 +++ b/src/MNH/write_budget.f90 @@ -1,4 +1,4 @@ -!MNH_LIC Copyright 1995-2019 CNRS, Meteo-France and Universite Paul Sabatier +!MNH_LIC Copyright 1995-2020 CNRS, Meteo-France and Universite Paul Sabatier !MNH_LIC This is part of the Meso-NH software governed by the CeCILL-C licence !MNH_LIC version 1. See LICENSE, CeCILL-C_V1-en.txt and CeCILL-C_V1-fr.txt !MNH_LIC for details. version 1. @@ -417,7 +417,7 @@ subroutine Store_one_budget_rho( tpdiafile, tpdates, pburhodj, kp, knocompress, end where case default - call Print_msg( NVERB_ERROR, 'GEN', 'Store_one_budget_rho', 'unknown CBUTYPE' ) + call Print_msg( NVERB_ERROR, 'BUD', 'Store_one_budget_rho', 'unknown CBUTYPE' ) end select allocate( ybucomment(1 ) ) @@ -455,7 +455,7 @@ subroutine Store_one_budget_rho( tpdiafile, tpdates, pburhodj, kp, knocompress, write( ygroup_name, fmt = "('RJZ__',I4.4)" ) nbutshift case default - call Print_msg( NVERB_ERROR, 'GEN', 'Store_one_budget_rho', 'unknown budget type' ) + call Print_msg( NVERB_ERROR, 'BUD', 'Store_one_budget_rho', 'unknown budget type' ) end select call Write_diachro( tpdiafile, tluout, ygroup_name, ybutype, iworkgrid, & @@ -507,7 +507,7 @@ subroutine Store_one_budget( tpdiafile, tpdates, pbudarray, prhodjn, kp, knocomp real, dimension(:,:,:,:,:,:), allocatable :: zworkt if( .not. allocated( prhodjn ) ) then - call Print_msg( NVERB_ERROR, 'GEN', 'Store_one_budget', 'prhodjn not allocated' ) + call Print_msg( NVERB_ERROR, 'BUD', 'Store_one_budget', 'prhodjn not allocated' ) return end if @@ -542,7 +542,7 @@ subroutine Store_one_budget( tpdiafile, tpdates, pbudarray, prhodjn, kp, knocomp end do case default - call Print_msg( NVERB_ERROR, 'GEN', 'Store_one_budget', 'unknown CBUTYPE' ) + call Print_msg( NVERB_ERROR, 'BUD', 'Store_one_budget', 'unknown CBUTYPE' ) end select deallocate(zconvert) @@ -635,7 +635,7 @@ subroutine Store_one_budget( tpdiafile, tpdates, pbudarray, prhodjn, kp, knocomp write( ygroup_name, fmt = "('SV',I3.3,I4.4)") jsv, nbutshift case default - call Print_msg( NVERB_ERROR, 'GEN', 'Store_one_budget', 'unknown budget type' ) + call Print_msg( NVERB_ERROR, 'BUD', 'Store_one_budget', 'unknown budget type' ) end select CALL Write_diachro( tpdiafile, tluout, ygroup_name, ybutype, iworkgrid, &