/[lmdze]/trunk/dyn3d/gcm.f90
ViewVC logotype

Diff of /trunk/dyn3d/gcm.f90

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

trunk/dyn3d/gcm.f revision 265 by guez, Tue Mar 20 09:35:59 2018 UTC trunk/dyn3d/gcm.f90 revision 352 by guez, Thu Jan 16 19:20:50 2020 UTC
# Line 1  Line 1 
1  PROGRAM gcm  PROGRAM gcm
2    
3    ! Authors: P. Le Van, L. Fairhead, F. Hourdin    ! Authors: P. Le Van, L. Fairhead, F. Hourdin
4    ! From "gcm.F", version 1.4, 2006/04/04 15:05:16    ! From "gcm.F", version 1.4, 2006/04/04
5    
6    ! General circulation model of LMD. Avec coordonn\'ee verticale    ! General circulation model of LMD. Avec coordonn\'ee verticale
7    ! hybride, avec nouveaux op\'erateurs de dissipation "*" ("gradiv2",    ! hybride, avec nouveaux op\'erateurs de dissipation "*" ("gradiv2",
8    ! "divgrad2", "nxgraro2"). Possibilit\'e de choisir le sch\'ema pour    ! "divgrad2", "nxgraro2"). Possibilit\'e de choisir le sch\'ema pour
9    ! l'advection de "q", en modifiant "iadv" dans "traceur.def".    ! l'advection de "q", en modifiant "iadv" dans "traceur.def".
10    
11      ! Libraries:
12      use netcdf95, only: nf95_close
13      use xios, only: xios_initialize, xios_finalize
14    
15    use comconst, only: dtvr, iniconst    use comconst, only: dtvr, iniconst
16    use comdissnew, only: read_comdissnew    use comdissnew, only: read_comdissnew
17    use comgeom, only:  aire_2d, inigeom    use comgeom, only:  aire_2d, inigeom
18    use comgeomphy, only: airephy    use comgeomphy, only: airephy
19    use conf_gcm_m, only: day_step, iperiod, iecri, iphysiq, nday, conf_gcm, &    use conf_gcm_m, only: day_step, iperiod, iphysiq, nday, conf_gcm, iflag_phys
        iflag_phys  
20    use conf_guide_m, only: conf_guide    use conf_guide_m, only: conf_guide
21    use dimensions, only: iim, jjm, llm, nqmx    use dimensions, only: iim, jjm, llm, nqmx
22    USE disvert_m, ONLY : disvert    USE disvert_m, ONLY : disvert
23    use dynetat0_m, only: dynetat0, day_ini    use dynetat0_m, only: dynetat0, day_ini
24      use dynetat0_chosen_m, only: dynetat0_chosen
25    use dynredem0_m, only: dynredem0    use dynredem0_m, only: dynredem0
26    use grid_change, only: dyn_phy, init_dyn_phy    use grid_change, only: dyn_phy, init_dyn_phy
27    use histclo_m, only: histclo    use histclo_m, only: histclo
28    use iniadvtrac_m, only: iniadvtrac    use infotrac_init_m, only: infotrac_init
29    use inidissip_m, only: inidissip    use inidissip_m, only: inidissip
30    use inifilr_m, only: inifilr    use inifilr_m, only: inifilr
31    use inithist_m, only: inithist    use inithist_m, only: inithist
32    use init_dynzon_m, only: init_dynzon    use init_dynzon_m, only: init_dynzon
33    USE ioconf_calendar_m, only: ioconf_calendar    USE ioconf_calendar_m, only: ioconf_calendar
   use jumble, only: new_unit  
34    use leapfrog_m, only: leapfrog    use leapfrog_m, only: leapfrog
   use netcdf95, only: nf95_close  
35    use suphec_m, only: suphec    use suphec_m, only: suphec
36    use unit_nml_m, only: unit_nml    use unit_nml_m, only: unit_nml, set_unit_nml
   use yoethf_m, only: yoethf  
