Ignore:
Timestamp:
Aug 2, 2024, 2:12:03 PM (3 months ago)
Author:
abarral
Message:

Add missing klon on strataer_emiss_mod.F90
Correct various missing explicit declarations
Replace tabs by spaces (tabs are not part of the fortran charset)
Continue cleaning modules
Removed unused arguments and variables

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Amaury_dev/libf/phylmd/ecrad/radiation/radiation_spectral_definition.F90

    r4853 r5158  
    201201    else
    202202      find_wavenumber = 1
    203       do while (wavenumber > this%wavenumber2(find_wavenumber) &
     203      DO while (wavenumber > this%wavenumber2(find_wavenumber) &
    204204           &    .and. find_wavenumber < this%nwav)
    205205        find_wavenumber = find_wavenumber + 1
     
    284284      end if
    285285
    286       do jband = 1,this%nband
     286      DO jband = 1,this%nband
    287287        weight = 0.0_jprb
    288         do jwav = 1,nwav
     288        DO jwav = 1,nwav
    289289          ! Work out wavenumber range for which this cloud wavenumber
    290290          ! will be applicable
     
    321321            ! Find interpolating points
    322322            iwav = 2
    323             do while (wavenumber(iwav) < this%wavenumber2_band(jband))
     323            DO while (wavenumber(iwav) < this%wavenumber2_band(jband))
    324324              iwav = iwav+1
    325325            end do
     
    358358      mapping = 0.0_jprb
    359359      ! Loop over wavenumbers representing cloud
    360       do jwav = 1,nwav
     360      DO jwav = 1,nwav
    361361        ! Clear the weights. The weight says for one wavenumber in the
    362362        ! cloud file, what is its fractional contribution to each of
     
    400400                 &  / (this%wavenumber2(isd1)-this%wavenumber1(isd1))
    401401            if (isd1-isd0 > 1) then
    402               do isd = isd0+1,isd1-1
     402              DO isd = isd0+1,isd1-1
    403403                ! Intermediate trapezia
    404404                weight(isd) = 0.5_jprb * (this%wavenumber1(isd)+this%wavenumber2(isd) &
     
    447447                 &  / (this%wavenumber2(isd1)-this%wavenumber1(isd1))
    448448            if (isd2-isd1 > 1) then
    449               do isd = isd1+1,isd2-1
     449              DO isd = isd1+1,isd2-1
    450450                ! Intermediate trapezia
    451451                weight(isd) = weight(isd) + 0.5_jprb * (2.0_jprb*wavenum2 &
     
    468468        weight = weight * planck_weight
    469469
    470         do jg = 1,this%ng
     470        DO jg = 1,this%ng
    471471          mapping(jg, jwav) = sum(weight * this%gpoint_fraction(:,jg))
    472472        end do
     
    478478
    479479      ! Normalize mapping matrix
    480       do jg = 1,this%ng
     480      DO jg = 1,this%ng
    481481        mapping(jg,:) = mapping(jg,:) * (1.0_jprb/sum(mapping(jg,:)))
    482482      end do
     
    589589    ! Check wavelength is monotonically increasing
    590590    if (ninterval > 2) then
    591       do jint = 2,ninterval-1
     591      DO jint = 2,ninterval-1
    592592        if (wavelength_bound(jint) <= wavelength_bound(jint-1)) then
    593593          write(nulerr, '(a)') '*** Error: wavelength bounds must be monotonically increasing'
     
    609609      end if
    610610
    611       do jband = 1,this%nband
    612         do jint = 1,ninterval
     611      DO jband = 1,this%nband
     612        DO jint = 1,ninterval
    613613          if (jint == 1) then
    614614            ! First input interval in wavelength space: lower
     
    692692     
    693693      ! All bounded intervals
    694       do jint = 2,ninterval-1
     694      DO jint = 2,ninterval-1
    695695        wavenumber1_bound = 0.01_jprb / wavelength_bound(jint)
    696696        wavenumber2_bound = 0.01_jprb / wavelength_bound(jint-1)
     
    710710      end if
    711711
    712       do jg = 1,this%ng
    713         do jin = 1,ninput
     712      DO jg = 1,this%ng
     713        DO jin = 1,ninput
    714714          mapping(jin,jg) = sum(this%gpoint_fraction(:,jg) * planck, &
    715715               &                 mask=(i_input==jin))
     
    723723
    724724      ! Loop through all intervals
    725       do jint = 1,ninterval
     725      DO jint = 1,ninterval
    726726        ! Loop through the wavenumbers for gpoint_fraction
    727         do jwav = 1,this%nwav
     727        DO jwav = 1,this%nwav
    728728          if (jint == 1) then
    729729            ! First input interval in wavelength space: lower
     
    758758      end do
    759759      if (use_fluxes_local) then
    760         do jg = 1,this%ng
     760        DO jg = 1,this%ng
    761761          mapping(:,jg) = mapping(:,jg) / sum(this%gpoint_fraction(:,jg) * planck)
    762762        end do
     
    769769    if (.not. use_fluxes_local) then
    770770      ! Normalize mapping matrix
    771       do jg = 1,size(mapping,dim=2)
     771      DO jg = 1,size(mapping,dim=2)
    772772        mapping(:,jg) = mapping(:,jg) * (1.0_jprb/sum(mapping(:,jg)))
    773773      end do
     
    828828    is_band_unassigned = .true.
    829829
    830     do jint = 1,ninterval
     830    DO jint = 1,ninterval
    831831      inext = minloc(wavelength1, dim=1, mask=is_band_unassigned)
    832832      if (jint > 1) then
     
    873873      write(nulout, '(a,i0,a,i0,a)') '  Mapping from ', nin, ' values to ', nout, ' bands (wavenumber ranges in cm-1)'
    874874      if (nout <= 40) then
    875         do jout = 1,nout
     875        DO jout = 1,nout
    876876          write(nulout,'(i6,a,i6,a)',advance='no') nint(this%wavenumber1_band(jout)), ' to', &
    877877               &                        nint(this%wavenumber2_band(jout)), ':'
    878           do jin = 1,nin
     878          DO jin = 1,nin
    879879            write(nulout,'(f5.2)',advance='no') mapping(jin,jout)
    880880          end do
     
    882882        end do
    883883      else
    884         do jout = 1,30
     884        DO jout = 1,30
    885885          write(nulout,'(i6,a,i6,a)',advance='no') nint(this%wavenumber1_band(jout)), ' to', &
    886886               &                        nint(this%wavenumber2_band(jout)), ':'
    887           do jin = 1,nin
     887          DO jin = 1,nin
    888888            write(nulout,'(f5.2)',advance='no') mapping(jin,jout)
    889889          end do
     
    893893        write(nulout,'(i6,a,i6,a)',advance='no') nint(this%wavenumber1_band(nout)), ' to', &
    894894             &                        nint(this%wavenumber2_band(nout)), ':'
    895         do jin = 1,nin
     895        DO jin = 1,nin
    896896          write(nulout,'(f5.2)',advance='no') mapping(jin,nout)
    897897        end do
     
    901901      write(nulout, '(a,i0,a,i0,a)') '  Mapping from ', nin, ' values to ', nout, ' g-points'
    902902      if (nout <= 40) then
    903         do jout = 1,nout
     903        DO jout = 1,nout
    904904          write(nulout,'(i3,a)',advance='no') jout, ':'
    905           do jin = 1,nin
     905          DO jin = 1,nin
    906906            write(nulout,'(f5.2)',advance='no') mapping(jin,jout)
    907907          end do
     
    909909        end do
    910910      else
    911         do jout = 1,30
     911        DO jout = 1,30
    912912          write(nulout,'(i3,a)',advance='no') jout, ':'
    913           do jin = 1,nin
     913          DO jin = 1,nin
    914914            write(nulout,'(f5.2)',advance='no') mapping(jin,jout)
    915915          end do
     
    918918        write(nulout,'(a)') '  ...'
    919919        write(nulout,'(i3,a)',advance='no') nout, ':'
    920         do jin = 1,nin
     920        DO jin = 1,nin
    921921          write(nulout,'(f5.2)',advance='no') mapping(jin,nout)
    922922        end do
Note: See TracChangeset for help on using the changeset viewer.