Skip to content

Commit

Permalink
Update models/ROMS/model_mod.f90 to reduce evaluated expressions
Browse files Browse the repository at this point in the history
  • Loading branch information
johnsonbk committed Sep 21, 2022
1 parent 0732910 commit 7c91b72
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions models/ROMS/model_mod.f90
Original file line number Diff line number Diff line change
Expand Up @@ -697,19 +697,18 @@ subroutine pert_model_copies(state_ens_handle, ens_size, perturbation_amplitude,
! Initialize random number sequence
call init_random_seq(random_seq, my_task_id())

! only perturb the actual ocean cells; leave the land and
! ocean floor values alone.
! Perturb the salinity and temperature fields

do i=1,state_ens_handle%my_num_vars
dart_index = state_ens_handle%my_vars(i)
call get_state_meta_data(dart_index, location, var_type)
do j=1, ens_size
if (var_type == QTY_TEMPERATURE .or. var_type == QTY_SALINITY) then
if (var_type == QTY_TEMPERATURE .or. var_type == QTY_SALINITY) then
do j=1, ens_size
state_ens_handle%copies(j,i) = random_gaussian(random_seq, &
state_ens_handle%copies(j,i), &
perturbation_amplitude)

endif
enddo
enddo
endif
enddo

end subroutine pert_model_copies
Expand Down

0 comments on commit 7c91b72

Please sign in to comment.