Index: /LMDZ6/trunk/libf/phylmd/Dust/lmdz_spla_ini.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/lmdz_spla_ini.f90	(revision 5505)
+++ /LMDZ6/trunk/libf/phylmd/Dust/lmdz_spla_ini.f90	(revision 5505)
@@ -0,0 +1,14 @@
+MODULE lmdz_spla_ini
+INTEGER, SAVE :: is_oce
+REAL, SAVE :: RNAVO
+!$OMP THREADPRIVATE(is_oce,RNAVO)
+
+CONTAINS
+SUBROUTINE spla_ini(is_oce_in,RNAVO_in)
+IMPLICIT NONE
+INTEGER is_oce_in
+REAL RNAVO_in
+is_oce=is_oce_in
+RNAVO=RNAVO_in
+END SUBROUTINE spla_ini
+END MODULE lmdz_spla_ini
Index: /LMDZ6/trunk/libf/phylmd/Dust/lmdz_spla_nightingale.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/lmdz_spla_nightingale.f90	(revision 5505)
+++ /LMDZ6/trunk/libf/phylmd/Dust/lmdz_spla_nightingale.f90	(revision 5505)
@@ -0,0 +1,86 @@
+MODULE lmdz_spla_nightingale
+CONTAINS
+SUBROUTINE spla_nightingale(klon,klev,nbsrf,u, v, u_10m, v_10m, paprs, pplay, &
+        cdragh, cdragm, t, q, ftsol, tsol, &
+        pctsrf, lmt_dmsconc, lmt_dms)
+  !
+USE lmdz_spla_ini, ONLY: is_oce, RNAVO
+
+IMPLICIT NONE
+  !
+INTEGER klon,klev,nbsrf
+  !
+  REAL, dimension(klon,klev), intent(in) :: u, v
+  REAL, dimension(klon), intent(in):: u_10m, v_10m
+  REAL, dimension(klon,nbsrf), intent(in):: ftsol
+  REAL, dimension(klon), intent(in) :: tsol
+  REAL, dimension(klon,klev+1), intent(in) :: paprs
+  REAL, dimension(klon,klev), intent(in) :: pplay
+  REAL, dimension(klon,klev), intent(in) :: t
+  REAL, dimension(klon,klev), intent(in) :: q
+  REAL, dimension(klon), intent(in) :: cdragh, cdragm
+  REAL, dimension(klon,nbsrf), intent(in) :: pctsrf
+  REAL, dimension(klon), intent(out) :: lmt_dmsconc  ! concentration oceanique DMS
+  REAL, dimension(klon), intent(out) :: lmt_dms      ! flux de DMS
+  !
+  REAL, dimension(klon) :: ustar, obklen
+  REAL, dimension(klon) :: u10, u10n
+  REAL :: tvelocity, schmidt_corr
+  REAL :: t1, t2, t3, t4, viscosity_kin, diffusivity, schmidt
+  INTEGER :: i
+  !
+  CALL bl_for_dms(u, v, paprs, pplay, cdragh, cdragm, &
+        t, q, tsol, ustar, obklen)
+  !
+  DO i=1,klon
+    u10(i)=SQRT(u_10m(i)**2+v_10m(i)**2)
+  ENDDO
+  !
+  CALL neutral(u10, ustar, obklen, u10n)
+  !
+  DO i=1,klon
+  !
+  ! tvelocity - transfer velocity, also known as kw (cm/s)
+  ! schmidt_corr - Schmidt number correction factor (dimensionless)
+  ! Reference:  Nightingale, P.D., G. Malin, C. S. Law, J. J. Watson, P.S. Liss
+  !  M. I. Liddicoat, J. Boutin, R.C. Upstill-Goddard. 'In situ evaluation
+  !  of air-sea gas exchange parameterizations using conservative and
+  !  volatile tracers.'  Glob. Biogeochem. Cycles, 14:373-387, 2000.
+  ! compute transfer velocity using u10neutral
+  !
+  tvelocity = 0.222*u10n(i)*u10n(i) + 0.333*u10n(i)
+  !
+  ! above expression gives tvelocity in cm/hr. convert to cm/s. 1hr =3600 sec
+
+  tvelocity = tvelocity / 3600.
+
+  ! compute the correction factor, which for Nightingale parameterization is
+  ! based on how different the schmidt number is from 600.
+  ! correction factor based on temperature in Kelvin. good
+  ! only for t<=30 deg C.  for temperatures above that, set correction factor
+  ! equal to value at 30 deg C.
+
+  IF (ftsol(i,is_oce) .LE. 303.15) THEN
+     t1 = ftsol(i,is_oce)
+  ELSE
+     t1 = 303.15
+  ENDIF
+
+  t2 = t1 * t1
+  t3 = t2 * t1
+  t4 = t3 * t1
+  viscosity_kin = 3.0363e-9*t4 - 3.655198e-6*t3 + 1.65333e-3*t2 &
+        - 3.332083e-1*t1 + 25.26819
+  diffusivity = 0.01922 * exp(-2177.1/t1)
+  schmidt = viscosity_kin / diffusivity
+  schmidt_corr = (schmidt/600.)**(-.5)
+  !
+  lmt_dms(i) = tvelocity  *  pctsrf(i,is_oce) &
+        * lmt_dmsconc(i)/1.0e12 * schmidt_corr * RNAVO
+  !
+  IF (lmt_dmsconc(i).LE.1.e-20) lmt_dms(i)=0.0
+  !
+  ENDDO
+  !
+END SUBROUTINE spla_nightingale
+END MODULE lmdz_spla_nightingale
Index: DZ6/trunk/libf/phylmd/Dust/nightingale.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/nightingale.f90	(revision 5504)
+++ 	(revision )
@@ -1,84 +1,0 @@
-SUBROUTINE nightingale(u, v, u_10m, v_10m, paprs, pplay, &
-        cdragh, cdragm, t, q, ftsol, tsol, &
-        pctsrf, lmt_dmsconc, lmt_dms)
-  !
-  USE dimphy
-  USE indice_sol_mod
-USE yomcst_mod_h
-IMPLICIT NONE
-  !
-
-
-  !
-  REAL :: u(klon,klev), v(klon,klev)
-  REAL :: u_10m(klon), v_10m(klon)
-  REAL :: ftsol(klon,nbsrf)
-  REAL :: tsol(klon)
-  REAL :: paprs(klon,klev+1), pplay(klon,klev)
-  REAL :: t(klon,klev)
-  REAL :: q(klon,klev)
-  REAL :: cdragh(klon), cdragm(klon)
-  REAL :: pctsrf(klon,nbsrf)
-  REAL :: lmt_dmsconc(klon)  ! concentration oceanique DMS
-  REAL :: lmt_dms(klon)      ! flux de DMS
-  !
-  REAL :: ustar(klon), obklen(klon)
-  REAL :: u10(klon), u10n(klon)
-  REAL :: tvelocity, schmidt_corr
-  REAL :: t1, t2, t3, t4, viscosity_kin, diffusivity, schmidt
-  INTEGER :: i
-  !
-  CALL bl_for_dms(u, v, paprs, pplay, cdragh, cdragm, &
-        t, q, tsol, ustar, obklen)
-  !
-  DO i=1,klon
-    u10(i)=SQRT(u_10m(i)**2+v_10m(i)**2)
-  ENDDO
-  !
-  CALL neutral(u10, ustar, obklen, u10n)
-  !
-  DO i=1,klon
-  !
-  ! tvelocity - transfer velocity, also known as kw (cm/s)
-  ! schmidt_corr - Schmidt number correction factor (dimensionless)
-  ! Reference:  Nightingale, P.D., G. Malin, C. S. Law, J. J. Watson, P.S. Liss
-  !  M. I. Liddicoat, J. Boutin, R.C. Upstill-Goddard. 'In situ evaluation
-  !  of air-sea gas exchange parameterizations using conservative and
-  !  volatile tracers.'  Glob. Biogeochem. Cycles, 14:373-387, 2000.
-  ! compute transfer velocity using u10neutral
-  !
-  tvelocity = 0.222*u10n(i)*u10n(i) + 0.333*u10n(i)
-  !
-  ! above expression gives tvelocity in cm/hr. convert to cm/s. 1hr =3600 sec
-
-  tvelocity = tvelocity / 3600.
-
-  ! compute the correction factor, which for Nightingale parameterization is
-  ! based on how different the schmidt number is from 600.
-  ! correction factor based on temperature in Kelvin. good
-  ! only for t<=30 deg C.  for temperatures above that, set correction factor
-  ! equal to value at 30 deg C.
-
-  IF (ftsol(i,is_oce) .LE. 303.15) THEN
-     t1 = ftsol(i,is_oce)
-  ELSE
-     t1 = 303.15
-  ENDIF
-
-  t2 = t1 * t1
-  t3 = t2 * t1
-  t4 = t3 * t1
-  viscosity_kin = 3.0363e-9*t4 - 3.655198e-6*t3 + 1.65333e-3*t2 &
-        - 3.332083e-1*t1 + 25.26819
-  diffusivity = 0.01922 * exp(-2177.1/t1)
-  schmidt = viscosity_kin / diffusivity
-  schmidt_corr = (schmidt/600.)**(-.5)
-  !
-  lmt_dms(i) = tvelocity  *  pctsrf(i,is_oce) &
-        * lmt_dmsconc(i)/1.0e12 * schmidt_corr * RNAVO
-  !
-  IF (lmt_dmsconc(i).LE.1.e-20) lmt_dms(i)=0.0
-  !
-  ENDDO
-  !
-END SUBROUTINE nightingale
Index: /LMDZ6/trunk/libf/phylmd/Dust/precuremission.f90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/Dust/precuremission.f90	(revision 5504)
+++ /LMDZ6/trunk/libf/phylmd/Dust/precuremission.f90	(revision 5505)
@@ -16,4 +16,5 @@
         source_tr,flux_tr,tr_seri)
 
