Ignore:
Timestamp:
Jul 24, 2024, 4:23:34 PM (2 months ago)
Author:
abarral
Message:

rename modules properly lmdz_*
move some unused files to obsolete/
(lint) uppercase fortran keywords

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Amaury_dev/libf/misc/lmdz_interpolation.f90

    r5116 r5117  
    3636    do while (ju - jl > 1)
    3737      jm = (ju + jl) / 2 ! Compute a midpoint,
    38       if (ascnd .eqv. (x >= xx(jm))) THEN
     38      IF (ascnd .eqv. (x >= xx(jm))) THEN
    3939        jl = jm ! and replace either the lower limit
    4040      else
     
    4444    ! {ju == jl + 1}
    4545
    46     ! {(ascnd .and. xx(jl) <= x < xx(jl+1))
     46    ! {(ascnd .AND. xx(jl) <= x < xx(jl+1))
    4747    !  .neqv.
    48     !  (.not. ascnd .and. xx(jl+1) <= x < xx(jl))}
     48    !  (.NOT. ascnd .AND. xx(jl+1) <= x < xx(jl))}
    4949
    5050    ! Then set the output, being careful with the endpoints:
    51     if (x == xx(1)) THEN
     51    IF (x == xx(1)) THEN
    5252      locate = 1
    53     else if (x == xx(n)) THEN
     53    ELSE IF (x == xx(n)) THEN
    5454      locate = n - 1
    5555    else
     
    8181    ascnd = (xx(n) >= xx(1))
    8282    ! (True if ascending order of table, false otherwise.)
    83     if (jlo < 0 .or. jlo > n) THEN
     83    IF (jlo < 0 .OR. jlo > n) THEN
    8484      ! Input guess not useful. Go immediately to bisection.
    8585      jlo = 0
     
    8787    else
    8888      inc = 1 ! Set the hunting increment.
    89       if (jlo == 0) THEN
     89      IF (jlo == 0) THEN
    9090        hunt_up = .TRUE.
    9191      else
    9292        hunt_up = x >= xx(jlo) .eqv. ascnd
    9393      end if
    94       if (hunt_up) then ! Hunt up:
    95         do
     94      IF (hunt_up) then ! Hunt up:
     95        DO
    9696          jhi = jlo + inc
    97           if (jhi > n) then ! Done hunting, since off end of table.
     97          IF (jhi > n) then ! Done hunting, since off end of table.
    9898            jhi = n + 1
    9999            exit
    100100          else
    101             if (x < xx(jhi) .eqv. ascnd) exit
     101            IF (x < xx(jhi) .eqv. ascnd) exit
    102102            jlo = jhi ! Not done hunting,
    103103            inc = inc + inc ! so double the increment
     
    106106      else ! Hunt down:
    107107        jhi = jlo
    108         do
     108        DO
    109109          jlo = jhi - inc
    110           if (jlo < 1) then ! Done hunting, since off end of table.
     110          IF (jlo < 1) then ! Done hunting, since off end of table.
    111111            jlo = 0
    112112            exit
    113113          else
    114             if (x >= xx(jlo) .eqv. ascnd) exit
     114            IF (x >= xx(jlo) .eqv. ascnd) exit
    115115            jhi = jlo ! Not done hunting,
    116116            inc = inc + inc ! so double the increment
     
    121121
    122122    do ! Hunt is done, so begin the final bisection phase:
    123       if (jhi - jlo <= 1) THEN
    124         if (x == xx(n)) jlo = n - 1
    125         if (x == xx(1)) jlo = 1
     123      IF (jhi - jlo <= 1) THEN
     124        IF (x == xx(n)) jlo = n - 1
     125        IF (x == xx(1)) jlo = 1
    126126        exit
    127127      else
    128128        jm = (jhi + jlo) / 2
    129         if (x >= xx(jm) .eqv. ascnd) THEN
     129        IF (x >= xx(jm) .eqv. ascnd) THEN
    130130          jlo = jm
    131131        else
Note: See TracChangeset for help on using the changeset viewer.