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

Annotation of /trunk/dyn3d/gcm.f

Parent Directory Parent Directory | Revision Log Revision Log


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

  ViewVC Help
Powered by ViewVC 1.1.21