--- trunk/libf/dyn3d/gcm.f90 2008/08/07 12:29:13 18 +++ trunk/libf/dyn3d/gcm.f90 2010/03/25 14:29:07 27 @@ -15,32 +15,29 @@ ! Pour Van-Leer plus vapeur d'eau saturée : iadv(1)=4 ! Pour Van-Leer : iadv=10 - USE IOIPSL, only: ioconf_calendar, histclo - use dimens_m, only: iim, jjm, llm, nqmx - use dimphy, only: klon - use paramet_m, only: ip1jm, ip1jmp1 - use comconst, only: daysec, cpp, dtvr, dtphys, g, rad, r, initialize - - use comdissnew, only: lstardis, nitergdiv, nitergrot, niterh, tetagdiv, & - tetagrot, tetatemp - + use abort_gcm_m, only: abort_gcm + use clesphys2, only: read_clesphys2 + use com_io_dyn, only: histid, histvid, histaveid + use comconst, only: daysec, cpp, dtvr, g, rad, r, initialize + use comgeom, only: rlatu, aire_2d, cu_2d, cv_2d, rlonv use conf_gcm_m, only: day_step, iperiod, anneeref, dayref, iecri, iphysiq, & nday, raz_date, periodav, conf_gcm - - use logic, only: iflag_phys - use comgeom, only: rlatu, aire_2d, cu_2d, cv_2d, rlonv - use temps, only: day_ref, annee_ref, day_ini, day_end, itau_dyn - use com_io_dyn, only: histid, histvid, histaveid - use tracstoke, only: istdyn, istphy - use abort_gcm_m, only: abort_gcm - use inithist_m, only: inithist - use initdynav_m, only: initdynav - use dynetat0_m, only: dynetat0 + use dimens_m, only: iim, jjm, llm, nqmx + use dimphy, only: klon + use dynetat0_m, only: dynetat0, day_ini + use dynredem0_m, only: dynredem0 use grid_change, only: dyn_phy, init_dyn_phy use iniadvtrac_m, only: iniadvtrac + use inidissip_m, only: inidissip + use inigeom_m, only: inigeom + use initdynav_m, only: initdynav + use inithist_m, only: inithist + USE IOIPSL, only: ioconf_calendar, histclo use leapfrog_m, only: leapfrog - use dynredem0_m, only: dynredem0 - use clesphys2, only: read_clesphys2 + use logic, only: iflag_phys + use paramet_m, only: ip1jm, ip1jmp1 + use temps, only: day_ref, annee_ref, day_end, itau_dyn + use tracstoke, only: istdyn, istphy IMPLICIT NONE @@ -56,15 +53,12 @@ REAL phis(iim + 1, jjm + 1) ! géopotentiel au sol ! Variables pour le fichier histoire : - REAL time_0 - - !!INTEGER i + REAL time_0 ! time in day, as a fraction of day, in [0, 1[ ! Calendrier : LOGICAL:: true_calendar = .false. ! default value ! Variables pour l'initialisation de la physique : - integer nq REAL zcufi(klon), zcvfi(klon) ! "cu" and "cv" values on the scalar grid REAL latfi(klon), lonfi(klon) REAL airefi(klon) @@ -97,7 +91,7 @@ ! Initialisation des traceurs ! Choix du schéma pour l'advection dans le fichier "traceur.def" ou via INCA - call iniadvtrac(nq) + call iniadvtrac ! Lecture du fichier "start.nc" : CALL dynetat0(vcov, ucov, teta, q, masse, ps, phis, time_0) @@ -152,10 +146,7 @@ ! Initialisation du filtre : CALL inifilr - ! Initialisation de la dissipation : - CALL inidissip(lstardis, nitergdiv, nitergrot, niterh, tetagdiv, tetagrot, & - tetatemp) - + CALL inidissip call init_dyn_phy ! Initialisation de la physique : @@ -185,7 +176,6 @@ zcufi, zcvfi, rad, g, r, cpp) ENDIF - ! Numéro de stockage pour les fichiers de redémarrage : ! Initialisation des entrées-sorties : day_end = day_ini + nday print *, "day_ini = ", day_ini @@ -193,17 +183,16 @@ CALL dynredem0("restart.nc", day_end, phis) CALL inithist(day_ref, annee_ref, zdtvr, nqmx, histid, histvid, & - infile="dyn_hist.nc", t_ops = iecri * daysec, t_wrt = iecri * daysec) + t_ops = iecri * daysec, t_wrt = iecri * daysec) CALL initdynav(day_ref, annee_ref, zdtvr, nqmx, histaveid, & - infile='dyn_hist_ave.nc', t_ops = iperiod * zdtvr, & - t_wrt = periodav * daysec) + t_ops = iperiod * zdtvr, t_wrt = periodav * daysec) ! Choix des fréquences de stockage pour le hors-ligne : istdyn = day_step / 4 ! stockage toutes les 6 h = 1 jour / 4 istphy = istdyn / iphysiq ! Intégration temporelle du modèle : - CALL leapfrog(ucov, vcov, teta, ps, masse, phis, nq, q, time_0) + CALL leapfrog(ucov, vcov, teta, ps, masse, phis, q, time_0) call histclo print *, 'Simulation finished'