Index: CONFIG/UNIFORM/v7/IPSLCM7/EXPERIMENTS/IPSLCM-reg/piControl_TEST.orch4/COMP/lmdz.card
===================================================================
--- CONFIG/UNIFORM/v7/IPSLCM7/EXPERIMENTS/IPSLCM-reg/piControl_TEST/COMP/lmdz.card	(revision 6855)
+++ CONFIG/UNIFORM/v7/IPSLCM7/EXPERIMENTS/IPSLCM-reg/piControl_TEST.orch4/COMP/lmdz.card	(revision 6870)
@@ -82,5 +82,5 @@
         (${SUBMIT_DIR}/PARAM/LMDZ/guide.def, .),                                 \
         (${SUBMIT_DIR}/PARAM/LMDZ/run.def, .),                                   \
-        (${SUBMIT_DIR}/PARAM/LMDZ/traceur.def, .),                               \
+        (${SUBMIT_DIR}/PARAM/LMDZ/tracer.def, .),                               \
         (${SUBMIT_DIR}/PARAM/LMDZ/ping_LMDZ.xml, ping_lmdz.xml ),                \
 	(${SUBMIT_DIR}/PARAM/LMDZ/dr2xml_IPSL_LMDZ.xml, dr2xml_lmdz.xml ),            \
@@ -110,5 +110,5 @@
 
 [OutputText]
-List=   (physiq.def, gcm.def, run.def, traceur.def, guide.def, config.def, vert.def, used_run.def, iodef.xml, context_lmdz.xml, field_def_lmdz.xml, file_def_*lmdz.xml, debug_notroot.01, debug.root.01, lmdz.prt, out_lmdz.x.err, out_lmdz.x.out)
+List=   (physiq.def, gcm.def, run.def, tracer.def, guide.def, config.def, vert.def, used_run.def, iodef.xml, context_lmdz.xml, field_def_lmdz.xml, file_def_*lmdz.xml, debug_notroot.01, debug.root.01, lmdz.prt, out_lmdz.x.err, out_lmdz.x.out)
 
 [OutputFiles]
Index: CONFIG/UNIFORM/v7/IPSLCM7/EXPERIMENTS/IPSLCM-reg/piControl_TEST.orch4/COMP/orchidee.card
===================================================================
--- CONFIG/UNIFORM/v7/IPSLCM7/EXPERIMENTS/IPSLCM-reg/piControl_TEST/COMP/orchidee.card	(revision 6855)
+++ CONFIG/UNIFORM/v7/IPSLCM7/EXPERIMENTS/IPSLCM-reg/piControl_TEST.orch4/COMP/orchidee.card	(revision 6870)
@@ -3,4 +3,8 @@
 
 [UserChoices]
+# Select the PFT and age class set-up. NOTE: the number of PFTs should match the 
+# number in the land cover and maps. The number of age classes does not affect the
+# maps that can be used.
+DefSuffix = 15pft.1ac
 
 # VEGET_UPDATE_at_start=y : orchidee.driver will set VEGET_UPDATE=1Y at the first cumul period when starting a new simulation. 
@@ -11,4 +15,11 @@
 # VEGET_UPDATE=1Y : update the vegetation and woodharvest file 1st of January each year
 VEGET_UPDATE=0Y
+
+# Choice for routing scheme. Set ROUTING below to have following parameters set in orchidee.def : 
+# ROUTING=standard   => in orchidee.def RIVER_ROUTING=y and ROUTING_METHOD=standard
+# ROUTING=simple     => in orchidee.def RIVER_ROUTING=y and ROUTING_METHOD=simple
+# ROUTING=native     => in orchidee.def RIVER_ROUTING=y and ROUTING_METHOD=native (note: routing_simple.nc is used also for this case)
+# ROUTING=off        => in orchidee.def RIVER_ROUTING=n 
+ROUTING=simple
 
 # Specify output level for output files
@@ -25,20 +36,17 @@
 output_freq_sechiba_history = 1mo
 output_freq_sechiba_out_2 = 1d
-output_freq_sechiba_history_4dim = 1d
-
+output_freq_sechiba_history_4dim = 1mo
 
 [InitialStateFiles]
