Skip to content

Commit

Permalink
Fix #58 by Jan Chylik - lsmcrossection works only for isurf==1, other…
Browse files Browse the repository at this point in the history
…wise disable and print warning
  • Loading branch information
Fredrik Jansson committed Aug 24, 2020
1 parent e6dd89a commit daa3941
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/modlsmcrosssection.f90
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ subroutine initlsmcrosssection
use modmpi, only :myid,my_real,mpierr,comm3d,mpi_logical,mpi_integer,cmyid
use modglobal,only :imax,jmax,ifnamopt,fname_options,dtmax,dtav_glob,ladaptive,j1,dt_lim,cexpnr,tres,btime,checknamelisterror
use modstat_nc,only : lnetcdf,open_nc, define_nc,ncinfo,nctiminfo,writestat_dims_nc
use modsurfdata, only : isurf
implicit none

integer :: ierr
Expand All @@ -92,6 +93,11 @@ subroutine initlsmcrosssection
close(ifnamopt)
end if

if (lcross .and. (isurf .ne. 1)) then
lcross = .FALSE.
write (6,*) "Ignoring lcross, lsmcrossection currently implemented only for isurf==1."
endif

call MPI_BCAST(dtav ,1,MY_REAL ,0,comm3d,mpierr)
call MPI_BCAST(lcross ,1,MPI_LOGICAL,0,comm3d,mpierr)
call MPI_BCAST(crossheight,1,MPI_INTEGER,0,comm3d,mpierr)
Expand Down

0 comments on commit daa3941

Please sign in to comment.