Skip to content

Commit 63b3177

Browse files
fix update_bc.f90
skip on lbc_ not u zonal u, meridonal v delta_u allocation - only when needed & once
1 parent 5fb9a84 commit 63b3177

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

models/mpas_atm/update_bc.f90

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -180,10 +180,10 @@ program update_bc
180180

181181
allocate(old_lbc_ucell(nVertLevels, nCells))
182182
allocate(old_lbc_vcell(nVertLevels, nCells))
183-
allocate( delta_u(nVertLevels, nEdges))
184183

185-
call nc_get_variable(ncBdyID, 'uReconstructMeridional', old_lbc_ucell)
186-
call nc_get_variable(ncBdyID, 'uReconstructZonal', old_lbc_vcell)
184+
185+
call nc_get_variable(ncBdyID, 'uReconstructZonal', old_lbc_ucell)
186+
call nc_get_variable(ncBdyID, 'uReconstructMeridional', old_lbc_vcell)
187187

188188
endif
189189

@@ -198,7 +198,7 @@ program update_bc
198198
avarname = trim(bvarname(5:)) !corresponding field in analysis domain
199199

200200
! skip edge normal winds
201-
if (bvarname == 'u') cycle VARLOOP
201+
if (bvarname == 'lbc_u') cycle VARLOOP
202202

203203
! reconstructed cell-center winds have different names in the lbc file.
204204
if (bvarname == 'lbc_ur') avarname = 'uReconstructZonal'
@@ -253,8 +253,8 @@ program update_bc
253253
allocate( lbc_ucell(nVertLevels, nCells))
254254
allocate( lbc_vcell(nVertLevels, nCells))
255255

256-
call nc_get_variable(ncBdyID, 'lbc_ur', lbc_vcell) ! already blended in VARLOOP
257-
call nc_get_variable(ncBdyID, 'lbc_vr', lbc_ucell) ! already blended in VALOOP
256+
call nc_get_variable(ncBdyID, 'lbc_ur', lbc_ucell) ! already blended in VARLOOP
257+
call nc_get_variable(ncBdyID, 'lbc_vr', lbc_vcell) ! already blended in VARLOOP
258258

259259
if (lbc_update_winds_from_increments) then
260260

@@ -291,7 +291,7 @@ program update_bc
291291
else ! just replace, no increments
292292

293293
call uv_field_cell_to_edges(lbc_ucell, lbc_vcell, lbc_u)
294-
call nc_put_variable(ncBdyID, 'lbc_u', var_data)
294+
call nc_put_variable(ncBdyID, 'lbc_u', lbc_u)
295295

296296
endif
297297

0 commit comments

Comments
 (0)