Index: /LMDZ6/branches/Portage_acc/libf/phylmd/physiq_mod.F90
===================================================================
--- /LMDZ6/branches/Portage_acc/libf/phylmd/physiq_mod.F90	(revision 4134)
+++ /LMDZ6/branches/Portage_acc/libf/phylmd/physiq_mod.F90	(revision 4135)
@@ -21,31 +21,32 @@
 
     USE ACAMA_GWD_rando_m, only: ACAMA_GWD_rando
-    USE aero_mod
+!    USE aero_mod
     USE add_phys_tend_mod, only : add_pbl_tend, add_phys_tend, diag_phys_tend, prt_enerbil, &
   &      fl_ebil, fl_cor_ebil
     USE assert_m, only: assert
-    USE change_srf_frac_mod
+    USE change_srf_frac_mod, only : change_srf_frac
     USE conf_phys_m, only: conf_phys
     USE carbon_cycle_mod, ONLY : infocfields_init, RCO2_glo, carbon_cycle_rad
-    USE CFMIP_point_locations   ! IM stations CFMIP
-    USE cmp_seri_mod
-    USE dimphy
-    USE etat0_limit_unstruct_mod
+    USE CFMIP_point_locations, ONLY : read_CFMIP_point_locations, LMDZ_CFMIP_point_locations
+    USE cmp_seri_mod, ONLY : init_cmp_seri
+    USE dimphy, ONLY : klon, klev, klevp1
+    USE etat0_limit_unstruct_mod, ONLY : create_etat0_limit,init_etat0_limit_unstruct, create_etat0_limit_unstruct 
     USE FLOTT_GWD_rando_m, only: FLOTT_GWD_rando
     USE fonte_neige_mod, ONLY  : fonte_neige_get_vars
     USE geometry_mod, ONLY: cell_area, latitude_deg, longitude_deg, longitude,latitude, &
          boundslon,boundslat, dx, dy, ind_cell_glo
+    USE indice_sol_mod, ONLY: nbsrf,is_ave, is_ter, is_oce, is_lic, is_sic 
     USE ioipsl, only: histbeg, histvert, histdef, histend, histsync, &
-         histwrite, ju2ymds, ymds2ju, getin
+         histwrite, ju2ymds, ymds2ju
     USE ioipsl_getin_p_mod, ONLY : getin_p
-    USE indice_sol_mod
+!    USE indice_sol_mod
     USE infotrac_phy, ONLY: nqtot, nbtr, nqo, tracers, type_trac, nqCO2
     USE readTracFiles_mod, ONLY: addPhase
     USE strings_mod,  ONLY: strIdx
-    USE iophy
+    USE iophy, ONLY : init_iophy_new
     USE limit_read_mod, ONLY : init_limit_read
     USE mod_grid_phy_lmdz, ONLY: nbp_lon, nbp_lat, nbp_lev, klon_glo, grid1dTo2d_glo, grid_type, unstructured
     USE mod_phys_lmdz_mpi_data, only: is_mpi_root
-    USE mod_phys_lmdz_para
+    USE mod_phys_lmdz_para, ONLY : is_master, is_sequential, is_omp_master
     USE netcdf95, only: nf95_close
     USE netcdf, only: nf90_fill_real     ! IM for NMC files
@@ -59,7 +60,63 @@
 !!  USE phys_local_var_mod, ONLY : a long list of variables
 !!              ==> see below, after "CPP Keys" section
