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

Contents of /trunk/dyn3d/gcm.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 276 - (show annotations)
Thu Jul 12 14:49:20 2018 UTC (5 years, 10 months ago) by guez
File size: 3015 byte(s)
Move procedure read_serre from module read_serre_m to module
dynetat0_m, to avoid side effet on variables of module dynetat0_m.

Create procedure set_unit_nml to avoid side effect on variable of
module unit_nml_m.

Downgrade pctsrf from variable of module etat0_m to argument of etat0
and limit to avoid side effect on pctsrf.

Move variable zmasq from module dimphy to module phyetat0_m to avoid
side effect on zmasq.

1 PROGRAM gcm
2
3 ! Authors: P. Le Van, L. Fairhead, F. Hourdin
4 ! From "gcm.F", version 1.4, 2006/04/04 15:05:16
5
6 ! General circulation model of LMD. Avec coordonn\'ee verticale
7 ! hybride, avec nouveaux op\'erateurs de dissipation "*" ("gradiv2",
8 ! "divgrad2", "nxgraro2"). Possibilit\'e de choisir le sch\'ema pour
9 ! l'advection de "q", en modifiant "iadv" dans "traceur.def".
10
11 use comconst, only: dtvr, iniconst
12 use comdissnew, only: read_comdissnew
13 use comgeom, only: aire_2d, inigeom
14 use comgeomphy, only: airephy
15 use conf_gcm_m, only: day_step, iperiod, iphysiq, nday, conf_gcm, iflag_phys
16 use conf_guide_m, only: conf_guide
17 use dimensions, only: iim, jjm, llm, nqmx
18 USE disvert_m, ONLY : disvert
19 use dynetat0_m, only: dynetat0, day_ini
20 use dynredem0_m, only: dynredem0
21 use grid_change, only: dyn_phy, init_dyn_phy
22 use histclo_m, only: histclo
23 use iniadvtrac_m, only: iniadvtrac
24 use inidissip_m, only: inidissip
25 use inifilr_m, only: inifilr
26 use inithist_m, only: inithist
27 use init_dynzon_m, only: init_dynzon
28 USE ioconf_calendar_m, only: ioconf_calendar
29 use leapfrog_m, only: leapfrog
30 use netcdf95, only: nf95_close
31 use suphec_m, only: suphec
32 use unit_nml_m, only: unit_nml, set_unit_nml
33 use createnewfield_m, only: NbField, Ncid
34
35 IMPLICIT NONE
36
37 ! Variables dynamiques :
38 REAL ucov(iim + 1, jjm + 1, llm), vcov(iim + 1, jjm, llm) ! vent covariant
39 REAL teta(iim + 1, jjm + 1, llm) ! temp\'erature potentielle
40 REAL q(iim + 1, jjm + 1, llm, nqmx) ! champs advect\'es
41 REAL ps(iim + 1, jjm + 1) ! pression au sol (Pa)
42 REAL masse(iim + 1, jjm + 1, llm) ! masse d'air
43 REAL phis(iim + 1, jjm + 1) ! g\'eopotentiel au sol
44
45 LOGICAL:: true_calendar = .false. ! default value
46 integer i
47
48 namelist /main_nml/true_calendar
49
50 !------------------------------------------------------------
51
52 call set_unit_nml
53 open(unit_nml, file="used_namelists.txt", status="replace", action="write")
54
55 CALL conf_gcm
56 call read_comdissnew
57
58 print *, "Enter namelist 'main_nml'."
59 read (unit=*, nml=main_nml)
60 write(unit_nml, nml=main_nml)
61
62 ! Choix du calendrier :
63 if (true_calendar) then
64 call ioconf_calendar('gregorian')
65 else
66 call ioconf_calendar('360d')
67 endif
68
69 call iniadvtrac
70 CALL iniconst
71 CALL dynetat0(vcov, ucov, teta, q, masse, ps, phis)
72 CALL disvert
73 CALL inigeom ! initialisation de la g\'eometrie
74 CALL inifilr ! initialisation du filtre
75 CALL inidissip
76 call init_dyn_phy
77
78 ! Initialisation de la physique :
79 IF (iflag_phys) THEN
80 airephy = pack(aire_2d, dyn_phy)
81 CALL suphec
82 ENDIF
83
84 ! Initialisation des entr\'ees-sorties :
85 CALL dynredem0(day_ini + nday, phis)
86 CALL inithist(t_ops = dtvr, t_wrt = dtvr)
87 call init_dynzon(dt_app = dtvr * iperiod)
88
89 CALL conf_guide
90 CALL leapfrog(ucov, vcov, teta, ps, masse, phis, q)
91
92 close(unit_nml)
93 call histclo
94
95 do i = 1, nbfield
96 call nf95_close(Ncid(i))
97 end do
98
99 print *, 'Simulation finished'
100 print *, 'Everything is cool'
101
102 END PROGRAM gcm

  ViewVC Help
Powered by ViewVC 1.1.21