chgres_cube  1.13.0
 All Data Structures Files Functions Variables
surface_target_data.F90
Go to the documentation of this file.
1 
4 
10 
11  use esmf
12 
13  implicit none
14 
15  private
16 
17 ! surface fields (not including nst)
18  type(esmf_field), public :: canopy_mc_target_grid
19 
20  type(esmf_field), public :: f10m_target_grid
21 
23  type(esmf_field), public :: ffmm_target_grid
24 
26  type(esmf_field), public :: ice_temp_target_grid
27 
28  type(esmf_field), public :: q2m_target_grid
29 
30  type(esmf_field), public :: seaice_depth_target_grid
31 
32  type(esmf_field), public :: seaice_fract_target_grid
33 
34  type(esmf_field), public :: seaice_skin_temp_target_grid
35 
36  type(esmf_field), public :: skin_temp_target_grid
37 
38  type(esmf_field), public :: sst_target_grid
39 
40  type(esmf_field), public :: srflag_target_grid
41 
42  type(esmf_field), public :: snow_liq_equiv_target_grid
43 
44  type(esmf_field), public :: snow_liq_equiv_at_ice_target_grid
45 
47  type(esmf_field), public :: snow_depth_target_grid
48 
49  type(esmf_field), public :: snow_depth_at_ice_target_grid
50 
51  type(esmf_field), public :: soil_temp_target_grid
52 
53  type(esmf_field), public :: soilm_liq_target_grid
54 
55  type(esmf_field), public :: soilm_tot_target_grid
56 
57  type(esmf_field), public :: t2m_target_grid
58 
59  type(esmf_field), public :: tprcp_target_grid
60 
61  type(esmf_field), public :: ustar_target_grid
62 
63  type(esmf_field), public :: z0_ice_target_grid
64 
65  type(esmf_field), public :: z0_water_target_grid
66 
67  type(esmf_field), public :: lai_target_grid
68 
69 
70 ! nst fields
71  type(esmf_field), public :: c_d_target_grid
72 
73  type(esmf_field), public :: c_0_target_grid
74 
75  type(esmf_field), public :: d_conv_target_grid
76 
77  type(esmf_field), public :: dt_cool_target_grid
78 
79  type(esmf_field), public :: ifd_target_grid
80 
82  type(esmf_field), public :: qrain_target_grid
83 
84  type(esmf_field), public :: tref_target_grid
85 
86  type(esmf_field), public :: w_d_target_grid
87 
88  type(esmf_field), public :: w_0_target_grid
89 
90  type(esmf_field), public :: xs_target_grid
91 
93  type(esmf_field), public :: xt_target_grid
94 
96  type(esmf_field), public :: xu_target_grid
97 
99  type(esmf_field), public :: xv_target_grid
100 
102  type(esmf_field), public :: xz_target_grid
103 
104  type(esmf_field), public :: xtts_target_grid
105 
106  type(esmf_field), public :: xzts_target_grid
107 
108  type(esmf_field), public :: z_c_target_grid
109 
110  type(esmf_field), public :: zm_target_grid
111 
112 
113  public :: cleanup_target_nst_data
114  public :: cleanup_target_sfc_data
115 
116  contains
117 
123 
124  implicit none
125 
126  integer :: rc
127 
128  print*,"- DESTROY TARGET GRID SURFACE FIELDS."
129  call esmf_fielddestroy(t2m_target_grid, rc=rc)
130  call esmf_fielddestroy(q2m_target_grid, rc=rc)
131  call esmf_fielddestroy(tprcp_target_grid, rc=rc)
132  call esmf_fielddestroy(f10m_target_grid, rc=rc)
133  call esmf_fielddestroy(ffmm_target_grid, rc=rc)
134  if (esmf_fieldiscreated(ice_temp_target_grid)) call esmf_fielddestroy(ice_temp_target_grid, rc=rc)
135  call esmf_fielddestroy(ustar_target_grid, rc=rc)
136  call esmf_fielddestroy(snow_liq_equiv_target_grid, rc=rc)
137  call esmf_fielddestroy(snow_depth_target_grid, rc=rc)
138  if (esmf_fieldiscreated(snow_liq_equiv_at_ice_target_grid)) call esmf_fielddestroy(snow_liq_equiv_at_ice_target_grid, rc=rc)
139  if (esmf_fieldiscreated(snow_depth_at_ice_target_grid)) call esmf_fielddestroy(snow_depth_at_ice_target_grid, rc=rc)
140  call esmf_fielddestroy(seaice_fract_target_grid, rc=rc)
141  call esmf_fielddestroy(seaice_depth_target_grid, rc=rc)
142  call esmf_fielddestroy(seaice_skin_temp_target_grid, rc=rc)
143  call esmf_fielddestroy(srflag_target_grid, rc=rc)
144  call esmf_fielddestroy(skin_temp_target_grid, rc=rc)
145  if (esmf_fieldiscreated(sst_target_grid)) call esmf_fielddestroy(sst_target_grid, rc=rc)
146  call esmf_fielddestroy(canopy_mc_target_grid, rc=rc)
147  call esmf_fielddestroy(lai_target_grid,rc=rc)
148  call esmf_fielddestroy(z0_ice_target_grid, rc=rc)
149  call esmf_fielddestroy(z0_water_target_grid, rc=rc)
150  call esmf_fielddestroy(soil_temp_target_grid, rc=rc)
151  call esmf_fielddestroy(soilm_tot_target_grid, rc=rc)
152  call esmf_fielddestroy(soilm_liq_target_grid, rc=rc)
153 
154  end subroutine cleanup_target_sfc_data
155 
161 
162  implicit none
163 
164  integer :: rc
165 
166  print*,"- DESTROY TARGET GRID NST DATA."
167 
168  call esmf_fielddestroy(c_d_target_grid, rc=rc)
169  call esmf_fielddestroy(c_0_target_grid, rc=rc)
170  call esmf_fielddestroy(d_conv_target_grid, rc=rc)
171  call esmf_fielddestroy(dt_cool_target_grid, rc=rc)
172  call esmf_fielddestroy(ifd_target_grid, rc=rc)
173  call esmf_fielddestroy(qrain_target_grid, rc=rc)
174  call esmf_fielddestroy(tref_target_grid, rc=rc)
175  call esmf_fielddestroy(w_d_target_grid, rc=rc)
176  call esmf_fielddestroy(w_0_target_grid, rc=rc)
177  call esmf_fielddestroy(xs_target_grid, rc=rc)
178  call esmf_fielddestroy(xt_target_grid, rc=rc)
179  call esmf_fielddestroy(xu_target_grid, rc=rc)
180  call esmf_fielddestroy(xv_target_grid, rc=rc)
181  call esmf_fielddestroy(xz_target_grid, rc=rc)
182  call esmf_fielddestroy(xtts_target_grid, rc=rc)
183  call esmf_fielddestroy(xzts_target_grid, rc=rc)
184  call esmf_fielddestroy(z_c_target_grid, rc=rc)
185  call esmf_fielddestroy(zm_target_grid, rc=rc)
186 
187  end subroutine cleanup_target_nst_data
188 
189  end module surface_target_data
subroutine, public cleanup_target_sfc_data
Free up memory once the target grid surface fields are no longer needed.
subroutine, public cleanup_target_nst_data
Free up memory once the target grid nst fields are no longer needed.
Module to hold ESMF fields associated with the target grid surface data.