NCEPLIBS-g2  3.4.5
gf_free.f
Go to the documentation of this file.
1 
5 
137 
138  subroutine gf_free(gfld)
139 
140  use grib_mod
141 
142  type(gribfield) :: gfld
143 
144  if (associated(gfld%idsect)) then
145  !nullify(gfld%idsect)
146  deallocate(gfld%idsect,stat=is)
147  !print *,'gfld%idsect: ',is
148  endif
149  nullify(gfld%idsect)
150 
151  if (associated(gfld%local)) then
152  ! nullify(gfld%local)
153  deallocate(gfld%local,stat=is)
154  !print *,'gfld%local: ',is
155  endif
156  nullify(gfld%local)
157 
158  if (associated(gfld%list_opt)) then
159  ! nullify(gfld%list_opt)
160  deallocate(gfld%list_opt,stat=is)
161  !print *,'gfld%list_opt: ',is
162  endif
163  nullify(gfld%list_opt)
164 
165  if (associated(gfld%igdtmpl)) then
166  !nullify(gfld%igdtmpl)
167  deallocate(gfld%igdtmpl,stat=is)
168  !print *,'gfld%igdtmpl: ',is
169  endif
170  nullify(gfld%igdtmpl)
171 
172  if (associated(gfld%ipdtmpl)) then
173  !nullify(gfld%ipdtmpl)
174  deallocate(gfld%ipdtmpl,stat=is)
175  !print *,'gfld%ipdtmpl: ',is
176  endif
177  nullify(gfld%ipdtmpl)
178 
179  if (associated(gfld%coord_list)) then
180  ! nullify(gfld%coord_list)
181  deallocate(gfld%coord_list,stat=is)
182  !print *,'gfld%coord_list: ',is
183  endif
184  nullify(gfld%coord_list)
185 
186  if (associated(gfld%idrtmpl)) then
187  !nullify(gfld%idrtmpl)
188  deallocate(gfld%idrtmpl,stat=is)
189  !print *,'gfld%idrtmpl: ',is
190  endif
191  nullify(gfld%idrtmpl)
192 
193  if (associated(gfld%bmap)) then
194  ! nullify(gfld%bmap)
195  deallocate(gfld%bmap,stat=is)
196  !print *,'gfld%bmap: ',is
197  endif
198  nullify(gfld%bmap)
199 
200  if (associated(gfld%fld)) then
201  ! nullify(gfld%fld)
202  deallocate(gfld%fld,stat=is)
203  ! print *,'gfld%fld: ',is
204  endif
205  nullify(gfld%fld)
206 
207  return
208  end
grib_mod::gribfield
Definition: gribmod.f:155
grib_mod
PROGRAM HISTORY LOG:
Definition: gribmod.f:151
gf_free
subroutine gf_free(gfld)
This subroutine frees up memory that was used to store array values in derived type gribfield.
Definition: gf_free.f:139