Skip to content

Commit

Permalink
Read FAST-JX input files from data directory instead of run directory
Browse files Browse the repository at this point in the history
The .dat FAST-JX input files have been moved from the run directories
to ExtData/CHEM_INPUTS/FAST_JX/v2018-09/. Chris Holmes wrote:

  Move all of the photolysis and aerosol optics data files out of
  the run directory and into a folder in ExtData. That would allow
  them to be documented, tracked and updated like emissions. As far
  as I have seen, these files are rarely modified by users, so they
  don’t need to be in the run directory. That would include the
  following files...

      brc.dat
      dust.dat
      FJX_j2j.dat
      FJX_spec.dat
      h2so4.dat
      jv_spec_mie.dat
      org.dat
      so4.dat
      soot.dat
      ssa.dat
      ssc.dat

Signed-off-by: Melissa Sulprizio <mpayer@seas.harvard.edu>
  • Loading branch information
msulprizio committed Sep 19, 2018
1 parent 32d5672 commit 03e94fe
Showing 1 changed file with 27 additions and 15 deletions.
42 changes: 27 additions & 15 deletions GeosCore/fast_jx_mod.F
Expand Up @@ -1679,10 +1679,12 @@ SUBROUTINE INIT_FJX( am_I_Root, Input_Opt,
!
! !REVISION HISTORY:
! 28 Mar 2013 - S. D. Eastham - Copied from Fast-JX v7.0
! 05 Mar 2014 - R. Yantosca - Use correct filenames for use w/ ESMF
! 27 Sep 2017 - M. Sulprizio- Define species IDs for ND22 diagnostic
! 03 Nov 2017 - R. Yantosca - Now accept State_Diag as an argument
! 29 Dec 2017 - C. Keller - Print mapping on root CPU only
! 05 Mar 2014 - R. Yantosca - Use correct filenames for use w/ ESMF
! 27 Sep 2017 - M. Sulprizio - Define species IDs for ND22 diagnostic
! 03 Nov 2017 - R. Yantosca - Now accept State_Diag as an argument
! 29 Dec 2017 - C. Keller - Print mapping on root CPU only
! 19 Sep 2018 - M. Sulprizio - Read .dat files from data directories instead
! of run directories
!EOP
!------------------------------------------------------------------------------
!BOC
Expand All @@ -1695,6 +1697,7 @@ SUBROUTINE INIT_FJX( am_I_Root, Input_Opt,
! Strings
CHARACTER(LEN=6) :: TITLEJXX(JVN_)
CHARACTER(LEN=255) :: DATA_DIR
CHARACTER(LEN=255) :: FILENAME
CHARACTER(LEN=255) :: ErrMsg, ThisLoc
Expand Down Expand Up @@ -1738,10 +1741,13 @@ SUBROUTINE INIT_FJX( am_I_Root, Input_Opt,
! Get a free LUN
JXUNIT = findFreeLUN()
! Define data directory for FAST-JX input
DATA_DIR = TRIM( Input_Opt%CHEM_INPUTS_DIR )//'FAST_JX/v2018-09/'
!=====================================================================
! Read in fast-J X-sections (spectral data)
!=====================================================================
FILENAME = 'FJX_spec.dat'
FILENAME = TRIM( DATA_DIR ) // 'FJX_spec.dat'
! Echo info
IF ( am_I_Root ) THEN
Expand All @@ -1765,7 +1771,7 @@ SUBROUTINE INIT_FJX( am_I_Root, Input_Opt,
!=====================================================================
! Read in 5-wavelength scattering data
!=====================================================================
FILENAME = 'jv_spec_mie.dat'
FILENAME = TRIM( DATA_DIR ) // 'jv_spec_mie.dat'
! Echo info
IF ( am_I_Root ) THEN
Expand Down Expand Up @@ -1804,7 +1810,7 @@ SUBROUTINE INIT_FJX( am_I_Root, Input_Opt,
! Read in photolysis rates used in chemistry code and mapping onto
! FJX J's CTM call: read in J-values names and link to fast-JX names
!=====================================================================
FILENAME = 'FJX_j2j.dat'
FILENAME = TRIM( DATA_DIR ) // 'FJX_j2j.dat'

! Echo info
IF ( am_I_Root ) THEN
Expand Down Expand Up @@ -2351,19 +2357,22 @@ SUBROUTINE RD_AOD( NJ1, am_I_Root, Input_Opt )
! 04 Aug 2015 - M. Long - Removed ".rc" file specifier. Not necessary.
! 03 Jan 2018 - M. Sulprizio - Replace UCX CPP switch with Input_Opt%LUCX
! 23 Mar 2018 - E. Lundgren - Pass Input_Opt to Calc_AOD
! 19 Sep 2018 - M. Sulprizio - Read .dat files from data directories instead
! of run directories
!EOP
!------------------------------------------------------------------------------
!BOC
!
! !LOCAL VARIABLES
!
INTEGER :: I, J, K, N
INTEGER :: IOS
CHARACTER*30 :: SPECFIL(6)
CHARACTER*30 :: SPECFIL_UCX(8)
CHARACTER(LEN=30) :: THISFILE
INTEGER :: I, J, K, N
INTEGER :: IOS
CHARACTER*30 :: SPECFIL(6)
CHARACTER*30 :: SPECFIL_UCX(8)
CHARACTER(LEN=255) :: DATA_DIR
CHARACTER(LEN=255) :: THISFILE
LOGICAL :: LBRC
LOGICAL :: LBRC
CHARACTER*78 TITLE0
Expand All @@ -2374,6 +2383,9 @@ SUBROUTINE RD_AOD( NJ1, am_I_Root, Input_Opt )
! Copy fields from Input_Opt
LBRC = Input_Opt%LBRC
! Define data directory for FAST-JX input
DATA_DIR = TRIM( Input_Opt%CHEM_INPUTS_DIR )//'FAST_JX/v2018-09/'
! IMPORTANT: aerosol_mod.F and dust_mod.F expect aerosols in this order
DATA SPECFIL /"so4.dat","soot.dat","org.dat",
& "ssa.dat","ssc.dat", "dust.dat"/
Expand All @@ -2399,9 +2411,9 @@ SUBROUTINE RD_AOD( NJ1, am_I_Root, Input_Opt )

! Choose different set of input files for UCX and tropchem simulations
IF ( Input_Opt%LUCX) THEN
THISFILE = SPECFIL_UCX(k)
THISFILE = TRIM( DATA_DIR ) // TRIM( SPECFIL_UCX(k) )
ELSE
THISFILE = SPECFIL(k)
THISFILE = TRIM( DATA_DIR ) // TRIM( SPECFIL(k) )
ENDIF

! open file
Expand Down

0 comments on commit 03e94fe

Please sign in to comment.