Skip to content

Commit 644bb34

Browse files
committed
Merge branch 'init_atmosphere/geog_path_slash' into release-v8.0.0 (PR #1085)
This merge corrects an issue in which static field processing would fail when the config_geog_data_path option was specified in a namelist without a trailing '/' character. In such cases, trying to build paths to geographical data tiles at various points in the mpas_init_atm_static module would fail to produce a valid path. A local variable, geog_data_path, that is the same as config_geog_data_path but guaranteed to have a trailing '/' was already being set near the beginning of the init_atm_static() routine, and this merge simply uses that variable in place of the user-provided config_geog_data_path. With the changes in this merge, static field processing can work with a geographical data path from the namelist that either does or does not have a trailing '/'.
2 parents f3e9db1 + ab45039 commit 644bb34

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/core_init_atmosphere/mpas_init_atm_static.F

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,7 @@ subroutine init_atm_static(mesh, dims, configs)
374374
end select
375375
376376
call mpas_log_write('--- start interpolate TER')
377-
call interp_terrain(mesh, tree, trim(config_geog_data_path)//trim(geog_sub_path))
377+
call interp_terrain(mesh, tree, trim(geog_data_path)//trim(geog_sub_path))
378378
call mpas_log_write('--- end interpolate TER')
379379
380380
@@ -398,7 +398,7 @@ subroutine init_atm_static(mesh, dims, configs)
398398
end select surface_input_select1
399399
400400
call mpas_log_write('--- start interpolate LU_INDEX')
401-
call interp_landuse(mesh, tree, trim(config_geog_data_path)//trim(geog_sub_path), isice_lu, iswater_lu)
401+
call interp_landuse(mesh, tree, trim(geog_data_path)//trim(geog_sub_path), isice_lu, iswater_lu)
402402
call mpas_log_write('--- end interpolate LU_INDEX')
403403
404404
!
@@ -407,7 +407,7 @@ subroutine init_atm_static(mesh, dims, configs)
407407
geog_sub_path = 'soiltype_top_30s/'
408408
409409
call mpas_log_write('--- start interpolate SOILCAT_TOP')
410-
call interp_soilcat(mesh, tree, trim(config_geog_data_path)//trim(geog_sub_path), iswater_soil)
410+
call interp_soilcat(mesh, tree, trim(geog_data_path)//trim(geog_sub_path), iswater_soil)
411411
call mpas_log_write('--- end interpolate SOILCAT_TOP')
412412
413413
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
@@ -461,7 +461,7 @@ subroutine init_atm_static(mesh, dims, configs)
461461
call mpas_log_write(' Dataset will be supersampled by a factor of $i', intArgs=(/supersample_fac/))
462462
end if
463463
464-
ierr = mgr % init(trim(config_geog_data_path)//trim(geog_sub_path))
464+
ierr = mgr % init(trim(geog_data_path)//trim(geog_sub_path))
465465
if (ierr /= 0) then
466466
call mpas_log_write('Error occurred when initializing the interpolation of snow albedo (snoalb)', &
467467
messageType=MPAS_LOG_CRIT)
@@ -706,7 +706,7 @@ subroutine init_atm_static(mesh, dims, configs)
706706
707707
geog_sub_path = 'greenfrac_fpar_modis/'
708708
709-
ierr = mgr % init(trim(config_geog_data_path)//trim(geog_sub_path))
709+
ierr = mgr % init(trim(geog_data_path)//trim(geog_sub_path))
710710
if (ierr /= 0) then
711711
call mpas_log_write('Error occurred when initalizing the interpolation of monthly vegetation fraction (greenfrac)', &
712712
messageType=MPAS_LOG_CRIT)
@@ -938,7 +938,7 @@ subroutine init_atm_static(mesh, dims, configs)
938938
939939
geog_sub_path = 'albedo_modis/'
940940
941-
ierr = mgr % init(trim(config_geog_data_path)//trim(geog_sub_path))
941+
ierr = mgr % init(trim(geog_data_path)//trim(geog_sub_path))
942942
if (ierr /= 0) then
943943
call mpas_log_write('Error occurred when initalizing the interpolation of monthly albedo (albedo12m)', &
944944
messageType=MPAS_LOG_CRIT)

0 commit comments

Comments
 (0)