Skip to content

Commit 7c589c9

Browse files
committed
Update code to fix Cray-related compiler issues
* Use assumed shape / volatile arrays with ext libs * Replace timestep multiple check with mod operator
1 parent d58ae32 commit 7c589c9

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/Land_models/NoahMP/IO_code/module_hrldas_netcdf_io.F

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -430,7 +430,7 @@ subroutine read_hrldas_hdrinfo(wrfinput_flnm, ix, jx, &
430430
real, pointer, dimension(:,:) :: dum2d_ptr
431431
#endif
432432
integer, volatile :: ncid, dimid, varid, ierr
433-
real, allocatable, dimension(:,:) :: dum2d
433+
real, allocatable, dimension(:,:), volatile :: dum2d
434434
character(len=256) :: units
435435
integer :: i
436436
integer :: rank
@@ -1320,7 +1320,7 @@ subroutine get_2d_netcdf(name, ncid, array, units, xstart, xend, ystart, yend, &
13201320
integer, intent(in) :: ncid
13211321
integer, intent(in) :: xstart, xend, ystart, yend
13221322
#ifdef MPP_LAND
1323-
real, dimension(xstart:xend,ystart:yend), intent(inout) :: array
1323+
real, dimension(:,:), intent(inout) :: array
13241324
#else
13251325
real, dimension(xstart:xend,ystart:yend), intent(out) :: array
13261326
#endif
@@ -1332,7 +1332,7 @@ subroutine get_2d_netcdf(name, ncid, array, units, xstart, xend, ystart, yend, &
13321332
logical, intent(in) :: fatal_if_error
13331333
integer, intent(out), volatile :: ierr
13341334
#ifdef MPP_LAND
1335-
real:: g_array(global_nx,global_ny)
1335+
real, volatile :: g_array(global_nx,global_ny)
13361336
#endif
13371337
13381338
ierr = 0

src/OrchestratorLayer/config.f90

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -749,11 +749,11 @@ subroutine init_namelist_rt_field(did)
749749
print*, "reset DTRT_TER=nlst(did)%DT "
750750
DTRT_TER=nlst(did)%DT
751751
endif
752-
if(nlst(did)%DT/DTRT_TER .ne. real(int(nlst(did)%DT) / int(DTRT_TER)) ) then
752+
if (modulo(nlst(did)%DT, DTRT_TER) /= 0) then
753753
print*, "nlst(did)%DT, DTRT_TER = ",nlst(did)%DT, DTRT_TER
754754
call hydro_stop("module_namelist: DT not a multiple of DTRT_TER")
755755
endif
756-
if(nlst(did)%DT/DTRT_CH .ne. real(int(nlst(did)%DT) / int(DTRT_CH)) ) then
756+
if (modulo(nlst(did)%DT, DTRT_CH) /= 0) then
757757
print*, "nlst(did)%DT, DTRT_CH = ",nlst(did)%DT, DTRT_CH
758758
call hydro_stop("module_namelist: DT not a multiple of DTRT_CH")
759759
endif

0 commit comments

Comments
 (0)