@@ -135,6 +135,8 @@ subroutine interp2(localpet, input_file)
135
135
if (ESMF_logFoundError(rcToCheck= rc,msg= ESMF_LOGERR_PASSTHRU,line= __LINE__,file= __FILE__)) &
136
136
call error_handler(" IN FieldScatter." , rc)
137
137
138
+ deallocate (data_src_global2)
139
+
138
140
isrctermprocessing = 1
139
141
140
142
method = ESMF_REGRIDMETHOD_CONSERVE
@@ -166,6 +168,12 @@ subroutine interp2(localpet, input_file)
166
168
if (ESMF_logFoundError(rcToCheck= rc,msg= ESMF_LOGERR_PASSTHRU,line= __LINE__,file= __FILE__)) &
167
169
call error_handler(" IN FieldRegrid." , rc)
168
170
171
+ print * ," - CALL FieldRegridRelease."
172
+ call ESMF_FieldRegridRelease(routehandle= regrid_data, rc= rc)
173
+
174
+ print * ," - CALL FieldDestroy."
175
+ call ESMF_FieldDestroy(data_field_src, rc= rc)
176
+
169
177
OUTPUT_LOOP : do tile = 1 , num_tiles
170
178
171
179
print * ," - CALL FieldGather FOR MODEL LATITUDE."
@@ -247,13 +255,12 @@ subroutine interp2(localpet, input_file)
247
255
248
256
status= nf90_close(ncid)
249
257
250
- deallocate (data_mdl_one_tile, dom_cat_mdl_one_tile, mask_mdl_one_tile, data_src_global2 )
258
+ deallocate (data_mdl_one_tile, dom_cat_mdl_one_tile, mask_mdl_one_tile)
251
259
deallocate (lat_mdl_one_tile, lon_mdl_one_tile, sum_mdl_one_tile, land_frac_mdl_one_tile)
252
260
253
- print * ," - CALL FieldRegridRelease."
254
- call ESMF_FieldRegridRelease(routehandle= regrid_data, rc= rc)
255
-
256
261
print * ," - CALL FieldDestroy."
257
- call ESMF_FieldDestroy(data_field_src, rc= rc)
262
+ call ESMF_FieldDestroy(data_field_mdl, rc= rc)
263
+
264
+ call mpi_barrier(mpi_comm_world, rc)
258
265
259
266
end subroutine interp2
0 commit comments