Ignore:
Timestamp:
Mar 5, 2014, 2:19:12 PM (11 years ago)
Author:
lguez
Message:

Converted to free source form files in libf/phylmd which were still in
fixed source form. The conversion was done using the polish mode of
the NAG Fortran Compiler.

In addition to converting to free source form, the processing of the
files also:

-- indented the code (including comments);

-- set Fortran keywords to uppercase, and set all other identifiers
to lower case;

-- added qualifiers to end statements (for example "end subroutine
conflx", instead of "end");

-- changed the terminating statements of all DO loops so that each
loop ends with an ENDDO statement (instead of a labeled continue).

-- replaced #include by include.

File:
1 moved

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/libf/phylmd/ecribin.F90

    r1988 r1992  
    1 !
     1
    22! $Header$
    3 !
    4       SUBROUTINE ecribins(unit,pz)
    5       USE dimphy
    6       IMPLICIT none
    7 c-----------------------------------------------------------------------
    8 #include "dimensions.h"
    9 cccc#include "dimphy.h"
    10 #include "paramet.h"
    11 #include "comgeom.h"
    12 #include "comvert.h"
    13 c
    14  arguments:
    15  ----------
    16       INTEGER unit
    17       REAL pz(klon)
    18 c
    19  local:
    20  ------
    21       INTEGER i,j, ig
    22       REAL zz(iim +1,jjm+1)
    23 c-----------------------------------------------------------------------
    24  passage a la grille dynamique:
    25  ------------------------------
    26          DO i=1,iim +1
    27             zz(i,1)=pz(1)
    28             zz(i,jjm+1)=pz(klon)
    29          ENDDO
    30  traitement des point normaux
    31          DO j=2,jjm
    32             ig=2+(j-2)*iim
    33             CALL SCOPY(iim,pz(ig),1,zz(1,j),1)
    34             zz(iim+1,j)=zz(1,j)
    35          ENDDO
    36 c-----------------------------------------------------------------------
     3
     4SUBROUTINE ecribins(unit, pz)
     5  USE dimphy
     6  IMPLICIT NONE
     7  ! -----------------------------------------------------------------------
     8  include "dimensions.h"
     9  ! ccc#include "dimphy.h"
     10  include "paramet.h"
     11  include "comgeom.h"
     12  include "comvert.h"
     13
     14  ! arguments:
     15  ! ----------
     16  INTEGER unit
     17  REAL pz(klon)
     18
     19  ! local:
     20  ! ------
     21  INTEGER i, j, ig
     22  REAL zz(iim+1, jjm+1)
     23  ! -----------------------------------------------------------------------
     24  ! passage a la grille dynamique:
     25  ! ------------------------------
     26  DO i = 1, iim + 1
     27    zz(i, 1) = pz(1)
     28    zz(i, jjm+1) = pz(klon)
     29  END DO
     30  ! traitement des point normaux
     31  DO j = 2, jjm
     32    ig = 2 + (j-2)*iim
     33    CALL scopy(iim, pz(ig), 1, zz(1,j), 1)
     34    zz(iim+1, j) = zz(1, j)
     35  END DO
     36  ! -----------------------------------------------------------------------
    3737#ifdef VPP
    38       CALL ecriture(unit,zz,(iim+1)*(jjm+1))
     38  CALL ecriture(unit, zz, (iim+1)*(jjm+1))
    3939#else
    40       WRITE(unit) zz
     40  WRITE (unit) zz
    4141#endif
    42 c
    4342
    44       RETURN
    45       END
    46       SUBROUTINE ecribina(unit,pz)
    47       USE dimphy
    48       IMPLICIT none
    49 c-----------------------------------------------------------------------
    50 #include "dimensions.h"
    51 cccc#include "dimphy.h"
    52 #include "paramet.h"
    53 #include "comgeom.h"
    54 #include "comvert.h"
    55 c
    56 c   arguments:
    57 c   ----------
    58       INTEGER unit
    59       REAL pz(klon,klev)
    60 c
    61 c   local:
    62 c   ------
    63       INTEGER i,j,ilay,ig
    64       REAL zz(iim+1,jjm+1,llm)
    65 c-----------------------------------------------------------------------
    66 c   passage a la grille dynamique:
    67 c   ------------------------------
    68       DO ilay=1,llm
    69 c   traitement des poles
    70          DO i=1,iim +1
    71             zz(i,1,ilay)=pz(1,ilay)
    72             zz(i,jjm+1,ilay)=pz(klon,ilay)
    73          ENDDO
    74 c   traitement des point normaux
    75          DO j=2,jjm
    76             ig=2+(j-2)*iim
    77             CALL SCOPY(iim,pz(ig,ilay),1,zz(1,j,ilay),1)
    78             zz(iim+1,j,ilay)=zz(1,j,ilay)
    79          ENDDO
    80       ENDDO
    81 c-----------------------------------------------------------------------
    82       DO ilay = 1, llm
     43
     44  RETURN
     45END SUBROUTINE ecribins
     46SUBROUTINE ecribina(unit, pz)
     47  USE dimphy
     48  IMPLICIT NONE
     49  ! -----------------------------------------------------------------------
     50  include "dimensions.h"
     51  ! ccc#include "dimphy.h"
     52  include "paramet.h"
     53  include "comgeom.h"
     54  include "comvert.h"
     55
     56  ! arguments:
     57  ! ----------
     58  INTEGER unit
     59  REAL pz(klon, klev)
     60
     61  ! local:
     62  ! ------
     63  INTEGER i, j, ilay, ig
     64  REAL zz(iim+1, jjm+1, llm)
     65  ! -----------------------------------------------------------------------
     66  ! passage a la grille dynamique:
     67  ! ------------------------------
     68  DO ilay = 1, llm
     69    ! traitement des poles
     70    DO i = 1, iim + 1
     71      zz(i, 1, ilay) = pz(1, ilay)
     72      zz(i, jjm+1, ilay) = pz(klon, ilay)
     73    END DO
     74    ! traitement des point normaux
     75    DO j = 2, jjm
     76      ig = 2 + (j-2)*iim
     77      CALL scopy(iim, pz(ig,ilay), 1, zz(1,j,ilay), 1)
     78      zz(iim+1, j, ilay) = zz(1, j, ilay)
     79    END DO
     80  END DO
     81  ! -----------------------------------------------------------------------
     82  DO ilay = 1, llm
    8383#ifdef VPP
    84          CALL ecriture(unit, zz(1,1,ilay), (iim+1)*(jjm+1))
     84    CALL ecriture(unit, zz(1,1,ilay), (iim+1)*(jjm+1))
    8585#else
    86          WRITE(unit) ((zz(i,j,ilay),i=1,iim +1),j=1,jjm+1)
     86    WRITE (unit)((zz(i,j,ilay),i=1,iim+1), j=1, jjm+1)
    8787#endif
    88       ENDDO
    89 c
    90       RETURN
    91       END
     88  END DO
     89
     90  RETURN
     91END SUBROUTINE ecribina
    9292#ifdef VPP
    9393@OPTIONS NODOUBLE
    94       SUBROUTINE ecriture(nunit, r8, n)
    95       INTEGER nunit, n, i
    96       REAL(KIND=8) r8(n)
    97       REAL r4(n)
    98       DO i = 1, n
    99          r4(i) = r8(i)
    100       ENDDO
    101       WRITE(nunit)r4
    102       RETURN
    103       END
     94SUBROUTINE ecriture(nunit, r8, n)
     95  INTEGER nunit, n, i
     96  REAL (KIND=8) r8(n)
     97  REAL r4(n)
     98
     99  DO i = 1, n
     100    r4(i) = r8(i)
     101  END DO
     102  WRITE (nunit) r4
     103  RETURN
     104END SUBROUTINE ecriture
    104105#endif
Note: See TracChangeset for help on using the changeset viewer.