Skip to content

Commit

Permalink
Merge pull request #1 from feiyulu/MOM6_DA
Browse files Browse the repository at this point in the history
removed copy_profiles, using linked profiles in ensemble_filter
  • Loading branch information
MJHarrison-GFDL authored Mar 26, 2018
2 parents 57102da + 857d5ff commit 59625bd
Showing 1 changed file with 3 additions and 8 deletions.
11 changes: 3 additions & 8 deletions src/framework/MOM_oda_driver.F90
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module MOM_oda_driver_mod
use constants_mod, only : radius, epsln
! ODA Modules
use oda_types_mod, only : grid_type, ocean_profile_type, ocean_control_struct
use oda_core_mod, only : oda_core_init, get_profiles, copy_profiles
use oda_core_mod, only : oda_core_init, get_profiles
! use eakf_oda_mod, only : ensemble_filter
use write_ocean_data_mod, only : open_profile_file
use write_ocean_data_mod, only : write_profile,close_profile_file
Expand Down Expand Up @@ -448,8 +448,6 @@ subroutine oda(Time, CS)
type(oda_CS), intent(inout) :: CS

integer :: i, j
type(ocean_profile_type), pointer, dimension(:) :: Profiles
integer :: numprof
integer :: m

if ( Time == CS%Time ) then
Expand All @@ -458,13 +456,10 @@ subroutine oda(Time, CS)
call set_current_pelist()
call set_root_pe(CS%ensemble_pelist(1,1))

call get_profiles(Time, CS%Profiles, CS%CProfiles, numprof)
allocate(Profiles(numprof))
call copy_profiles(CS%CProfiles, Profiles)
call get_profiles(Time, CS%Profiles, CS%CProfiles)
#ifdef ENABLE_ECDA
call ensemble_filter(CS%Ocean_prior, CS%Ocean_posterior, Profiles, CS%kdroot, CS%mpp_domain, CS%oda_grid)
call ensemble_filter(CS%Ocean_prior, CS%Ocean_posterior, CS%CProfiles, CS%kdroot, CS%mpp_domain, CS%oda_grid)
#endif
deallocate(Profiles)

!! switch back to ensemble member pelist
call set_current_pelist(CS%ensemble_pelist(CS%ensemble_id,:))
Expand Down

0 comments on commit 59625bd

Please sign in to comment.