Skip to content

Commit ef715af

Browse files
Merge branch 'main' into github-display-lic
2 parents 2b1c383 + cd49e9a commit ef715af

File tree

85 files changed

+47
-1749
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+47
-1749
lines changed

CHANGELOG.rst

+6
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ individual files.
2222

2323
The changes are now listed with the most recent at the top.
2424

25+
**June 1 2023 :: Smoother removal. Tag v10.7.3**
26+
27+
- Dead smoother code removed.
28+
- Documentation fix for quality control.
29+
- Cray Compiler Environment mkmf.template
30+
2531
**May 10 2023 :: Doc-fix. Tag v10.7.2**
2632

2733
- conf.py changes for latest readthedocs. Fixes search and flyout menu.

README.rst

-1
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,6 @@ References
488488
assimilation_code/modules/observations/obs_kind_mod
489489
assimilation_code/modules/observations/DEFAULT_obs_kind_mod
490490
assimilation_code/modules/observations/obs_sequence_mod
491-
assimilation_code/modules/assimilation/smoother_mod
492491
assimilation_code/modules/assimilation/assim_readme
493492
assimilation_code/modules/assimilation/assim_tools_mod
494493
assimilation_code/modules/assimilation/cov_cutoff_mod

assimilation_code/modules/assimilation/filter_mod.dopplerfold.f90

+1-75
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,6 @@ module filter_mod
6565
use mpi_utilities_mod, only : my_task_id, task_sync, broadcast_send, broadcast_recv, &
6666
task_count
6767

68-
use smoother_mod, only : smoother_read_restart, advance_smoother, &
69-
smoother_gen_copy_meta_data, smoother_write_restart, &
70-
init_smoother, do_smoothing, smoother_mean_spread, &
71-
smoother_assim, smoother_ss_diagnostics, &
72-
smoother_end, set_smoother_trace
73-
7468
use random_seq_mod, only : random_seq_type, init_random_seq, random_gaussian
7569

7670
use state_vector_io_mod, only : state_vector_io_init, read_state, write_state, &
@@ -358,9 +352,8 @@ subroutine filter_main()
358352
type(file_info_type) :: file_info_output
359353
type(file_info_type) :: file_info_all
360354

361-
logical :: ds, all_gone, allow_missing
355+
logical :: all_gone, allow_missing
362356

363-
! real(r8), allocatable :: temp_ens(:) ! for smoother
364357
real(r8), allocatable :: prior_qc_copy(:)
365358

366359
call filter_initialize_modules_used() ! static_init_model called in here
@@ -392,8 +385,6 @@ subroutine filter_main()
392385
write(msgstring, '(A,I5)') 'running with an ensemble size of ', ens_size
393386
call error_handler(E_MSG,'filter_main:', msgstring, source)
394387

395-
! See if smoothing is turned on
396-
ds = do_smoothing()
397388

398389
call set_missing_ok_status(allow_missing_clm)
399390
allow_missing = get_missing_ok_status()
@@ -551,13 +542,6 @@ subroutine filter_main()
551542
! Set a time type for initial time if namelist inputs are not negative
552543
call filter_set_initial_time(init_time_days, init_time_seconds, time1, read_time_from_file)
553544

554-
! Moved this. Not doing anything with it, but when we do it should be before the read
555-
! Read in or initialize smoother restarts as needed
556-
if(ds) then
557-
call init_smoother(state_ens_handle, POST_INF_COPY, POST_INF_SD_COPY)
558-
call smoother_read_restart(state_ens_handle, ens_size, model_size, time1, init_time_days)
559-
endif
560-
561545
call trace_message('Before reading in ensemble restart files')
562546
call timestamp_message('Before reading in ensemble restart files')
563547

@@ -613,11 +597,6 @@ subroutine filter_main()
613597
prior_obs_spread_index, posterior_obs_spread_index, &
614598
compute_posterior)
615599

616-
if(ds) call error_handler(E_ERR, 'filter', 'smoother broken by Helen')
617-
618-
!>@todo fudge
619-
if(ds) call smoother_gen_copy_meta_data(num_output_state_members, output_inflation=.true.)
620-
621600
call timestamp_message('After initializing output files')
622601
call trace_message('After initializing output files')
623602

@@ -735,15 +714,6 @@ subroutine filter_main()
735714

