Removal of unnecessary, expensive array initializations in the MPAS_ATM model_mod.f90 #407
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description:
Removed unnecessary array initializations from get_close_state() and get_close_obs() subroutines in the MPAS_ATM model_mod.f90
close_ind = -99
if (present(dist)) dist = 1.0e9_r8 !something big and positive (far away) in radians
Their removal causes a significant reduction to the runtime (can be more than 20%) when running MPAS_ATM cases with large model_size.
See issue for more info.
Fixes issue
Fixes issue #405
Types of changes
Documentation changes needed?
Tests
Tested to be bitwise identical with both Intel and GNU Fortran.
MPAS_ATM was also built and run with all debugging flags, which did not produce any relevant errors or warnings.
For an execution of a high-memory case on Casper (96 ensemble members, 459,985 observations, model_size = 327,759,048), the runtime was reduced from 145 min. to 112 min. or about %23
For an execution of separate mpas_atm case that uses RTTOV observations (10 ensemble members, 77,042 observations, model_size = 109,118,772), the runtime is reduced from 1 min. 9 sec. to 55 sec. or about %20
These test cases are included under Testing Datasets.
Checklist for merging
Checklist for release
Testing Datasets
Test cases can be found in the following directories on Cheyenne, but any execution of filter with MPAS_ATM will work.
/glade/scratch/masmith/DART/models/mpas_atm/test_run_96ensmembers (will take over an hour to run)
/glade/scratch/masmith/DART/models/mpas_atm/test_run_5ensmembers (recommend using this smaller version)
These test cases must be run on the mega-mpas branch.
/glade/scratch/masmith/DART/models/mpas_atm/mpas_rttov_test
This test case can be run on main, but will need to use a specific build template and &preprocess_nml for the RTTOV obs. These can be found at /glade/scratch/masmith/DART/models/mpas_atm/work/rttov_input.nml and /glade/scratch/masmith/DART/build_templates/mkmf.template.rttov.intel