Skip to content

Commit

Permalink
removed manifest. removed photolysis-grid
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholaswogan committed Sep 26, 2024
1 parent afc1246 commit e20309f
Show file tree
Hide file tree
Showing 10 changed files with 2 additions and 88 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
[submodule "photochem/data"]
path = photochem/data
url = https://github.com/Nicholaswogan/photochem_clima_data
3 changes: 0 additions & 3 deletions MANIFEST.in

This file was deleted.

8 changes: 1 addition & 7 deletions examples/ModernEarth/settings.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ atmosphere-grid:
top: 1.0e7 # cm
number-of-layers: 100

photolysis-grid:
regular-grid: true
lower-wavelength: 92.5 # nm
upper-wavelength: 855.0 # nm
number-of-bins: 200

planet:
planet-mass: 5.972e27 # grams
planet-radius: 6.371e8 # cm. Radius to bottom of atmosphere-grid
Expand Down Expand Up @@ -58,7 +52,7 @@ boundary-conditions:
lower-boundary: {type: press, press: 360.0}
upper-boundary: {type: veff, veff: 0.0}
- name: CH4
lower-boundary: {type: flux, flux: 5.0e10}
lower-boundary: {type: flux, flux: 1.0e11}
upper-boundary: {type: veff, veff: 0.0}
- name: CO
lower-boundary: {type: press, press: 0.11}
Expand Down
8 changes: 1 addition & 7 deletions examples/ModernEarth/settings_Atmosphere.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ atmosphere-grid:
top: 1.0e7 # cm
number-of-layers: 100

photolysis-grid:
regular-grid: true
lower-wavelength: 92.5 # nm
upper-wavelength: 855.0 # nm
number-of-bins: 200

planet:
background-gas: N2
surface-pressure: 1.01325
Expand Down Expand Up @@ -57,7 +51,7 @@ boundary-conditions:
lower-boundary: {type: mix, mix: 3.606975e-04}
upper-boundary: {type: veff, veff: 0.0}
- name: CH4
lower-boundary: {type: flux, flux: 5.0e10}
lower-boundary: {type: flux, flux: 9.0e10}
upper-boundary: {type: veff, veff: 0.0}
- name: CO
lower-boundary: {type: mix, mix: 1.102131e-07}
Expand Down
1 change: 0 additions & 1 deletion photochem/data
Submodule data deleted from a1f8cd
1 change: 0 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
long_description=long_description,
long_description_content_type='text/markdown',
url = "https://github.com/Nicholaswogan/Photochem",
include_package_data=True,
cmake_args=['-DBUILD_PYTHON_PHOTOCHEM=ON',\
'-DBUILD_EXECUTABLES=OFF',\
'-DBUILD_WITH_OPENMP=ON']
Expand Down
13 changes: 0 additions & 13 deletions src/input/photochem_input_read.f90
Original file line number Diff line number Diff line change
Expand Up @@ -619,19 +619,6 @@ subroutine unpack_settings(infile, s, dat, var, err)
endif
var%nz = s%nz

!!!!!!!!!!!!!!!!!!!!!!!
!!! photolysis-grid !!!
!!!!!!!!!!!!!!!!!!!!!!!
dat%regular_grid = s%regular_grid

if (dat%regular_grid) then
dat%lower_wavelength = s%lower_wv
dat%upper_wavelength = s%upper_wv
dat%nw = s%nw
else
dat%grid_file = s%grid_file
endif

!!!!!!!!!!!!!!
!!! planet !!!
!!!!!!!!!!!!!!
Expand Down
11 changes: 0 additions & 11 deletions src/photochem_types.f90
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@ module photochem_types ! make a giant IO object
character(:), allocatable :: top
integer :: nz

! photolysis-grid
logical :: regular_grid
real(dp) :: lower_wv
real(dp) :: upper_wv
integer :: nw
character(:), allocatable :: grid_file

! planet
character(:), allocatable :: back_gas_name
real(dp), allocatable :: P_surf
Expand Down Expand Up @@ -366,10 +359,6 @@ subroutine time_dependent_rate_fcn(tn, nz, rate)
real(dp), allocatable :: particle_radius_file(:,:) !! (np,nzf) cm

! settings
logical :: regular_grid !! True of wavelength grid is evenly spaced
real(dp) :: lower_wavelength !! nm
real(dp) :: upper_wavelength !! nm
character(:), allocatable :: grid_file !! filename of grid file. Only if regular_grid == False
logical :: back_gas !! True if background gas is used
character(:), allocatable :: back_gas_name !! Normally N2, but can be most any gas.
real(dp), allocatable :: back_gas_mu !! g/mol
Expand Down
36 changes: 0 additions & 36 deletions src/photochem_types_create.f90
Original file line number Diff line number Diff line change
Expand Up @@ -74,42 +74,6 @@ function unpack_PhotoSettings(root, filename, err) result(s)
return
endif

!!!!!!!!!!!!!!!!!!!!!!!
!!! photolysis-grid !!!
!!!!!!!!!!!!!!!!!!!!!!!
dict => root%get_dictionary('photolysis-grid',.true.,error = io_err)
if (allocated(io_err)) then; err = trim(filename)//trim(io_err%message); return; endif
s%regular_grid = dict%get_logical('regular-grid',error = io_err)
if (allocated(io_err)) then; err = trim(filename)//trim(io_err%message); return; endif

if (s%regular_grid) then
s%lower_wv = dict%get_real('lower-wavelength',error = io_err)
if (allocated(io_err)) then; err = trim(filename)//trim(io_err%message); return; endif
s%upper_wv = dict%get_real('upper-wavelength',error = io_err)
if (allocated(io_err)) then; err = trim(filename)//trim(io_err%message); return; endif
s%nw = dict%get_integer('number-of-bins',error = io_err)
if (allocated(io_err)) then; err = trim(filename)//trim(io_err%message); return; endif
if (s%nw < 1) then
err = 'Number of photolysis bins must be >= 1 in '//trim(filename)
return
endif
if (s%lower_wv > s%upper_wv) then
err = 'lower-wavelength must be smaller than upper-wavelength in '//trim(filename)
return
endif
else
s%grid_file = dict%get_string('input-file',error = io_err)
if (allocated(io_err)) then; err = trim(filename)//trim(io_err%message); return; endif
endif
! make sure photon-scale-factor is not in the photolysis-grid dictionary
scalar => dict%get_scalar('photon-scale-factor',required=.false.,error = io_err)
if (allocated(io_err)) then; err = trim(filename)//trim(io_err%message); return; endif
if (associated(scalar)) then
err = '"photon-scale-factor" is no longer specified in the "photolysis-grid" dictionary. '// &
'Instead, specify "photon-scale-factor" in the "planet" dictionary.'
return
endif

!!!!!!!!!!!!!!
!!! planet !!!
!!!!!!!!!!!!!!
Expand Down
6 changes: 0 additions & 6 deletions tests/test_settings1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,6 @@ atmosphere-grid:
top: 1.0e7 # cm
number-of-layers: 80

photolysis-grid:
regular-grid: true
lower-wavelength: 92.5 # nm
upper-wavelength: 855.0 # nm
number-of-bins: 200

planet:
planet-mass: 5.972e27 # grams
planet-radius: 6.371e8 # cm. Radius to bottom of atmosphere-grid
Expand Down

0 comments on commit e20309f

Please sign in to comment.