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

Annotation of /trunk/dyn3d/gcm.f

Parent Directory Parent Directory | Revision Log Revision Log


Revision 266 - (hide annotations)
Thu Apr 19 17:54:55 2018 UTC (6 years, 1 month ago) by guez
File size: 3036 byte(s)
Define macros of the preprocessor CPP_IIM, CPP_JJM, CPP_LLM so we can
control the resolution from the compilation command, and automate
compilation for several resolutions.

In module yoethf_m, transform variables into named constants. So we do
not need procedure yoethf any longer.

Bug fix in program test_inter_barxy, missing calls to fyhyp and fxhyp,
and definition of rlatu.

Remove variable iecri of module conf_gcm_m. The files dyn_hist*.nc are
written every time step. We are simplifying the output system, pending
replacement by a whole new system.

Modify possible value of vert_sampling from "param" to
"strato_custom", following LMDZ. Default values of corresponding
namelist variables are now the values used for LMDZ CMIP6.

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 57 use jumble, only: new_unit
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 57 use unit_nml_m, only: 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 57 call new_unit(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 128 CALL dynetat0(vcov, ucov, teta, q, masse, ps, phis)
73 guez 79 CALL disvert
74 guez 139 CALL inigeom ! initialisation de la g\'eometrie
75 guez 36 CALL inifilr ! initialisation du filtre
76 guez 27 CALL inidissip
77 guez 3 call init_dyn_phy
78    
79     ! Initialisation de la physique :
80 guez 208 IF (iflag_phys) THEN
81 guez 37 airephy = pack(aire_2d, dyn_phy)
82     CALL suphec
83 guez 3 ENDIF
84    
85 guez 139 ! Initialisation des entr\'ees-sorties :
86 guez 157 CALL dynredem0(day_ini + nday, phis)
87 guez 266 CALL inithist(t_ops = dtvr, t_wrt = dtvr)
88 guez 57 call init_dynzon(dt_app = dtvr * iperiod)
89 guez 3
90 guez 115 CALL conf_guide
91 guez 128 CALL leapfrog(ucov, vcov, teta, ps, masse, phis, q)
92 guez 3
93 guez 68 close(unit_nml)
94 guez 10 call histclo
95 guez 108
96     do i = 1, nbfield
97 guez 109 call nf95_close(Ncid(i))
98 guez 108 end do
99    
100 guez 10 print *, 'Simulation finished'
101     print *, 'Everything is cool'
102    
103 guez 3 END PROGRAM gcm

  ViewVC Help
Powered by ViewVC 1.1.21