-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfinalize_hma.F90
More file actions
70 lines (63 loc) · 2 KB
/
Copy pathfinalize_hma.F90
File metadata and controls
70 lines (63 loc) · 2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
!-----------------------BEGIN NOTICE -- DO NOT EDIT-----------------------
! NASA Goddard Space Flight Center
! Land Information System Framework (LISF)
! Version 7.3
!
! Copyright (c) 2020 United States Government as represented by the
! Administrator of the National Aeronautics and Space Administration.
! All Rights Reserved.
!-------------------------END NOTICE -- DO NOT EDIT-----------------------
!BOP
! !ROUTINE: finalize_hmaens
! \label{finalize_hmaens}
!
! !REVISION HISTORY:
! 23 Dec 2019: Sujay Kumar, initial code
!
! !INTERFACE:
subroutine finalize_hmaens(findex)
! !USES:
use LIS_coreMod, only : LIS_rc
use hmaens_forcingMod, only : hmaens_struc
!
! !DESCRIPTION:
! Routine to cleanup ERA5 forcing related memory allocations.
!
!EOP
implicit none
integer :: findex
integer :: n
do n=1,LIS_rc%nnest
select case( LIS_rc%met_interp(findex) )
case( "bilinear" )
deallocate(hmaens_struc(n)%n111)
deallocate(hmaens_struc(n)%n121)
deallocate(hmaens_struc(n)%n211)
deallocate(hmaens_struc(n)%n221)
deallocate(hmaens_struc(n)%w111)
deallocate(hmaens_struc(n)%w121)
deallocate(hmaens_struc(n)%w211)
deallocate(hmaens_struc(n)%w221)
case( "budget-bilinear" )
deallocate(hmaens_struc(n)%n111)
deallocate(hmaens_struc(n)%n121)
deallocate(hmaens_struc(n)%n211)
deallocate(hmaens_struc(n)%n221)
deallocate(hmaens_struc(n)%w111)
deallocate(hmaens_struc(n)%w121)
deallocate(hmaens_struc(n)%w211)
deallocate(hmaens_struc(n)%w221)
deallocate(hmaens_struc(n)%n112)
deallocate(hmaens_struc(n)%n122)
deallocate(hmaens_struc(n)%n212)
deallocate(hmaens_struc(n)%n222)
deallocate(hmaens_struc(n)%w112)
deallocate(hmaens_struc(n)%w122)
deallocate(hmaens_struc(n)%w212)
deallocate(hmaens_struc(n)%w222)
case( "neighbor" )
deallocate(hmaens_struc(n)%n113)
end select
enddo
deallocate(hmaens_struc)
end subroutine finalize_hmaens