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/ustarhb.F90

    r1988 r1992  
    1 !
     1
    22! $Header$
    3 !
    4       SUBROUTINE ustarhb(knon,u,v,cd_m, ustar)
    5       use dimphy
    6       IMPLICIT none
    7 c======================================================================
    8 c Laurent Li (LMD/CNRS), le 30 septembre 1998
    9 c Couche limite non-locale. Adaptation du code du CCM3.
    10 c Code non teste, donc a ne pas utiliser.
    11 c======================================================================
    12 c Nonlocal scheme that determines eddy diffusivities based on a
    13 c diagnosed boundary layer height and a turbulent velocity scale.
    14 c Also countergradient effects for heat and moisture are included.
    15 c
    16 c For more information, see Holtslag, A.A.M., and B.A. Boville, 1993:
    17 c Local versus nonlocal boundary-layer diffusion in a global climate
    18 c model. J. of Climate, vol. 6, 1825-1842.
    19 c======================================================================
    20 cym#include "dimensions.h"
    21 cym#include "dimphy.h"
    22 #include "YOMCST.h"
    23 c
    24 c Arguments:
    25 c
    26       INTEGER knon ! nombre de points a calculer
    27       REAL u(klon,klev) ! vitesse U (m/s)
    28       REAL v(klon,klev) ! vitesse V (m/s)
    29       REAL cd_m(klon) ! coefficient de friction au sol pour vitesse
    30       REAL ustar(klon)
    31 c
    32       INTEGER i, k
    33       REAL zxt, zxq, zxu, zxv, zxmod, taux, tauy
    34       REAL zx_alf1, zx_alf2 ! parametres pour extrapolation
    35       LOGICAL unssrf(klon) ! unstb pbl w/lvls within srf pbl lyr
    36       LOGICAL unsout(klon) ! unstb pbl w/lvls in outer pbl lyr
    37       LOGICAL check(klon)  ! True=>chk if Richardson no.>critcal
    38 c
    39 #include "YOETHF.h"
    40 #include "FCTTRE.h"
    41       DO i = 1, knon
    42         zx_alf1 = 1.0
    43         zx_alf2 = 1.0 - zx_alf1
    44         zxu = u(i,1)*zx_alf1+u(i,2)*zx_alf2
    45         zxv = v(i,1)*zx_alf1+v(i,2)*zx_alf2
    46         zxmod = 1.0+SQRT(zxu**2+zxv**2)
    47         taux = zxu *zxmod*cd_m(i)
    48         tauy = zxv *zxmod*cd_m(i)
    49         ustar(i) = SQRT(taux**2+tauy**2)
    50 c      print*,'Ust ',zxu,zxmod,taux,ustar(i)
    51       ENDDO
    52 c
    53       return
    54       end
     3
     4SUBROUTINE ustarhb(knon, u, v, cd_m, ustar)
     5  USE dimphy
     6  IMPLICIT NONE
     7  ! ======================================================================
     8  ! Laurent Li (LMD/CNRS), le 30 septembre 1998
     9  ! Couche limite non-locale. Adaptation du code du CCM3.
     10  ! Code non teste, donc a ne pas utiliser.
     11  ! ======================================================================
     12  ! Nonlocal scheme that determines eddy diffusivities based on a
     13  ! diagnosed boundary layer height and a turbulent velocity scale.
     14  ! Also countergradient effects for heat and moisture are included.
     15
     16  ! For more information, see Holtslag, A.A.M., and B.A. Boville, 1993:
     17  ! Local versus nonlocal boundary-layer diffusion in a global climate
     18  ! model. J. of Climate, vol. 6, 1825-1842.
     19  ! ======================================================================
     20  ! ym#include "dimensions.h"
     21  ! ym#include "dimphy.h"
     22  include "YOMCST.h"
     23
     24  ! Arguments:
     25
     26  INTEGER knon ! nombre de points a calculer
     27  REAL u(klon, klev) ! vitesse U (m/s)
     28  REAL v(klon, klev) ! vitesse V (m/s)
     29  REAL cd_m(klon) ! coefficient de friction au sol pour vitesse
     30  REAL ustar(klon)
     31
     32  INTEGER i, k
     33  REAL zxt, zxq, zxu, zxv, zxmod, taux, tauy
     34  REAL zx_alf1, zx_alf2 ! parametres pour extrapolation
     35  LOGICAL unssrf(klon) ! unstb pbl w/lvls within srf pbl lyr
     36  LOGICAL unsout(klon) ! unstb pbl w/lvls in outer pbl lyr
     37  LOGICAL check(klon) ! True=>chk if Richardson no.>critcal
     38
     39  include "YOETHF.h"
     40  include "FCTTRE.h"
     41  DO i = 1, knon
     42    zx_alf1 = 1.0
     43    zx_alf2 = 1.0 - zx_alf1
     44    zxu = u(i, 1)*zx_alf1 + u(i, 2)*zx_alf2
     45    zxv = v(i, 1)*zx_alf1 + v(i, 2)*zx_alf2
     46    zxmod = 1.0 + sqrt(zxu**2+zxv**2)
     47    taux = zxu*zxmod*cd_m(i)
     48    tauy = zxv*zxmod*cd_m(i)
     49    ustar(i) = sqrt(taux**2+tauy**2)
     50    ! print*,'Ust ',zxu,zxmod,taux,ustar(i)
     51  END DO
     52
     53  RETURN
     54END SUBROUTINE ustarhb
Note: See TracChangeset for help on using the changeset viewer.