source: trunk/LMDZ.MARS/libf/phymars/comsaison_h.F90 @ 2800

Last change on this file since 2800 was 2597, checked in by emillour, 3 years ago

Mars GCM:
Move "zls" (solar longitude) from being a local variable of physiq
to module comsaison_h. This is for convenience (saving zls and making
it available to the "plasma dynamical core").
Also cleaned up and commented comsaison_h in the process.
JYC+EM

File size: 973 bytes
Line 
1module comsaison_h
2
3implicit none
4
5  real,save :: dist_sol ! Sun-Mars distance (AU)
6  real,save :: declin ! declination (rad)
7  real,save :: zls ! solar longitude (rad)
8  real,save,allocatable :: mu0(:) ! cosine of solar zenith angle
9  real,save,allocatable :: fract(:) ! day fraction over the time interval (0: night, 1: day)
10  real,save,allocatable :: local_time(:) ! local solar time as fraction of day (0,1)
11
12!$OMP THREADPRIVATE(dist_sol,declin,zls,mu0,fract,local_time)
13
14contains
15
16  subroutine ini_comsaison_h(ngrid)
17 
18  implicit none
19  integer,intent(in) :: ngrid ! number of atmospheric columns
20 
21    allocate(mu0(ngrid))
22    allocate(fract(ngrid))
23    allocate(local_time(ngrid))
24 
25  end subroutine ini_comsaison_h
26
27
28  subroutine end_comsaison_h
29
30  implicit none
31
32    if (allocated(mu0)) deallocate(mu0)
33    if (allocated(fract)) deallocate(fract)
34    if (allocated(local_time)) deallocate(local_time)
35
36  end subroutine end_comsaison_h
37 
38end module comsaison_h
Note: See TracBrowser for help on using the repository browser.