-List=   (${R_IN}/SRF/SOIL/soils_param_zobler_coord.nc, soils_param.nc ), \
-        (${R_IN}/SRF/SOIL/soils_param_zobler_coord.nc, soilcolor.nc ), \
-	(${R_IN}/SRF/reftemp.nc, . ), \
-	(${R_IN}/SRF/routing.nc, . ), \
-        (${R_IN}/SRF/albedo/alb_bg_modisopt_2D_ESA_v2.nc, alb_bg.nc ), \
-        (${R_IN}/SRF/cartepente2d_15min.nc, .)
+List=       (${R_IN}/SRF/SOIL/soil_bulk_and_ph.nc, .), \
+            (${R_IN}/SRF/SOIL/soils_param_usda_with_clay_oxisol_coord.nc, soils_param.nc), \
+            (${R_IN}/SRF/SOIL/soils_param_zobler_coord.nc, soilcolor.nc), \
+            (${R_IN}/SRF/cartepente2d_15min4.nc, cartepente2d_15min.nc), \
+            (${R_IN}/SRF/reftemp4.nc, reftemp.nc), \
+            (${R_IN}/SRF/PFTMAPS/CMIP6/ESA-LUH2v2/historical/15PFT.v2023.1/PFTmap_1700.nc, PFTmap.nc)
 
 [BoundaryFiles]
-List= ()
-ListNonDel= (${R_IN}/SRF/PFTMAPS/CMIP6/ESA-LUH2v2/historical/15PFT.v1/PFTmap_1850.nc, PFTmap.nc),\
-            (${R_IN}/SRF/WOODHARVEST/LUH2v2/historical/woodharvest_1850.nc,           woodharvest.nc)
-
+List=   ()
+ListNonDel= (${R_IN}/SRF/ROUTING/routing_simple.nc, .)
 
 [SmoothFiles]
@@ -46,24 +54,27 @@
 
 [ParametersFiles]
-List=	(${SUBMIT_DIR}/PARAM/ORCHIDEE/orchidee.def_v22, orchidee.def)   ,\
-    (${SUBMIT_DIR}/PARAM/ORCHIDEE/ping_orchidee.xml, . )                       ,\
-	(${SUBMIT_DIR}/PARAM/ORCHIDEE/dr2xml_IPSL_orchidee.xml, dr2xml_orchidee.xml)                    ,\
-	(${MODIPSL}/modeles/ORCHIDEE_2_2/src_xml/file_def_orchidee.xml, .)  ,\
-	(${MODIPSL}/modeles/ORCHIDEE_2_2/src_xml/context_input_orchidee.xml, .) ,\
-	(${MODIPSL}/modeles/ORCHIDEE_2_2/src_xml/context_orchidee.xml, .)   ,\
-	(${MODIPSL}/modeles/ORCHIDEE_2_2/src_xml/field_def_orchidee.xml, .)
+List=   (${SUBMIT_DIR}/PARAM/ORCHIDEE/orchidee.def_v4, orchidee.def)   ,\
+        (${SUBMIT_DIR}/PARAM/ORCHIDEE/orchidee_pft.def_${DefSuffix}_v4, orchidee_pft.def) ,\
+        (${MODIPSL}/modeles/ORCHIDEE_4/src_xml/file_def_orchidee.xml, .)  ,\
+        (${MODIPSL}/modeles/ORCHIDEE_4/src_xml/context_input_orchidee.xml, .) ,\
+        (${MODIPSL}/modeles/ORCHIDEE_4/src_xml/context_orchidee.xml, .)   ,\
+        (${MODIPSL}/modeles/ORCHIDEE_4/src_xml/context_routing_orchidee.xml, .)   ,\
+        (${MODIPSL}/modeles/ORCHIDEE_4/src_xml/field_def_orchidee.xml, .)
 
 [RestartFiles]
-List=	(sechiba_rest_out.nc, sechiba_rest.nc, sechiba_rest_in.nc)
+List=   (sechiba_rest_out.nc, sechiba_rest.nc, sechiba_rest_in.nc) ,\
+        (routing_restart.nc, routing_restart.nc, routing_start.nc)
 
 [OutputText]
-List=   (out_orchidee*, orchidee.def, used_orchidee.def, iodef.xml, context_orchidee.xml, field_def_orchidee.xml, file_def_orchidee.xml, context_input_orchidee.xml, river_desc.nc)
+List=   (out_orchidee*, orchidee.def, orchidee_pft.def, used_orchidee.def, used_orchidee_pft.def, iodef.xml, context_orchidee.xml, context_input_orchidee.xml, context_routing_orchidee.xml, field_def_orchidee.xml, file_def_orchidee.xml, river_desc.nc)
 
 [OutputFiles]
