--- trunk/libf/dyn3d/gcm.f90 2008/04/18 14:45:53 10 +++ trunk/libf/dyn3d/gcm.f90 2008/08/07 12:29:13 18 @@ -29,7 +29,7 @@ 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_phy, itau_dyn + 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 @@ -37,13 +37,13 @@ use initdynav_m, only: initdynav use dynetat0_m, only: dynetat0 use grid_change, only: dyn_phy, init_dyn_phy - use advtrac_m, only: iniadvtrac + use iniadvtrac_m, only: iniadvtrac use leapfrog_m, only: leapfrog use dynredem0_m, only: dynredem0 + use clesphys2, only: read_clesphys2 IMPLICIT NONE - REAL clesphy0(20) REAL zdtvr ! time step for dynamics, in s ! Variables dynamiques : @@ -92,7 +92,8 @@ endif ! Lecture des fichiers "gcm.def" ou "run.def" : - CALL conf_gcm(clesphy0) + call read_clesphys2 + CALL conf_gcm ! Initialisation des traceurs ! Choix du schéma pour l'advection dans le fichier "traceur.def" ou via INCA @@ -119,19 +120,18 @@ if (annee_ref /= anneeref .or. day_ref /= dayref) then print *, 'Attention : les dates initiales lues dans le fichier ' // & '"start" ne correspondent pas à celles lues dans "gcm.def".' - if (raz_date /= 1) then - print *, 'On garde les dates du fichier "start".' - else + if (raz_date) then print *, 'On réinitialise à la date lue dans "gcm.def".' annee_ref = anneeref day_ref = dayref day_ini = dayref itau_dyn = 0 - itau_phy = 0 time_0 = 0. + else + print *, 'On garde les dates du fichier "start".' endif ELSE - raz_date = 0 + raz_date = .false. endif ! Initialisation des constantes dynamiques : @@ -181,7 +181,7 @@ airefi = pack(aire_2d, dyn_phy) print *, 'Attention : vitesse verticale nulle dans la physique.' - CALL iniphysiq(klon, llm, daysec, day_ini, dtphys, latfi, lonfi, airefi, & + CALL iniphysiq(klon, llm, latfi, lonfi, airefi, & zcufi, zcvfi, rad, g, r, cpp) ENDIF @@ -203,7 +203,7 @@ istphy = istdyn / iphysiq ! Intégration temporelle du modèle : - CALL leapfrog(ucov, vcov, teta, ps, masse, phis, nq, q, clesphy0, time_0) + CALL leapfrog(ucov, vcov, teta, ps, masse, phis, nq, q, time_0) call histclo print *, 'Simulation finished'