736715
! if model state data not at required time, advance model
737716
if (curr_ens_time /= next_ens_time) then
738-
! Advance the lagged distribution, if needed.
739-
! Must be done before the model runs and updates the data.
740-
if(ds) then
741-
call trace_message('Before advancing smoother')
742-
call timestamp_message('Before advancing smoother')
743-
call advance_smoother(state_ens_handle)
744-
call timestamp_message('After advancing smoother')
745-
call trace_message('After advancing smoother')
746-
endif
747717

748718
! we are going to advance the model - make sure we're doing single file output
749719
if (.not. has_cycling) then
@@ -928,24 +898,6 @@ subroutine filter_main()
928898
call timestamp_message('After observation assimilation')
929899
call trace_message('After observation assimilation')
930900

931-
! Do the update for the smoother lagged fields, too.
932-
! Would be more efficient to do these all at once inside filter_assim
933-
! in the future
934-
if(ds) then
935-
write(msgstring, '(A,I8,A)') 'Ready to reassimilate up to', size(keys), ' observations in the smoother'
936-
call trace_message(msgstring, 'filter:', -1)
937-
938-
call trace_message('Before smoother assimilation')
939-
call timestamp_message('Before smoother assimilation')
940-
call smoother_assim(obs_fwd_op_ens_handle, seq, keys, ens_size, num_groups, &
941-
obs_val_index, ENS_MEAN_COPY, ENS_SD_COPY, &
942-
PRIOR_INF_COPY, PRIOR_INF_SD_COPY, OBS_KEY_COPY, OBS_GLOBAL_QC_COPY, &
943-
OBS_MEAN_START, OBS_MEAN_END, OBS_VAR_START, &
944-
OBS_VAR_END)
945-
call timestamp_message('After smoother assimilation')
946-
call trace_message('After smoother assimilation')
947-
endif
948-
949901
! Already transformed, so compute mean and spread for state diag as needed
950902
call compute_copy_mean_sd(state_ens_handle, 1, ens_size, ENS_MEAN_COPY, ENS_SD_COPY)
951903

@@ -982,11 +934,6 @@ subroutine filter_main()
982934
call write_state(state_ens_handle, file_info_postassim)
983935
endif
984936

985-
!>@todo What to do here?
986-
!call smoother_ss_diagnostics(model_size, num_output_state_members, &
987-
! output_inflation, temp_ens, ENS_MEAN_COPY, ENS_SD_COPY, &
988-
! POST_INF_COPY, POST_INF_SD_COPY)
989-
990937
call timestamp_message('After postassim state space output')
991938
call trace_message('After postassim state space output')
992939

@@ -1035,12 +982,6 @@ subroutine filter_main()
1035982
call timestamp_message('After computing posterior observation values')
1036983
call trace_message('After computing posterior observation values')
1037984

1038-
if(ds) then
1039-
call trace_message('Before computing smoother means/spread')
1040-
call smoother_mean_spread(ens_size, ENS_MEAN_COPY, ENS_SD_COPY)
1041-
call trace_message('After computing smoother means/spread')
1042-
endif
1043-
1044985
call trace_message('Before posterior obs space diagnostics')
1045986

1046987
! Write posterior observation space diagnostics
@@ -1104,11 +1045,6 @@ subroutine filter_main()
11041045
call write_state(state_ens_handle, file_info_analysis)
11051046
endif
11061047

1107-
!>@todo What to do here?
1108-
!call smoother_ss_diagnostics(model_size, num_output_state_members, &
1109-
! output_inflation, temp_ens, ENS_MEAN_COPY, ENS_SD_COPY, &
1110-
! POST_INF_COPY, POST_INF_SD_COPY)
1111-
11121048
call timestamp_message('After analysis state space output')
11131049
call trace_message('After analysis state space output')
11141050

@@ -1153,9 +1089,6 @@ subroutine filter_main()
11531089
if (.not. write_all_stages_at_end) &
11541090
call write_state(state_ens_handle, file_info_output)
11551091

1156-
!>@todo need to fix smoother
1157-
!if(ds) call smoother_write_restart(1, ens_size)
1158-
11591092
call timestamp_message('After state space output')
11601093
call trace_message('After state space output')
11611094

@@ -1215,12 +1148,6 @@ subroutine filter_main()
12151148
call destroy_obs_sequence(seq)
12161149
call trace_message('After ensemble and obs memory cleanup')
12171150