-    USE phys_state_var_mod ! Variables sauvegardees de la physique
-    USE phys_output_mod
-    USE phys_output_ctrlout_mod
+    USE phys_output_mod, ONLY: nfiles, itau_con, zustr_gwd_hines, zvstr_gwd_hines, zustr_gwd_front, zvstr_gwd_front
+    USE phys_output_mod, ONLY: zustr_gwd_rando, zvstr_gwd_rando, ecrit_files, sza_o, swaerofree_diag, swaero_diag
+    USE phys_output_mod, ONLY: dryaod_diag, ok_4xco2atm, map_prop_hc, map_prop_hist, map_emis_hc, map_iwp_hc
+    USE phys_output_mod, ONLY: map_deltaz_hc, map_pcld_hc, map_tcld_hc, map_emis_cb, map_pcld_cb, map_tcld_cb, map_emis_thci
+    USE phys_output_mod, ONLY: map_pcld_thci, map_tcld_thci, map_emis_anv, map_pcld_anv, map_tcld_anv, map_emis_hist
+    USE phys_output_mod, ONLY: map_iwp_hist, map_deltaz_hist, map_rad_hist, map_ntot, map_hc, map_hist
+    USE phys_output_mod, ONLY: map_cb, map_thci, map_anv, alt_tropo
+    USE phys_output_mod, ONLY: phys_output_var_init, phys_output_open
+    USE phys_output_ctrlout_mod, ONLY: naero_grp, id_strat_phy
+!    USE phys_output_ctrlout_mod
+!    USE phys_output_mod
+    USE phys_state_var_mod, ONLY :  nlevstd3, nlevstd, nlevstd8, nout ! Variables sauvegardees de la physique
+    USE phys_state_var_mod, ONLY : wght_th, lalim_conv, ustar, rain_con,  snow_con
+    USE phys_state_var_mod, ONLY : topswai, topswad, solswai,  solswad, ccm, tau_aero
+    USE phys_state_var_mod, ONLY : piz_aero,  cg_aero, rnebcon0,  rnebcon,  clwcon0
+    USE phys_state_var_mod, ONLY : clwcon,  pbl_tke, pctsrf, zuthe, zvthe, sollwdown
+    USE phys_state_var_mod, ONLY : tr_ancien, ftsol, u_ancien, v_ancien, t_ancien
+    USE phys_state_var_mod, ONLY : q_ancien, ql_ancien, qs_ancien, prw_ancien, prlw_ancien
+    USE phys_state_var_mod, ONLY : prsw_ancien, wo, ema_cbmf, ema_pcb, ema_pct, ibas_con, itop_con
+    USE phys_state_var_mod, ONLY : rugoro, swradcorr, wake_s, wake_deltat, wake_deltaq
+    USE phys_state_var_mod, ONLY : gustiness, ale_bl, ale_wake, ale_bl_stat, coefh, coefm 
+    USE phys_state_var_mod, ONLY : fevap, z0m, z0h, agesno, falb_dif, u10m, v10m 
+    USE phys_state_var_mod, ONLY :
+    USE phys_state_var_mod, ONLY : albsol_dir, falb_dir, albsol_dir, ftd
+    USE phys_state_var_mod, ONLY : rain_fall, snow_fall, solsw,   solswfdiff, sollw
+    USE phys_state_var_mod, ONLY : wake_cstar, wstar, beta_aridity, albsol_dif,  delta_tsurf
+    USE phys_state_var_mod, ONLY : wake_dens, qsol, wake_delta_pbl_TKE, treedrg
+    USE phys_state_var_mod, ONLY : fqd, wd, wake_fip, clwcon0th, zmax0 
+    USE phys_state_var_mod, ONLY : ratqs, pfrac_impa, pfrac_nucl, pfrac_1nucl
+    USE phys_state_var_mod, ONLY : zqasc, fm_therm, tau_aero_sw_rrtm, tau_aero_lw_rrtm
+    USE phys_state_var_mod, ONLY : piz_aero_sw_rrtm, albsol1, albsol2, falb1, falb2
+    USE phys_state_var_mod, ONLY : cg_aero_sw_rrtm
+    USE phys_state_var_mod, ONLY : heat,heat0,cool,cool0,albpla
+    USE phys_state_var_mod, ONLY : heat_volc,cool_volc, topsw,toplw
+    USE phys_state_var_mod, ONLY : topsw0,toplw0,solsw0,sollw0, lwdnc0, lwdn0, lwdn
+    USE phys_state_var_mod, ONLY : lwupc0, lwup0, lwup, swdnc0, swdn0, swdn, swupc0
+    USE phys_state_var_mod, ONLY : swup0, swup
+    USE phys_state_var_mod, ONLY : heatp,heat0p,coolp,cool0p,albplap
+    USE phys_state_var_mod, ONLY : topswp,toplwp, solswp, solswfdiffp,sollwp, sollwdownp
+    USE phys_state_var_mod, ONLY : topsw0p,toplw0p,solsw0p,sollw0p, lwdnc0p, lwdn0p, lwdnp
+    USE phys_state_var_mod, ONLY : lwupc0p, lwup0p, lwupp, swdnc0p, swdn0p, swdnp, swupc0p
+    USE phys_state_var_mod, ONLY : swup0p, swupp
+    USE phys_state_var_mod, ONLY : radsol, du_gwd_front, du_gwd_rando, nday_rain, total_rain
+    USE phys_state_var_mod, ONLY : tsumstd, qsumstd, rhsumstd, phisumstd, usumstd, vsumstd
+    USE phys_state_var_mod, ONLY : wsumstd, tlevstd, qlevstd, rhlevstd, philevstd
+    USE phys_state_var_mod, ONLY : ulevstd, vlevstd, wlevstd, tlevstd, qlevstd
+    USE phys_state_var_mod, ONLY : rneb_ancien, phys_tstep, cin, pbase, radpas, cvpas_0
+    USE phys_state_var_mod, ONLY : cvpas, wkpas, zstd, zsig, zgam, zthe, ancien_ok, wake_pe
+    USE phys_state_var_mod, ONLY : ale_bl_trig, alp_bl, ale, alp, sig1, w01, sigd
+    USE phys_state_var_mod, ONLY : ma, mipsh, cape, bbase, qcondc, qtc_cv, sigt_cv
+    USE phys_state_var_mod, ONLY : cv_gen, awake_dens, entr_therm, detr_therm, f0
+    USE phys_state_var_mod, ONLY : rnebcon0th, ratqs_inter, radsolp, zpic, zmea, zval
+    USE phys_state_var_mod, ONLY : uvstd, vqstd, vtstd, wqstd, vphistd
+    USE phys_state_var_mod, ONLY : wtstd, u2std, v2std, t2std, o3std, o3daystd, swdn200clr
+    USE phys_state_var_mod, ONLY : swdn200, swup200clr, swup200, lwdn200clr, lwdn200
+    USE phys_state_var_mod, ONLY : lwup200clr, lwup200, tnondef
+    USE phys_state_var_mod, ONLY : phys_state_var_init
+
+    
     USE print_control_mod, ONLY: mydebug=>debug , lunout, prt_level, &
          alert_first_call, call_alert, prt_alerte
@@ -75,7 +132,7 @@
     USE tropopause_m,     ONLY: dyn_tropopause
     USE ice_sursat_mod,  ONLY: flight_init, airplane
-    USE vampir
+!    USE vampir
     USE VERTICAL_LAYERS_MOD, ONLY: aps,bps, ap, bp
-    USE write_field_phy
+    USE write_field_phy, ONLY : writefield_phy
     USE lscp_mod, ONLY : lscp
     USE wake_ini_mod, ONLY : wake_ini
@@ -111,5 +168,5 @@
 
 
-#ifdef CPP_StratAer
+ #ifdef CPP_StratAer
     USE strataer_mod, ONLY: strataer_init
 #endif
@@ -1619,5 +1676,5 @@
        ! in the output files. Only at the end in the opposite case
        ok_sync_omp=.FALSE.
-       CALL getin('ok_sync',ok_sync_omp)
+       CALL getin_p('ok_sync',ok_sync_omp)
        CALL phys_output_open(longitude_deg,latitude_deg,nCFMIP,tabijGCM, &
             iGCM,jGCM,lonGCM,latGCM, &
