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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.