diff --git a/src/initial_mod.F90 b/src/initial_mod.F90 index 4491fea185ae18699767f37897cc8d0ecf0c228f..d02af4b8af855d7dc3938dc2d5447bd3f7380d3e 100644 --- a/src/initial_mod.F90 +++ b/src/initial_mod.F90 @@ -26,23 +26,19 @@ CONTAINS SUBROUTINE initial_readinputs ! Read the input parameters - USE basic, ONLY : lu_in USE prec_const IMPLICIT NONE NAMELIST /INITIAL/ INIT_OPT,ACT_ON_MODES,& - init_amp,init_background,init_noiselvl,iseed - + init_amp,init_background,init_noiselvl,iseed READ(lu_in,initial) - END SUBROUTINE initial_readinputs !******************************************************************************! !!!!!! initialize the moments and load/build coeff tables !******************************************************************************! SUBROUTINE initialize - USE basic, ONLY: speak USE time_integration, ONLY: set_updatetlevel USE collision, ONLY: init_collision @@ -53,9 +49,7 @@ CONTAINS USE model, ONLY: LINEARITY USE nonlinear, ONLY: compute_Sapj, nonlinear_init IMPLICIT NONE - CALL set_updatetlevel(1) - !!!!!! Set the moments arrays Nepj, Nipj and phi!!!!!! ! through loading a previous state IF ( job2load .GE. 0 ) THEN @@ -129,23 +123,18 @@ CONTAINS CALL update_ghosts_moments CALL update_ghosts_EM !! End of phi and moments initialization - ! Init collision operator CALL init_collision - !! Preparing auxiliary arrays at initial state ! particle density, fluid velocity and temperature (used in diagnose) CALL speak('Computing fluid moments and transport') CALL compute_fluid_moments CALL compute_radial_transport CALL compute_radial_heatflux - ! init auxval for nonlinear CALL nonlinear_init ! compute nonlinear for t=0 diagnostic CALL compute_Sapj ! compute S_0 = S(phi_0,N_0) - - END SUBROUTINE initialize !******************************************************************************! @@ -591,8 +580,8 @@ CONTAINS DO ij=1+ngj/2,local_nj+ngj/2 DO iz=1+ngz/2,local_nz+ngz/2 IF((ikx+local_nkx_offset .LE. 186) .AND. (iky+local_nky_offset .LE. 94)) THEN - IF (.TRUE.) THEN - ! IF ( (parray(ip) .EQ. 0) .AND. (jarray(ij) .EQ. 0) ) THEN + !IF (.TRUE.) THEN + IF ( (parray(ip) .EQ. 0) .AND. (jarray(ij) .EQ. 0) ) THEN moments(ia,ip,ij,iky,ikx,iz,:) = scaling*(ricci_mat_real(ikx+local_nkx_offset,iky+local_nky_offset)& - imagu*ricci_mat_imag(ikx+local_nkx_offset,iky+local_nky_offset)) ELSE diff --git a/src/readinputs.F90 b/src/readinputs.F90 index d0550189d8ff0b7791e12a10b026348eea7b02ab..b6e4bac0ccdd32de5d25238bb336eee68a325734 100644 --- a/src/readinputs.F90 +++ b/src/readinputs.F90 @@ -1,6 +1,5 @@ SUBROUTINE readinputs ! Additional data specific for a new run - USE grid, ONLY: grid_readinputs USE diagnostics, ONLY: diag_readinputs USE collision, ONLY: collision_readinputs diff --git a/src/utility_mod.F90 b/src/utility_mod.F90 index b854484898e0decd434e31984c00e520aa6ccd67..be5f4812eaabc87b7a36a4635e0393cfc5007d2d 100644 --- a/src/utility_mod.F90 +++ b/src/utility_mod.F90 @@ -1,6 +1,6 @@ MODULE utility IMPLICIT NONE - PUBLIC :: is_nan, is_inf!. checkfield, checkelem + PUBLIC :: is_nan, is_inf, decomp1D!. checkfield, checkelem CONTAINS FUNCTION is_nan(x,str) RESULT(isn) @@ -43,6 +43,21 @@ CONTAINS END FUNCTION is_inf + ! Distribute data among processes in a balanced way + SUBROUTINE decomp1D( n, numprocs, myid, is, ie ) + INTEGER, INTENT(IN) :: n, numprocs, myid + INTEGER, INTENT(OUT) :: is, ie + INTEGER :: nlocal + INTEGER :: deficit + nlocal = n / numprocs + is = myid * nlocal + 1 + deficit = MOD(n,numprocs) + is = is + MIN(myid,deficit) + IF (myid .LT. deficit) nlocal = nlocal + 1 + ie = is + nlocal - 1 + IF ((ie .GT. n) .OR. (myid .EQ. numprocs-1)) ie = n + END SUBROUTINE decomp1D + ! FUNCTION checkfield(n1,n2,n3,field,str) RESULT(mlend) ! use prec_const, ONLY: xp ! IMPLICIT NONE diff --git a/testcases/cyclone_example/fort_00.90 b/testcases/cyclone_example/fort_00.90 index 309ceed7edb743d9150be18137b69f0877b270e9..efb2eeef82f35524268bb17d9b0a81c5623bba70 100644 --- a/testcases/cyclone_example/fort_00.90 +++ b/testcases/cyclone_example/fort_00.90 @@ -60,7 +60,6 @@ nu = 0.05 beta = 0.0 ADIAB_E = .t. - tau_e = 1.0 / &CLOSURE hierarchy_closure='truncation'