Ignore:
Timestamp:
Jul 19, 2024, 4:15:44 PM (2 months ago)
Author:
abarral
Message:

Commit linked to correcting relevant warnings during gfortran compilation

[minor]
Correct remnants of fixed-form "+" in massbarxy.F90
Correct COMMON alignment in clesphys.h, flux_arp.h, cv*param.h, YOECUMF.h, alpale.h
Correct obsolete logical operators
Restrict use of iso_fortran_env in nf95_abort.f90
Remove redundant save in module declarations
Remove <continue> without labels
Fix nonstandard kind selectors

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Amaury_dev/libf/phylmd/cosp/optics_lib.F90

    r2428 r5081  
    3838 
    3939! ----- INPUTS -----
    40   real*8, intent(in) :: freq,tk
     40  real(kind=8), intent(in) :: freq,tk
    4141 
    4242! ----- OUTPUTS -----
    43   real*8, intent(out) :: n_r, n_i
     43  real(kind=8), intent(out) :: n_r, n_i
    4444
    4545! ----- INTERNAL -----   
    46   real*8 ld,es,ei,a,ls,sg,tm1,cos1,sin1
    47   real*8 e_r,e_i
    48   real*8 pi
    49   real*8 tc
    50   complex*16 e_comp, sq
     46  real(kind=8) ld,es,ei,a,ls,sg,tm1,cos1,sin1
     47  real(kind=8) e_r,e_i
     48  real(kind=8) pi
     49  real(kind=8) tc
     50  complex(kind=8) e_comp, sq
    5151
    5252  tc = tk - 273.15
     
    102102
    103103! ----- INPUTS -----
    104   real*8, intent(in) :: freq, t
     104  real(kind=8), intent(in) :: freq, t
    105105 
    106106! ----- OUTPUTS ----- 
    107   real*8, intent(out) :: n_r,n_i
     107  real(kind=8), intent(out) :: n_r,n_i
    108108
    109109! Parameters:
    110   integer*2 :: i,lt1,lt2,nwl,nwlt
     110  integer(kind=2) :: i,lt1,lt2,nwl,nwlt
    111111  parameter(nwl=468,nwlt=62)
    112112
    113   real*8 :: alam,cutice,pi,t1,t2,wlmax,wlmin, &
     113  real(kind=8) :: alam,cutice,pi,t1,t2,wlmax,wlmin, &
    114114            x,x1,x2,y,y1,y2,ylo,yhi,tk
    115115
    116   real*8 :: &
     116  real(kind=8) :: &
    117117       tabim(nwl),tabimt(nwlt,4),tabre(nwl),tabret(nwlt,4),temref(4), &
    118118       wl(nwl),wlt(nwlt)
     
    540540    if(tk < temref(4)) tk=temref(4)
    541541    do 11 i=2,4
    542       if(tk.ge.temref(i)) go to 12
     542      if(tk>=temref(i)) go to 12
    543543    11 continue
    544544    12 lt1=i
    545545    lt2=i-1
    546546    do 13 i=2,nwlt
    547       if(alam.le.wlt(i)) go to 14
     547      if(alam<=wlt(i)) go to 14
    548548    13 continue
    549549    14 x1=log(wlt(i-1))
     
    586586      Subroutine MieInt(Dx, SCm, Inp, Dqv, Dqxt, Dqsc, Dbsc, Dg, Xs1, Xs2, DPh, Error)
    587587
    588       Integer * 2  Imaxx
     588      Integer (kind=2)  Imaxx
    589589      Parameter (Imaxx = 12000)
    590       Real * 4     RIMax          ! largest real part of refractive index
     590      Real (kind=4)     RIMax          ! largest real part of refractive index
    591591      Parameter (RIMax = 2.5)
    592       Real * 4     IRIMax         ! largest imaginary part of refractive index
     592      Real (kind=4)     IRIMax         ! largest imaginary part of refractive index
    593593      Parameter (IRIMax = -2)
    594       Integer * 2  Itermax
     594      Integer (kind=2)  Itermax
    595595      Parameter (Itermax = 12000 * 2.5)
    596596                                ! must be large enough to cope with the
    597597                                ! largest possible nmx = x * abs(scm) + 15
    598598                                ! or nmx =  Dx + 4.05*Dx**(1./3.) + 2.0
    599       Integer * 2  Imaxnp
     599      Integer (kind=2)  Imaxnp
    600600      Parameter (Imaxnp = 10000)  ! Change this as required
    601601!     INPUT
    602       Real * 8     Dx
    603       Complex * 16  SCm
    604       Integer * 4  Inp
    605       Real * 8     Dqv(Inp)
     602      Real (kind=8)     Dx
     603      Complex (kind=8)  SCm
     604      Integer (kind=4)  Inp
     605      Real (kind=8)     Dqv(Inp)
    606606!     OUTPUT
    607       Complex * 16  Xs1(InP)
    608       Complex * 16  Xs2(InP)
    609       Real * 8     Dqxt
    610       Real * 8     Dqsc
    611       Real * 8     Dg
    612       Real * 8     Dbsc
    613       Real * 8     DPh(InP)
    614       Integer * 4  Error
     607      Complex (kind=8)  Xs1(InP)
     608      Complex (kind=8)  Xs2(InP)
     609      Real (kind=8)     Dqxt
     610      Real (kind=8)     Dqsc
     611      Real (kind=8)     Dg
     612      Real (kind=8)     Dbsc
     613      Real (kind=8)     DPh(InP)
     614      Integer (kind=4)  Error
    615615!     LOCAL
    616       Integer * 2  I
    617       Integer * 2  NStop
    618       Integer * 2  NmX
    619       Integer * 4  N    ! N*N > 32767 ie N > 181
    620       Integer * 4  Inp2
    621       Real * 8     Chi,Chi0,Chi1
    622       Real * 8     APsi,APsi0,APsi1
    623       Real * 8     Pi0(Imaxnp)
    624       Real * 8     Pi1(Imaxnp)
    625       Real * 8     Taun(Imaxnp)
    626       Real * 8     Psi,Psi0,Psi1
    627       Complex * 8  Ir
    628       Complex * 16 Cm
    629       Complex * 16 A,ANM1,APB
    630       Complex * 16 B,BNM1,AMB
    631       Complex * 16 D(Itermax)
    632       Complex * 16 Sp(Imaxnp)
    633       Complex * 16 Sm(Imaxnp)
    634       Complex * 16 Xi,Xi0,Xi1
    635       Complex * 16 Y
     616      Integer (kind=2)  I
     617      Integer (kind=2)  NStop
     618      Integer (kind=2)  NmX
     619      Integer (kind=4)  N    ! N*N > 32767 ie N > 181
     620      Integer (kind=4)  Inp2
     621      Real (kind=8)     Chi,Chi0,Chi1
     622      Real (kind=8)     APsi,APsi0,APsi1
     623      Real (kind=8)     Pi0(Imaxnp)
     624      Real (kind=8)     Pi1(Imaxnp)
     625      Real (kind=8)     Taun(Imaxnp)
     626      Real (kind=8)     Psi,Psi0,Psi1
     627      Complex (kind=4)  Ir
     628      Complex (kind=8) Cm
     629      Complex (kind=8) A,ANM1,APB
     630      Complex (kind=8) B,BNM1,AMB
     631      Complex (kind=8) D(Itermax)
     632      Complex (kind=8) Sp(Imaxnp)
     633      Complex (kind=8) Sm(Imaxnp)
     634      Complex (kind=8) Xi,Xi0,Xi1
     635      Complex (kind=8) Y
    636636!     ACCELERATOR VARIABLES
    637       Integer * 2  Tnp1
    638       Integer * 2  Tnm1
    639       Real * 8     Dn
    640       Real * 8     Rnx
    641       Real * 8     S(Imaxnp)
    642       Real * 8     T(Imaxnp)
    643       Real * 8     Turbo
    644       Real * 8     A2
    645       Complex * 16 A1
     637      Integer (kind=2)  Tnp1
     638      Integer (kind=2)  Tnm1
     639      Real (kind=8)     Dn
     640      Real (kind=8)     Rnx
     641      Real (kind=8)     S(Imaxnp)
     642      Real (kind=8)     T(Imaxnp)
     643      Real (kind=8)     Turbo
     644      Real (kind=8)     A2
     645      Complex (kind=8) A1
    646646     
    647       If ((Dx.Gt.Imaxx) .Or. (InP.Gt.ImaxNP)) Then
     647      If ((Dx>Imaxx) .Or. (InP>ImaxNP)) Then
    648648        Error = 1
    649649        Return
     
    652652      Ir = 1 / Cm
    653653      Y =  Dx * Cm
    654       If (Dx.Lt.0.02) Then
     654      If (Dx<0.02) Then
    655655         NStop = 2
    656656      Else
    657          If (Dx.Le.8.0) Then
     657         If (Dx<=8.0) Then
    658658            NStop = Dx + 4.00*Dx**(1./3.) + 2.0
    659659         Else
    660             If (Dx.Lt. 4200.0) Then
     660            If (Dx< 4200.0) Then
    661661               NStop = Dx + 4.05*Dx**(1./3.) + 2.0
    662662            Else
     
    666666      End If
    667667      NmX = Max(Real(NStop),Real(Abs(Y))) + 15.
    668       If (Nmx .gt. Itermax) then
     668      If (Nmx > Itermax) then
    669669          Error = 1
    670670          Return
     
    709709         Dqxt = Tnp1 *      Dble(A + B)          + Dqxt
    710710         Dqsc = Tnp1 * (A*Conjg(A) + B*Conjg(B)) + Dqsc
    711          If (N.Gt.1) then
     711         If (N>1) then
    712712         Dg = Dg + (dN*dN - 1) * Dble(ANM1*Conjg(A) + BNM1 * Conjg(B)) / dN + TNM1 * Dble(ANM1*Conjg(BNM1)) / (dN*dN - dN)
    713713         End If
     
    717717         AMB = A2 * (A - B)
    718718         Do I = 1,Inp2
    719             If (I.GT.Inp) Then
     719            If (I>Inp) Then
    720720               S(I) = -Pi1(I)
    721721            Else
     
    736736         Xi1 = Dcmplx(APsi1,Chi1)
    737737      End Do
    738       If (Dg .GT.0) Dg = 2 * Dg / Dqsc
     738      If (Dg >0) Dg = 2 * Dg / Dqsc
    739739      Dqsc =  2 * Dqsc / Dx**2
    740740      Dqxt =  2 * Dqxt / Dx**2
Note: See TracChangeset for help on using the changeset viewer.