From daa39410557f436e2f2a166da8fec821b81e7469 Mon Sep 17 00:00:00 2001 From: Fredrik Jansson Date: Mon, 24 Aug 2020 15:52:54 +0200 Subject: [PATCH] Fix #58 by Jan Chylik - lsmcrossection works only for isurf==1, otherwise disable and print warning --- src/modlsmcrosssection.f90 | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modlsmcrosssection.f90 b/src/modlsmcrosssection.f90 index 95ac6ff7..03906a8b 100644 --- a/src/modlsmcrosssection.f90 +++ b/src/modlsmcrosssection.f90 @@ -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 @@ -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)