Index: /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef.xml
===================================================================
--- /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef.xml	(revision 5136)
+++ /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/CONFIG/ORCA2_LIM/EXP00/iodef.xml	(revision 5137)
@@ -21,5 +21,5 @@
     -->
     
-    <file_definition type="multiple_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4">
+    <file_definition type="one_file" name="@expname@_@freq@_@startdate@_@enddate@" sync_freq="10d" min_digits="4">
     
       <file_group id="1ts" output_freq="1ts"  output_level="10" enabled=".TRUE."/> <!-- 1 time step files -->
@@ -54,5 +54,4 @@
 
 	<file id="file3" name_suffix="_grid_U" description="ocean U grid variables" >
-	  <field field_ref="suoce"        name="uos"     long_name="sea_surface_x_velocity"    />
 	  <field field_ref="uoce"         name="uo"      long_name="sea_water_x_velocity"      />
 	  <field field_ref="utau"         name="tauuo"   long_name="surface_downward_x_stress" />
@@ -63,5 +62,4 @@
 	
 	<file id="file4" name_suffix="_grid_V" description="ocean V grid variables" >
-	  <field field_ref="svoce"        name="vos"     long_name="sea_surface_y_velocity"    />
 	  <field field_ref="voce"         name="vo"      long_name="sea_water_y_velocity"      />
 	  <field field_ref="vtau"         name="tauvo"   long_name="surface_downward_y_stress" />
@@ -91,4 +89,30 @@
 	</file>
 
+       <file id="file7" name_suffix="_diaptr" description="diaptr variables" >
+           <field field_ref="zomsfglo"    />
+           <field field_ref="zomsfatl"    />
+           <field field_ref="zomsfpac"    />
+           <field field_ref="zomsfind"    />
+           <field field_ref="zomsfipc"     />
+           <field field_ref="zotemglo"   />
+           <field field_ref="zotematl"   />
+           <field field_ref="zotempac"   />
+           <field field_ref="zotemind"   />
+           <field field_ref="zotemipc"   />
+           <field field_ref="zosalglo"     />
+           <field field_ref="zosalatl"     />
+           <field field_ref="zosalpac"     />
+           <field field_ref="zosalind"     />
+           <field field_ref="zosalipc"     />
+           <field field_ref="zosrfglo"    />
+           <field field_ref="zosrfatl"    />
+           <field field_ref="zosrfpac"    />
+           <field field_ref="zosrfind"    />
+           <field field_ref="zosrfipc"    />
+           <field field_ref="sophtadv"      />
+           <field field_ref="sophtldf"      />
+           <field field_ref="sopstadv"      />
+           <field field_ref="sopstldf"      />
+        </file>
 	<!--
 	<file id="file8" name_suffix="_Tides" description="tidal harmonics" >
Index: /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/CONFIG/ORCA2_LIM/cpp_ORCA2_LIM.fcm
===================================================================
--- /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/CONFIG/ORCA2_LIM/cpp_ORCA2_LIM.fcm	(revision 5136)
+++ /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/CONFIG/ORCA2_LIM/cpp_ORCA2_LIM.fcm	(revision 5137)
@@ -1,1 +1,1 @@
-bld::tool::fppkeys key_trabbl key_lim2 key_dynspg_flt key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx key_iomput key_mpp_mpi key_diaobs key_asminc
+bld::tool::fppkeys key_trabbl key_lim2 key_dynspg_flt key_diaeiv key_ldfslp key_traldf_c2d key_traldf_eiv key_dynldf_c3d key_zdftke key_zdfddm key_zdftmx key_iomput key_mpp_mpi
Index: /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/CONFIG/SHARED/namelist_ref
===================================================================
--- /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 5136)
+++ /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/CONFIG/SHARED/namelist_ref	(revision 5137)
@@ -1071,4 +1071,5 @@
 !!   namnc4       netcdf4 chunking and compression settings             ("key_netcdf4")
 !!   namtrd       dynamics and/or tracer trends
