diff --git a/src/lmdz/ext/output_physiqex_mod.F90 b/src/lmdz/ext/output_physiqex_mod.F90
index f3d4bed35ff0943de3ad2834810831f5a000c13e..e0aac023ea63647b40525aeb2db7b7db3e3e8337 100644
--- a/src/lmdz/ext/output_physiqex_mod.F90
+++ b/src/lmdz/ext/output_physiqex_mod.F90
@@ -4,7 +4,7 @@ MODULE output_physiqex_mod
 
 CONTAINS 
 
-SUBROUTINE output_physiqex(debut,zjulian,pdtphys,presnivs,paprs,u,v,t,qx,cf,zqr,zqs,zqg,ptke)
+SUBROUTINE output_physiqex(debut,zjulian,pdtphys,presnivs,paprs,u,v,t,qx,cf,zqr,zqs,zqg,ptke,theta)
 
       USE dimphy, only : klon,klev
       USE iophy, only : histbeg_phy,histwrite_phy
@@ -25,6 +25,7 @@ real,intent(in) :: presnivs(klev) ! pseudo-pressure (Pa) of mid-layers
 real,intent(in) :: u(klon,klev) ! eastward zonal wind (m/s)
 real,intent(in) :: v(klon,klev) ! northward meridional wind (m/s)
 real,intent(in) :: t(klon,klev) ! temperature (K)
+real,intent(in) :: theta(klon,klev) ! temperature (K)
 real,intent(in) :: paprs(klon,klev+1) ! interlayer pressure (Pa)
 real,intent(in) :: qx(klon,klev,nqtot) !tracers
 real,intent(in) :: cf(klon,klev) !cloud fraction
@@ -54,104 +55,18 @@ print*,'nnnnnnn ',nid_hist,debut,itau
 if(debut)then
 
    call getin_p("iwrite_phys",iwrite_phys)
-   call getin_p("ioex",ioex)
-
-   if ( ioex == 1 ) then
-      CALL iophys_ini(pdtphys)
-   else if ( ioex == 2 ) then
-
-      CALL init_iophy_new(latitude_deg,longitude_deg)
-      dtime=pdtphys
-      itau=0
-      call histbeg_phy("histins.nc",itau,zjulian,dtime,nhori,nid_hist)
-      print*,'NNNNNNN ',nid_hist,debut
-      print*,'NNNNNNN OK0'
-      t_ops=pdtphys*iwrite_phys ! frequency of the IOIPSL operation
-      t_wrt=pdtphys*iwrite_phys ! frequency of the outputs in the file
-      print*,'NNNNNNN OK1'
 
    !$OMP MASTER
