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

Annotation of /trunk/dyn3d/gcm.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 313 - (hide annotations)
Mon Dec 10 15:54:30 2018 UTC (5 years, 6 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 guez 3 PROGRAM gcm
2    
3 guez 36 ! Authors: P. Le Van, L. Fairhead, F. Hourdin
4     ! From "gcm.F", version 1.4, 2006/04/04 15:05:16
5 guez 3
6 guez 139 ! 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 guez 38 ! l'advection de "q", en modifiant "iadv" dans "traceur.def".
10    
11 guez 263 use comconst, only: dtvr, iniconst
12 guez 191 use comdissnew, only: read_comdissnew
13 guez 168 use comgeom, only: aire_2d, inigeom
14     use comgeomphy, only: airephy
15 guez 266 use conf_gcm_m, only: day_step, iperiod, iphysiq, nday, conf_gcm, iflag_phys
16 guez 115 use conf_guide_m, only: conf_guide
17 guez 265 use dimensions, only: iim, jjm, llm, nqmx
18 guez 79 USE disvert_m, ONLY : disvert
19 guez 168 use dynetat0_m, only: dynetat0, day_ini
20 guez 313 use dynetat0_chosen_m, only: dynetat0_chosen
21 guez 26 use dynredem0_m, only: dynredem0
22 guez 3 use grid_change, only: dyn_phy, init_dyn_phy
23 guez 61 use histclo_m, only: histclo
24 guez 18 use iniadvtrac_m, only: iniadvtrac
25 guez 26 use inidissip_m, only: inidissip
26 guez 54 use inifilr_m, only: inifilr
27 guez 26 use inithist_m, only: inithist
28 guez 57 use init_dynzon_m, only: init_dynzon
29 guez 92 USE ioconf_calendar_m, only: ioconf_calendar
30 guez 3 use leapfrog_m, only: leapfrog
31 guez 108 use netcdf95, only: nf95_close
32 guez 37 use suphec_m, only: suphec
33 guez 276 use unit_nml_m, only: unit_nml, set_unit_nml
34 guez 110 use createnewfield_m, only: NbField, Ncid
35 guez 3
36     IMPLICIT NONE
37    
38     ! Variables dynamiques :
39 guez 55 REAL ucov(iim + 1, jjm + 1, llm), vcov(iim + 1, jjm, llm) ! vent covariant
40 guez 139 REAL teta(iim + 1, jjm + 1, llm) ! temp\'erature potentielle
41     REAL q(iim + 1, jjm + 1, llm, nqmx) ! champs advect\'es
42 guez 39 REAL ps(iim + 1, jjm + 1) ! pression au sol (Pa)
43 guez 55 REAL masse(iim + 1, jjm + 1, llm) ! masse d'air
44 guez 139 REAL phis(iim + 1, jjm + 1) ! g\'eopotentiel au sol
45 guez 3
46     LOGICAL:: true_calendar = .false. ! default value
47 guez 108 integer i
48    
49 guez 3 namelist /main_nml/true_calendar
50    
51     !------------------------------------------------------------
52    
53 guez 276 call set_unit_nml
54 guez 79 open(unit_nml, file="used_namelists.txt", status="replace", action="write")
55 guez 57
56     CALL conf_gcm
57 guez 191 call read_comdissnew
58 guez 57
59 guez 3 print *, "Enter namelist 'main_nml'."
60     read (unit=*, nml=main_nml)
61 guez 57 write(unit_nml, nml=main_nml)
62 guez 3
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 guez 23 call iniadvtrac
71 guez 79 CALL iniconst
72 guez 313 CALL dynetat0_chosen
73 guez 128 CALL dynetat0(vcov, ucov, teta, q, masse, ps, phis)
74 guez 79 CALL disvert
75 guez 139 CALL inigeom ! initialisation de la g\'eometrie
76 guez 36 CALL inifilr ! initialisation du filtre
77 guez 27 CALL inidissip
78 guez 3 call init_dyn_phy
79    
80     ! Initialisation de la physique :
81 guez 208 IF (iflag_phys) THEN
82 guez 37 airephy = pack(aire_2d, dyn_phy)
83     CALL suphec
84 guez 3 ENDIF
85    
86 guez 139 ! Initialisation des entr\'ees-sorties :
87 guez 157 CALL dynredem0(day_ini + nday, phis)
88 guez 266 CALL inithist(t_ops = dtvr, t_wrt = dtvr)
89 guez 57 call init_dynzon(dt_app = dtvr * iperiod)
90 guez 3
91 guez 115 CALL conf_guide
92 guez 128 CALL leapfrog(ucov, vcov, teta, ps, masse, phis, q)
93 guez 3
94 guez 68 close(unit_nml)
95 guez 10 call histclo
96 guez 108
97     do i = 1, nbfield
98 guez 109 call nf95_close(Ncid(i))
99 guez 108 end do
100    
101 guez 10 print *, 'Simulation finished'
102     print *, 'Everything is cool'
103    
104 guez 3 END PROGRAM gcm

  ViewVC Help
Powered by ViewVC 1.1.21