Skip to content

Commit e87944c

Browse files
committed
Slight adaptions for facilitating merge
1 parent 0baac7a commit e87944c

1 file changed

Lines changed: 13 additions & 14 deletions

File tree

interface/model/eclm/enkf_clm_mod_5.F90

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -138,6 +138,12 @@ subroutine define_clm_statevec(mype)
138138

139139
call get_proc_bounds(begg, endg, begl, endl, begc, endc, begp, endp)
140140

141+
#ifdef PDAF_DEBUG
142+
WRITE(*,"(a,i5,a,i10,a,i10,a,i10,a,i10,a,i10,a,i10,a,i10,a,i10,a)") &
143+
"TSMP-PDAF mype(w)=", mype, " define_clm_statevec, CLM5-bounds (g,l,c,p)----",&
144+
begg,",",endg,",",begl,",",endl,",",begc,",",endc,",",begp,",",endp," -------"
145+
#endif
146+
141147
clm_begg = begg
142148
clm_endg = endg
143149
clm_begc = begc
@@ -198,6 +204,7 @@ subroutine define_clm_statevec(mype)
198204
WRITE(*, '(a,x,a,i5,x,a,i10)') "TSMP-PDAF-debug", "mype(w)=", mype, "define_clm_statevec: clm_statevecsize=", clm_statevecsize
199205
#endif
200206

207+
IF (allocated(clm_statevec)) deallocate(clm_statevec)
201208
if ((clmupdate_swc/=0) .or. (clmupdate_T/=0) .or. (clmupdate_texture/=0) .or. (clmupdate_tws/=0)) then
202209
!hcp added condition
203210
allocate(clm_statevec(clm_statevecsize))
@@ -1154,7 +1161,7 @@ subroutine update_clm(tstartcycle, mype) bind(C,name="update_clm")
11541161

11551162
! write updated swc back to CLM
11561163
if(obs_type_update_swc/=0) then
1157-
call update_swc(tstartcycle, mype)
1164+
call update_clm_swc(tstartcycle, mype)
11581165
endif
11591166

11601167
!hcp: TG, TV
@@ -1165,7 +1172,7 @@ subroutine update_clm(tstartcycle, mype) bind(C,name="update_clm")
11651172

11661173
! write updated texture back to CLM
11671174
if(obs_type_update_texture/=0) then
1168-
call update_texture(tstartcycle, mype)
1175+
call update_clm_texture(tstartcycle, mype)
11691176
endif
11701177

11711178
if (obs_type_update_tws==1) then
@@ -1177,7 +1184,7 @@ subroutine update_clm(tstartcycle, mype) bind(C,name="update_clm")
11771184
end subroutine update_clm
11781185

11791186

1180-
subroutine update_swc(tstartcycle, mype)
1187+
subroutine update_clm_swc(tstartcycle, mype)
11811188
use clm_varpar , only : nlevsoi
11821189
use shr_kind_mod , only : r8 => shr_kind_r8
11831190
use ColumnType , only : col
@@ -1383,11 +1390,10 @@ subroutine update_swc(tstartcycle, mype)
13831390
end do
13841391
end do
13851392

1386-
end subroutine update_swc
1393+
end subroutine update_clm_swc
13871394

13881395

1389-
1390-
subroutine update_texture(tstartcycle, mype)
1396+
subroutine update_clm_texture(tstartcycle, mype)
13911397
use clm_varpar , only : nlevsoi
13921398
use shr_kind_mod , only : r8 => shr_kind_r8
13931399
use clm_instMod, only : soilstate_inst
@@ -1425,7 +1431,7 @@ subroutine update_texture(tstartcycle, mype)
14251431
call clm_correct_texture
14261432
call clm_texture_to_parameters
14271433

1428-
end subroutine update_texture
1434+
end subroutine update_clm_texture
14291435

14301436

14311437

@@ -2223,7 +2229,6 @@ subroutine init_n_domains_clm(n_domains_p)
22232229
use decompMod, only : get_proc_bounds
22242230
use clm_varcon , only : ispval
22252231
use ColumnType , only : col
2226-
use GridcellType , only : grc
22272232

22282233
implicit none
22292234

@@ -2236,12 +2241,6 @@ subroutine init_n_domains_clm(n_domains_p)
22362241
integer :: c
22372242
integer :: cc
22382243

2239-
real(r8), pointer :: lon(:)
2240-
real(r8), pointer :: lat(:)
2241-
2242-
lon => grc%londeg
2243-
lat => grc%latdeg
2244-
22452244
! TODO: remove unnecessary calls of get_proc_bounds (use clm_begg,
22462245
! clm_endg, etc)
22472246
call get_proc_bounds(begg=begg, endg=endg, begc=begc, endc=endc)

0 commit comments

Comments
 (0)