source: trunk/LMDZ.COMMON/libf/evolution/allocation.F90 @ 4155

Last change on this file since 4155 was 4138, checked in by jbclement, 3 weeks ago

PEM:

  • Move ice table variables from "ice_table" to the main program.
  • Merge "job_id_mod" and "job_timelimit_mod" into "job" which is relocated to the PEM folder.
  • Rename local variables in procedures to avoid masking variables in parent scope.
  • Few cleanings to delete remaining PEM-external "include" and "use".

JBC

File size: 2.8 KB
Line 
1MODULE allocation
2!-----------------------------------------------------------------------
3! NAME
4!     allocation
5!
6! DESCRIPTION
7!     Management of memory throughout the modules of the code.
8!
9! AUTHORS & DATE
10!     JB Clement, 12/2025
11!
12! NOTES
13!
14!-----------------------------------------------------------------------
15
16! DEPENDENCIES
17! ------------
18use geometry,   only: ini_geometry, end_geometry, dim_init
19use atmosphere, only: ini_atmosphere, end_atmosphere
20use tracers,    only: ini_tracers, end_tracers
21use slopes,     only: ini_slopes, end_slopes
22use surface,    only: ini_surface, end_surface
23use surf_temp,  only: ini_surf_temp, end_surf_temp
24use soil_temp,  only: ini_soil_temp, end_soil_temp
25use frost,      only: ini_frost, end_frost
26use soil,       only: ini_soil, end_soil
27use surf_ice,   only: ini_surf_ice, end_surf_ice
28use orbit,      only: ini_orbit, end_orbit
29use output,     only: ini_output, end_output
30
31! DECLARATION
32! -----------
33implicit none
34
35contains
36!+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
37
38!=======================================================================
39SUBROUTINE ini_allocation()
40!-----------------------------------------------------------------------
41! NAME
42!     ini_geometry
43!
44! DESCRIPTION
45!     Initialize module arrays.
46!
47! AUTHORS & DATE
48!     JB Clement, 12/2025
49!
50! NOTES
51!
52!-----------------------------------------------------------------------
53
54! DEPENDENCIES
55! ------------
56use stoppage, only: stop_clean
57
58! DECLARATION
59! -----------
60implicit none
61
62! CODE
63! ----
64! Initialize the dimensions
65call ini_geometry()
66if (.not. dim_init) call stop_clean(__FILE__,__LINE__,"Dimensions of module 'geometry' were not correctly initilized.",1)
67
68! Initialize everything else
69call ini_atmosphere()
70call ini_tracers()
71call ini_slopes()
72call ini_surface()
73call ini_surf_temp()
74call ini_soil_temp()
75call ini_frost()
76call ini_soil()
77call ini_surf_ice()
78call ini_orbit()
79call ini_output()
80
81END SUBROUTINE ini_allocation
82!=======================================================================
83
84!=======================================================================
85SUBROUTINE end_allocation()
86!-----------------------------------------------------------------------
87! NAME
88!     end_geometry
89!
90! DESCRIPTION
91!     Deallocate module arrays.
92!
93! AUTHORS & DATE
94!     JB Clement, 12/2025
95!
96! NOTES
97!
98!-----------------------------------------------------------------------
99
100! DECLARATION
101! -----------
102implicit none
103
104! CODE
105! ----
106call end_output()
107call end_orbit()
108call end_surf_ice()
109call end_soil()
110call end_frost()
111call end_soil_temp()
112call end_surf_temp()
113call end_surface()
114call end_slopes()
115call end_tracers()
116call end_atmosphere()
117call end_geometry()
118
119END SUBROUTINE end_allocation
120!=======================================================================
121
122END MODULE allocation
123
Note: See TracBrowser for help on using the repository browser.