+!!   namptr       Poleward Transport Diagnostics
 !!   namflo       float parameters                                      ("key_float")
 !!   namhsb       Heat and salt budgets
@@ -1120,4 +1121,10 @@
    ln_ariane     = .true.     !  Input with Ariane tool convention(T)
    ln_flo_ascii  = .true.     !  Output with Ariane tool netcdf convention(F) or ascii file (T)
+/
+!-----------------------------------------------------------------------
+&namptr       !   Poleward Transport Diagnostic
+!-----------------------------------------------------------------------
+   ln_diaptr  = .false.    !  Poleward heat and salt transport (T) or not (F)
+   ln_subbas  = .false.     !  Atlantic/Pacific/Indian basins computation (T) or not
 /
 !-----------------------------------------------------------------------
Index: /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/CONFIG/cfg.txt
===================================================================
--- /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/CONFIG/cfg.txt	(revision 5136)
+++ /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/CONFIG/cfg.txt	(revision 5137)
@@ -11,4 +11,4 @@
 GYRE OPA_SRC
 ORCA2_LIM3 OPA_SRC LIM_SRC_3 NST_SRC
+ORCA2_LIM_PTR OPA_SRC LIM_SRC_2 NST_SRC
 ORCA2_LIM OPA_SRC LIM_SRC_2 NST_SRC
-ORCA2_LIM_PTR OPA_SRC LIM_SRC_2 NST_SRC
Index: /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90
===================================================================
--- /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90	(revision 5136)
+++ /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/DIA/diaptr.F90	(revision 5137)
@@ -37,5 +37,5 @@
    PUBLIC   ptr_sj         ! call by tra_ldf & tra_adv routines
    PUBLIC   ptr_sjk        ! 
-   PUBLIC   dia_ptr_alloc   ! call in opa module
+   PUBLIC   dia_ptr_init   ! call in step module
    PUBLIC   dia_ptr        ! call in step module
 
@@ -45,8 +45,7 @@
    
 
-   LOGICAL, PUBLIC ::   l_diaptr = .TRUE.    !  Poleward transport flag (T) or not (F)
-   LOGICAL         ::   l_subbas = .FALSE.   !  Atlantic/Pacific/Indian basins calculation
-   LOGICAL         ::   linit    = .TRUE.    !  initialization flag (set to false after the 1st call)
-   INTEGER         ::   nptr                 ! = 1 (l_subbas=F) or = 5 (glo, atl, pac, ind, ipc) (l_subbas=T) 
+   LOGICAL, PUBLIC ::   ln_diaptr   !  Poleward transport flag (T) or not (F)
+   LOGICAL, PUBLIC ::   ln_subbas   !  Atlantic/Pacific/Indian basins calculation
+   INTEGER         ::   nptr        ! = 1 (l_subbas=F) or = 5 (glo, atl, pac, ind, ipc) (l_subbas=T) 
    INTEGER         ::   nx, ny 
 
@@ -90,8 +89,4 @@
       IF( nn_timing == 1 )   CALL timing_start('dia_ptr')
 
-      IF( linit )  THEN
-         CALL dia_ptr_init
-         linit = .FALSE.
-      ENDIF
       !
       IF( PRESENT( pvtr ) ) THEN
@@ -147,4 +142,5 @@
             z2d(nx,:) = htr_adv(:) * rc_pwatt        !  (conversion in PW)
             cl1 = 'sophtadv'                 
+            !IF(lwp) write(numout,*) ' sophtadv : ',(z2d(nx,jj), jj=1,jpj)
             CALL iom_put( TRIM(cl1), z2d )
             z2d(nx,:) = str_adv(:) * rc_ggram        ! (conversion in Gg)
@@ -175,11 +171,20 @@
       !! ** Purpose :   Initialization, namelist read
       !!----------------------------------------------------------------------