-List=   (sechiba_history.nc,   ${R_OUT_SRF_O_M}/${PREFIX}_1M_sechiba_history.nc, Post_1M_sechiba_history), \
-        (sechiba_history_4dim.nc,${R_OUT_SRF_O_M}/${PREFIX}_1M_sechiba_history_4dim.nc, NONE), \
-        (sechiba_out_2.nc,     ${R_OUT_SRF_O_H}/${PREFIX}_HF_sechiba_out_2.nc,   NONE), \
+List=   (sechiba_history.nc,      ${R_OUT_SRF_O_M}/${PREFIX}_1M_sechiba_history.nc, Post_1M_sechiba_history), \
+        (sechiba_history_4dim.nc, ${R_OUT_SRF_O_M}/${PREFIX}_1M_sechiba_history_4dim.nc, NONE), \
+        (sechiba_out_2.nc,        ${R_OUT_SRF_O_H}/${PREFIX}_HF_sechiba_out_2.nc,   NONE), \
         (ORCHIDEE_interp_diag.nc, ${R_OUT_SRF_O_D}/${PREFIX}_ORCHIDEE_interp_diag.nc, NONE), \
-        (forcing_by_ORCHIDEE.nc, ${R_OUT_SRF_O_H}/${PREFIX}_forcing_by_ORCHIDEE.nc, NONE)
+        (forcing_by_ORCHIDEE.nc,  ${R_OUT_SRF_O_H}/${PREFIX}_forcing_by_ORCHIDEE.nc, NONE), \
+        (diag_routing.nc,         ${R_OUT_SRF_O_D}/${PREFIX}_1D_sechiba_routing.nc, NONE),\
+        (diag_routing_r.nc,       ${R_OUT_SRF_O_D}/${PREFIX}_1D_sechiba_routing_r.nc, NONE)
 
 
Index: CONFIG/UNIFORM/v7/IPSLCM7/EXPERIMENTS/IPSLCM-reg/piControl_TEST.orch4/COMP/stomate.card
===================================================================
--- CONFIG/UNIFORM/v7/IPSLCM7/EXPERIMENTS/IPSLCM-reg/piControl_TEST/COMP/stomate.card	(revision 6855)
+++ CONFIG/UNIFORM/v7/IPSLCM7/EXPERIMENTS/IPSLCM-reg/piControl_TEST.orch4/COMP/stomate.card	(revision 6870)
@@ -3,4 +3,12 @@
 
 [UserChoices]
+# NINPUT_UPDATE=1Y: change in nitrogen input maps every year. 
+# Nitrogen input maps should be set in BoundaryFiles/List for 1Y or in InitialStateFile for 0Y.
+NINPUT_UPDATE=0Y
+
+# STOMATE_IMPOSE_CN: impose nitrogen
+# If STOMATE_IMPOSE_CN=y the file leaf_cn.nc must be available except if STOMATE_READ_CN=n
+# If STOMATE_IMPOSE_CN=n the other N-input files are needed, see commented files below
+STOMATE_IMPOSE_CN=n
 
 # Specify output level for output files
@@ -17,10 +25,15 @@
 output_freq_stomate_ipcc_history = 1mo
 
-
 [InitialStateFiles]
-List=   ()
+List=   (${R_IN}/SRF/NITROGEN/N_FERTILISATION/NMIP2/synthetic/historical/nfer_crop_nh4_1850.nc, Nfert_ammo_cropland.nc) ,\
+        (${R_IN}/SRF/NITROGEN/N_FERTILISATION/NMIP2/synthetic/historical/nfer_crop_no3_1850.nc, Nfert_nitr_cropland.nc) ,\
+        (${R_IN}/SRF/NITROGEN/N_FERTILISATION/NMIP2/synthetic/historical/nfer_pas_nh4_1850.nc,  Nfert_ammo_pasture.nc) ,\
+        (${R_IN}/SRF/NITROGEN/N_FERTILISATION/NMIP2/synthetic/historical/nfer_pas_no3_1850.nc,  Nfert_nitr_pasture.nc) ,\
+        (${R_IN}/SRF/NITROGEN/N_DEPOSITION/CMIP6.2/historical/nhx__1850.nc, Nammonium.nc), \
+        (${R_IN}/SRF/NITROGEN/N_DEPOSITION/CMIP6.2/historical/noy__1850.nc, Nnitrate.nc), \
+        (${R_IN}/SRF/NITROGEN/BNF/bnf_1850.nc, bnf.nc)
 
 [BoundaryFiles]
-List=   ()
+List= ()
 ListNonDel= ()
 
@@ -39,21 +52,24 @@
 [OutputFiles]
 List=   (stomate_history.nc,      ${R_OUT_SBG_O_M}/${PREFIX}_1M_stomate_history.nc,      Post_1M_stomate_history),    \
-        (stomate_ipcc_history.nc, ${R_OUT_SBG_O_M}/${PREFIX}_1M_stomate_ipcc_history.nc, Post_1M_stomate_ipcc_history)
+        (stomate_ipcc_history.nc, ${R_OUT_SBG_O_M}/${PREFIX}_1M_stomate_ipcc_history.nc, Post_1M_stomate_ipcc_history), \
+        (stomate_history_4dim.nc, ${R_OUT_SBG_O_M}/${PREFIX}_1M_stomate_history_4dim.nc, NONE), \
+        (stomate_fixed_dia.nc, ${R_OUT_SBG_O_Y}/${PREFIX}_1Y_stomate_fixed_dia.nc, NONE)
 
