Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix several incorrect argument ranks in calls to WRF I/O API routines #184

Merged
merged 2 commits into from
Nov 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions geogrid/src/output_module.F
Original file line number Diff line number Diff line change
Expand Up @@ -1429,21 +1429,21 @@ subroutine ext_put_dom_ti_integer_scalar(var_name, var_value)
#ifdef IO_BINARY
if (io_form_output == BINARY) then
call ext_int_put_dom_ti_integer(handle, trim(var_name), &
var_value, &
(/ var_value /), &
1, istatus)
end if
#endif
#ifdef IO_NETCDF
if (io_form_output == NETCDF) then
call ext_ncd_put_dom_ti_integer(handle, trim(var_name), &
var_value, &
(/ var_value /), &
1, istatus)
end if
#endif
#ifdef IO_GRIB1
if (io_form_output == GRIB1) then
call ext_gr1_put_dom_ti_integer(handle, trim(var_name), &
var_value, &
(/ var_value /), &
1, istatus)
end if
#endif
Expand Down Expand Up @@ -1516,21 +1516,21 @@ subroutine ext_put_dom_ti_real_scalar(var_name, var_value)
#ifdef IO_BINARY
if (io_form_output == BINARY) then
call ext_int_put_dom_ti_real(handle, trim(var_name), &
var_value, &
(/ var_value /), &
1, istatus)
end if
#endif
#ifdef IO_NETCDF
if (io_form_output == NETCDF) then
call ext_ncd_put_dom_ti_real(handle, trim(var_name), &
var_value, &
(/ var_value /), &
1, istatus)
end if
#endif
#ifdef IO_GRIB1
if (io_form_output == GRIB1) then
call ext_gr1_put_dom_ti_real(handle, trim(var_name), &
var_value, &
(/ var_value /), &
1, istatus)
end if
#endif
Expand Down
18 changes: 12 additions & 6 deletions metgrid/src/input_module.F
Original file line number Diff line number Diff line change
Expand Up @@ -633,25 +633,26 @@ subroutine ext_get_dom_ti_integer_scalar(var_name, var_value, suppress_errors)

! Local variables
integer :: istatus, outcount
integer, dimension(1) :: var_value_arr

#ifdef IO_BINARY
if (io_form_input == BINARY) then
call ext_int_get_dom_ti_integer(handle, trim(var_name), &
var_value, &
var_value_arr, &
1, outcount, istatus)
end if
#endif
#ifdef IO_NETCDF
if (io_form_input == NETCDF) then
call ext_ncd_get_dom_ti_integer(handle, trim(var_name), &
var_value, &
var_value_arr, &
1, outcount, istatus)
end if
#endif
#ifdef IO_GRIB1
if (io_form_input == GRIB1) then
call ext_gr1_get_dom_ti_integer(handle, trim(var_name), &
var_value, &
var_value_arr, &
1, outcount, istatus)
end if
#endif
Expand All @@ -662,6 +663,8 @@ subroutine ext_get_dom_ti_integer_scalar(var_name, var_value, suppress_errors)
call mprintf((istatus /= 0),ERROR,'Error while reading domain time-independent attribute.')
end if

var_value = var_value_arr(1)

end subroutine ext_get_dom_ti_integer_scalar


Expand Down Expand Up @@ -724,31 +727,34 @@ subroutine ext_get_dom_ti_real_scalar(var_name, var_value)

! Local variables
integer :: istatus, outcount
real, dimension(1) :: var_value_arr

#ifdef IO_BINARY
if (io_form_input == BINARY) then
call ext_int_get_dom_ti_real(handle, trim(var_name), &
var_value, &
var_value_arr, &
1, outcount, istatus)
end if
#endif
#ifdef IO_NETCDF
if (io_form_input == NETCDF) then
call ext_ncd_get_dom_ti_real(handle, trim(var_name), &
var_value, &
var_value_arr, &
1, outcount, istatus)
end if
#endif
#ifdef IO_GRIB1
if (io_form_input == GRIB1) then
call ext_gr1_get_dom_ti_real(handle, trim(var_name), &
var_value, &
var_value_arr, &
1, outcount, istatus)
end if
#endif

call mprintf((istatus /= 0),ERROR,'Error while reading domain time-independent attribute.')

var_value = var_value_arr(1)

end subroutine ext_get_dom_ti_real_scalar


Expand Down