-      INTEGER :: jn,  inum   ! local integers
-      !!----------------------------------------------------------------------
-
-      l_diaptr = iom_use("zomsfglo") .OR. iom_use("zotemglo") .OR. iom_use("sophtadv") .OR. iom_use("sophtldf")
-      CALL iom_open( 'subbasins', inum,  ldstop = .FALSE.  )
-      IF( inum > 0 ) l_subbas  = .TRUE.
-      
+      INTEGER ::  jn           ! local integers
+      INTEGER ::  inum, ierr   ! local integers
+      INTEGER ::  ios          ! Local integer output status for namelist read
+      !!
+      NAMELIST/namptr/ ln_diaptr, ln_subbas
+      !!----------------------------------------------------------------------
+
+      REWIND( numnam_ref )              ! Namelist namptr in reference namelist : Poleward transport
+      READ  ( numnam_ref, namptr, IOSTAT = ios, ERR = 901)
+901   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namptr in reference namelist', lwp )
+
+      REWIND( numnam_cfg )              ! Namelist namptr in configuration namelist : Poleward transport
+      READ  ( numnam_cfg, namptr, IOSTAT = ios, ERR = 902 )
+902   IF( ios /= 0 ) CALL ctl_nam ( ios , 'namptr in configuration namelist', lwp )
+      IF(lwm) WRITE ( numond, namptr )
+
       IF(lwp) THEN                     ! Control print
          WRITE(numout,*)
@@ -187,13 +192,13 @@
          WRITE(numout,*) '~~~~~~~~~~~~'
          WRITE(numout,*) '   Namelist namptr : set ptr parameters'
-         WRITE(numout,*) '      Poleward heat & salt transport (T) or not (F)      l_diaptr  = ', l_diaptr
-         WRITE(numout,*) '      Global (F) or glo/Atl/Pac/Ind/Indo-Pac basins      l_subbas  = ', l_subbas
+         WRITE(numout,*) '      Poleward heat & salt transport (T) or not (F)      ln_diaptr  = ', ln_diaptr
+         WRITE(numout,*) '      Global (F) or glo/Atl/Pac/Ind/Indo-Pac basins      ln_subbas  = ', ln_subbas
       ENDIF
 
-      IF( l_diaptr ) THEN  
+      IF( ln_diaptr ) THEN  
          !
          CALL dom_ngb( 180., 90., nx, ny, 'T' ) !  i-line that passes near the North Pole : Reference latitude (used in plots)
          !
-         IF( l_subbas ) THEN 
+         IF( ln_subbas ) THEN 
             nptr = 5            ! Global, Atlantic, Pacific, Indian, Indo-Pacific
             ALLOCATE( clsubb(nptr) )
@@ -212,5 +217,6 @@
          IF( lk_mpp )   CALL mpp_ini_znl( numout )     ! Define MPI communicator for zonal sum
 
-         IF( l_subbas ) THEN                ! load sub-basin mask
+         IF( ln_subbas ) THEN                ! load sub-basin mask
+            CALL iom_open( 'subbasins', inum,  ldstop = .FALSE.  )
             CALL iom_get( inum, jpdom_data, 'atlmsk', btmsk(:,:,2) )   ! Atlantic basin
             CALL iom_get( inum, jpdom_data, 'pacmsk', btmsk(:,:,3) )   ! Pacific  basin
Index: /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90
===================================================================
--- /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90	(revision 5136)
+++ /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traadv.F90	(revision 5137)
@@ -118,5 +118,5 @@
       CALL iom_put( "wocetr_eff", zwn )
       !
-      IF( l_diaptr )   CALL dia_ptr( zvn )                                     ! diagnose the effective MSF 
+      IF( ln_diaptr )   CALL dia_ptr( zvn )                                     ! diagnose the effective MSF 
       !
    
Index: /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_cen2.F90
===================================================================
--- /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_cen2.F90	(revision 5136)
+++ /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_cen2.F90	(revision 5137)
@@ -279,5 +279,5 @@
          END IF
          !                                 ! "Poleward" heat and salt transports (contribution of upstream fluxes)
