Ignore:
Timestamp:
Apr 19, 2022, 12:03:01 PM (3 years ago)
Author:
dbardet
Message:

Using of is_master keyword to allow nly the master processor to write the messages and avoid too heavy output files

Location:
trunk/LMDZ.GENERIC/libf/phystd
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.GENERIC/libf/phystd/interpolateCH4CH4.F90

    r2655 r2662  
    1616  use callkeys_mod, only: strictboundcia
    1717  use datafile_mod, only: datadir
     18  use mod_phys_lmdz_para, only : is_master
     19
    1820  implicit none
    1921
     
    5759  if(temp.gt.400)then
    5860    if (strictboundcia) then
    59       print*,'Your temperatures are too high for this CH4-CH4 CIA dataset.'
    60       print*,'Please run mixed CH4-CH4 atmospheres below T = 400 K.'     
     61      if (is_master) then
     62        print*,'Your temperatures are too high for this CH4-CH4 CIA dataset.'
     63        print*,'Please run mixed CH4-CH4 atmospheres below T = 400 K.'     
     64      endif
    6165      stop
    6266    else
    63       print*,'Your temperatures are too high for this CH4-CH4 CIA dataset'
    64       print*,'you have chosen strictboundcia = ', strictboundcia
    65       print*,'*********************************************************'
    66       print*,' we allow model to continue but with temp = 400          '
    67       print*,'  ...       for CH4-CH4 CIA dataset        ...           '
    68       print*,'  ... we assume we know what you are doing ...           '
    69       print*,'*********************************************************'
     67      if (is_master) then
     68        print*,'Your temperatures are too high for this CH4-CH4 CIA dataset'
     69        print*,'you have chosen strictboundcia = ', strictboundcia
     70        print*,'*********************************************************'
     71        print*,' we allow model to continue but with temp = 400          '
     72        print*,'  ...       for CH4-CH4 CIA dataset        ...           '
     73        print*,'  ... we assume we know what you are doing ...           '
     74        print*,'*********************************************************'
     75      endif
    7076      temp = 400
    7177    endif
    7278  elseif(temp.lt.40)then
    7379    if (strictboundcia) then
    74       print*,'Your temperatures are too low for this CH4-CH4 CIA dataset.'
    75       print*,'Please run mixed CH4-CH4 atmospheres above T = 40 K.'     
     80      if (is_master) then
     81        print*,'Your temperatures are too low for this CH4-CH4 CIA dataset.'
     82        print*,'Please run mixed CH4-CH4 atmospheres above T = 40 K.'     
     83      endif
    7684      stop
    7785    else
    78       print*,'Your temperatures are too low for this CH4-CH4 CIA dataset'
    79       print*,'you have chosen strictboundcia = ', strictboundcia
    80       print*,'*********************************************************'
    81       print*,' we allow model to continue but with temp = 40           '
    82       print*,'  ...       for CH4-CH4 CIA dataset        ...           '
    83       print*,'  ... we assume we know what you are doing ...           '
    84       print*,'*********************************************************'
     86      if (is_master) then
     87        print*,'Your temperatures are too low for this CH4-CH4 CIA dataset'
     88        print*,'you have chosen strictboundcia = ', strictboundcia
     89        print*,'*********************************************************'
     90        print*,' we allow model to continue but with temp = 40           '
     91        print*,'  ...       for CH4-CH4 CIA dataset        ...           '
     92        print*,'  ... we assume we know what you are doing ...           '
     93        print*,'*********************************************************'
     94      endif
    8595      temp = 40
    8696    endif
     
    90100
    91101  if(firstcall)then ! called by sugas_corrk only
    92      print*,'----------------------------------------------------'
    93      print*,'Initialising CH4-CH4 continuum from HITRAN database...'
     102     if (is_master) print*,'----------------------------------------------------'
     103     if (is_master) print*,'Initialising CH4-CH4 continuum from HITRAN database...'
    94104
    95105     !     1.1 Open the ASCII files
     
    99109     open(33,file=dt_file,form='formatted',status='old',iostat=ios)
    100110     if (ios.ne.0) then        ! file not found
    101         write(*,*) 'Error from interpolateCH4CH4'
    102         write(*,*) 'Data file ',trim(dt_file),' not found.'
    103         write(*,*) 'Check that your path to datagcm:',trim(datadir)
    104         write(*,*) 'is correct. You can change it in callphys.def with:'
    105         write(*,*) 'datadir = /absolute/path/to/datagcm'
    106         write(*,*) 'Also check that the continuum data continuum_data/CH4-CH4_2011.cia is there.'
     111        if (is_master) then
     112          write(*,*) 'Error from interpolateCH4CH4'
     113          write(*,*) 'Data file ',trim(dt_file),' not found.'
     114          write(*,*) 'Check that your path to datagcm:',trim(datadir)
     115          write(*,*) 'is correct. You can change it in callphys.def with:'
     116          write(*,*) 'datadir = /absolute/path/to/datagcm'
     117          write(*,*) 'Also check that the continuum data continuum_data/CH4-CH4_2011.cia is there.'
     118        endif
    107119        call abort
    108120     else
     
    112124           read(33,fmat1) bleh,blah,blah,nres,Ttemp
    113125           if(nS.ne.nres)then
    114               print*,'Resolution given in file: ',trim(dt_file)
    115               print*,'is ',nres,', which does not match nS.'
    116               print*,'Please adjust nS value in interpolateCH4CH4.F90'
     126              if (is_master) then
     127                print*,'Resolution given in file: ',trim(dt_file)
     128                print*,'is ',nres,', which does not match nS.'
     129                print*,'Please adjust nS value in interpolateCH4CH4.F90'
     130              endif
    117131              stop
    118132           endif
     
    129143!$OMP END MASTER
    130144!$OMP BARRIER
    131 
    132      print*,'interpolateCH4CH4: At wavenumber ',wn,' cm^-1'
    133      print*,'   temperature                 ',temp,' K'
    134      print*,'   pressure                    ',pres,' Pa'
    135 
     145     if (is_master) then
     146       print*,'interpolateCH4CH4: At wavenumber ',wn,' cm^-1'
     147       print*,'   temperature                 ',temp,' K'
     148       print*,'   pressure                    ',pres,' Pa'
     149     endif
    136150  endif
    137151
  • trunk/LMDZ.GENERIC/libf/phystd/interpolateH2CH4.F90

    r2655 r2662  
    1616  use callkeys_mod, only: H2orthopara_mixture, strictboundcia
    1717  use datafile_mod, only: datadir
     18  use mod_phys_lmdz_para, only : is_master
     19
    1820  implicit none
    1921
     
    5961  if(temp.gt.400)then
    6062    if (strictboundcia) then
    61       print*,'Your temperatures are too high for this H2-CH4 CIA dataset.'
    62       print*,'Please run mixed H2-CH4 atmospheres below T = 400 K.'     
     63      if (is_master) then
     64        print*,'Your temperatures are too high for this H2-CH4 CIA dataset.'
     65        print*,'Please run mixed H2-CH4 atmospheres below T = 400 K.'     
     66      endif
    6367      stop
    6468    else
    65       print*,'Your temperatures are too high for this H2-CH4 CIA dataset'
    66       print*,'you have chosen strictboundcia = ', strictboundcia
    67       print*,'*********************************************************'
    68       print*,' we allow model to continue but with temp = 400          '
    69       print*,'  ...       for H2-CH4 CIA dataset         ...           '
    70       print*,'  ... we assume we know what you are doing ...           '
    71       print*,'*********************************************************'
     69      if (is_master) then
     70        print*,'Your temperatures are too high for this H2-CH4 CIA dataset'
     71        print*,'you have chosen strictboundcia = ', strictboundcia
     72        print*,'*********************************************************'
     73        print*,' we allow model to continue but with temp = 400          '
     74        print*,'  ...       for H2-CH4 CIA dataset         ...           '
     75        print*,'  ... we assume we know what you are doing ...           '
     76        print*,'*********************************************************'
     77      endif
    7278      temp = 400
    7379    endif
    7480  elseif(temp.lt.40)then
    7581    if (strictboundcia) then
    76       print*,'Your temperatures are too low for this H2-CH4 CIA dataset.'
    77       print*,'Please run mixed H2-CH4 atmospheres above T = 40 K.'     
     82      if (is_master) then
     83        print*,'Your temperatures are too low for this H2-CH4 CIA dataset.'
     84        print*,'Please run mixed H2-CH4 atmospheres above T = 40 K.'     
     85      endif
    7886      stop
    7987    else
    80       print*,'Your temperatures are too low for this H2-CH4 CIA dataset'
    81       print*,'you have chosen strictboundcia = ', strictboundcia
    82       print*,'*********************************************************'
    83       print*,' we allow model to continue but with temp = 40           '
    84       print*,'  ...       for H2-CH4 CIA dataset         ...           '
    85       print*,'  ... we assume we know what you are doing ...           '
    86       print*,'*********************************************************'
     88      if (is_master) then
     89        print*,'Your temperatures are too low for this H2-CH4 CIA dataset'
     90        print*,'you have chosen strictboundcia = ', strictboundcia
     91        print*,'*********************************************************'
     92        print*,' we allow model to continue but with temp = 40           '
     93        print*,'  ...       for H2-CH4 CIA dataset         ...           '
     94        print*,'  ... we assume we know what you are doing ...           '
     95        print*,'*********************************************************'
     96      endif
    8797      temp = 40
    8898    endif
     
    93103
    94104  if(firstcall)then ! called by sugas_corrk only
    95      print*,'----------------------------------------------------'
    96      print*,'Initialising H2-CH4 continuum from HITRAN database...'
     105     if (is_master) print*,'----------------------------------------------------'
     106     if (is_master) print*,'Initialising H2-CH4 continuum from HITRAN database...'
    97107
    98108     !     1.1 Open the ASCII files
     
    106116     open(33,file=dt_file,form='formatted',status='old',iostat=ios)
    107117     if (ios.ne.0) then        ! file not found
    108         write(*,*) 'Error from interpolateH2CH4'
    109         write(*,*) 'Data file ',trim(dt_file),' not found.'
    110         write(*,*) 'Check that your path to datagcm:',trim(datadir)
    111         write(*,*) 'is correct. You can change it in callphys.def with:'
    112         write(*,*) 'datadir = /absolute/path/to/datagcm'
    113         write(*,*) 'Also check that the continuum data continuum_data/H2-CH4_norm_2011.cia is there.'
     118        if (is_master) then
     119          write(*,*) 'Error from interpolateH2CH4'
     120          write(*,*) 'Data file ',trim(dt_file),' not found.'
     121          write(*,*) 'Check that your path to datagcm:',trim(datadir)
     122          write(*,*) 'is correct. You can change it in callphys.def with:'
     123          write(*,*) 'datadir = /absolute/path/to/datagcm'
     124          write(*,*) 'Also check that the continuum data continuum_data/H2-CH4_norm_2011.cia is there.'
     125        endif
    114126        call abort
    115127     else
     
    119131           read(33,fmat1) bleh,blah,blah,nres,Ttemp
    120132           if(nS.ne.nres)then
    121               print*,'Resolution given in file: ',trim(dt_file)
    122               print*,'is ',nres,', which does not match nS.'
    123               print*,'Please adjust nS value in interpolateH2CH4.F90'
     133              if (is_master) then
     134                print*,'Resolution given in file: ',trim(dt_file)
     135                print*,'is ',nres,', which does not match nS.'
     136                print*,'Please adjust nS value in interpolateH2CH4.F90'
     137              endif
    124138              stop
    125139           endif
     
    136150!$OMP END MASTER
    137151!$OMP BARRIER
    138 
    139      print*,'interpolateH2CH4: At wavenumber ',wn,' cm^-1'
    140      print*,'   temperature                 ',temp,' K'
    141      print*,'   CH4 partial pressure        ',presCH4,' Pa'
    142      print*,'   and H2 partial pressure     ',presH2,' Pa'
    143 
     152     if (is_master) then
     153       print*,'interpolateH2CH4: At wavenumber ',wn,' cm^-1'
     154       print*,'   temperature                 ',temp,' K'
     155       print*,'   CH4 partial pressure        ',presCH4,' Pa'
     156       print*,'   and H2 partial pressure     ',presH2,' Pa'
     157     endif
    144158  endif
    145159
  • trunk/LMDZ.GENERIC/libf/phystd/interpolateH2H2.F90

    r2655 r2662  
    2020      use callkeys_mod, only: versH2H2cia, strictboundcia, H2orthopara_mixture
    2121      use datafile_mod, only: datadir
     22      use mod_phys_lmdz_para, only : is_master
    2223
    2324      implicit none
     
    6465      if(temp.gt.400)then
    6566        if (strictboundcia) then
    66           print*,'Your temperatures are too high for this H2-H2 CIA dataset. If you '
    67           print*,'really want to run simulations with hydrogen at T > 400 K, contact'
    68           print*,'Robin Wordsworth [rwordsworth@uchicago.edu].'
     67          if (is_master) then
     68            print*,'Your temperatures are too high for this H2-H2 CIA dataset. If you '
     69            print*,'really want to run simulations with hydrogen at T > 400 K, contact'
     70            print*,'Robin Wordsworth [rwordsworth@uchicago.edu].'
     71          endif
    6972          stop
    7073        else
    71           print*,'Your temperatures are too high for this H2-H2 CIA dataset'
    72           print*,'you have chosen strictboundcia = ', strictboundcia
    73           print*,'*********************************************************'
    74           print*,' we allow model to continue but with temp = 400          '
    75           print*,'  ...       for H2-H2 CIA dataset          ...           '
    76           print*,'  ... we assume we know what you are doing ...           '
    77           print*,'*********************************************************'
     74          if (is_master) then
     75            print*,'Your temperatures are too high for this H2-H2 CIA dataset'
     76            print*,'you have chosen strictboundcia = ', strictboundcia
     77            print*,'*********************************************************'
     78            print*,' we allow model to continue but with temp = 400          '
     79            print*,'  ...       for H2-H2 CIA dataset          ...           '
     80            print*,'  ... we assume we know what you are doing ...           '
     81            print*,'*********************************************************'
     82          endif
    7883          temp = 400
    7984        endif
    8085      elseif(temp.lt.40)then     
    8186        if (strictboundcia) then
    82           print*,'Your temperatures are too low for this H2-H2 CIA dataset. If you '
    83           print*,'really want to run simulations with hydrogen at T < 40 K, contact'
    84           print*,'Robin Wordsworth [rwordsworth@uchicago.edu].'
     87          if (is_master) then
     88            print*,'Your temperatures are too low for this H2-H2 CIA dataset. If you '
     89            print*,'really want to run simulations with hydrogen at T < 40 K, contact'
     90            print*,'Robin Wordsworth [rwordsworth@uchicago.edu].'
     91          endif
    8592          stop
    8693        else
    87           print*,'Your temperatures are too low for this H2-H2 CIA dataset'
    88           print*,'you have chosen strictboundcia = ', strictboundcia
    89           print*,'*********************************************************'
    90           print*,' we allow model to continue but with temp = 40           '
    91           print*,'  ...       for H2-H2 CIA dataset          ...           '
    92           print*,'  ... we assume we know what you are doing ...           '
    93           print*,'*********************************************************'
     94          if (is_master) then
     95            print*,'Your temperatures are too low for this H2-H2 CIA dataset'
     96            print*,'you have chosen strictboundcia = ', strictboundcia
     97            print*,'*********************************************************'
     98            print*,' we allow model to continue but with temp = 40           '
     99            print*,'  ...       for H2-H2 CIA dataset          ...           '
     100            print*,'  ... we assume we know what you are doing ...           '
     101            print*,'*********************************************************'
     102          endif
    94103          temp = 40
    95104        endif           
     
    99108
    100109      if(firstcall)then ! called by sugas_corrk only
    101          print*,'----------------------------------------------------'
    102          print*,'Initialising H2-H2 continuum from HITRAN database...'
     110         if (is_master) print*,'----------------------------------------------------'
     111         if (is_master) print*,'Initialising H2-H2 continuum from HITRAN database...'
    103112
    104113!     1.1 Open the ASCII files and set nS according to version
     
    126135         open(33,file=dt_file,form='formatted',status='old',iostat=ios)
    127136         if (ios.ne.0) then        ! file not found
    128            write(*,*) 'Error from interpolateH2H2'
    129            write(*,*) 'Data file ',trim(dt_file),' not found.'
    130            write(*,*) 'Check that your path to datagcm:',trim(datadir)
    131            write(*,*) 'is correct. You can change it in callphys.def with:'
    132            write(*,*) 'datadir = /absolute/path/to/datagcm'
    133            write(*,*) 'Also check that the continuum data is there.'
     137           if (is_master) then
     138             write(*,*) 'Error from interpolateH2H2'
     139             write(*,*) 'Data file ',trim(dt_file),' not found.'
     140             write(*,*) 'Check that your path to datagcm:',trim(datadir)
     141             write(*,*) 'is correct. You can change it in callphys.def with:'
     142             write(*,*) 'datadir = /absolute/path/to/datagcm'
     143             write(*,*) 'Also check that the continuum data is there.'
     144           endif
    134145           call abort
    135146         else
    136147         
    137148         if(versH2H2cia.eq.2011) then
    138            write(*,*) '... You are using H2-H2 CIA from 2011 but you should use more recent data available on HITRAN !'
    139            write(*,*) '... (Especially if you are running a giant planet atmosphere)'
    140            write(*,*) '... Just find out the H2-H2 CIA from 2018, put it in your datadir and have a look at interpolateH2H2.F90 ! .'
     149           if (is_master) then
     150             write(*,*) '... You are using H2-H2 CIA from 2011 but you should use more recent data available on HITRAN !'
     151             write(*,*) '... (Especially if you are running a giant planet atmosphere)'
     152             write(*,*) '... Just find out the H2-H2 CIA from 2018, put it in your datadir and have a look at interpolateH2H2.F90 ! .'
     153           endif
    141154         endif
    142155
     
    151164
    152165               if(nS.ne.nres)then
    153                   print*,'Resolution given in file: ',trim(dt_file)
    154                   print*,'is ',nres,', which does not match nS.'
    155                   print*,'Please adjust nS value in interpolateH2H2.F90'
     166                  if (is_master) then
     167                    print*,'Resolution given in file: ',trim(dt_file)
     168                    print*,'is ',nres,', which does not match nS.'
     169                    print*,'Please adjust nS value in interpolateH2H2.F90'
     170                  endif
    156171                  stop
    157172               endif
     
    169184!$OMP BARRIER
    170185
    171          print*,'interpolateH2H2: At wavenumber ',wn,' cm^-1'
    172          print*,'   temperature ',temp,' K'
    173          print*,'   pressure ',pres,' Pa'
    174 
     186         if (is_master) then
     187           print*,'interpolateH2H2: At wavenumber ',wn,' cm^-1'
     188           print*,'   temperature ',temp,' K'
     189           print*,'   pressure ',pres,' Pa'
     190         endif
    175191      endif
    176192     
  • trunk/LMDZ.GENERIC/libf/phystd/interpolateH2He.F90

    r2655 r2662  
    1616      use callkeys_mod, only: H2orthopara_mixture, strictboundcia
    1717      use datafile_mod, only: datadir
     18      use mod_phys_lmdz_para, only : is_master
    1819
    1920      implicit none
     
    6162      if(temp.gt.400)then
    6263        if (strictboundcia) then
    63           print*,'Your temperatures are too high for this H2-He CIA dataset.'
    64           print*,'Please run mixed H2-He atmospheres below T = 400 K.'     
     64          if (is_master) then
     65            print*,'Your temperatures are too high for this H2-He CIA dataset.'
     66            print*,'Please run mixed H2-He atmospheres below T = 400 K.'     
     67          endif
    6568          stop
    6669        else
    67           print*,'Your temperatures are too high for this H2-He CIA dataset'
    68           print*,'you have chosen strictboundcia = ', strictboundcia
    69           print*,'*********************************************************'
    70           print*,' we allow model to continue but with temp = 400          '
    71           print*,'  ...       for H2-He CIA dataset          ...           '
    72           print*,'  ... we assume we know what you are doing ...           '
    73           print*,'*********************************************************'
     70          if (is_master) then
     71            print*,'Your temperatures are too high for this H2-He CIA dataset'
     72            print*,'you have chosen strictboundcia = ', strictboundcia
     73            print*,'*********************************************************'
     74            print*,' we allow model to continue but with temp = 400          '
     75            print*,'  ...       for H2-He CIA dataset          ...           '
     76            print*,'  ... we assume we know what you are doing ...           '
     77            print*,'*********************************************************'
     78          endif
    7479          temp = 400
    7580        endif
    7681      elseif(temp.lt.40)then
    7782        if (strictboundcia) then
    78           print*,'Your temperatures are too low for this H2-He CIA dataset.'
    79           print*,'Please run mixed H2-He atmospheres above T = 40 K.'     
     83          if (is_master) then
     84            print*,'Your temperatures are too low for this H2-He CIA dataset.'
     85            print*,'Please run mixed H2-He atmospheres above T = 40 K.'     
     86          endif
    8087          stop
    8188        else
    82           print*,'Your temperatures are too low for this H2-He CIA dataset'
    83           print*,'you have chosen strictboundcia = ', strictboundcia
    84           print*,'*********************************************************'
    85           print*,' we allow model to continue but with temp = 40           '
    86           print*,'  ...       for H2-He CIA dataset          ...           '
    87           print*,'  ... we assume we know what you are doing ...           '
    88           print*,'*********************************************************'
     89          if (is_master) then
     90            print*,'Your temperatures are too low for this H2-He CIA dataset'
     91            print*,'you have chosen strictboundcia = ', strictboundcia
     92            print*,'*********************************************************'
     93            print*,' we allow model to continue but with temp = 40           '
     94            print*,'  ...       for H2-He CIA dataset          ...           '
     95            print*,'  ... we assume we know what you are doing ...           '
     96            print*,'*********************************************************'
     97          endif
    8998          temp = 40
    9099        endif
     
    95104
    96105      if(firstcall)then ! called by sugas_corrk only
    97          print*,'----------------------------------------------------'
    98          print*,'Initialising H2-He continuum from HITRAN database...'
     106         if (is_master) print*,'----------------------------------------------------'
     107         if (is_master) print*,'Initialising H2-He continuum from HITRAN database...'
    99108
    100109!     1.1 Open the ASCII files
     
    108117         open(33,file=dt_file,form='formatted',status='old',iostat=ios)
    109118         if (ios.ne.0) then        ! file not found
    110            write(*,*) 'Error from interpolateH2He'
    111            write(*,*) 'Data file ',trim(dt_file),' not found.'
    112            write(*,*) 'Check that your path to datagcm:',trim(datadir)
    113            write(*,*) 'is correct. You can change it in callphys.def with:'
    114            write(*,*) 'datadir = /absolute/path/to/datagcm'
    115            write(*,*) 'Also check that the continuum data is there.'
     119           if (is_master) then
     120             write(*,*) 'Error from interpolateH2He'
     121             write(*,*) 'Data file ',trim(dt_file),' not found.'
     122             write(*,*) 'Check that your path to datagcm:',trim(datadir)
     123             write(*,*) 'is correct. You can change it in callphys.def with:'
     124             write(*,*) 'datadir = /absolute/path/to/datagcm'
     125             write(*,*) 'Also check that the continuum data is there.'
     126           endif
    116127           call abort
    117128         else
     
    121132               read(33,fmat1) bleh,blah,blah,nres,Ttemp
    122133               if(nS.ne.nres)then
    123                   print*,'Resolution given in file: ',trim(dt_file)
    124                   print*,'is ',nres,', which does not match nS.'
    125                   print*,'Please adjust nS value in interpolateH2He.F90'
     134                  if (is_master) then
     135                    print*,'Resolution given in file: ',trim(dt_file)
     136                    print*,'is ',nres,', which does not match nS.'
     137                    print*,'Please adjust nS value in interpolateH2He.F90'
     138                  endif
    126139                  stop
    127140               endif
     
    138151!$OMP END MASTER
    139152!$OMP BARRIER
    140 
    141          print*,'interpolateH2He: At wavenumber ',wn,' cm^-1'
    142          print*,'   temperature                 ',temp,' K'
    143          print*,'   H2 partial pressure         ',presH2,' Pa'
    144          print*,'   and He partial pressure     ',presHe,' Pa'
    145 
     153         if (is_master) then
     154           print*,'interpolateH2He: At wavenumber ',wn,' cm^-1'
     155           print*,'   temperature                 ',temp,' K'
     156           print*,'   H2 partial pressure         ',presH2,' Pa'
     157           print*,'   and He partial pressure     ',presHe,' Pa'
     158         endif
    146159      endif
    147160
  • trunk/LMDZ.GENERIC/libf/phystd/interpolateH2O_self_foreign.F90

    r2520 r2662  
    1616
    1717      use datafile_mod, only: datadir
     18      use mod_phys_lmdz_para, only : is_master
     19
    1820      implicit none
    1921
     
    6466
    6567      if(firstcall)then ! called by sugas_corrk only
    66          print*,'----------------------------------------------------'
    67          print*,'Initialising H2O continuum from MT_CKD data...'
     68         if (is_master) print*,'----------------------------------------------------'
     69         if (is_master) print*,'Initialising H2O continuum from MT_CKD data...'
    6870
    6971!     1.1 Open the ASCII files
     
    7577         open(34,file=dt_file,form='formatted',status='old',iostat=ios)
    7678         if (ios.ne.0) then        ! file not found
    77            write(*,*) 'Error from interpolateH2O_cont SELF'
    78            write(*,*) 'Data file ',trim(dt_file),' not found.'
    79            write(*,*) 'Check that your path to datagcm:',trim(datadir)
    80            write(*,*) ' is correct. You can change it in callphys.def with:'
    81            write(*,*) ' datadir = /absolute/path/to/datagcm'
    82            write(*,*) ' Check that there is a H2O-H2O_continuum_MT_CKD3.3.cia'
    83            write(*,*)'Continuum file available here:'
    84            write(*,*)' https://www.lmd.jussieu.fr/~lmdz/planets/LMDZ.GENERIC/datagcm/continuum_data/'
     79           if (is_master) then
     80             write(*,*) 'Error from interpolateH2O_cont SELF'
     81             write(*,*) 'Data file ',trim(dt_file),' not found.'
     82             write(*,*) 'Check that your path to datagcm:',trim(datadir)
     83             write(*,*) ' is correct. You can change it in callphys.def with:'
     84             write(*,*) ' datadir = /absolute/path/to/datagcm'
     85             write(*,*) ' Check that there is a H2O-H2O_continuum_MT_CKD3.3.cia'
     86             write(*,*)'Continuum file available here:'
     87             write(*,*)' https://www.lmd.jussieu.fr/~lmdz/planets/LMDZ.GENERIC/datagcm/continuum_data/'
     88           endif
    8589           call abort
    8690         else
     
    8892             read(34,fmat1) dummy_var1,nres,Ttemp
    8993             if(nS.ne.nres)then
    90                print*,'Resolution given in file: ',trim(dt_file)
    91                print*,'is ',nres,', which does not match nS.'
    92                print*,'Adjust nS value in interpolateH2O_MTCKD...F90'
     94               if (is_master) then
     95                 print*,'Resolution given in file: ',trim(dt_file)
     96                 print*,'is ',nres,', which does not match nS.'
     97                 print*,'Adjust nS value in interpolateH2O_MTCKD...F90'
     98               endif
    9399               stop
    94100             endif
     
    107113         open(35,file=dt_file,form='formatted',status='old',iostat=ios)
    108114         if (ios.ne.0) then        ! file not found
    109            write(*,*) 'Error from interpolateH2O_cont FOREIGN'
    110            write(*,*) 'Data file ',trim(dt_file),' not found.'
    111            write(*,*)'Check that your path to datagcm:',trim(datadir)
    112            write(*,*)' is correct. You can change it in callphys.def with:'
    113            write(*,*)' datadir = /absolute/path/to/datagcm'
    114            write(*,*)' Check that there is a H2O-AIR_continuum_MT_CKD3.3.cia'
    115            write(*,*)'Continuum file available here:'
    116            write(*,*)' https://www.lmd.jussieu.fr/~lmdz/planets/LMDZ.GENERIC/datagcm/continuum_data/'
     115           if (is_master) then
     116             write(*,*) 'Error from interpolateH2O_cont FOREIGN'
     117             write(*,*) 'Data file ',trim(dt_file),' not found.'
     118             write(*,*)'Check that your path to datagcm:',trim(datadir)
     119             write(*,*)' is correct. You can change it in callphys.def with:'
     120             write(*,*)' datadir = /absolute/path/to/datagcm'
     121             write(*,*)' Check that there is a H2O-AIR_continuum_MT_CKD3.3.cia'
     122             write(*,*)'Continuum file available here:'
     123             write(*,*)' https://www.lmd.jussieu.fr/~lmdz/planets/LMDZ.GENERIC/datagcm/continuum_data/'
     124           endif
    117125           call abort
    118126         else
     
    120128             read(35,fmat2) dummy_var2,nres,Ttemp
    121129             if(nS.ne.nres)then
    122                print*,'Resolution given in file: ',trim(dt_file)
    123                print*,'is ',nres,', which does not match nS.'
    124                print*,'Adjust nS value in interpolateH2O_MTCKD...F90'
     130               if (is_master) then
     131                 print*,'Resolution given in file: ',trim(dt_file)
     132                 print*,'is ',nres,', which does not match nS.'
     133                 print*,'Adjust nS value in interpolateH2O_MTCKD...F90'
     134               endif
    125135               stop
    126136             endif
     
    134144         endif
    135145         close(35)
    136 
    137          print*,'interpolateH2O_MTCKDcont: At wavenumber ',wn,' cm^-1'
    138          print*,'   temperature ',temp,' K'
    139          print*,'   H2O pressure ',presS,' Pa'
    140          print*,'   air pressure ',presF,' Pa'
     146         if (is_master) then
     147           print*,'interpolateH2O_MTCKDcont: At wavenumber ',wn,' cm^-1'
     148           print*,'   temperature ',temp,' K'
     149           print*,'   H2O pressure ',presS,' Pa'
     150           print*,'   air pressure ',presF,' Pa'
     151         endif
    141152!$OMP END MASTER
    142153!$OMP BARRIER
  • trunk/LMDZ.GENERIC/libf/phystd/interpolateHeCH4.F90

    r2655 r2662  
    1616  use callkeys_mod, only: strictboundcia
    1717  use datafile_mod, only: datadir
     18  use mod_phys_lmdz_para, only : is_master
     19
    1820  implicit none
    1921
     
    5961  if(temp.gt.350)then
    6062    if (strictboundcia) then
    61       print*,'Your temperatures are too high for this He-CH4 CIA dataset.'
    62       print*,'Please run mixed He-CH4 atmospheres below T = 350 K.'     
     63      if (is_master) then
     64        print*,'Your temperatures are too high for this He-CH4 CIA dataset.'
     65        print*,'Please run mixed He-CH4 atmospheres below T = 350 K.'     
     66      endif
    6367      stop
    6468    else
    65       print*,'Your temperatures are too high for this He-CH4 CIA dataset'
    66       print*,'you have chosen strictboundcia = ', strictboundcia
    67       print*,'*********************************************************'
    68       print*,' we allow model to continue but with temp = 350          '
    69       print*,'  ...       for He-CH4 CIA dataset         ...           '
    70       print*,'  ... we assume we know what you are doing ...           '
    71       print*,'*********************************************************'
     69      if (is_master) then
     70        print*,'Your temperatures are too high for this He-CH4 CIA dataset'
     71        print*,'you have chosen strictboundcia = ', strictboundcia
     72        print*,'*********************************************************'
     73        print*,' we allow model to continue but with temp = 350          '
     74        print*,'  ...       for He-CH4 CIA dataset         ...           '
     75        print*,'  ... we assume we know what you are doing ...           '
     76        print*,'*********************************************************'
     77      endif
    7278      temp = 350
    7379    endif
    7480  elseif(temp.lt.40)then
    7581    if (strictboundcia) then
    76       print*,'Your temperatures are too low for this He-CH4 CIA dataset.'
    77       print*,'Please run mixed He-CH4 atmospheres above T = 40 K.'     
     82      if (is_master) then
     83        print*,'Your temperatures are too low for this He-CH4 CIA dataset.'
     84        print*,'Please run mixed He-CH4 atmospheres above T = 40 K.'     
     85      endif
    7886      stop
    7987    else
    80       print*,'Your temperatures are too low for this He-CH4 CIA dataset'
    81       print*,'you have chosen strictboundcia = ', strictboundcia
    82       print*,'*********************************************************'
    83       print*,' we allow model to continue but with temp = 40           '
    84       print*,'  ...       for He-CH4 CIA dataset         ...           '
    85       print*,'  ... we assume we know what you are doing ...           '
    86       print*,'*********************************************************'
     88      if (is_master) then
     89        print*,'Your temperatures are too low for this He-CH4 CIA dataset'
     90        print*,'you have chosen strictboundcia = ', strictboundcia
     91        print*,'*********************************************************'
     92        print*,' we allow model to continue but with temp = 40           '
     93        print*,'  ...       for He-CH4 CIA dataset         ...           '
     94        print*,'  ... we assume we know what you are doing ...           '
     95        print*,'*********************************************************'
     96      endif
    8797      temp = 40
    8898    endif
     
    93103
    94104  if(firstcall)then ! called by sugas_corrk only
    95      print*,'----------------------------------------------------'
    96      print*,'Initialising He-CH4 continuum from HITRAN database...'
     105     if (is_master) print*,'----------------------------------------------------'
     106     if (is_master) print*,'Initialising He-CH4 continuum from HITRAN database...'
    97107
    98108     !     1.1 Open the ASCII files
     
    102112     open(33,file=dt_file,form='formatted',status='old',iostat=ios)
    103113     if (ios.ne.0) then        ! file not found
    104         write(*,*) 'Error from interpolateHeCH4'
    105         write(*,*) 'Data file ',trim(dt_file),' not found.'
    106         write(*,*) 'Check that your path to datagcm:',trim(datadir)
    107         write(*,*) 'is correct. You can change it in callphys.def with:'
    108         write(*,*) 'datadir = /absolute/path/to/datagcm'
    109         write(*,*) 'Also check that the continuum data continuum_data/He-CH4_2018.cia is there.'
     114        if (is_master) then
     115          write(*,*) 'Error from interpolateHeCH4'
     116          write(*,*) 'Data file ',trim(dt_file),' not found.'
     117          write(*,*) 'Check that your path to datagcm:',trim(datadir)
     118          write(*,*) 'is correct. You can change it in callphys.def with:'
     119          write(*,*) 'datadir = /absolute/path/to/datagcm'
     120          write(*,*) 'Also check that the continuum data continuum_data/He-CH4_2018.cia is there.'
     121        endif
    110122        call abort
    111123     else
     
    115127           read(33,fmat1) bleh,blah,blah,nres,Ttemp
    116128           if(nS.ne.nres)then
    117               print*,'Resolution given in file: ',trim(dt_file)
    118               print*,'is ',nres,', which does not match nS.'
    119               print*,'Please adjust nS value in interpolateHeCH4.F90'
     129              if (is_master) then
     130                print*,'Resolution given in file: ',trim(dt_file)
     131                print*,'is ',nres,', which does not match nS.'
     132                print*,'Please adjust nS value in interpolateHeCH4.F90'
     133              endif
    120134              stop
    121135           endif
     
    132146!$OMP END MASTER
    133147!$OMP BARRIER
    134 
    135      print*,'interpolateHeCH4: At wavenumber ',wn,' cm^-1'
    136      print*,'   temperature                 ',temp,' K'
    137      print*,'   CH4 partial pressure        ',presCH4,' Pa'
    138      print*,'   and He partial pressure     ',presHe,' Pa'
    139 
     148     if (is_master) then
     149       print*,'interpolateHeCH4: At wavenumber ',wn,' cm^-1'
     150       print*,'   temperature                 ',temp,' K'
     151       print*,'   CH4 partial pressure        ',presCH4,' Pa'
     152       print*,'   and He partial pressure     ',presHe,' Pa'
     153     endif
    140154  endif
    141155
  • trunk/LMDZ.GENERIC/libf/phystd/interpolateN2H2.F90

    r1315 r2662  
    1515
    1616  use datafile_mod, only: datadir
     17  use mod_phys_lmdz_para, only : is_master
     18
    1719  implicit none
    1820
     
    5759
    5860  if(temp.gt.400)then
    59      print*,'Your temperatures are too high for this N2-H2 CIA dataset.'
    60      print*,'Please run mixed N2-H2 atmospheres below T = 400 K.'     
     61     if (is_master) then
     62       print*,'Your temperatures are too high for this N2-H2 CIA dataset.'
     63       print*,'Please run mixed N2-H2 atmospheres below T = 400 K.'     
     64     endif
    6165     stop
    6266  endif
     
    6670
    6771  if(firstcall)then ! called by sugas_corrk only
    68      print*,'----------------------------------------------------'
    69      print*,'Initialising N2-H2 continuum from HITRAN database...'
     72     if (is_master) print*,'----------------------------------------------------'
     73     if (is_master) print*,'Initialising N2-H2 continuum from HITRAN database...'
    7074
    7175     !     1.1 Open the ASCII files
     
    7579     open(33,file=dt_file,form='formatted',status='old',iostat=ios)
    7680     if (ios.ne.0) then        ! file not found
    77         write(*,*) 'Error from interpolateN2H2'
    78         write(*,*) 'Data file ',trim(dt_file),' not found.'
    79         write(*,*) 'Check that your path to datagcm:',trim(datadir)
    80         write(*,*) 'is correct. You can change it in callphys.def with:'
    81         write(*,*) 'datadir = /absolute/path/to/datagcm'
    82         write(*,*) 'Also check that the continuum data continuum_data/N2-H2_2011.cia is there.'
     81        if (is_master) then
     82          write(*,*) 'Error from interpolateN2H2'
     83          write(*,*) 'Data file ',trim(dt_file),' not found.'
     84          write(*,*) 'Check that your path to datagcm:',trim(datadir)
     85          write(*,*) 'is correct. You can change it in callphys.def with:'
     86          write(*,*) 'datadir = /absolute/path/to/datagcm'
     87          write(*,*) 'Also check that the continuum data continuum_data/N2-H2_2011.cia is there.'
     88        endif
    8389        call abort
    8490     else
     
    8894           read(33,fmat1) bleh,blah,blah,nres,Ttemp
    8995           if(nS.ne.nres)then
    90               print*,'Resolution given in file: ',trim(dt_file)
    91               print*,'is ',nres,', which does not match nS.'
    92               print*,'Please adjust nS value in interpolateN2H2.F90'
     96              if (is_master) then
     97                print*,'Resolution given in file: ',trim(dt_file)
     98                print*,'is ',nres,', which does not match nS.'
     99                print*,'Please adjust nS value in interpolateN2H2.F90'
     100              endif
    93101              stop
    94102           endif
     
    105113!$OMP END MASTER
    106114!$OMP BARRIER
    107 
    108      print*,'interpolateN2H2: At wavenumber ',wn,' cm^-1'
    109      print*,'   temperature                 ',temp,' K'
    110      print*,'   N2 partial pressure         ',presN2,' Pa'
    111      print*,'   and H2 partial pressure     ',presH2,' Pa'
    112 
     115     if (is_master) then
     116       print*,'interpolateN2H2: At wavenumber ',wn,' cm^-1'
     117       print*,'   temperature                 ',temp,' K'
     118       print*,'   N2 partial pressure         ',presN2,' Pa'
     119       print*,'   and H2 partial pressure     ',presH2,' Pa'
     120     endif
    113121  endif
    114122
  • trunk/LMDZ.GENERIC/libf/phystd/interpolateN2N2.F90

    r1315 r2662  
    1515
    1616  use datafile_mod, only: datadir
     17  use mod_phys_lmdz_para, only : is_master
     18
    1719  implicit none
    1820
     
    5658
    5759  if(temp.gt.400)then
    58      print*,'Your temperatures are too high for this N2-N2 CIA dataset.'
    59      print*,'Currently, HITRAN provides data for this pair in the range 40-400 K.'
     60     if (is_master) then
     61       print*,'Your temperatures are too high for this N2-N2 CIA dataset.'
     62       print*,'Currently, HITRAN provides data for this pair in the range 40-400 K.'
     63     endif
    6064     stop
    6165  endif
     
    6468
    6569  if(firstcall)then ! called by sugas_corrk only
    66      print*,'----------------------------------------------------'
    67      print*,'Initialising N2-N2 continuum from HITRAN database...'
     70     if (is_master) print*,'----------------------------------------------------'
     71     if (is_master) print*,'Initialising N2-N2 continuum from HITRAN database...'
    6872
    6973     !     1.1 Open the ASCII files
     
    7377     open(33,file=dt_file,form='formatted',status='old',iostat=ios)
    7478     if (ios.ne.0) then        ! file not found
    75         write(*,*) 'Error from interpolateN2N2'
    76         write(*,*) 'Data file ',trim(dt_file),' not found.'
    77         write(*,*) 'Check that your path to datagcm:',trim(datadir)
    78         write(*,*) 'is correct. You can change it in callphys.def with:'
    79         write(*,*) 'datadir = /absolute/path/to/datagcm'
    80         write(*,*) 'Also check that the continuum data continuum_data/N2-N2_norm_2011.cia is there.'
     79        if (is_master) then
     80          write(*,*) 'Error from interpolateN2N2'
     81          write(*,*) 'Data file ',trim(dt_file),' not found.'
     82          write(*,*) 'Check that your path to datagcm:',trim(datadir)
     83          write(*,*) 'is correct. You can change it in callphys.def with:'
     84          write(*,*) 'datadir = /absolute/path/to/datagcm'
     85          write(*,*) 'Also check that the continuum data continuum_data/N2-N2_norm_2011.cia is there.'
     86        endif
    8187        call abort
    8288     else
     
    8692           read(33,fmat1) bleh,blah,blah,nres,Ttemp
    8793           if(nS.ne.nres)then
    88               print*,'Resolution given in file: ',trim(dt_file)
    89               print*,'is ',nres,', which does not match nS.'
    90               print*,'Please adjust nS value in interpolateN2N2.F90'
     94              if (is_master) then
     95                print*,'Resolution given in file: ',trim(dt_file)
     96                print*,'is ',nres,', which does not match nS.'
     97                print*,'Please adjust nS value in interpolateN2N2.F90'
     98              endif
    9199              stop
    92100           endif
     
    103111!$OMP END MASTER
    104112!$OMP BARRIER
    105 
    106      print*,'interpolateN2N2: At wavenumber ',wn,' cm^-1'
    107      print*,'   temperature ',temp,' K'
    108      print*,'   pressure ',pres,' Pa'
    109 
     113     if (is_master) then
     114       print*,'interpolateN2N2: At wavenumber ',wn,' cm^-1'
     115       print*,'   temperature ',temp,' K'
     116       print*,'   pressure ',pres,' Pa'
     117     endif
    110118  endif
    111119     call bilinearbig(nS,nT,wn_arr,temp_arr,abs_arr,wn,temp,abcoef,ind)
Note: See TracChangeset for help on using the changeset viewer.