diff --git a/src/conv_mod.f90 b/src/conv_mod.f90 index b2c7efcf5f5cb390773b266b64bb050b3151bffb..76a639c3fd9b1811d01581ee163d5a14378d53d8 100644 --- a/src/conv_mod.f90 +++ b/src/conv_mod.f90 @@ -438,7 +438,7 @@ subroutine convmix(itime) ! Now visit all grid columns where particles are present ! by going through the sorted particles !$OMP PARALLEL PRIVATE (igrold,kpart,ipart,igr,jy,ix,kz,lconv, & -!$OMP ktop,ztold,nage,ipconv,itage,lcalcflux) +!$OMP ktop,ztold,nage,ipconv,itage,lcalcflux,ithread) igrold = -1 #if (defined _OPENMP) ithread = OMP_GET_THREAD_NUM()+1 ! Starts at 1 diff --git a/src/drydepo_mod.f90 b/src/drydepo_mod.f90 index 98bf7c653873446964cdff93e2f7911e61257a19..9bd0ee83e6a15b1328e2f0ed11c2898fb8db83bf 100644 --- a/src/drydepo_mod.f90 +++ b/src/drydepo_mod.f90 @@ -38,18 +38,25 @@ subroutine alloc_drydepo if (.not. drydep) return write(*,*) 'allocate drydepo fields' allocate(xlanduse(0:nxmax-1,0:nymax-1,numclass), & - xlandusen(0:nxmaxn-1,0:nymaxn-1,numclass,numbnests), & vdep(0:nxmax-1,0:nymax-1,maxspec,numwfmem), & - z0_drydep(0:nxmax-1,0:nymax-1), & - z0_drydepn(0:nxmax-1,0:nymax-1,numbnests), stat=stat) + z0_drydep(0:nxmax-1,0:nymax-1), stat=stat) if (stat.ne.0) error stop "Could not allocate drydepo fields" + if (numbnests.ge.1) then + allocate(xlandusen(0:nxmaxn-1,0:nymaxn-1,numclass,numbnests), & + vdepn(0:nxmaxn-1,0:nymaxn-1,maxspec,numwfmem,numbnests), & + z0_drydepn(0:nxmaxn-1,0:nymaxn-1,numbnests), stat=stat) + if (stat.ne.0) error stop "Could not allocate drydepo fields" + endif end subroutine alloc_drydepo subroutine dealloc_drydepo if (.not. drydep) return - deallocate(xlanduse,xlandusen,vdep,z0_drydep,z0_drydepn) + deallocate(xlanduse,vdep,z0_drydep) + if (numbnests.ge.1) then + deallocate(xlandusen,vdepn,z0_drydepn) + endif end subroutine dealloc_drydepo diff --git a/src/make_command.sh b/src/make_command.sh deleted file mode 100755 index deb0e704a23a0da693480e6e4455e4a5d0c7a559..0000000000000000000000000000000000000000 --- a/src/make_command.sh +++ /dev/null @@ -1,23 +0,0 @@ - -module purge -module load eccodes -export CPATH=/opt/tools/eccodes/2.28.0-gcc9.4/include:/opt/tools/netcdf-fortran/4.6.0-gcc9.4/include -export LIBRARY_PATH=$LIBRARY_PATH:/opt/tools/eccodes/2.28.0-gcc9.4/lib - -rm -f *.o *.mod - -# eta ncf - new default FLEXPART_ETA -FC=/opt/tools/gcc/9.4.0/bin/gfortran make -f makefile_gfortran -#executable: FLEXPART_ETA - -# meter bin - classic -#FC=/opt/tools/gcc/9.4.0/bin/gfortran make -f makefile_gfortran eta=no ncf=no -# executable: FLEXPART_BIN - -# meter ncf: -#FC=/opt/tools/gcc/9.4.0/bin/gfortran make -f makefile_gfortran eta=no -# executable: FLEXPART - -# eta/bin -#FC=/opt/tools/gcc/9.4.0/bin/gfortran make -f makefile_gfortran ncf=no -# executable: FLEXPART_ETA_BIN diff --git a/src/windfields_mod.f90 b/src/windfields_mod.f90 index 1168c929ca089488730afb14549131683fe4cecc..e2e7dac30dbff969c130c24643b21c987aac1842 100644 --- a/src/windfields_mod.f90 +++ b/src/windfields_mod.f90 @@ -1882,11 +1882,8 @@ subroutine gridcheck_nest ! Allocate memory for windfields using nxmax, nymaxn, numbnest !************************************************************* - if (numbnests.ge.1) then - ! If nested wind fields are used, allocate arrays - !************************************************ - call alloc_windfields_nest - endif + call alloc_windfields_nest + return @@ -4303,8 +4300,6 @@ subroutine alloc_windfields_nest if (stat.ne.0) error stop "Could not allocate tropopausen" allocate(olin(0:nxmaxn-1,0:nymaxn-1,1,numwfmem,numbnests),stat=stat) if (stat.ne.0) error stop "Could not allocate olin" - allocate(vdepn(0:nxmaxn-1,0:nymaxn-1,maxspec,numwfmem,numbnests),stat=stat) - if (stat.ne.0) error stop "Could not allocate vdepn" ! Initialise !************ @@ -4362,7 +4357,7 @@ subroutine dealloc_windfields_nest #endif deallocate(psn,sdn,msln,tccn,u10n,v10n,tt2n,td2n,lsprecn,convprecn, & - sshfn,ssrn,sfcstressn,ustarn,wstarn,hmixn,tropopausen,olin,vdepn) + sshfn,ssrn,sfcstressn,ustarn,wstarn,hmixn,tropopausen,olin) deallocate(xresoln,yresoln,xln,yln,xrn,yrn) end subroutine dealloc_windfields_nest