-
-#ifndef CPP_IOIPSL_NO_OUTPUT 
-       ! IOIPSL
-       ! define vertical coordinate
-       call histvert(nid_hist,"presnivs","Vertical levels","Pa",klev, &
-                     presnivs,zvertid,'down')
-       ! define variables which will be written in "histins.nc" file
-       call histdef(nid_hist,'Temp','Atmospheric temperature','K', &
-                    nbp_lon,jj_nb,nhori,klev,1,klev,zvertid,32, &
-                    'inst(X)',t_ops,t_wrt)
-       print*,'NNNNNNN OK2a',nid_hist,t_ops,t_wrt
-       call histdef(nid_hist,'u','Eastward Zonal Wind','m/s', &
-                    nbp_lon,jj_nb,nhori,klev,1,klev,zvertid,32, &
-                    'inst(X)',t_ops,t_wrt)
-       print*,'NNNNNNN OK2b',nid_hist,t_ops,t_wrt
-       call histdef(nid_hist,'v','Northward Meridional Wind','m/s', &
-                    nbp_lon,jj_nb,nhori,klev,1,klev,zvertid,32, &
-                    'inst(X)',t_ops,t_wrt)
-       print*,'NNNNNNN OK2c',nid_hist,t_ops,t_wrt
-       call histdef(nid_hist,'ps','Surface Pressure','Pa', &
-                    nbp_lon,jj_nb,nhori,1,1,1,zvertid,32, &
-                    'inst(X)',t_ops,t_wrt)
-
-
-       call histdef(nid_hist,'qv','Water vapor specifiq content', 'kg/kg', &
-                    nbp_lon,jj_nb,nhori,klev,1,klev,zvertid,32, &
-                    'inst(X)',t_ops,t_wrt)
-       call histdef(nid_hist,'qc','Cloud liquid water specifiq content', 'kg/kg', &
-                    nbp_lon,jj_nb,nhori,klev,1,klev,zvertid,32, &
-                    'inst(X)',t_ops,t_wrt)
-       call histdef(nid_hist,'qi','Cloud solid water specifiq content', 'kg/kg', &
-                    nbp_lon,jj_nb,nhori,klev,1,klev,zvertid,32, &
-                    'inst(X)',t_ops,t_wrt)
-       call histdef(nid_hist, 'CF', 'Cloud fraction', '0-1', &
-                     nbp_lon,jj_nb,nhori,klev,1,klev,zvertid,32, &
-                    'inst(X)',t_ops,t_wrt)
-       call histdef(nid_hist, 'qr', 'Rain specifiq content', 'kg/kg', &
-                     nbp_lon,jj_nb,nhori,klev,1,klev,zvertid,32, &
-                    'inst(X)',t_ops,t_wrt)
-       call histdef(nid_hist, 'qs', 'Snow specifiq content', 'kg/kg', &
-                     nbp_lon,jj_nb,nhori,klev,1,klev,zvertid,32, &
-                    'inst(X)',t_ops,t_wrt)
-       call histdef(nid_hist, 'qg', 'Graupel specifiq content', 'kg/kg', &
-                     nbp_lon,jj_nb,nhori,klev,1,klev,zvertid,32, &
-                    'inst(X)',t_ops,t_wrt)
-       call histdef(nid_hist, 'TKE', 'TKE', 'm2/s2', &
-                     nbp_lon,jj_nb,nhori,klev,1,klev,zvertid,32, &
-                    'inst(X)',t_ops,t_wrt)
-
-       ! end definition sequence
-       print*,'NNNNNNN OK2',nid_hist,t_ops,t_wrt
-       call histend(nid_hist)
-       print*,'NNNNNNN OK3'
-#endif
-
-#ifdef CPP_XIOS
-      !XIOS
-          ! Declare available vertical axes to be used in output files:    
-          CALL wxios_add_vaxis("presnivs", klev, presnivs)
-      
-          ! Declare calendar and time step
-          CALL wxios_set_cal(dtime,"earth_360d",1,1,1,0.0,1,1,1,0.0)
-          
-          !Finalize the context:
-          CALL wxios_closedef()
-#endif
-
-      !$OMP END MASTER
-      !$OMP BARRIER
-   endif
+   CALL iophys_ini(pdtphys)
+   !$OMP END MASTER
+   !$OMP BARRIER
 
 endif
 
 
 itau=itau+1
 
-! write some outputs:
-! IOIPSL
-#ifndef CPP_IOIPSL_NO_OUTPUT 
 if (modulo(itau,iwrite_phys)==0) then
-  if ( ioex == 1 ) then
      call iophys_ecrit('temp',klev,'Temperature','K',t)
      call iophys_ecrit('u',klev,'zonal wind','m/s',u)
      call iophys_ecrit('v',klev,'meridinal wind','m/s',v)
@@ -164,50 +79,8 @@ if (modulo(itau,iwrite_phys)==0) then
      call iophys_ecrit('qs',klev,'Snow specifiq content', 'kg/kg', zqs)
      call iophys_ecrit('qg',klev,'Graupel specifiq content', 'kg/kg', zqg)
      call iophys_ecrit('TKE',klev,'TKE', 'm2/s2', ptke)