-         IF( cdtype == 'TRA' .AND. l_diaptr ) THEN  
+         IF( cdtype == 'TRA' .AND. ln_diaptr ) THEN  
            IF( jn == jp_tem )   htr_adv(:) = ptr_sj( zwy(:,:,:) )
            IF( jn == jp_sal )   str_adv(:) = ptr_sj( zwy(:,:,:) )
Index: /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl.F90
===================================================================
--- /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl.F90	(revision 5136)
+++ /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl.F90	(revision 5137)
@@ -219,5 +219,5 @@
          END IF
          !                                 ! "Poleward" heat and salt transports (contribution of upstream fluxes)
-         IF( cdtype == 'TRA' .AND. l_diaptr ) THEN  
+         IF( cdtype == 'TRA' .AND. ln_diaptr ) THEN  
             IF( jn == jp_tem )  htr_adv(:) = ptr_sj( zwy(:,:,:) )
             IF( jn == jp_sal )  str_adv(:) = ptr_sj( zwy(:,:,:) )
Index: /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl2.F90
===================================================================
--- /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl2.F90	(revision 5136)
+++ /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_muscl2.F90	(revision 5137)
@@ -200,5 +200,5 @@
 
          !                                 ! "Poleward" heat and salt transports (contribution of upstream fluxes)
-         IF( cdtype == 'TRA' .AND. l_diaptr ) THEN
+         IF( cdtype == 'TRA' .AND. ln_diaptr ) THEN
             IF( jn == jp_tem )  htr_adv(:) = ptr_sj( zwy(:,:,:) )
             IF( jn == jp_sal )  str_adv(:) = ptr_sj( zwy(:,:,:) )
Index: /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90
===================================================================
--- /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90	(revision 5136)
+++ /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_qck.F90	(revision 5137)
@@ -355,5 +355,5 @@
          IF( l_trd )   CALL trd_tra( kt, cdtype, jn, jptra_yad, zwy, pvn, ptn(:,:,:,jn) )
          !                                 ! "Poleward" heat and salt transports (contribution of upstream fluxes)
-         IF( cdtype == 'TRA' .AND. l_diaptr ) THEN  
+         IF( cdtype == 'TRA' .AND. ln_diaptr ) THEN  
            IF( jn == jp_tem )  htr_adv(:) = ptr_sj( zwy(:,:,:) )
            IF( jn == jp_sal )  str_adv(:) = ptr_sj( zwy(:,:,:) )
Index: /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_tvd.F90
===================================================================
--- /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_tvd.F90	(revision 5136)
+++ /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_tvd.F90	(revision 5137)
@@ -184,5 +184,5 @@
          END IF
          !                                 ! "Poleward" heat and salt transports (contribution of upstream fluxes)
-         IF( cdtype == 'TRA' .AND. l_diaptr ) THEN  
+         IF( cdtype == 'TRA' .AND. ln_diaptr ) THEN  
            IF( jn == jp_tem )  htr_adv(:) = ptr_sj( zwy(:,:,:) )
            IF( jn == jp_sal )  str_adv(:) = ptr_sj( zwy(:,:,:) )
@@ -250,5 +250,5 @@
          END IF
          !                                 ! "Poleward" heat and salt transports (contribution of upstream fluxes)
-         IF( cdtype == 'TRA' .AND. l_diaptr ) THEN  
+         IF( cdtype == 'TRA' .AND. ln_diaptr ) THEN  
            IF( jn == jp_tem )  htr_adv(:) = ptr_sj( zwy(:,:,:) ) + htr_adv(:)
            IF( jn == jp_sal )  str_adv(:) = ptr_sj( zwy(:,:,:) ) + str_adv(:)
@@ -398,5 +398,5 @@
          END IF
          !                                 ! "Poleward" heat and salt transports (contribution of upstream fluxes)
-         IF( cdtype == 'TRA' .AND. l_diaptr ) THEN  
+         IF( cdtype == 'TRA' .AND. ln_diaptr ) THEN  
            IF( jn == jp_tem )  htr_adv(:) = ptr_sj( zwy(:,:,:) )
            IF( jn == jp_sal )  str_adv(:) = ptr_sj( zwy(:,:,:) )
