[1723] | 1 | module turb_mod |
---|
| 2 | |
---|
| 3 | !! variables |
---|
| 4 | REAL,SAVE,ALLOCATABLE :: q2(:,:) ! Turbulent Kinetic Energy |
---|
| 5 | REAL,SAVE,ALLOCATABLE :: sens(:) |
---|
[2534] | 6 | REAL,allocatable,SAVE :: l0(:) ! Characteristic mixing length |
---|
[1723] | 7 | REAL,SAVE,ALLOCATABLE :: yustar(:) |
---|
| 8 | REAL,SAVE,ALLOCATABLE :: wstar(:) |
---|
| 9 | REAL,SAVE,ALLOCATABLE :: tstar(:) |
---|
| 10 | REAL,SAVE,ALLOCATABLE :: hfmax_th(:) |
---|
| 11 | REAL,SAVE,ALLOCATABLE :: zmax_th(:) |
---|
| 12 | ! REAL,SAVE,ALLOCATABLE :: sensibFlux(:) |
---|
| 13 | LOGICAL :: turb_resolved = .false. |
---|
| 14 | ! this is a flag to say 'turbulence is resolved' |
---|
| 15 | ! mostly for LES use. default is FALSE (for GCM and mesoscale) |
---|
| 16 | |
---|
[2534] | 17 | contains |
---|
[1723] | 18 | |
---|
[2534] | 19 | subroutine ini_turb_mod(ngrid,nlayer) |
---|
[1723] | 20 | |
---|
[2534] | 21 | implicit none |
---|
| 22 | integer,intent(in) :: ngrid ! number of atmospheric columns |
---|
| 23 | integer,intent(in) :: nlayer ! number of atmospheric layers |
---|
[1723] | 24 | |
---|
[2534] | 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)) |
---|
[1723] | 33 | ! allocate(sensibFlux(ngrid)) |
---|
| 34 | |
---|
[2534] | 35 | end subroutine ini_turb_mod |
---|
[1723] | 36 | |
---|
[2534] | 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 | |
---|
| 53 | |
---|
[1723] | 54 | end module turb_mod |
---|