Ignore:
Timestamp:
Dec 10, 2023, 10:37:07 PM (11 months ago)
Author:
lguez
Message:

Bug fix: only print parameters if nErupt > 0

The variables which we print should be allocated and defined. Some of
the variables in the if structure are allocated only if nErupt > 0, so we put
the whole if structure inside a test on nErupt.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/StratAer/strataer_emiss_mod.F90

    r4765 r4766  
    153153    !============= Print params =============
    154154    IF (is_master) THEN
    155        IF (flag_emit == 1 .OR. flag_emit == 4) THEN
    156           WRITE(lunout,*) 'IN STRATAER nErupt: ',nErupt
    157           WRITE(lunout,*) 'IN STRATAER injdur: ',injdur
    158           WRITE(lunout,*) 'IN STRATAER nAerErupt: ',nAerErupt
    159 
    160           WRITE(lunout,*) 'IN STRATAER : year_emit_vol',year_emit_vol
    161           WRITE(lunout,*) 'IN STRATAER : mth_emit_vol',mth_emit_vol
    162           WRITE(lunout,*) 'IN STRATAER : day_emit_vol',day_emit_vol
    163           WRITE(lunout,*) 'IN STRATAER : altemiss_vol',altemiss_vol
    164           WRITE(lunout,*) 'IN STRATAER : sigma_alt_vol',sigma_alt_vol
    165           WRITE(lunout,*) 'IN STRATAER : xlat_min_vol',xlat_min_vol
    166           WRITE(lunout,*) 'IN STRATAER : xlat_max_vol',xlat_max_vol
    167           WRITE(lunout,*) 'IN STRATAER : xlon_min_vol',xlon_min_vol
    168           WRITE(lunout,*) 'IN STRATAER : xlon_max_vol',xlon_max_vol
    169           IF (flag_emit==1) THEN
    170              WRITE(lunout,*) 'IN STRATAEREMISS : m_sulf_emiss_vol',m_sulf_emiss_vol
    171              WRITE(lunout,*) 'IN STRATAER : m_aer_emiss_vol',m_aer_emiss_vol
    172              IF (ok_qemiss) then
    173                 WRITE(lunout,*) 'IN STRATAEREMISS : m_H2O_emiss_vol',m_H2O_emiss_vol
     155       IF (nErupt > 0) then
     156          if (flag_emit == 1 .OR. flag_emit == 4) THEN
     157             WRITE(lunout,*) 'IN STRATAER nErupt: ',nErupt
     158             WRITE(lunout,*) 'IN STRATAER injdur: ',injdur
     159             WRITE(lunout,*) 'IN STRATAER nAerErupt: ',nAerErupt
     160
     161             WRITE(lunout,*) 'IN STRATAER : year_emit_vol',year_emit_vol
     162             WRITE(lunout,*) 'IN STRATAER : mth_emit_vol',mth_emit_vol
     163             WRITE(lunout,*) 'IN STRATAER : day_emit_vol',day_emit_vol
     164             WRITE(lunout,*) 'IN STRATAER : altemiss_vol',altemiss_vol
     165             WRITE(lunout,*) 'IN STRATAER : sigma_alt_vol',sigma_alt_vol
     166             WRITE(lunout,*) 'IN STRATAER : xlat_min_vol',xlat_min_vol
     167             WRITE(lunout,*) 'IN STRATAER : xlat_max_vol',xlat_max_vol
     168             WRITE(lunout,*) 'IN STRATAER : xlon_min_vol',xlon_min_vol
     169             WRITE(lunout,*) 'IN STRATAER : xlon_max_vol',xlon_max_vol
     170             IF (flag_emit==1) THEN
     171                WRITE(lunout,*) 'IN STRATAEREMISS : m_sulf_emiss_vol',m_sulf_emiss_vol
     172                WRITE(lunout,*) 'IN STRATAER : m_aer_emiss_vol',m_aer_emiss_vol
     173                IF (ok_qemiss) then
     174                   WRITE(lunout,*) 'IN STRATAEREMISS : m_H2O_emiss_vol',m_H2O_emiss_vol
     175                ENDIF
    174176             ENDIF
    175           ENDIF
    176        ELSEIF (flag_emit == 2) THEN
    177           WRITE(lunout,*) 'IN STRATAER : m_aer_emiss_sai',m_aer_emiss_sai
    178           WRITE(lunout,*) 'IN STRATAER : altemiss_sai',altemiss_sai
    179           WRITE(lunout,*) 'IN STRATAER : sigma_alt_sai',sigma_alt_sai
    180           WRITE(lunout,*) 'IN STRATAER : xlat_sai',xlat_sai
    181           WRITE(lunout,*) 'IN STRATAER : xlon_sai',xlon_sai
    182        ELSEIF (flag_emit == 3) THEN
    183           WRITE(lunout,*) 'IN STRATAER : m_aer_emiss_sai',m_aer_emiss_sai
    184           WRITE(lunout,*) 'IN STRATAER : altemiss_sai',altemiss_sai
    185           WRITE(lunout,*) 'IN STRATAER : sigma_alt_sai',sigma_alt_sai
    186           WRITE(lunout,*) 'IN STRATAER : year_emit_sai start/end',year_emit_sai_start,year_emit_sai_end
    187           WRITE(lunout,*) 'IN STRATAER : mth_emit_sai start/end',mth_emit_sai_start,mth_emit_sai_end
    188           WRITE(lunout,*) 'IN STRATAER : day_emit_sai start/end',day_emit_sai_start,day_emit_sai_end
    189           WRITE(lunout,*) 'IN STRATAER : xlat_min_sai',xlat_min_sai
    190           WRITE(lunout,*) 'IN STRATAER : xlat_max_sai',xlat_max_sai
    191           WRITE(lunout,*) 'IN STRATAER : xlon_sai',xlon_sai
    192        ENDIF
    193        IF(flag_emit == 4) THEN
    194           WRITE(lunout,*) 'IN STRATAER : nSpeciesErupt: ',nSpeciesErupt
    195           WRITE(lunout,*) 'IN STRATAER : id_species = ',id_species
    196           WRITE(lunout,*) 'IN STRATAER : id_HCl = ',id_HCl
    197           WRITE(lunout,*) 'IN STRATAER : id_HBr = ',id_HBr
    198           WRITE(lunout,*) 'IN STRATAER : id_NOx = ',id_NOx
    199           WRITE(lunout,*) 'IN STRATAER : id_H2O = ',id_H2O
    200           WRITE(lunout,*) 'IN STRATAER : m_Chlore_emiss_vol = ',m_Chlore_emiss_vol
    201           WRITE(lunout,*) 'IN STRATAER : m_Brome_emiss_vol = ',m_Brome_emiss_vol
    202           WRITE(lunout,*) 'IN STRATAER : m_NOx_emiss_vol = ',m_NOx_emiss_vol
    203           WRITE(lunout,*) 'IN STRATAER : m_H2O_emiss_vol = ',m_H2O_emiss_vol
    204        ENDIF
     177          ELSEIF (flag_emit == 2) THEN
     178             WRITE(lunout,*) 'IN STRATAER : m_aer_emiss_sai',m_aer_emiss_sai
     179             WRITE(lunout,*) 'IN STRATAER : altemiss_sai',altemiss_sai
     180             WRITE(lunout,*) 'IN STRATAER : sigma_alt_sai',sigma_alt_sai
     181             WRITE(lunout,*) 'IN STRATAER : xlat_sai',xlat_sai
     182             WRITE(lunout,*) 'IN STRATAER : xlon_sai',xlon_sai
     183          ELSEIF (flag_emit == 3) THEN
     184             WRITE(lunout,*) 'IN STRATAER : m_aer_emiss_sai',m_aer_emiss_sai
     185             WRITE(lunout,*) 'IN STRATAER : altemiss_sai',altemiss_sai
     186             WRITE(lunout,*) 'IN STRATAER : sigma_alt_sai',sigma_alt_sai
     187             WRITE(lunout,*) 'IN STRATAER : year_emit_sai start/end',year_emit_sai_start,year_emit_sai_end
     188             WRITE(lunout,*) 'IN STRATAER : mth_emit_sai start/end',mth_emit_sai_start,mth_emit_sai_end
     189             WRITE(lunout,*) 'IN STRATAER : day_emit_sai start/end',day_emit_sai_start,day_emit_sai_end
     190             WRITE(lunout,*) 'IN STRATAER : xlat_min_sai',xlat_min_sai
     191             WRITE(lunout,*) 'IN STRATAER : xlat_max_sai',xlat_max_sai
     192             WRITE(lunout,*) 'IN STRATAER : xlon_sai',xlon_sai
     193          ENDIF
     194          IF(flag_emit == 4) THEN
     195             WRITE(lunout,*) 'IN STRATAER : nSpeciesErupt: ',nSpeciesErupt
     196             WRITE(lunout,*) 'IN STRATAER : id_species = ',id_species
     197             WRITE(lunout,*) 'IN STRATAER : id_HCl = ',id_HCl
     198             WRITE(lunout,*) 'IN STRATAER : id_HBr = ',id_HBr
     199             WRITE(lunout,*) 'IN STRATAER : id_NOx = ',id_NOx
     200             WRITE(lunout,*) 'IN STRATAER : id_H2O = ',id_H2O
     201             WRITE(lunout,*) 'IN STRATAER : m_Chlore_emiss_vol = ',m_Chlore_emiss_vol
     202             WRITE(lunout,*) 'IN STRATAER : m_Brome_emiss_vol = ',m_Brome_emiss_vol
     203             WRITE(lunout,*) 'IN STRATAER : m_NOx_emiss_vol = ',m_NOx_emiss_vol
     204             WRITE(lunout,*) 'IN STRATAER : m_H2O_emiss_vol = ',m_H2O_emiss_vol
     205          ENDIF
     206       endif
    205207    ENDIF ! if master
    206208
Note: See TracChangeset for help on using the changeset viewer.