+USE lmdz_spla_nightingale, ONLY: spla_nightingale
 USE chem_spla_mod_h
   USE chem_mod_h
@@ -84,5 +85,5 @@
   REAL :: lmt_h2sbio(klon)        ! emissions de h2s bio
 
-  EXTERNAL condsurfs, liss, nightingale
+  EXTERNAL condsurfs, liss
   !=========================================================================
   ! Modifications introduced by NHL
@@ -96,5 +97,5 @@
   !=========================================================================
 
-     CALL nightingale(u_seri, v_seri, u10m_ec, v10m_ec, paprs, &
+     CALL spla_nightingale(klon,klev,nbsrf,u_seri, v_seri, u10m_ec, v10m_ec, paprs, &
            pplay, cdragh, cdragm, t_seri, q_seri, ftsol, &
            tsol, pctsrf, lmt_dmsconc, lmt_dms)
Index: /LMDZ6/trunk/libf/phylmd/physiq_mod.F90
===================================================================
--- /LMDZ6/trunk/libf/phylmd/physiq_mod.F90	(revision 5504)
+++ /LMDZ6/trunk/libf/phylmd/physiq_mod.F90	(revision 5505)
@@ -132,5 +132,6 @@
     USE lmdz_xios, ONLY: xios_get_field_attr, xios_field_is_active, xios_context
     USE lmdz_xios, ONLY: xios_set_current_context
-    use wxios_mod, ONLY: missing_val, using_xios
+    USE wxios_mod, ONLY: missing_val, using_xios
+    USE lmdz_spla_ini, ONLY : spla_ini
 
 #ifndef CPP_XIOS
@@ -1883,4 +1884,5 @@
 IF (CPPKEY_DUST) THEN
        ! Quand on utilise SPLA, on force iflag_phytrac=1
+       CALL spla_ini(is_oce,RNAVO)
        CALL phytracr_spl_out_init()
        CALL phys_output_write_spl(itap, pdtphys, paprs, pphis,                  &
