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

Contents of /trunk/dyn3d/gcm.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 313 - (show annotations)
Mon Dec 10 15:54:30 2018 UTC (5 years, 5 months ago) by guez
File size: 3085 byte(s)
Remove module temps. Move variable itau_dyn from module temps to
module dynetat0_m, where it is defined.

Split module dynetat0_m into dynetat0_m and dynetat0_chosen_m. The
motivation is to create smaller modules. Procedures principal_cshift
and invert_zoomx had to stay in dynetat0_m because of circular
dependency. Now we will be able to move them away. Module variables
which are chosen by the user, not computed, in program ce0l go to
dynetat0_chosen_m: day_ref, annee_ref, clon, clat, grossismx,
grossismy, dzoomx, dzoomy, taux, tauy.

Move variable "pa" from module disvert_m to module
dynetat0_chosen_m. Define "pa" in dynetat0_chosen rather than etat0.

Define day_ref and annee_ref in procedure read_serre rather than
etat0.

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 dynetat0_chosen_m, only: dynetat0_chosen
21 use dynredem0_m, only: dynredem0
22 use grid_change, only: dyn_phy, init_dyn_phy
23 use histclo_m, only: histclo
24 use iniadvtrac_m, only: iniadvtrac
25 use inidissip_m, only: inidissip
26 use inifilr_m, only: inifilr
27 use inithist_m, only: inithist
28 use init_dynzon_m, only: init_dynzon
29 USE ioconf_calendar_m, only: ioconf_calendar
30 use leapfrog_m, only: leapfrog
31 use netcdf95, only: nf95_close
32 use suphec_m, only: suphec
33 use unit_nml_m, only: unit_nml, set_unit_nml
34 use createnewfield_m, only: NbField, Ncid
35
36 IMPLICIT NONE
37
38 ! Variables dynamiques :
39 REAL ucov(iim + 1, jjm + 1, llm), vcov(iim + 1, jjm, llm) ! vent covariant
40 REAL teta(iim + 1, jjm + 1, llm) ! temp\'erature potentielle
41 REAL q(iim + 1, jjm + 1, llm, nqmx) ! champs advect\'es
42 REAL ps(iim + 1, jjm + 1) ! pression au sol (Pa)
43 REAL masse(iim + 1, jjm + 1, llm) ! masse d'air
44 REAL phis(iim + 1, jjm + 1) ! g\'eopotentiel au sol
45
46 LOGICAL:: true_calendar = .false. ! default value
47 integer i
48
49 namelist /main_nml/true_calendar
50
51 !------------------------------------------------------------
52
53 call set_unit_nml
54 open(unit_nml, file="used_namelists.txt", status="replace", action="write")
55
56 CALL conf_gcm
57 call read_comdissnew
58
59 print *, "Enter namelist 'main_nml'."
60 read (unit=*, nml=main_nml)
61 write(unit_nml, nml=main_nml)
62
63 ! Choix du calendrier :
64 if (true_calendar) then
65 call ioconf_calendar('gregorian')
66 else
67 call ioconf_calendar('360d')
68 endif
69
70 call iniadvtrac
71 CALL iniconst
72 CALL dynetat0_chosen
73 CALL dynetat0(vcov, ucov, teta, q, masse, ps, phis)
74 CALL disvert
75 CALL inigeom ! initialisation de la g\'eometrie
76 CALL inifilr ! initialisation du filtre
77 CALL inidissip
78 call init_dyn_phy
79
80 ! Initialisation de la physique :
81 IF (iflag_phys) THEN
82 airephy = pack(aire_2d, dyn_phy)
83 CALL suphec
84 ENDIF
85
86 ! Initialisation des entr\'ees-sorties :
87 CALL dynredem0(day_ini + nday, phis)
88 CALL inithist(t_ops = dtvr, t_wrt = dtvr)
89 call init_dynzon(dt_app = dtvr * iperiod)
90
91 CALL conf_guide
92 CALL leapfrog(ucov, vcov, teta, ps, masse, phis, q)
93
94 close(unit_nml)
95 call histclo
96
97 do i = 1, nbfield
98 call nf95_close(Ncid(i))
99 end do
100
101 print *, 'Simulation finished'
102 print *, 'Everything is cool'
103
104 END PROGRAM gcm

  ViewVC Help
Powered by ViewVC 1.1.21