Index: codes/icosagcm/branches/SATURN_DYNAMICO/LMDZ.COMMON/libf/phystd/phyetat0_academic.F90
===================================================================
--- codes/icosagcm/branches/SATURN_DYNAMICO/LMDZ.COMMON/libf/phystd/phyetat0_academic.F90	(revision 270)
+++ codes/icosagcm/branches/SATURN_DYNAMICO/LMDZ.COMMON/libf/phystd/phyetat0_academic.F90	(revision 298)
@@ -11,4 +11,5 @@
                      inquire_dimension, inquire_dimension_length
   use slab_ice_h, only: noceanmx
+  use mod_phys_lmdz_para, only : is_master
 
   implicit none
@@ -102,11 +103,11 @@
 ! Ehouarn, if file not found, then call tabfi with nid_start==0
 if (.not.found_file) then
-  write(*,*) 'phyetat0_academic: call tabfi with nid_start=0'
+  if (is_master) write(*,*) 'phyetat0_academic: call tabfi with nid_start=0'
   call tabfi (ngrid,0,Lmodif,tab0,day_ini,lmax,p_rad, &
                    p_omeg,p_g,p_cpp,p_mugaz,p_daysec,time)
 else
   ! possibility to modify tab_cntrl in tabfi
-  write(*,*)
-  write(*,*) 'TABFI in phyeta0: Lmodif=',Lmodif," tab0=",tab0
+  if (is_master) write(*,*)
+  if (is_master) write(*,*) 'TABFI in phyeta0: Lmodif=',Lmodif," tab0=",tab0
   call tabfi (ngrid,nid_start,Lmodif,tab0,day_ini,lmax,p_rad, &
                    p_omeg,p_g,p_cpp,p_mugaz,p_daysec,time)
@@ -176,8 +177,8 @@
 endif
 if (.not.found) then
-  write(*,*) "phyetat0: Failed loading <phisfi>"
+  if (is_master) write(*,*) "phyetat0: Failed loading <phisfi>"
   phisfi(:)=0
 else
-  write(*,*) "phyetat0: surface geopotential <phisfi> range:", &
+  if (is_master) write(*,*) "phyetat0: surface geopotential <phisfi> range:", &
              minval(phisfi), maxval(phisfi)
 endif
@@ -190,10 +191,10 @@
 endif
 if (.not.found) then
-  write(*,*) "phyetat0: Failed loading <albedodat>"
+  if (is_master) write(*,*) "phyetat0: Failed loading <albedodat>"
   do ig=1,ngrid
     albedodat(ig)=0.
   enddo
 else
-  write(*,*) "phyetat0: Bare ground albedo <albedodat> range:", &
+  if (is_master) write(*,*) "phyetat0: Bare ground albedo <albedodat> range:", &
              minval(albedodat), maxval(albedodat)
 endif
@@ -208,5 +209,5 @@
     zmea(:)=0.
 else
-  write(*,*) "phyetat0: <ZMEA> range:", &
+  if (is_master) write(*,*) "phyetat0: <ZMEA> range:", &
              minval(zmea), maxval(zmea)
 endif
@@ -219,8 +220,8 @@
 endif
 if (.not.found) then
-  write(*,*) "phyetat0: Failed loading <ZSTD>"
+  if (is_master) write(*,*) "phyetat0: Failed loading <ZSTD>"
    zstd(:)=0.
 else
-  write(*,*) "phyetat0: <ZSTD> range:", &
+  if (is_master) write(*,*) "phyetat0: <ZSTD> range:", &
              minval(zstd), maxval(zstd)
 endif
@@ -233,8 +234,8 @@
 endif
 if (.not.found) then
-  write(*,*) "phyetat0: Failed loading <ZSIG>"
+  if (is_master) write(*,*) "phyetat0: Failed loading <ZSIG>"
   zsig(:)=0.
 else
-  write(*,*) "phyetat0: <ZSIG> range:", &
+  if (is_master) write(*,*) "phyetat0: <ZSIG> range:", &
              minval(zsig), maxval(zsig)
 endif
