Skip to content

Set StokesMOST column arrays before they are read by StokesXi() - #448

Open
alperaltuntas wants to merge 1 commit into
dev/ncarfrom
fix_kpp_stokesmost_uninit
Open

Set StokesMOST column arrays before they are read by StokesXi()#448
alperaltuntas wants to merge 1 commit into
dev/ncarfrom
fix_kpp_stokesmost_uninit

Conversation

@alperaltuntas

@alperaltuntas alperaltuntas commented Aug 28, 2026

Copy link
Copy Markdown
Member

This PR sets cellHeight, uE_H and vE_H for the entire column before cvmix_kpp_compute_StokesXi() is called. All three are passed to that routine in full, but within the k loop they were filled only down to the current layer, while the routine reads one layer deeper. For instance, at k=1 it evaluates uE(1)-uE(2) and zk(1)-zk(2). So the values read beyond the current layer were whatever the arrays still held from the previous column.

The uE_H/vE_H loop is back where it was before #379 moved it into the k loop. The cell heights have been set within that loop since StokesMOST was introduced.

This changes answers for STOKES_MOST = True.

testing: status: pr_mom, b4b unless STOKES_MOST = True.

Note: this should also fix issue 348.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant