Index: LMDZ6/trunk/libf/phylmd/dyn1d/1DUTILS.h
===================================================================
--- LMDZ6/trunk/libf/phylmd/dyn1d/1DUTILS.h	(revision 3538)
+++ LMDZ6/trunk/libf/phylmd/dyn1d/1DUTILS.h	(revision 3540)
@@ -2,5 +2,5 @@
 
 !
-! $Id: conf_unicol.F 1279 2010-08-04 17:20:56Z lahellec $
+! $Id$
 !
 !
@@ -826,10 +826,10 @@
       ENDDO
 
-      modname = 'dyn1dredem'
-      ierr = NF_OPEN(fichnom, NF_WRITE, nid)
-      IF (ierr .NE. NF_NOERR) THEN
-         abort_message="Pb. d ouverture "//fichnom
-         CALL abort_gcm('Modele 1D',abort_message,1)
-      ENDIF
+!     modname = 'dyn1dredem'
+!     ierr = NF_OPEN(fichnom, NF_WRITE, nid)
+!     IF (ierr .NE. NF_NOERR) THEN
+!        abort_message="Pb. d ouverture "//fichnom
+!        CALL abort_gcm('Modele 1D',abort_message,1)
+!     ENDIF
 
       DO l=1,length
Index: LMDZ6/trunk/libf/phylmd/dyn1d/lmdz1d.F90
===================================================================
--- LMDZ6/trunk/libf/phylmd/dyn1d/lmdz1d.F90	(revision 3538)
+++ LMDZ6/trunk/libf/phylmd/dyn1d/lmdz1d.F90	(revision 3540)
@@ -46,5 +46,6 @@
                           preff, aps, bps, pseudoalt, scaleheight
    USE temps_mod, ONLY: annee_ref, calend, day_end, day_ini, day_ref, &
-                        itau_dyn, itau_phy, start_time
+                        itau_dyn, itau_phy, start_time, year_len
+   USE phys_cal_mod, ONLY : year_len_phys_cal_mod => year_len 
 
       implicit none
@@ -240,15 +241,14 @@
 !  Initializations of boundary conditions 
 !---------------------------------------------------------------------
-      integer, parameter :: yd = 360
-      real :: phy_nat (yd) = 0.0 ! 0=ocean libre,1=land,2=glacier,3=banquise
-      real :: phy_alb (yd)  ! Albedo land only (old value condsurf_jyg=0.3)
-      real :: phy_sst (yd)  ! SST (will not be used; cf read_tsurf1d.F)
-      real :: phy_bil (yd) = 1.0 ! Ne sert que pour les slab_ocean
-      real :: phy_rug (yd) ! Longueur rugosite utilisee sur land only
-      real :: phy_ice (yd) = 0.0 ! Fraction de glace
-      real :: phy_fter(yd) = 0.0 ! Fraction de terre
-      real :: phy_foce(yd) = 0.0 ! Fraction de ocean
-      real :: phy_fsic(yd) = 0.0 ! Fraction de glace
-      real :: phy_flic(yd) = 0.0 ! Fraction de glace
+      real, allocatable :: phy_nat (:)  ! 0=ocean libre,1=land,2=glacier,3=banquise
+      real, allocatable :: phy_alb (:)  ! Albedo land only (old value condsurf_jyg=0.3)
+      real, allocatable :: phy_sst (:)  ! SST (will not be used; cf read_tsurf1d.F)
+      real, allocatable :: phy_bil (:)  ! Ne sert que pour les slab_ocean
+      real, allocatable :: phy_rug (:) ! Longueur rugosite utilisee sur land only
+      real, allocatable :: phy_ice (:) ! Fraction de glace
+      real, allocatable :: phy_fter(:) ! Fraction de terre
+      real, allocatable :: phy_foce(:) ! Fraction de ocean
+      real, allocatable :: phy_fsic(:) ! Fraction de glace
+      real, allocatable :: phy_flic(:) ! Fraction de glace
 
 !---------------------------------------------------------------------
@@ -471,4 +471,23 @@
 
       call conf_gcm( 99, .TRUE. )
+      
+!-----------------------------------------------------------------------
+      allocate( phy_nat (year_len))  ! 0=ocean libre,1=land,2=glacier,3=banquise
+      phy_nat(:)=0.0
+      allocate( phy_alb (year_len))  ! Albedo land only (old value condsurf_jyg=0.3)
+      allocate( phy_sst (year_len))  ! SST (will not be used; cf read_tsurf1d.F)
+      allocate( phy_bil (year_len))  ! Ne sert que pour les slab_ocean
+      phy_bil(:)=1.0
+      allocate( phy_rug (year_len)) ! Longueur rugosite utilisee sur land only
+      allocate( phy_ice (year_len)) ! Fraction de glace
+      phy_ice(:)=0.0
+      allocate( phy_fter(year_len)) ! Fraction de terre
+      phy_fter(:)=0.0
+      allocate( phy_foce(year_len)) ! Fraction de ocean
+      phy_foce(:)=0.0
+      allocate( phy_fsic(year_len)) ! Fraction de glace
+      phy_fsic(:)=0.0
+      allocate( phy_flic(year_len)) ! Fraction de glace
+      phy_flic(:)=0.0
 !-----------------------------------------------------------------------
 !   Choix du calendrier
@@ -486,4 +505,5 @@
         write(*,*)'CALENDRIER CHOISI: Terrestre bissextile'
       else if (calend == 'gregorian') then
+        stop 'gregorian calend should not be used by normal user'
         call ioconf_calendar('gregorian') ! not to be used by normal users
         write(*,*)'CALENDRIER CHOISI: Gregorien'
@@ -738,4 +758,7 @@
       rlon_rad(1)=xlon*rpi/180.
 
+     ! iniphysiq will call iniaqua who needs year_len from phys_cal_mod
+     year_len_phys_cal_mod=year_len
+           
      ! Ehouarn: iniphysiq requires arrays related to (3D) dynamics grid,
      ! e.g. for cell boundaries, which are meaningless in 1D; so pad these 
@@ -936,5 +959,5 @@
 !        phy_fter,phy_foce,phy_flic,phy_fsic)
 !------------------------------------------------------------------------
-      do i=1,yd
+      do i=1,year_len
         phy_nat(i)  = nat_surf
         phy_alb(i)  = albedo