@@ -247,8 +248,8 @@
 endif
 if (.not.found) then
-  write(*,*) "phyetat0: Failed loading <ZGAM>"
+  if (is_master) write(*,*) "phyetat0: Failed loading <ZGAM>"
   zgam(:)=0.
 else
-  write(*,*) "phyetat0: <ZGAM> range:", &
+  if (is_master) write(*,*) "phyetat0: <ZGAM> range:", &
              minval(zgam), maxval(zgam)
 endif
@@ -261,8 +262,8 @@
 endif
 if (.not.found) then
-  write(*,*) "phyetat0: Failed loading <ZTHE>"
+  if (is_master) write(*,*) "phyetat0: Failed loading <ZTHE>"
   zthe(:)=0.
 else
-  write(*,*) "phyetat0: <ZTHE> range:", &
+  if (is_master) write(*,*) "phyetat0: <ZTHE> range:", &
              minval(zthe), maxval(zthe)
 endif
@@ -278,5 +279,5 @@
   !tsurf(:)=175.0
 else
-  write(*,*) "phyetat0: Surface temperature <tsurf> range:", &
+  if (is_master) write(*,*) "phyetat0: Surface temperature <tsurf> range:", &
              minval(tsurf), maxval(tsurf)
 endif
@@ -289,8 +290,8 @@
 endif
 if (.not.found) then
-  write(*,*) "phyetat0: Failed loading <emis>"
+  if (is_master) write(*,*) "phyetat0: Failed loading <emis>"
   emis(:)=0.5
 else
-  write(*,*) "phyetat0: Surface emissivity <emis> range:", &
+  if (is_master) write(*,*) "phyetat0: Surface emissivity <emis> range:", &
              minval(emis), maxval(emis)
 endif
@@ -303,8 +304,8 @@
 endif
 if (.not.found) then
-  write(*,*) "phyetat0: Failed loading <cloudfrac>"
+  if (is_master) write(*,*) "phyetat0: Failed loading <cloudfrac>"
   cloudfrac(:,:)=0.
 else
-  write(*,*) "phyetat0: Cloud fraction <cloudfrac> range:", &
+  if (is_master) write(*,*) "phyetat0: Cloud fraction <cloudfrac> range:", &
              minval(cloudfrac), maxval(cloudfrac)
 endif
@@ -317,8 +318,8 @@
 endif
 if (.not.found) then
-  write(*,*) "phyetat0: Failed loading <totcloudfrac>"
+  if (is_master) write(*,*) "phyetat0: Failed loading <totcloudfrac>"
   totcloudfrac(:)=0.5
 else
-  write(*,*) "phyetat0: Total cloud fraction <totcloudfrac> range:", &
+  if (is_master) write(*,*) "phyetat0: Total cloud fraction <totcloudfrac> range:", &
              minval(totcloudfrac), maxval(totcloudfrac)
 endif
@@ -331,5 +332,5 @@
 endif
 if (.not.found) then
-  write(*,*) "phyetat0: Failed loading <hice>"
+  if (is_master) write(*,*) "phyetat0: Failed loading <hice>"
 !  call abort
       do ig=1,ngrid
@@ -337,5 +338,5 @@
       enddo
 else
-  write(*,*) "phyetat0: Height of oceanic ice <hice> range:", &
+  if (is_master) write(*,*) "phyetat0: Height of oceanic ice <hice> range:", &
              minval(hice), maxval(hice)
 endif
@@ -349,5 +350,5 @@
 endif
 if (.not.found) then
-  write(*,*) "phyetat0: Failed loading <rnat>"
+  if (is_master) write(*,*) "phyetat0: Failed loading <rnat>"
       do ig=1,ngrid
         rnat(ig)=1.
@@ -362,5 +363,5 @@
       enddo
 
-  write(*,*) "phyetat0: Nature of surface <rnat> range:", &
+  if (is_master) write(*,*) "phyetat0: Nature of surface <rnat> range:", &
              minval(rnat), maxval(rnat)
 endif