@@ -524,5 +524,5 @@
          END IF
          !                                 ! "Poleward" heat and salt transports (contribution of upstream fluxes)
-         IF( cdtype == 'TRA' .AND. l_diaptr ) THEN  
+         IF( cdtype == 'TRA' .AND. ln_diaptr ) THEN  
            IF( jn == jp_tem )  htr_adv(:) = ptr_sj( zwy(:,:,:) ) + htr_adv(:)
            IF( jn == jp_sal )  str_adv(:) = ptr_sj( zwy(:,:,:) ) + str_adv(:)
Index: /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90
===================================================================
--- /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90	(revision 5136)
+++ /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traadv_ubs.F90	(revision 5137)
@@ -177,5 +177,5 @@
          END IF
          !                                 ! "Poleward" heat and salt transports (contribution of upstream fluxes)
-         IF( cdtype == 'TRA' .AND. l_diaptr ) THEN  
+         IF( cdtype == 'TRA' .AND. ln_diaptr ) THEN  
             IF( jn == jp_tem )  htr_adv(:) = ptr_sj( ztv(:,:,:) )
             IF( jn == jp_sal )  str_adv(:) = ptr_sj( ztv(:,:,:) )
Index: /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_bilap.F90
===================================================================
--- /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_bilap.F90	(revision 5136)
+++ /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_bilap.F90	(revision 5137)
@@ -166,5 +166,5 @@
          !                                                
          ! "zonal" mean lateral diffusive heat and salt transport
-         IF( cdtype == 'TRA' .AND. l_diaptr ) THEN  
+         IF( cdtype == 'TRA' .AND. ln_diaptr ) THEN  
            IF( jn == jp_tem )  htr_ldf(:) = ptr_sj( ztv(:,:,:) )
            IF( jn == jp_sal )  str_ldf(:) = ptr_sj( ztv(:,:,:) )
Index: /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_bilapg.F90
===================================================================
--- /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_bilapg.F90	(revision 5136)
+++ /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_bilapg.F90	(revision 5137)
@@ -247,5 +247,5 @@
          !                                                ! ===============
          ! "Poleward" diffusive heat or salt transport
