/[lmdze]/trunk/Sources/dyn3d/gcm.f
ViewVC logotype

Diff of /trunk/Sources/dyn3d/gcm.f

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/libf/dyn3d/gcm.f90 revision 68 by guez, Wed Nov 14 16:59:30 2012 UTC trunk/dyn3d/gcm.f revision 92 by guez, Wed Mar 26 18:16:05 2014 UTC
# Line 8  PROGRAM gcm Line 8  PROGRAM gcm
8    ! "divgrad2", "nxgraro2"). Possibilité de choisir le schéma pour    ! "divgrad2", "nxgraro2"). Possibilité de choisir le schéma pour
9    ! l'advection de "q", en modifiant "iadv" dans "traceur.def".    ! l'advection de "q", en modifiant "iadv" dans "traceur.def".
10    
11    USE calendar, only: ioconf_calendar    use comconst, only: daysec, dtvr, iniconst
12    use clesphys2, only: read_clesphys2    use comgeom, only: rlatu, aire_2d, cu_2d, cv_2d, rlonv, inigeom
   use comconst, only: daysec, cpp, dtvr, g, rad, r  
   use comgeom, only: rlatu, aire_2d, cu_2d, cv_2d, rlonv  
13    use comgeomphy, only: airephy, cuphy, cvphy, rlatd, rlond    use comgeomphy, only: airephy, cuphy, cvphy, rlatd, rlond
14    use conf_gcm_m, only: day_step, iperiod, anneeref, dayref, iecri, iphysiq, &    use conf_gcm_m, only: day_step, iperiod, anneeref, dayref, iecri, iphysiq, &
15         nday, raz_date, periodav, conf_gcm, iflag_phys         nday, raz_date, periodav, conf_gcm, iflag_phys
16    use dimens_m, only: iim, jjm, llm, nqmx    use dimens_m, only: iim, jjm, llm, nqmx
17    use dimphy, only: klon    use dimphy, only: klon
18      USE disvert_m, ONLY : disvert
19    use dynetat0_m, only: dynetat0, day_ini    use dynetat0_m, only: dynetat0, day_ini
20    use dynredem0_m, only: dynredem0    use dynredem0_m, only: dynredem0
21    use grid_change, only: dyn_phy, init_dyn_phy    use grid_change, only: dyn_phy, init_dyn_phy
# Line 24  PROGRAM gcm Line 23  PROGRAM gcm
23    use iniadvtrac_m, only: iniadvtrac    use iniadvtrac_m, only: iniadvtrac
24    use inidissip_m, only: inidissip    use inidissip_m, only: inidissip
25    use inifilr_m, only: inifilr    use inifilr_m, only: inifilr
   use inigeom_m, only: inigeom  
26    use initdynav_m, only: initdynav    use initdynav_m, only: initdynav
27    use inithist_m, only: inithist    use inithist_m, only: inithist
28    use init_dynzon_m, only: init_dynzon    use init_dynzon_m, only: init_dynzon
29      USE ioconf_calendar_m, only: ioconf_calendar
30    use jumble, only: new_unit    use jumble, only: new_unit
31    use leapfrog_m, only: leapfrog    use leapfrog_m, only: leapfrog
32    use suphec_m, only: suphec    use suphec_m, only: suphec
# Line 38  PROGRAM gcm Line 37  PROGRAM gcm
37    
38    IMPLICIT NONE    IMPLICIT NONE
39    
   REAL zdtvr ! time step for dynamics, in s  
   
40    ! Variables dynamiques :    ! Variables dynamiques :
41    REAL ucov(iim + 1, jjm + 1, llm), vcov(iim + 1, jjm, llm)  ! vent covariant    REAL ucov(iim + 1, jjm + 1, llm), vcov(iim + 1, jjm, llm)  ! vent covariant
42    REAL teta(iim + 1, jjm + 1, llm) ! température potentielle    REAL teta(iim + 1, jjm + 1, llm) ! température potentielle
# Line 63  PROGRAM gcm Line 60  PROGRAM gcm
60    !------------------------------------------------------------    !------------------------------------------------------------
61    
62    call new_unit(unit_nml)    call new_unit(unit_nml)
63    open(unit_nml, file="used_namelists", status="replace", action="write")    open(unit_nml, file="used_namelists.txt", status="replace", action="write")
64    
65    CALL conf_gcm    CALL conf_gcm
66    
# Line 78  PROGRAM gcm Line 75  PROGRAM gcm
75       call ioconf_calendar('360d')       call ioconf_calendar('360d')
76    endif    endif
77    
   ! Lecture des fichiers "gcm.def" ou "run.def" :  
   call read_clesphys2  
   
78    ! Initialisation des traceurs    ! Initialisation des traceurs
79    ! Choix du schéma pour l'advection dans le fichier "traceur.def" ou via INCA    ! Choix du schéma pour l'advection dans le fichier "traceur.def" ou via INCA
80    call iniadvtrac    call iniadvtrac
81    
82      CALL iniconst
83    
84    ! Lecture du fichier "start.nc" :    ! Lecture du fichier "start.nc" :
85    CALL dynetat0(vcov, ucov, teta, q, masse, ps, phis, time_0)    CALL dynetat0(vcov, ucov, teta, q, masse, ps, phis, time_0)
86    
# Line 106  PROGRAM gcm Line 102  PROGRAM gcm
102       raz_date = .false.       raz_date = .false.
103    endif    endif
104    
105    ! On recalcule éventuellement le pas de temps :    CALL disvert
   zdtvr = daysec / REAL(day_step)  
   IF (dtvr /= zdtvr) THEN  
      print *, 'Warning: the time steps in the ".def" file and in ' // &  
           '"start.nc" are different'  
      print *, 'dtvr (from "start.nc") = ', dtvr  
      print *, 'zdtvr (from ".def") = ', zdtvr  
      print *, 'Using the value from the ".def" file.'  
      dtvr = zdtvr  
   ENDIF  
   
   CALL iniconst  
106    CALL inigeom ! initialisation de la géometrie    CALL inigeom ! initialisation de la géometrie
107    CALL inifilr ! initialisation du filtre    CALL inifilr ! initialisation du filtre
108    CALL inidissip    CALL inidissip
# Line 155  PROGRAM gcm Line 140  PROGRAM gcm
140    print *, "day_end = ", day_end    print *, "day_end = ", day_end
141    
142    CALL dynredem0("restart.nc", day_end, phis)    CALL dynredem0("restart.nc", day_end, phis)
143    CALL inithist(day_ref, annee_ref, zdtvr, nqmx, t_ops = iecri * daysec, &    CALL inithist(day_ref, annee_ref, dtvr, nqmx, t_ops = iecri * daysec, &
144         t_wrt = iecri * daysec)         t_wrt = iecri * daysec)
145    CALL initdynav(day_ref, annee_ref, zdtvr, nqmx, t_ops = iperiod * zdtvr, &    CALL initdynav(day_ref, annee_ref, dtvr, nqmx, t_ops = iperiod * dtvr, &
146         t_wrt = periodav * daysec)         t_wrt = periodav * daysec)
147    call init_dynzon(dt_app = dtvr * iperiod)    call init_dynzon(dt_app = dtvr * iperiod)
148    

Legend:
Removed from v.68  
changed lines
  Added in v.92

  ViewVC Help
Powered by ViewVC 1.1.21