1218-
if(ds) then
1219-
call trace_message('Before smoother memory cleanup')
1220-
call smoother_end()
1221-
call trace_message('After smoother memory cleanup')
1222-
endif
1223-
12241151
call trace_message('Filter done')
12251152
call timestamp_message('Filter done')
12261153
if(my_task_id() == 0) then
@@ -1875,7 +1802,6 @@ subroutine set_trace(trace_execution, output_timestamps, silence)
18751802
timestamp_level = -1
18761803
endif
18771804

1878-
call set_smoother_trace(trace_level, timestamp_level)
18791805
call set_obs_model_trace(trace_level, timestamp_level)
18801806
call set_assim_tools_trace(trace_level, timestamp_level)
18811807

assimilation_code/modules/assimilation/filter_mod.f90

+1-75
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,6 @@ module filter_mod
6565
use mpi_utilities_mod, only : my_task_id, task_sync, broadcast_send, broadcast_recv, &
6666
task_count
6767

68-
use smoother_mod, only : smoother_read_restart, advance_smoother, &
69-
smoother_gen_copy_meta_data, smoother_write_restart, &
70-
init_smoother, do_smoothing, smoother_mean_spread, &
71-
smoother_assim, smoother_ss_diagnostics, &
72-
smoother_end, set_smoother_trace
73-
7468
use random_seq_mod, only : random_seq_type, init_random_seq, random_gaussian
7569

7670
use state_vector_io_mod, only : state_vector_io_init, read_state, write_state, &
@@ -353,9 +347,8 @@ subroutine filter_main()
353347
type(file_info_type) :: file_info_output
354348
type(file_info_type) :: file_info_all
355349

356-
logical :: ds, all_gone, allow_missing
350+
logical :: all_gone, allow_missing
357351

358-
! real(r8), allocatable :: temp_ens(:) ! for smoother
359352
real(r8), allocatable :: prior_qc_copy(:)
360353

361354
call filter_initialize_modules_used() ! static_init_model called in here
@@ -387,9 +380,6 @@ subroutine filter_main()
387380
write(msgstring, '(A,I5)') 'running with an ensemble size of ', ens_size
388381
call error_handler(E_MSG,'filter_main:', msgstring, source)
389382

390-
! See if smoothing is turned on
391-
ds = do_smoothing()
392-
393383
call set_missing_ok_status(allow_missing_clm)
394384
allow_missing = get_missing_ok_status()
395385

@@ -546,13 +536,6 @@ subroutine filter_main()
546536
! Set a time type for initial time if namelist inputs are not negative
547537
call filter_set_initial_time(init_time_days, init_time_seconds, time1, read_time_from_file)
548538

549-
! Moved this. Not doing anything with it, but when we do it should be before the read
550-
! Read in or initialize smoother restarts as needed
551-
if(ds) then
552-
call init_smoother(state_ens_handle, POST_INF_COPY, POST_INF_SD_COPY)
553-
call smoother_read_restart(state_ens_handle, ens_size, model_size, time1, init_time_days)
554-
endif
555-
556539
call trace_message('Before reading in ensemble restart files')
557540
call timestamp_message('Before reading in ensemble restart files')
558541

@@ -608,11 +591,6 @@ subroutine filter_main()
608591
prior_obs_spread_index, posterior_obs_spread_index, &
609592
compute_posterior)
610593

611-
if(ds) call error_handler(E_ERR, 'filter', 'smoother broken by Helen')
612-
613-
!>@todo fudge
614-
if(ds) call smoother_gen_copy_meta_data(num_output_state_members, output_inflation=.true.)
615-
616594
call timestamp_message('After initializing output files')
617595
call trace_message('After initializing output files')
618596

@@ -730,15 +708,6 @@ subroutine filter_main()
730708

731709
! if model state data not at required time, advance model
732710
if (curr_ens_time /= next_ens_time) then
733-
! Advance the lagged distribution, if needed.
734-
! Must be done before the model runs and updates the data.
735-
if(ds) then
736-
call trace_message('Before advancing smoother')
737-
call timestamp_message('Before advancing smoother')
738-
call advance_smoother(state_ens_handle)
739-
call timestamp_message('After advancing smoother')
740-
call trace_message('After advancing smoother')
741-
endif
742711

743712
! we are going to advance the model - make sure we're doing single file output
744713
if (.not. has_cycling) then
@@ -923,24 +892,6 @@ subroutine filter_main()
923892
call timestamp_message('After observation assimilation')
924893
call trace_message('After observation assimilation')
925894