-         IF( cdtype == 'TRA' .AND. l_diaptr .AND. ( kaht == 2 ) ) THEN
+         IF( cdtype == 'TRA' .AND. ln_diaptr .AND. ( kaht == 2 ) ) THEN
             ! note sign is reversed to give down-gradient diffusive transports (#1043)
             IF( jn == jp_tem)   htr_ldf(:) = ptr_sj( -zftv(:,:,:) )
Index: /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90
===================================================================
--- /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90	(revision 5136)
+++ /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso.F90	(revision 5137)
@@ -222,5 +222,5 @@
          !
          ! "Poleward" diffusive heat or salt transports (T-S case only)
-         IF( cdtype == 'TRA' .AND. l_diaptr ) THEN
+         IF( cdtype == 'TRA' .AND. ln_diaptr ) THEN
             ! note sign is reversed to give down-gradient diffusive transports (#1043)
             IF( jn == jp_tem)   htr_ldf(:) = ptr_sj( -zftv(:,:,:) )
Index: /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso_grif.F90
===================================================================
--- /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso_grif.F90	(revision 5136)
+++ /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_iso_grif.F90	(revision 5137)
@@ -386,5 +386,5 @@
          !
          !                             ! "Poleward" diffusive heat or salt transports (T-S case only)
-         IF( cdtype == 'TRA' .AND. l_diaptr ) THEN
+         IF( cdtype == 'TRA' .AND. ln_diaptr ) THEN
             IF( jn == jp_tem)   htr_ldf(:) = ptr_sj( zftv(:,:,:) )        ! 3.3  names
             IF( jn == jp_sal)   str_ldf(:) = ptr_sj( zftv(:,:,:) )
Index: /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_lap.F90
===================================================================
--- /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_lap.F90	(revision 5136)
+++ /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/TRA/traldf_lap.F90	(revision 5137)
@@ -148,5 +148,5 @@
          !
          ! "Poleward" diffusive heat or salt transports
-         IF( cdtype == 'TRA' .AND. l_diaptr ) THEN
+         IF( cdtype == 'TRA' .AND. ln_diaptr ) THEN
             IF( jn  == jp_tem)   htr_ldf(:) = ptr_sj( ztv(:,:,:) )
             IF( jn  == jp_sal)   str_ldf(:) = ptr_sj( ztv(:,:,:) )
Index: /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90
===================================================================
--- /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90	(revision 5136)
+++ /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/nemogcm.F90	(revision 5137)
@@ -61,4 +61,5 @@
    USE asminc          ! assimilation increments     
    USE asmbkg          ! writing out state trajectory
+   USE diaptr          ! poleward transports           (dia_ptr_init routine)
    USE diadct          ! sections transports           (dia_dct_init routine)
    USE diaobs          ! Observation diagnostics       (dia_obs_init routine)
@@ -438,4 +439,5 @@
       IF( lk_floats     )   CALL     flo_init   ! drifting Floats
       IF( lk_diaar5     )   CALL dia_ar5_init   ! ar5 diag
+                            CALL dia_ptr_init   ! Poleward TRansports initialization
       IF( lk_diadct     )   CALL dia_dct_init   ! Sections tranports
                             CALL dia_hsb_init   ! heat content, salt content and volume budgets
Index: /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/step.F90
===================================================================
--- /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 5136)
+++ /branches/2015/dev_r5020_CNRS_DIAPTR/NEMOGCM/NEMO/OPA_SRC/step.F90	(revision 5137)
@@ -208,14 +208,13 @@
       ! diagnostics and outputs             (ua, va, tsa used as workspace)
       !<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
-      IF( lk_floats  )   CALL flo_stp( kstp )         ! drifting Floats
-      IF( lk_diahth  )   CALL dia_hth( kstp )         ! Thermocline depth (20 degres isotherm depth)
-      IF( .NOT. lk_cpl ) CALL dia_fwb( kstp )         ! Fresh water budget diagnostics
-      IF( lk_diadct  )   CALL dia_dct( kstp )         ! Transports
-      IF( lk_diaar5  )   CALL dia_ar5( kstp )         ! ar5 diag
-      IF( lk_diaharm )   CALL dia_harm( kstp )        ! Tidal harmonic analysis
-                         CALL dia_wri( kstp )         ! ocean model: outputs
-      !
-      IF( ln_crs     )   CALL crs_fld( kstp )         ! ocean model: online field coarsening & output
-
+      IF( lk_floats  )      CALL flo_stp( kstp )         ! drifting Floats
+      IF( lk_diahth  )      CALL dia_hth( kstp )         ! Thermocline depth (20 degres isotherm depth)
+      IF( .NOT. lk_cpl )    CALL dia_fwb( kstp )         ! Fresh water budget diagnostics
+      IF( lk_diadct  )      CALL dia_dct( kstp )         ! Transports
+      IF( lk_diaar5  )      CALL dia_ar5( kstp )         ! ar5 diag
+      IF( lk_diaharm )      CALL dia_harm( kstp )        ! Tidal harmonic analysis
+                            CALL dia_wri( kstp )         ! ocean model: outputs
+      !
+      IF( ln_crs     )      CALL crs_fld( kstp )         ! ocean model: online field coarsening & output
 
 #if defined key_top
@@ -244,5 +243,5 @@
                              CALL tra_ldf    ( kstp )       ! lateral mixing
 
-      IF( l_diaptr       )   CALL dia_ptr                   ! Poleward adv/ldf TRansports diagnostics
+      IF( ln_diaptr      )   CALL dia_ptr                   ! Poleward adv/ldf TRansports diagnostics
 
 #if defined key_agrif
