Skip to content

Commit

Permalink
Merge pull request ufs-community#69 from kaiyuan-cheng/gnu_compiler
Browse files Browse the repository at this point in the history
Fix for GNU compiler
  • Loading branch information
bensonr authored Feb 11, 2021
2 parents 6a335ad + 48fc570 commit 9078be0
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
2 changes: 1 addition & 1 deletion GFDL_tools/fv_diag_column.F90
Original file line number Diff line number Diff line change
Expand Up @@ -478,7 +478,7 @@ subroutine debug_column_dyn(pt, delp, delz, u, v, w, q, heat_source, cappa, akap
else
heats = 0.0
endif
write(unit,'(I4, F7.2, F8.3, I6, F8.3, F8.3, F8.3, F8.3, F9.5, F9.3, F9.3, G )') &
write(unit,'(I4, F7.2, F8.3, I6, F8.3, F8.3, F8.3, F8.3, F9.5, F9.3, F9.3, G9.3 )') &
k, temp, delp(i,j,k)*0.01, -int(delz(i,j,k)), u(i,j,k), v(i,j,k), w(i,j,k), &
q(i,j,k,sphum)*1000., cond*1000., pres*1.e-2, (pres-preshyd(k))*1.e-2, heats
enddo
Expand Down
14 changes: 11 additions & 3 deletions driver/SHiELD/atmosphere.F90
Original file line number Diff line number Diff line change
Expand Up @@ -758,14 +758,22 @@ subroutine atmosphere_hgt (hgt, position, relative, flip)
!--- if needed, flip the indexing during this step
if (flip) then
if (.not. relative) then
z(:,:,1) = Atm(mygrid)%phis(:,:)/grav
do j = jsc, jec
do i = isc, iec
z(i-isc+1,j-jsc+1,1) = Atm(mygrid)%phis(i,j)/grav
enddo
enddo
endif
do k = 2,npz+1
z(:,:,k) = z(:,:,k-1) - dz(:,:,npz+2-k)
enddo
else
if (.not. relative) then
z(:,:,npz+1) = Atm(mygrid)%phis(:,:)/grav
do j = jsc, jec
do i = isc, iec
z(i-isc+1,j-jsc+1,npz+1) = Atm(mygrid)%phis(i,j)/grav
enddo
enddo
endif
do k = npz,1,-1
z(:,:,k) = z(:,:,k+1) - dz(:,:,k)
Expand Down Expand Up @@ -875,7 +883,7 @@ subroutine atmosphere_nggps_diag (Time, init)
logical, optional, intent(in) :: init

if (PRESENT(init)) then
if (init == .true.) then
if (init .eqv. .true.) then
call fv_nggps_diag_init(Atm(mygrid:mygrid), Atm(mygrid)%atmos_axes, Time)
return
else
Expand Down
3 changes: 1 addition & 2 deletions tools/fv_grid_tools.F90
Original file line number Diff line number Diff line change
Expand Up @@ -598,8 +598,7 @@ subroutine init_grid(Atm, grid_name, grid_file, npx, npy, npz, ndims, nregions,
call setup_aligned_nest(Atm)

else
!if(trim(grid_file) == 'INPUT/grid_spec.nc') then
if(Atm%flagstruct%grid_type < 0 ) then
if( trim(grid_file) == 'INPUT/grid_spec.nc' .or. Atm%flagstruct%grid_type < 0 ) then
call read_grid(Atm, grid_file, ndims, nregions, ng)
else

Expand Down
2 changes: 1 addition & 1 deletion tools/test_cases.F90
Original file line number Diff line number Diff line change
Expand Up @@ -6808,6 +6808,7 @@ subroutine read_namelist_test_case_nml(nml_filename)

character(*), intent(IN) :: nml_filename
integer :: ierr, f_unit, unit, ios
namelist /test_case_nml/test_case, bubble_do, alpha, nsolitons, soliton_Umax, soliton_size

#include<file_version.h>

Expand All @@ -6817,7 +6818,6 @@ subroutine read_namelist_test_case_nml(nml_filename)
alpha = 0.
bubble_do = .false.
test_case = 11 ! (USGS terrain)
namelist /test_case_nml/test_case, bubble_do, alpha, nsolitons, soliton_Umax, soliton_size

#ifdef INTERNAL_FILE_NML
! Read Test_Case namelist
Expand Down

0 comments on commit 9078be0

Please sign in to comment.