926-
! Do the update for the smoother lagged fields, too.
927-
! Would be more efficient to do these all at once inside filter_assim
928-
! in the future
929-
if(ds) then
930-
write(msgstring, '(A,I8,A)') 'Ready to reassimilate up to', size(keys), ' observations in the smoother'
931-
call trace_message(msgstring, 'filter:', -1)
932-
933-
call trace_message('Before smoother assimilation')
934-
call timestamp_message('Before smoother assimilation')
935-
call smoother_assim(obs_fwd_op_ens_handle, seq, keys, ens_size, num_groups, &
936-
obs_val_index, ENS_MEAN_COPY, ENS_SD_COPY, &
937-
PRIOR_INF_COPY, PRIOR_INF_SD_COPY, OBS_KEY_COPY, OBS_GLOBAL_QC_COPY, &
938-
OBS_MEAN_START, OBS_MEAN_END, OBS_VAR_START, &
939-
OBS_VAR_END)
940-
call timestamp_message('After smoother assimilation')
941-
call trace_message('After smoother assimilation')
942-
endif
943-
944895
! Already transformed, so compute mean and spread for state diag as needed
945896
call compute_copy_mean_sd(state_ens_handle, 1, ens_size, ENS_MEAN_COPY, ENS_SD_COPY)
946897

@@ -977,11 +928,6 @@ subroutine filter_main()
977928
call write_state(state_ens_handle, file_info_postassim)
978929
endif
979930

980-
!>@todo What to do here?
981-
!call smoother_ss_diagnostics(model_size, num_output_state_members, &
982-
! output_inflation, temp_ens, ENS_MEAN_COPY, ENS_SD_COPY, &
983-
! POST_INF_COPY, POST_INF_SD_COPY)
984-
985931
call timestamp_message('After postassim state space output')
986932
call trace_message('After postassim state space output')
987933

@@ -1030,11 +976,6 @@ subroutine filter_main()
1030976
call timestamp_message('After computing posterior observation values')
1031977
call trace_message('After computing posterior observation values')
1032978

1033-
if(ds) then
1034-
call trace_message('Before computing smoother means/spread')
1035-
call smoother_mean_spread(ens_size, ENS_MEAN_COPY, ENS_SD_COPY)
1036-
call trace_message('After computing smoother means/spread')
1037-
endif
1038979

1039980
call trace_message('Before posterior obs space diagnostics')
1040981

@@ -1103,11 +1044,6 @@ subroutine filter_main()
11031044
call write_state(state_ens_handle, file_info_analysis)
11041045
endif
11051046

1106-
!>@todo What to do here?
1107-
!call smoother_ss_diagnostics(model_size, num_output_state_members, &
1108-
! output_inflation, temp_ens, ENS_MEAN_COPY, ENS_SD_COPY, &
1109-
! POST_INF_COPY, POST_INF_SD_COPY)
1110-
11111047
call timestamp_message('After analysis state space output')
11121048
call trace_message('After analysis state space output')
11131049

@@ -1152,9 +1088,6 @@ subroutine filter_main()
11521088
if (.not. write_all_stages_at_end) &
11531089
call write_state(state_ens_handle, file_info_output)
11541090

1155-
!>@todo need to fix smoother
1156-
!if(ds) call smoother_write_restart(1, ens_size)
1157-
11581091
call timestamp_message('After state space output')
11591092
call trace_message('After state space output')
11601093

@@ -1214,12 +1147,6 @@ subroutine filter_main()
12141147
call destroy_obs_sequence(seq)
12151148
call trace_message('After ensemble and obs memory cleanup')
12161149

1217-
if(ds) then
1218-
call trace_message('Before smoother memory cleanup')
1219-
call smoother_end()
1220-
call trace_message('After smoother memory cleanup')
1221-
endif
1222-
12231150
call trace_message('Filter done')
12241151
call timestamp_message('Filter done')
12251152
if(my_task_id() == 0) then
@@ -1910,7 +1837,6 @@ subroutine set_trace(trace_execution, output_timestamps, silence)
19101837
timestamp_level = -1
19111838
endif
19121839

1913-
call set_smoother_trace(trace_level, timestamp_level)
19141840
call set_obs_model_trace(trace_level, timestamp_level)
19151841
call set_assim_tools_trace(trace_level, timestamp_level)
19161842

assimilation_code/modules/assimilation/filter_mod.rst

-1
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,6 @@ Modules used
476476
ensemble_manager_mod
477477
adaptive_inflate_mod
478478
mpi_utilities_mod
479-
smoother_mod
480479
random_seq_mod
481480
state_vector_io_mod
482481
io_filenames_mod

0 commit comments

Comments
 (0)