Index: /trunk/LMDZ.MARS/README
===================================================================
--- /trunk/LMDZ.MARS/README	(revision 2596)
+++ /trunk/LMDZ.MARS/README	(revision 2597)
@@ -3549,2 +3549,9 @@
 - missing rho at launch altitude
 - changed inputs, because R and Cp are needed to compute rho and BV
+
+== 17/12/2021 == JYC+EM
+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.
+
Index: /trunk/LMDZ.MARS/libf/phymars/comsaison_h.F90
===================================================================
--- /trunk/LMDZ.MARS/libf/phymars/comsaison_h.F90	(revision 2596)
+++ /trunk/LMDZ.MARS/libf/phymars/comsaison_h.F90	(revision 2597)
@@ -3,13 +3,12 @@
 implicit none
 
-  logical,save :: callsais
-  integer,save :: isaison
-  real,save :: dist_sol
-  real,save :: declin
-  real,save,allocatable :: mu0(:)
-  real,save,allocatable :: fract(:)
+  real,save :: dist_sol ! Sun-Mars distance (AU)
+  real,save :: declin ! declination (rad)
+  real,save :: zls ! solar longitude (rad)
+  real,save,allocatable :: mu0(:) ! cosine of solar zenith angle
+  real,save,allocatable :: fract(:) ! day fraction over the time interval (0: night, 1: day)
   real,save,allocatable :: local_time(:) ! local solar time as fraction of day (0,1)
 
-!$OMP THREADPRIVATE(callsais,isaison,dist_sol,declin,mu0,fract,local_time)
+!$OMP THREADPRIVATE(dist_sol,declin,zls,mu0,fract,local_time)
 
 contains
Index: /trunk/LMDZ.MARS/libf/phymars/physiq_mod.F
===================================================================
--- /trunk/LMDZ.MARS/libf/phymars/physiq_mod.F	(revision 2596)
+++ /trunk/LMDZ.MARS/libf/phymars/physiq_mod.F	(revision 2597)
@@ -54,5 +54,6 @@
      &                     capcal, fluxgrd, qsurf,
      &                     hmons,summit,base,watercap,watercaptag
-      use comsaison_h, only: dist_sol, declin, mu0, fract, local_time
+      use comsaison_h, only: dist_sol, declin, zls, 
+     &                       mu0, fract, local_time
       use slope_mod, only: theta_sl, psi_sl
       use conc_mod, only: rnew, cpnew, mmean
@@ -316,5 +317,4 @@
       REAL tau(ngrid,naerkind)     ! Column dust optical depth at each point
                                    ! AS: TBD: this one should be in a module !
-      REAL zls                       !  solar longitude (rad)
       REAL zday                      ! date (time since Ls=0, in martian days)
       REAL zzlay(ngrid,nlayer)     ! altitude at the middle of the layers