-  else if ( ioex == 2 ) then
-     call histwrite_phy(nid_hist,.false.,"Temp",itau,t)
-     call histwrite_phy(nid_hist,.false.,"u",itau,u)
-     call histwrite_phy(nid_hist,.false.,"v",itau,v)
-     call histwrite_phy(nid_hist,.false.,"ps",itau,paprs(:,1))
-     call histwrite_phy(nid_hist,.false.,"qv",itau,qx(:,:,1))
-     call histwrite_phy(nid_hist,.false.,"qc",itau,qx(:,:,2))
-     call histwrite_phy(nid_hist,.false.,"qi",itau,qx(:,:,3))
-     call histwrite_phy(nid_hist,.false.,'CF',itau,cf)
-     call histwrite_phy(nid_hist,.false.,'qr',itau,zqr)
-     call histwrite_phy(nid_hist,.false.,'qs',itau,zqs)
-     call histwrite_phy(nid_hist,.false.,'qg',itau,zqg)
-     call histwrite_phy(nid_hist,.false.,'qg',itau,ptke)
-     !$OMP MASTER
-     CALL histsync(nid_hist)
-     !$OMP END MASTER
-  endif
+     call iophys_ecrit('theta',klev,'Temperature potentielle', 'K', theta)
 endif
-#endif
-
-!XIOS
-#ifdef CPP_XIOS
-   !$OMP MASTER
-       !Increment XIOS time
-       CALL xios_update_calendar(itau)
-   !$OMP END MASTER
-   !$OMP BARRIER
-   
-       !Send fields to XIOS: (NB these fields must also be defined as
-       ! <field id="..." /> in iodef.xml to be correctly used
-       CALL histwrite_phy("Temp",t)
-       CALL histwrite_phy("temp_newton",temp_newton)
-       CALL histwrite_phy("u",u)
-       CALL histwrite_phy("v",v)
-       CALL histwrite_phy("ps",paprs(:,1))
-       CALL histwrite_phy("qv",qx(:,:,1))
-       CALL histwrite_phy("qc",qx(:,:,2))
-       CALL histwrite_phy("qi",qx(:,:,3))
-       CALL histwrite_phy("CF",cf)
-       CALL histwrite_phy("qr",zqr)
-       CALL histwrite_phy("qs",zqs)
-       CALL histwrite_phy("qg",zqg)
-       CALL histwrite_phy("TKE",ptke)
-#endif
 
 
 END SUBROUTINE output_physiqex
diff --git a/src/lmdz/ext/physiqex_mod.F90 b/src/lmdz/ext/physiqex_mod.F90
index 59ab075c1295389c21d4b425a26731a35875fc45..8fd767bbf6b4510903167841c6e3e27e19364bed 100644
--- a/src/lmdz/ext/physiqex_mod.F90
+++ b/src/lmdz/ext/physiqex_mod.F90
@@ -421,6 +421,7 @@ d_v(1:klon,1)=d_v(1:klon,1)-v(1:klon,1)/86400.
 ! Flux ARMCU
 PSFTH(:) = -fsens/1000.
 PSFRV(:) = -flat/(2.5e6)
+print*, "SRRRRflux", PSFTH(1), PSFRV(1)
 !
 PSFSV(:,:) = 0.
 PSFU(:) = 0.
@@ -548,7 +549,7 @@ PTKEM(:,2:klev+1)=PTKEM(:,2:klev+1)+d_tke(:,:)*pdtphys
 ! Entrees sorties
 !------------------------------------------------------------
 
-call output_physiqex(debut,zjulian,pdtphys,presnivs,paprs,u,v,t,qx,ZCLDFR,ZQR,ZQS,ZQG,PTKEM)
+call output_physiqex(debut,zjulian,pdtphys,presnivs,paprs,u,v,t,qx,ZCLDFR,ZQR,ZQS,ZQG,PTKEM,ZTHETA)
 
 ! if lastcall, then it is time to write "restartphy.nc" file
 if (lafin) then
diff --git a/src/lmdz/lmdz_version.json b/src/lmdz/lmdz_version.json
index 2aef852a86f9d562bffec1efb065891b887de7a9..854cb33491c811619fbb31bdae5eec8736db9a83 100644
--- a/src/lmdz/lmdz_version.json
+++ b/src/lmdz/lmdz_version.json
@@ -1,5 +1,5 @@
 {
-"version":"20230522.trunk",
+"version":"20230529.trunk",
 "install_arg":"-unstable",
 "rad":"oldrad"
 }