Index: LMDZ6/trunk/libf/phylmdiso/phyaqua_mod.F90
===================================================================
--- LMDZ6/trunk/libf/phylmdiso/phyaqua_mod.F90	(revision 5066)
+++ LMDZ6/trunk/libf/phylmdiso/phyaqua_mod.F90	(revision 5073)
@@ -636,72 +636,32 @@
       dims(2) = ntim
 
-#ifdef NC_DOUBLE
-      ierr = nf_def_var(nid, 'TEMPS', nf_double, 1, ntim, id_tim)
-#else
-      ierr = nf_def_var(nid, 'TEMPS', nf_float, 1, ntim, id_tim)
-#endif
+      ierr = nf_def_var(nid, 'TEMPS', NF90_FORMAT, 1, ntim, id_tim)
       ierr = nf_put_att_text(nid, id_tim, 'title', 17, 'Jour dans l annee')
 
-#ifdef NC_DOUBLE
-      ierr = nf_def_var(nid, 'NAT', nf_double, 2, dims, id_nat)
-#else
-      ierr = nf_def_var(nid, 'NAT', nf_float, 2, dims, id_nat)
-#endif
+      ierr = nf_def_var(nid, 'NAT', NF90_FORMAT, 2, dims, id_nat)
       ierr = nf_put_att_text(nid, id_nat, 'title', 23, &
         'Nature du sol (0,1,2,3)')
 
-#ifdef NC_DOUBLE
-      ierr = nf_def_var(nid, 'SST', nf_double, 2, dims, id_sst)
-#else
-      ierr = nf_def_var(nid, 'SST', nf_float, 2, dims, id_sst)
-#endif
+      ierr = nf_def_var(nid, 'SST', NF90_FORMAT, 2, dims, id_sst)
       ierr = nf_put_att_text(nid, id_sst, 'title', 35, &
         'Temperature superficielle de la mer')
 
-#ifdef NC_DOUBLE
-      ierr = nf_def_var(nid, 'BILS', nf_double, 2, dims, id_bils)
-#else
-      ierr = nf_def_var(nid, 'BILS', nf_float, 2, dims, id_bils)
-#endif
+      ierr = nf_def_var(nid, 'BILS', NF90_FORMAT, 2, dims, id_bils)
       ierr = nf_put_att_text(nid, id_bils, 'title', 32, &
         'Reference flux de chaleur au sol')
 
-#ifdef NC_DOUBLE
-      ierr = nf_def_var(nid, 'ALB', nf_double, 2, dims, id_alb)
-#else
-      ierr = nf_def_var(nid, 'ALB', nf_float, 2, dims, id_alb)
-#endif
+      ierr = nf_def_var(nid, 'ALB', NF90_FORMAT, 2, dims, id_alb)
       ierr = nf_put_att_text(nid, id_alb, 'title', 19, 'Albedo a la surface')
 
-#ifdef NC_DOUBLE
-      ierr = nf_def_var(nid, 'RUG', nf_double, 2, dims, id_rug)
-#else
-      ierr = nf_def_var(nid, 'RUG', nf_float, 2, dims, id_rug)
-#endif
+      ierr = nf_def_var(nid, 'RUG', NF90_FORMAT, 2, dims, id_rug)
       ierr = nf_put_att_text(nid, id_rug, 'title', 8, 'Rugosite')
 
-#ifdef NC_DOUBLE
-      ierr = nf_def_var(nid, 'FTER', nf_double, 2, dims, id_fter)
-#else
-      ierr = nf_def_var(nid, 'FTER', nf_float, 2, dims, id_fter)
-#endif
+      ierr = nf_def_var(nid, 'FTER', NF90_FORMAT, 2, dims, id_fter)
       ierr = nf_put_att_text(nid, id_fter, 'title',10,'Frac. Land')
-#ifdef NC_DOUBLE
-      ierr = nf_def_var(nid, 'FOCE', nf_double, 2, dims, id_foce)
-#else
-      ierr = nf_def_var(nid, 'FOCE', nf_float, 2, dims, id_foce)
-#endif
+      ierr = nf_def_var(nid, 'FOCE', NF90_FORMAT, 2, dims, id_foce)
       ierr = nf_put_att_text(nid, id_foce, 'title',11,'Frac. Ocean')
-#ifdef NC_DOUBLE
-      ierr = nf_def_var(nid, 'FSIC', nf_double, 2, dims, id_fsic)
-#else
-      ierr = nf_def_var(nid, 'FSIC', nf_float, 2, dims, id_fsic)
-#endif
+      ierr = nf_def_var(nid, 'FSIC', NF90_FORMAT, 2, dims, id_fsic)
       ierr = nf_put_att_text(nid, id_fsic, 'title',13,'Frac. Sea Ice')
-#ifdef NC_DOUBLE
-      ierr = nf_def_var(nid, 'FLIC', nf_double, 2, dims, id_flic)
-#else
-      ierr = nf_def_var(nid, 'FLIC', nf_float, 2, dims, id_flic)
-#endif
+      ierr = nf_def_var(nid, 'FLIC', NF90_FORMAT, 2, dims, id_flic)
       ierr = nf_put_att_text(nid, id_flic, 'title',14,'Frac. Land Ice')
 