37    use createnewfield_m, only: NbField, Ncid    use createnewfield_m, only: NbField, Ncid
38    
39    IMPLICIT NONE    IMPLICIT NONE
# Line 40  PROGRAM gcm Line 41  PROGRAM gcm
41    ! Variables dynamiques :    ! Variables dynamiques :
42    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
43    REAL teta(iim + 1, jjm + 1, llm) ! temp\'erature potentielle    REAL teta(iim + 1, jjm + 1, llm) ! temp\'erature potentielle
44    REAL q(iim + 1, jjm + 1, llm, nqmx) ! champs advect\'es    REAL q(iim + 1, jjm + 1, llm, nqmx) ! mass fraction of advected species
45    REAL ps(iim + 1, jjm + 1) ! pression au sol (Pa)    REAL ps(iim + 1, jjm + 1) ! pression au sol (Pa)
46    REAL masse(iim + 1, jjm + 1, llm) ! masse d'air    REAL masse(iim + 1, jjm + 1, llm) ! masse d'air
47    REAL phis(iim + 1, jjm + 1) ! g\'eopotentiel au sol    REAL phis(iim + 1, jjm + 1) ! g\'eopotentiel au sol
# Line 52  PROGRAM gcm Line 53  PROGRAM gcm
53    
54    !------------------------------------------------------------    !------------------------------------------------------------
55    
56    call new_unit(unit_nml)    call set_unit_nml
57    open(unit_nml, file="used_namelists.txt", status="replace", action="write")    open(unit_nml, file="used_namelists.txt", status="replace", action="write")
58    
59    CALL conf_gcm    CALL conf_gcm
# Line 62  PROGRAM gcm Line 63  PROGRAM gcm
63    read (unit=*, nml=main_nml)    read (unit=*, nml=main_nml)
64    write(unit_nml, nml=main_nml)    write(unit_nml, nml=main_nml)
65    
66      call xios_initialize("LMDZE")
67      
68    ! Choix du calendrier :    ! Choix du calendrier :
69    if (true_calendar) then    if (true_calendar) then
70       call ioconf_calendar('gregorian')       call ioconf_calendar('gregorian')
# Line 69  PROGRAM gcm Line 72  PROGRAM gcm
72       call ioconf_calendar('360d')       call ioconf_calendar('360d')
73    endif    endif
74    
75    call iniadvtrac    call infotrac_init
76    CALL iniconst    CALL iniconst
77      CALL dynetat0_chosen
78    CALL dynetat0(vcov, ucov, teta, q, masse, ps, phis)    CALL dynetat0(vcov, ucov, teta, q, masse, ps, phis)
79    CALL disvert    CALL disvert
80    CALL inigeom ! initialisation de la g\'eometrie    CALL inigeom ! initialisation de la g\'eometrie
# Line 82  PROGRAM gcm Line 86  PROGRAM gcm
86    IF (iflag_phys) THEN    IF (iflag_phys) THEN
87       airephy = pack(aire_2d, dyn_phy)       airephy = pack(aire_2d, dyn_phy)
88       CALL suphec       CALL suphec
      call yoethf  
89    ENDIF    ENDIF
90    
91    ! Initialisation des entr\'ees-sorties :    ! Initialisation des entr\'ees-sorties :
92    CALL dynredem0(day_ini + nday, phis)    CALL dynredem0(day_ini + nday, phis)
93    CALL inithist(t_ops = iecri * dtvr, t_wrt = iecri * dtvr)    CALL inithist(t_ops = dtvr, t_wrt = dtvr)
94    call init_dynzon(dt_app = dtvr * iperiod)    call init_dynzon(dt_app = dtvr * iperiod)
95    
96    CALL conf_guide    CALL conf_guide
# Line 100  PROGRAM gcm Line 103  PROGRAM gcm
103       call nf95_close(Ncid(i))       call nf95_close(Ncid(i))
104    end do    end do
105    
106      call xios_finalize
107    
108    print *, 'Simulation finished'    print *, 'Simulation finished'
109    print *, 'Everything is cool'    print *, 'Everything is cool'
110    

Legend:
Removed from v.265  
changed lines
  Added in v.352

  ViewVC Help
Powered by ViewVC 1.1.21