- Timestamp:
- Sep 9, 2021, 3:50:44 PM (3 years ago)
- Location:
- LMDZ6/trunk/libf
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phy_common/print_control_mod.F90
r3435 r3981 5 5 INTEGER,SAVE :: prt_level ! debug output level 6 6 LOGICAL,SAVE :: debug ! flag to specify if in "debug mode" 7 !$OMP THREADPRIVATE(lunout,prt_level,debug) 7 LOGICAL,SAVE :: alert_first_call = .TRUE. ! for printing alerts on first call to routine only 8 LOGICAL,SAVE :: call_alert ! (combination of is_master and alert_first_call for easier use 9 !$OMP THREADPRIVATE(lunout,prt_level,debug, alert_first_call, call_alert) 8 10 9 11 ! NB: Module variable Initializations done by set_print_control … … 15 17 SUBROUTINE set_print_control(lunout_,prt_level_,debug_) 16 18 IMPLICIT NONE 17 INTEGER :: lunout_18 INTEGER :: prt_level_19 LOGICAL :: debug_19 INTEGER, INTENT(IN) :: lunout_ 20 INTEGER, INTENT(IN) :: prt_level_ 21 LOGICAL, INTENT(IN) :: debug_ 20 22 21 23 lunout = lunout_ … … 25 27 END SUBROUTINE set_print_control 26 28 29 SUBROUTINE prt_alerte(message, modname, niv_alerte) 30 ! Function to print different values of alarms when first encountered 31 ! Meant for informative purposee 32 IMPLICIT NONE 33 ! Arguments: 34 ! message: message to print out 35 ! modname: module/routine name 36 ! niv_alerte: alert level (0/1/2) 37 CHARACTER(LEN=*), INTENT(IN) :: modname 38 CHARACTER(LEN=*) :: message 39 INTEGER :: niv_alerte 40 ! local variables 41 CHARACTER(LEN=7), DIMENSION(0:2) :: alarm_color = (/ 'VERTE ','ORANGE ','ROUGE ' /) 42 CHARACTER(LEN=7) :: alarm_couleur 43 INTEGER :: alarm_file=15 ! in case we want/need to print out the special alarms in a separate file 44 45 IF ( alert_first_call) then 46 IF ( alarm_file .ne. lunout ) THEN 47 OPEN(unit = alarm_file, file = "ALERTES.txt") 48 ENDIF 49 ENDIF 50 51 alarm_couleur = alarm_color(niv_alerte) 52 IF (niv_alerte < 0 .OR. niv_alerte > 3) then 53 message = 'NIVEAU ALERTE INVALIDE '//message 54 alarm_couleur='NOIRE ' 55 ENDIF 56 57 WRITE(alarm_file, *)' ALERTE ',alarm_couleur, trim(modname), trim(message) 58 59 END SUBROUTINE prt_alerte 60 61 27 62 END MODULE print_control_mod -
LMDZ6/trunk/libf/phylmd/physiq_mod.F90
r3956 r3981 59 59 USE phys_output_mod 60 60 USE phys_output_ctrlout_mod 61 USE print_control_mod, ONLY: mydebug=>debug , lunout, prt_level 61 USE print_control_mod, ONLY: mydebug=>debug , lunout, prt_level, & 62 alert_first_call, call_alert, prt_alerte 62 63 USE readaerosol_mod, ONLY : init_aero_fromfile 63 64 USE readaerosolstrato_m, ONLY : init_readaerosolstrato … … 1028 1029 !JLD REAL zstophy, zout 1029 1030 1030 CHARACTER *20 modname1031 CHARACTER*80 abort_message1031 CHARACTER (LEN=20) :: modname='physiq_mod' 1032 CHARACTER*80 message, abort_message 1032 1033 LOGICAL, SAVE :: ok_sync, ok_sync_omp 1033 1034 !$OMP THREADPRIVATE(ok_sync) … … 1194 1195 pi = 4. * ATAN(1.) 1195 1196 1197 ! set-up call to alerte function 1198 call_alert = (alert_first_call .AND. is_master) 1199 1196 1200 ! Ehouarn: set value of jjmp1 since it is no longer a "fixed parameter" 1197 1201 jjmp1=nbp_lat … … 1311 1315 forall (k=1: nbp_lev) zmasse(:, k) = (paprs(:, k)-paprs(:, k+1)) / rg 1312 1316 1313 modname = 'physiq'1314 1317 1315 1318 IF (debut) THEN … … 5249 5252 ! 5250 5253 5254 ! Disabling calls to the prt_alerte function 5255 alert_first_call = .FALSE. 5256 5251 5257 IF (lafin) THEN 5252 5258 itau_phy = itau_phy + itap
Note: See TracChangeset
for help on using the changeset viewer.