@@ -715,9 +675,5 @@
       ! write the 'times'
       DO k = 1, year_len
-#ifdef NC_DOUBLE
-        ierr = nf_put_var1_double(nid, id_tim, k, dble(k))
-#else
-        ierr = nf_put_var1_real(nid, id_tim, k, float(k))
-#endif
+        ierr = nf90_put_var(nid, id_tim, k, k)
         IF (ierr/=nf_noerr) THEN
           WRITE (*, *) 'writelim error with temps(k),k=', k
@@ -732,9 +688,5 @@
     CALL gather(phy_nat, phy_glo)
     IF (is_master) THEN
-#ifdef NC_DOUBLE
-      ierr = nf_put_var_double(nid, id_nat, phy_glo)
-#else
-      ierr = nf_put_var_real(nid, id_nat, phy_glo)
-#endif
+      ierr = nf90_put_var(nid, id_nat, phy_glo)
       IF (ierr/=nf_noerr) THEN
         WRITE (*, *) 'writelim error with phy_nat'
@@ -745,9 +697,5 @@
     CALL gather(phy_sst, phy_glo)
     IF (is_master) THEN
-#ifdef NC_DOUBLE
-      ierr = nf_put_var_double(nid, id_sst, phy_glo)
-#else
-      ierr = nf_put_var_real(nid, id_sst, phy_glo)
-#endif
+      ierr = nf90_put_var(nid, id_sst, phy_glo)
       IF (ierr/=nf_noerr) THEN
         WRITE (*, *) 'writelim error with phy_sst'
@@ -758,9 +706,5 @@
     CALL gather(phy_bil, phy_glo)
     IF (is_master) THEN
-#ifdef NC_DOUBLE
-      ierr = nf_put_var_double(nid, id_bils, phy_glo)
-#else
-      ierr = nf_put_var_real(nid, id_bils, phy_glo)
-#endif
+      ierr = nf90_put_var(nid, id_bils, phy_glo)
       IF (ierr/=nf_noerr) THEN
         WRITE (*, *) 'writelim error with phy_bil'
@@ -771,9 +715,5 @@
     CALL gather(phy_alb, phy_glo)
     IF (is_master) THEN
-#ifdef NC_DOUBLE
-      ierr = nf_put_var_double(nid, id_alb, phy_glo)
-#else
-      ierr = nf_put_var_real(nid, id_alb, phy_glo)
-#endif
+      ierr = nf90_put_var(nid, id_alb, phy_glo)
       IF (ierr/=nf_noerr) THEN
         WRITE (*, *) 'writelim error with phy_alb'
@@ -784,9 +724,5 @@
     CALL gather(phy_rug, phy_glo)
     IF (is_master) THEN
-#ifdef NC_DOUBLE
-      ierr = nf_put_var_double(nid, id_rug, phy_glo)
-#else
-      ierr = nf_put_var_real(nid, id_rug, phy_glo)
-#endif
+      ierr = nf90_put_var(nid, id_rug, phy_glo)
       IF (ierr/=nf_noerr) THEN
         WRITE (*, *) 'writelim error with phy_rug'
@@ -797,9 +733,5 @@
     CALL gather(phy_fter, phy_glo)
     IF (is_master) THEN
-#ifdef NC_DOUBLE
-      ierr = nf_put_var_double(nid, id_fter, phy_glo)
-#else
-      ierr = nf_put_var_real(nid, id_fter, phy_glo)
-#endif
+      ierr = nf90_put_var(nid, id_fter, phy_glo)
       IF (ierr/=nf_noerr) THEN
         WRITE (*, *) 'writelim error with phy_fter'
@@ -810,9 +742,5 @@
     CALL gather(phy_foce, phy_glo)
     IF (is_master) THEN
-#ifdef NC_DOUBLE
-      ierr = nf_put_var_double(nid, id_foce, phy_glo)
-#else
-      ierr = nf_put_var_real(nid, id_foce, phy_glo)
-#endif
+      ierr = nf90_put_var(nid, id_foce, phy_glo)
       IF (ierr/=nf_noerr) THEN
         WRITE (*, *) 'writelim error with phy_foce'
@@ -823,9 +751,5 @@
     CALL gather(phy_fsic, phy_glo)
     IF (is_master) THEN
-#ifdef NC_DOUBLE
-      ierr = nf_put_var_double(nid, id_fsic, phy_glo)
-#else
-      ierr = nf_put_var_real(nid, id_fsic, phy_glo)
-#endif
+      ierr = nf90_put_var(nid, id_fsic, phy_glo)
       IF (ierr/=nf_noerr) THEN
         WRITE (*, *) 'writelim error with phy_fsic'
@@ -836,9 +760,5 @@
     CALL gather(phy_flic, phy_glo)
     IF (is_master) THEN
-#ifdef NC_DOUBLE
-      ierr = nf_put_var_double(nid, id_flic, phy_glo)
-#else
-      ierr = nf_put_var_real(nid, id_flic, phy_glo)
-#endif
+      ierr = nf90_put_var(nid, id_flic, phy_glo)
       IF (ierr/=nf_noerr) THEN
         WRITE (*, *) 'writelim error with phy_flic'
