Ignore:
Timestamp:
Jun 9, 2021, 9:38:56 PM (3 years ago)
Author:
emillour
Message:

Venus GCM:
Some cosmetics in routines, along with adding the possibility to read/write q2 from/to startphy.nc/restartsphy.nc (not really used, but in preparation of future commits).
VB+EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.VENUS/libf/phyvenus/turb_mod.F90

    r1723 r2534  
    44  REAL,SAVE,ALLOCATABLE :: q2(:,:)    ! Turbulent Kinetic Energy
    55  REAL,SAVE,ALLOCATABLE :: sens(:)
    6   REAL,allocatable,SAVE :: l0(:)
     6  REAL,allocatable,SAVE :: l0(:)      ! Characteristic mixing length
    77  REAL,SAVE,ALLOCATABLE :: yustar(:)
    88  REAL,SAVE,ALLOCATABLE :: wstar(:)
     
    1515      ! mostly for LES use. default is FALSE (for GCM and mesoscale)
    1616
    17 !contains
     17contains
    1818
    19 !  subroutine ini_turb_mod(ngrid,nlayer)
     19  subroutine ini_turb_mod(ngrid,nlayer)
    2020
    21 !  implicit none
    22 !  integer,intent(in) :: ngrid ! number of atmospheric columns
    23 !  integer,intent(in) :: nlayer ! number of atmospheric layers
     21  implicit none
     22  integer,intent(in) :: ngrid ! number of atmospheric columns
     23  integer,intent(in) :: nlayer ! number of atmospheric layers
    2424
    25 !    allocate(q2(ngrid,nlayer+1))
    26 !    allocate(l0(ngrid))
    27 !    allocate(wstar(ngrid))
    28 !   allocate(ustar(ngrid))
    29 !   allocate(tstar(ngrid))
    30 !   allocate(hfmax_th(ngrid))
    31 !   allocate(zmax_th(ngrid))
     25    allocate(q2(ngrid,nlayer+1))
     26    allocate(sens(ngrid))
     27    allocate(l0(ngrid))
     28    allocate(wstar(ngrid))
     29    allocate(yustar(ngrid))
     30    allocate(tstar(ngrid))
     31    allocate(hfmax_th(ngrid))
     32    allocate(zmax_th(ngrid))
    3233!   allocate(sensibFlux(ngrid))
    3334
    34 !  end subroutine ini_turb_mod
     35  end subroutine ini_turb_mod
     36
     37  subroutine end_turb_mod
     38
     39  implicit none
     40
     41    if (allocated(q2)) deallocate(q2)
     42    if (allocated(sens)) deallocate(sens)
     43    if (allocated(l0)) deallocate(l0)
     44    if (allocated(wstar)) deallocate(wstar)
     45    if (allocated(yustar)) deallocate(yustar)
     46    if (allocated(tstar)) deallocate(tstar)
     47    if (allocated(hfmax_th)) deallocate(hfmax_th)
     48    if (allocated(zmax_th)) deallocate(zmax_th)
     49!    if (allocated(sensibFlux)) deallocate(sensibFlux)
     50
     51  end subroutine end_turb_mod
     52
    3553
    3654end module turb_mod
Note: See TracChangeset for help on using the changeset viewer.