-[Post_1M_stomate_history]
-Patches = ()
-GatherWithInternal = (lon, lat, Areas, CONTFRAC, time_counter, time_centered, time_centered_bounds)
-TimeSeriesVars2D = (CONVFLUX,CFLUX_PROD10,CFLUX_PROD100,HARVEST_ABOVE,WOOD_HARVEST)
+[Post_1Y_stomate_history]
+Patches= ()
+GatherWithInternal= (lon, lat, time_counter, Areas, CONTFRAC)
+TimeSeriesVars2D= (T2M_MONTH,RESOLUTION_X,RESOLUTION_Y,FLUX_PROD_S_LCC_c,FLUX_PROD_M_LCC_c,FLUX_PROD_L_LCC_c,FLUX_PROD_S_HARVEST_c,FLUX_PROD_M_HARVEST_c,FLUX_PROD_L_HARVEST_c)
 ChunckJob2D = NONE
-TimeSeriesVars3D = (VEGET_COV_MAX,NPP,GPP,HET_RESP,MAINT_RESP,GROWTH_RESP,TOTAL_M,TOTAL_BM_LITTER,TOTAL_SOIL_CARB,WOOD_HARVEST_PFT)
+TimeSeriesVars3D= (LAI_MEAN,VEGET_MAX,NPP,GPP,HET_RESP,MAINT_RESP,GROWTH_RESP,TOTAL_M_n,TOTAL_M_c,TOTAL_BM_LITTER_c,TOTAL_BM_LITTER_n,ADAPTATION,REGENERATION,SOIL_ACTIVE_c,SOIL_ACTIVE_n,SOIL_SLOW_c,SOIL_SLOW_n,SOIL_PASSIVE_c,SOIL_PASSIVE_n,SOIL_SURF_c,SOIL_SURF_n,LITTER_STR_AB_c,LITTER_STR_AB_n,LITTER_STR_BE_c,LITTER_STR_BE_n,LITTER_MET_AB_c,LITTER_MET_AB_n,LITTER_MET_BE_c,LITTER_MET_BE_n,LITTER_WOD_AB_c,LITTER_WOD_AB_n,LITTER_WOD_BE_c,LITTER_WOD_BE_n,TOTAL_TURN_c,TOTAL_TURN_n,LEAF_M_n,LEAF_M_c,N_UPTAKE_NO3,N_UPTAKE_NH4,NH3_EMISSION,N2_EMISSION,N2O_EMISSION,NOX_EMISSION,NBP_pool_c,NBP_flux_c,MBC_NBP1_c,MBC_NBP1_n,MBC_NBP2_c,MBC_NBP2_n)
 ChunckJob3D = NONE
-Seasonal = ON
+Seasonal=ON
 
-[Post_1M_stomate_ipcc_history]
-Patches = ()
-GatherWithInternal = (lon, lat, Areas, CONTFRAC, time_counter, time_centered, time_centered_bounds)
-TimeSeriesVars2D = (cProduct, lai, gpp, ra, fLuc, nbp, fVegLitter, fLitterSoil, cLeaf, cWood, cRoot, cMisc, cLitterAbove, cLitterBelow, cSoilFast, cSoilMedium, cSoilSlow, cMassVariation, treeFracPrimDec, treeFracPrimEver, c3PftFrac, c4PftFrac, rGrowth, rMaint, nppLeaf, nppWood, nppRoot, nep, fWoodharvest, cVegCrop, cLitterCrop, cSoilCrop, nppCrop, raCrop)
+[Post_1Y_stomate_ipcc_history]
+Patches= ()
+GatherWithInternal= (lon, lat, time_counter, Areas, CONTFRAC)
+TimeSeriesVars2D=(cVeg, cLitter, cSoil, cProduct, cMassVariation, lai, gpp, ra, npp, rh, fFire, fHarvest, fLuc, nbp_c, nbp_n, fVegLitter, fLitterSoil, cLeaf, cWood, cRoot, cMisc, cLitterAbove, cLitterBelow, cSoilFast, cSoilMedium, cSoilSlow, landCoverFrac, treeFracPrimDec, treeFracPrimEver, c3PftFrac, c4PftFrac, rGrowth, rMaint, nppLeaf, nppWood, nppRoot, nep_c, nep_n, fWoodharvest)
 ChunckJob2D = NONE
-TimeSeriesVars3D = ()
+TimeSeriesVars3D=()
 ChunckJob3D = NONE
-Seasonal = ON
+Seasonal=ON
+