@@ -372,10 +373,10 @@
 endif
 if (.not.found) then
-  write(*,*) "phyetat0: Failed loading <pctsrf_sic>"
+  if (is_master) write(*,*) "phyetat0: Failed loading <pctsrf_sic>"
       do ig=1,ngrid
       pctsrf_sic(ig)=0.
       enddo
 else
-  write(*,*) "phyetat0: Pourcentage of sea ice cover <pctsrf_sic> range:", &
+  if (is_master) write(*,*) "phyetat0: Pourcentage of sea ice cover <pctsrf_sic> range:", &
              minval(pctsrf_sic), maxval(pctsrf_sic)
 endif
@@ -387,5 +388,5 @@
 endif
 if (.not.found) then
-  write(*,*) "phyetat0: Failed loading <tslab>"
+  if (is_master) write(*,*) "phyetat0: Failed loading <tslab>"
       do ig=1,ngrid
       do iq=1,noceanmx
@@ -394,5 +395,5 @@
       enddo
 else
-  write(*,*) "phyetat0: Slab ocean temperature <tslab> range:", &
+  if (is_master) write(*,*) "phyetat0: Slab ocean temperature <tslab> range:", &
              minval(tslab), maxval(tslab)
 endif
@@ -404,10 +405,10 @@
 endif
 if (.not.found) then
-  write(*,*) "phyetat0: Failed loading <tsea_ice>"
+  if (is_master) write(*,*) "phyetat0: Failed loading <tsea_ice>"
       do ig=1,ngrid
       tsea_ice(ig)=273.15-1.8
       enddo
 else
-  write(*,*) "phyetat0: Oceanic ice temperature <tsea_ice> range:", &
+  if (is_master) write(*,*) "phyetat0: Oceanic ice temperature <tsea_ice> range:", &
              minval(tsea_ice), maxval(tsea_ice)
 endif
@@ -419,10 +420,10 @@
 endif
 if (.not.found) then
-  write(*,*) "phyetat0: Failed loading <sea_ice>"
+  if (is_master) write(*,*) "phyetat0: Failed loading <sea_ice>"
       do ig=1,ngrid
       tsea_ice(ig)=0.
       enddo
 else
-  write(*,*) "phyetat0: Oceanic ice quantity <sea_ice> range:", &
+  if (is_master) write(*,*) "phyetat0: Oceanic ice quantity <sea_ice> range:", &
              minval(sea_ice), maxval(sea_ice)
 endif
@@ -438,8 +439,8 @@
 endif
 if (.not.found) then
-  write(*,*) "phyetat0: Failed loading <q2>"
+  if (is_master) write(*,*) "phyetat0: Failed loading <q2>"
   q2(:,:)=0.001
 else
-  write(*,*) "phyetat0: PBL wind variance <q2> range:", &
+  if (is_master) write(*,*) "phyetat0: PBL wind variance <q2> range:", &
              minval(q2), maxval(q2)
 endif
@@ -453,5 +454,5 @@
       ! "h2o_ice" should be loaded instead
       txt="h2o_ice"
-      write(*,*) 'phyetat0: loading surface tracer', &
+      if (is_master) write(*,*) 'phyetat0: loading surface tracer', &
                            ' h2o_ice instead of h2o_vap'
     endif
@@ -462,8 +463,8 @@
     endif
     if (.not.found) then
-      write(*,*) "phyetat0: Failed loading <",trim(txt),">"
-      write(*,*) "         ",trim(txt)," is set to zero"
+      if (is_master) write(*,*) "phyetat0: Failed loading <",trim(txt),">"
+      if (is_master) write(*,*) "         ",trim(txt)," is set to zero"
     else
-      write(*,*) "phyetat0: Surface tracer <",trim(txt),"> range:", &
+      if (is_master) write(*,*) "phyetat0: Surface tracer <",trim(txt),"> range:", &
                  minval(qsurf(:,iq)), maxval(qsurf(:,iq))
     endif
