Ignore:
Timestamp:
Mar 15, 2019 3:36:25 PM (5 years ago)
Author:
forkel
Message:

editing in kpp4palm: add statements for avoiding unused variables, remove $Id

File:
1 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/UTIL/chemistry/gasphase_preproc/kpp4palm/bin/kpp4palm.ksh

    r3780 r3799  
    4040# -----------------
    4141# $Id$
     42# Removed edit of phot(nphot) for version edit phot(nphot), now done in fortran_file.C (15.03.2019, forkel)
     43# Editing with sed to add dummy statements toavoud unused variables
     44#
     45# 3780 2019-03-05 11:19:45Z forkel
    4246# forkel   05. March 2019: cs_mech and set_cm
    4347# forkel   30. Oktober 2018: Integrating contents of kp4_compress into chem_gasphase_mod.f90
     
    337341$BASE/bin/kpp4palm.exe $PREFIX $MODE $VLEN $DE_INDEX $DE_INDEX_FAST
    338342
    339 #Prelimanary, substitution has to be moved into kpp4palm.exe
     343# Add dummy statements in order to prevent warnings due to unused variables
     344#
     345sed -i -e '/cfactor =/a !  ' kk_kpp.f90
     346sed -i -e '/cfactor =/a    IF ( lu_crow(1) == 1  .OR.  lu_icol(1) == 1  .OR.  lu_irow(1) == 1 )  CONTINUE ' kk_kpp.f90
     347sed -i -e '/cfactor =/a ! Following line is just to avoid compiler message about unused variables' kk_kpp.f90
     348sed -i -e '/cfactor =/a !  ' kk_kpp.f90
     349
    340350if [[ $MODE = "vector" ]]
    341351then
    342   sed -i -e 's/phot(nphot/phot(vl_dim,nphot/g' kk_kpp.f90
    343 fi
     352sed -i -e '/! Computation of equation rates/i ! Following line is just to avoid compiler message about unused variables' kk_kpp.f90
     353sed -i -e '/! Computation of equation rates/i IF ( f(vl,nfix) > 0.0_dp )  CONTINUE' kk_kpp.f90
     354sed -i -e '/! Computation of equation rates/i !  ' kk_kpp.f90
     355else
     356sed -i -e '/! Computation of equation rates/i ! Following line is just to avoid compiler message about unused variables' kk_kpp.f90
     357sed -i -e '/! Computation of equation rates/i IF ( f(nfix) > 0.0_dp )  CONTINUE' kk_kpp.f90
     358sed -i -e '/! Computation of equation rates/i !  ' kk_kpp.f90
     359fi
     360
     361if [[ $MODE = "vector" ]]
     362then
     363sed -i -e '/REAL(kind=dp) :: b/a   IF ( f(vl,nfix) > 0.0_dp )  CONTINUE' kk_kpp.f90
     364sed -i -e '/REAL(kind=dp) :: b/a ! Following line is just to avoid compiler message about unused variables' kk_kpp.f90
     365sed -i -e '/REAL(kind=dp):: b/a !' kk_kpp.f90
     366else
     367sed -i -e '/REAL(kind=dp):: b/a   IF ( f(nfix) > 0.0_dp )  CONTINUE' kk_kpp.f90
     368sed -i -e '/REAL(kind=dp):: b/a ! Following line is just to avoid compiler message about unused variables' kk_kpp.f90
     369sed -i -e '/REAL(kind=dp):: b/a !' kk_kpp.f90
     370fi
     371
     372sed -i -e '/one=1.0_dp/a       IF ( incx == 0 )  CONTINUE' kk_kpp.f90
     373sed -i -e '/one=1.0_dp/a ! Following line is just to avoid compiler message about unused variables' kk_kpp.f90
     374sed -i -e '/one=1.0_dp/a !  ' kk_kpp.f90
     375
     376sed -i -e '/IF (alpha .eq. zero)RETURN/i !  ' kk_kpp.f90
     377sed -i -e '/IF (alpha .eq. zero)RETURN/i ! Following line is just to avoid compiler message about unused variables' kk_kpp.f90
     378sed -i -e '/IF (alpha .eq. zero)RETURN/i     IF ( incx == 0  .OR.  incy == 0 )  CONTINUE' kk_kpp.f90
     379
     380sed -i -e '/INTENT(INOUT):: b(n)/a       IF ( pivot(1) == 0 )  CONTINUE' kk_kpp.f90
     381sed -i -e '/INTENT(INOUT):: b(n)/a ! Following line is just to avoid compiler message about unused variables' kk_kpp.f90
     382sed -i -e '/INTENT(INOUT):: b(n)/a !  ' kk_kpp.f90
    344383
    345384if [[ -e $OUTDIR/${OUTFILE}.f90 ]]
Note: See TracChangeset for help on using the changeset viewer.