-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
17 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4419,20 +4419,24 @@ subroutine cat_enkf_increments( & | |
|
||
N_select_varnames = 0 | ||
|
||
if (any(obs_param%varname == 'Tb')) then | ||
N_select_varnames = N_select_varnames + 1 | ||
select_varnames(N_select_varnames) = 'Tb' | ||
end if | ||
|
||
if (any(obs_param%varname == 'sfmc')) then | ||
N_select_varnames = N_select_varnames + 1 | ||
select_varnames(N_select_varnames) = 'sfmc' | ||
end if | ||
do ii = 1,N_obs_param | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
amfox37
Author
Contributor
|
||
|
||
if (trim(obs_param(ii)%varname) == 'Tb') then | ||
N_select_varnames = N_select_varnames + 1 | ||
select_varnames(N_select_varnames) = 'Tb' | ||
end if | ||
|
||
if (trim(obs_param(ii)%varname) == 'sfmc') then | ||
N_select_varnames = N_select_varnames + 1 | ||
select_varnames(N_select_varnames) = 'sfmc' | ||
end if | ||
|
||
if (trim(obs_param(ii)%varname) == 'sfds') then | ||
N_select_varnames = N_select_varnames + 1 | ||
select_varnames(N_select_varnames) = 'sfds' | ||
end if | ||
|
||
if (any(obs_param%varname == 'sfds')) then | ||
N_select_varnames = N_select_varnames + 1 | ||
select_varnames(N_select_varnames) = 'sfds' | ||
end if | ||
end do | ||
|
||
! Will get all species associated with Tb or sfds observations | ||
|
||
|
@amfox37 : Is this the correct logic? If there are two different species that have varname 'Tb', then the loop would result in N_select_varnames=2, whereas the old logic (with "any()") would have resulted in N_select_varnames=1. At least this is what it looks like to me late in the day. Maybe I'm getting it wrong. I suppose the loop needs to be around each of the varnames, with an exit from the loop after the if statement is true for the first time?