Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
gutmann committed Nov 16, 2024
2 parents a717083 + 247cc0d commit 94dac06
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 15 deletions.
8 changes: 4 additions & 4 deletions helpers/aggregate_parallel_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,15 +64,15 @@ def set_up_dataset(d):
x_off, y_off = get_dim_offset(dims)

if len(dims) == 1:
nt = d.dims[dims[0]]
nt = d.sizes[dims[0]]
data = np.zeros((nt))
if len(dims) == 2:
data = np.zeros((ny + y_off, nx + x_off))
if len(dims) == 3:
data = np.zeros((d.dims[dims[0]], ny + y_off, nx + x_off))
data = np.zeros((d.sizes[dims[0]], ny + y_off, nx + x_off))
if len(dims) == 4:
nt = d.dims[dims[0]]
nz = d.dims[dims[1]]
nt = d.sizes[dims[0]]
nz = d.sizes[dims[1]]
data = np.zeros((nt, nz, ny + y_off, nx + x_off))

# print(name, data.shape, dims, attrs)
Expand Down
5 changes: 1 addition & 4 deletions src/physics/linear_winds.f90
Original file line number Diff line number Diff line change
Expand Up @@ -597,10 +597,7 @@ subroutine copy_data_to_remote(wind, grids, LUT, LUT_co, LUT_index_co, i, j, k,
)
LUT_co(1:ime-ims+1, 1:jme-jms+1, this_image())[img] = wind(ims:ime,jms:jme)

LUT_index_co(this_image(), 1)[img] = i
LUT_index_co(this_image(), 2)[img] = j
LUT_index_co(this_image(), 3)[img] = k
LUT_index_co(this_image(), 4)[img] = z
LUT_index_co(this_image(), :)[img] = [i, j, k, z]
end associate
enddo

Expand Down
2 changes: 1 addition & 1 deletion src/physics/lsm_driver.f90
Original file line number Diff line number Diff line change
Expand Up @@ -1169,7 +1169,6 @@ subroutine lsm_init(domain,options)
END DO
END DO
endif
! if(options%parameters%debug) write(*,*)" ",lake_count, " lake cells in image ", this_image()

! setlake_depth_flag and use_lakedepth flag. (They seem to be redundant, but whatever):
if( associated(domain%lake_depth%data_2d) ) then
Expand Down Expand Up @@ -1270,6 +1269,7 @@ subroutine lsm(domain,options,dt)
! First handle the open water surface options
! --------------------------------------------------
! if (options%physics%watersurface==kWATER_BASIC) then
! write(*,*) "WARNING: Water Basic option has been disabled"
! Note, do nothing because QFX and QSFC are only used for to calculate diagnostic
! T2m and Q2m. However, the fluxes and stability terms are not coordinated, so
! This leads to problems in the current formulation and this has been removed.
Expand Down
13 changes: 7 additions & 6 deletions src/physics/ra_clWRF_support.f90
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
!-----------------------------------------------------------------------
MODULE module_ra_clWRF_support

use iso_fortran_env, only: iostat_end
!USE module_wrf_error

IMPLICIT NONE
Expand Down Expand Up @@ -113,6 +114,7 @@ SUBROUTINE read_CAMgases(yr, julian, model, co2vmr, n2ovmr, ch4vmr, cfc11vmr, cf
!INTEGER, EXTERNAL :: get_unused_unit

INTEGER :: istatus, iunit, idata
CHARACTER(LEN=1024) :: imessage
!ccc VARCAM_in_years is a module variable, needs something else here!
INTEGER, SAVE :: max_years
integer :: nyrm, nyrp, njulm, njulp
Expand Down Expand Up @@ -151,7 +153,7 @@ SUBROUTINE read_CAMgases(yr, julian, model, co2vmr, n2ovmr, ch4vmr, cfc11vmr, cf
istatus = 0
idata = 1
DO WHILE (istatus == 0)
READ(UNIT=iunit, FMT='(I4, 1x, F8.3,1x, 4(F10.3,1x))', IOSTAT=istatus) &
READ(UNIT=iunit, FMT='(I4, 1x, F8.3,1x, 4(F10.3,1x))', IOSTAT=istatus, IOMSG=imessage) &
yrdata(idata), co2r(idata), n2or(idata), ch4r(idata), cfc11r(idata), &
cfc12r(idata)
if (istatus==0) then
Expand All @@ -171,11 +173,10 @@ SUBROUTINE read_CAMgases(yr, julian, model, co2vmr, n2ovmr, ch4vmr, cfc11vmr, cf
END DO
if (this_image()==1) print*,"CLWRF read:",idata-1, " lines"

! gnu, intel? and cray end of file error status?
IF ((istatus /= -1).and.(istatus/=-4001)) THEN
if (this_image()==1) PRINT *,'CLWRF -- clwrf -- CLWRF ALERT!'
if (this_image()==1) PRINT *," Not normal ending of 'CAMtr_volume_mixing_ratio' file"
if (this_image()==1) PRINT *," Lecture ends with 'IOSTAT'=",istatus
IF (istatus /= iostat_end) THEN
PRINT *,'CLWRF -- clwrf -- CLWRF ALERT!'
PRINT *," Not normal ending of 'CAMtr_volume_mixing_ratio' file"
PRINT *," Lecture ends with 'IOSTAT'=",istatus, "and IOMSG=", trim(imessage)
END IF
max_years = idata - 1
CLOSE(iunit)
Expand Down

0 comments on commit 94dac06

Please sign in to comment.