Last change
on this file since 2616 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
|
Rev | Line | |
---|
[1047] | 1 | module comsaison_h |
---|
| 2 | |
---|
| 3 | implicit none |
---|
| 4 | |
---|
[2597] | 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) |
---|
[1974] | 10 | real,save,allocatable :: local_time(:) ! local solar time as fraction of day (0,1) |
---|
[1047] | 11 | |
---|
[2597] | 12 | !$OMP THREADPRIVATE(dist_sol,declin,zls,mu0,fract,local_time) |
---|
[2578] | 13 | |
---|
[1047] | 14 | contains |
---|
| 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)) |
---|
[1974] | 23 | allocate(local_time(ngrid)) |
---|
[1047] | 24 | |
---|
| 25 | end subroutine ini_comsaison_h |
---|
[1770] | 26 | |
---|
| 27 | |
---|
| 28 | subroutine end_comsaison_h |
---|
| 29 | |
---|
| 30 | implicit none |
---|
| 31 | |
---|
| 32 | if (allocated(mu0)) deallocate(mu0) |
---|
| 33 | if (allocated(fract)) deallocate(fract) |
---|
[1974] | 34 | if (allocated(local_time)) deallocate(local_time) |
---|
[1770] | 35 | |
---|
| 36 | end subroutine end_comsaison_h |
---|
[1047] | 37 | |
---|
| 38 | end module comsaison_h |
---|
Note: See
TracBrowser
for help on using the repository browser.