Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete unnecessary variable #191

Open
wants to merge 44 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
44 commits
Select commit Hold shift + click to select a range
5d85b70
add subroutine for single particle
Apr 16, 2022
d04a6df
add detailed species
Apr 16, 2022
cd6d346
first commit
Oct 28, 2022
7ecd973
add function for organic volume
Oct 31, 2022
8ac8937
fix frac_core_water error
Nov 3, 2022
728ebbe
fix v_delta error
Nov 3, 2022
8a1a4ff
add critical diameter for varying sigma
Nov 4, 2022
008902d
fix env_state_A_varying sigma error
Nov 4, 2022
718bb07
add env_state_A_varying_sigma
Nov 4, 2022
b54ca50
rename sigma to vary_sigma
Nov 4, 2022
f2f7d1c
rename sigma for varying_sigma
Nov 4, 2022
74d1224
correct v_delta and v_core
Nov 5, 2022
4d9868e
add sc_varying_sigma related variables
Nov 5, 2022
cb2125d
add sigma value to aero_data.dat
Nov 6, 2022
c04e719
add aero_data%sigma
Nov 6, 2022
74c8692
apply sigma value of each species into effective surface tension calc…
Nov 6, 2022
4440c3a
apply sigma value of each species to effective surface tension method
Nov 6, 2022
892f143
apply sigma value of each species to effective surface tension metho
Nov 6, 2022
ae27428
correct crit_diam
Nov 6, 2022
7edba1d
use equation following files
Nov 11, 2022
7568c36
add varying sigma defination
Nov 11, 2022
efde019
upload before new test
Nov 13, 2022
7f1e083
modified effective surface tension method
Nov 13, 2022
857f628
add IF for particles with large organic fraction
Nov 13, 2022
c47115d
print sc_dist
Nov 13, 2022
415caff
update surface tension volume
Nov 30, 2022
809358b
Merge remote-tracking branch 'upstream/master'
Dec 1, 2022
f64c77c
get updated
Dec 1, 2022
b7cc327
update sigma value for each species
Dec 1, 2022
3aa7cb7
seperate sigma from env_state_A
Dec 4, 2022
bc725c3
update Newton's loop
Feb 25, 2023
0d518a2
update effective surface tension method in newton's loop and SSc
Mar 8, 2023
84fdc25
fix error for v_org = 0
Mar 27, 2023
11f0b7b
Merge pull request #3 from Jim-Xu/film
Jim-Xu Apr 14, 2023
5cc4777
fix defination warning
Apr 15, 2023
d5a0e02
Merge pull request #4 from Jim-Xu/film
Jim-Xu Apr 15, 2023
b65199f
final effective surface tension update
Jul 9, 2023
f080b92
Merge pull request #5 from Jim-Xu/film
Jim-Xu Jul 9, 2023
210d246
delete uncessary variable
Aug 25, 2023
733aad1
Merge branch 'master' into film
Aug 25, 2023
84e7515
Merge branch 'master' into film
Jim-Xu Aug 25, 2023
479a887
Merge pull request #8 from Jim-Xu/film
Jim-Xu Aug 25, 2023
7dde0c5
change f(d)
Dec 12, 2023
1b6573e
Merge branch 'master' of github.com:Jim-Xu/partmc into film
Dec 12, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 21 additions & 21 deletions scenarios/1_urban_plume/aero_data.dat
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
# dens (kg/m^3) ions in soln (1) molec wght (kg/mole) kappa (1)
SO4 1800 0 96d-3 0.65
NO3 1800 0 62d-3 0.65
Cl 2200 0 35.5d-3 1.28
NH4 1800 0 18d-3 0.65
MSA 1800 0 95d-3 0.53
ARO1 1400 0 150d-3 0.1
ARO2 1400 0 150d-3 0.1
ALK1 1400 0 140d-3 0.1
OLE1 1400 0 140d-3 0.1
API1 1400 0 184d-3 0.1
API2 1400 0 184d-3 0.1
LIM1 1400 0 200d-3 0.1
LIM2 1400 0 200d-3 0.1
CO3 2600 0 60d-3 0.53
Na 2200 0 23d-3 1.28
Ca 2600 0 40d-3 0.53
OIN 2600 0 1d-3 0.1
OC 1000 0 1d-3 0.001
BC 1800 0 1d-3 0
H2O 1000 0 18d-3 0
# dens (kg/m^3) ions in soln (1) molec wght (kg/mole) kappa (1) surface tension (J m^{-2})
SO4 1800 0 96d-3 0.65 0.073
NO3 1800 0 62d-3 0.65 0.073
Cl 2200 0 35.5d-3 1.28 0.073
NH4 1800 0 18d-3 0.65 0.073
MSA 1800 0 95d-3 0.53 0.03
ARO1 1400 0 150d-3 0.1 0.03
ARO2 1400 0 150d-3 0.1 0.03
ALK1 1400 0 140d-3 0.1 0.03
OLE1 1400 0 140d-3 0.1 0.03
API1 1400 0 184d-3 0.1 0.03
API2 1400 0 184d-3 0.1 0.03
LIM1 1400 0 200d-3 0.1 0.03
LIM2 1400 0 200d-3 0.1 0.03
CO3 2600 0 60d-3 0.53 0.073
Na 2200 0 23d-3 1.28 0.073
Ca 2600 0 40d-3 0.53 0.073
OIN 2600 0 1d-3 0.1 0
OC 1000 0 1d-3 0.001 0.03
BC 1800 0 1d-3 0 0
H2O 1000 0 18d-3 0 0.073
559 changes: 548 additions & 11 deletions scenarios/1_urban_plume/urban_plume_process.F90

Large diffs are not rendered by default.

22 changes: 20 additions & 2 deletions src/aero_data.F90
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ module pmc_aero_data
real(kind=dp), allocatable :: molec_weight(:)
!> Length \c aero_data_n_spec(aero_data), kappas (1).
real(kind=dp), allocatable :: kappa(:)
!> Length \c aero_data_n_spec(aero_data), sigma (J m-2).
real(kind=dp), allocatable :: sigma(:)
!> Length \c aero_data_n_source(aero_data), source names.
character(len=AERO_SOURCE_NAME_LEN), allocatable :: source_name(:)
!> Fractal particle parameters.
Expand Down Expand Up @@ -430,9 +432,9 @@ subroutine spec_file_read_aero_data(file, aero_data)

! check the data size
n_species = size(species_data, 1)
if (.not. ((size(species_data, 2) == 4) .or. (n_species == 0))) then
if (.not. ((size(species_data, 2) == 5) .or. (n_species == 0))) then
call die_msg(428926381, 'each line in ' // trim(file%name) &
// ' should contain exactly 5 values')
// ' should contain exactly 6 values')
end if

! allocate and copy over the data
Expand All @@ -442,12 +444,14 @@ subroutine spec_file_read_aero_data(file, aero_data)
call ensure_integer_array_size(aero_data%num_ions, n_species)
call ensure_real_array_size(aero_data%molec_weight, n_species)
call ensure_real_array_size(aero_data%kappa, n_species)
call ensure_real_array_size(aero_data%sigma, n_species)
do i = 1,n_species
aero_data%name(i) = species_name(i)(1:AERO_NAME_LEN)
aero_data%density(i) = species_data(i,1)
aero_data%num_ions(i) = nint(species_data(i,2))
aero_data%molec_weight(i) = species_data(i,3)
aero_data%kappa(i) = species_data(i,4)
aero_data%sigma(i) = species_data(i,5)
call assert_msg(232362742, &
(aero_data%num_ions(i) == 0) .or. (aero_data%kappa(i) == 0d0), &
"ions and kappa both non-zero for species " &
Expand Down Expand Up @@ -519,6 +523,7 @@ integer function pmc_mpi_pack_size_aero_data(val)
+ pmc_mpi_pack_size_integer_array(val%num_ions) &
+ pmc_mpi_pack_size_real_array(val%molec_weight) &
+ pmc_mpi_pack_size_real_array(val%kappa) &
+ pmc_mpi_pack_size_real_array(val%sigma) &
+ pmc_mpi_pack_size_string_array(val%source_name) &
+ pmc_mpi_pack_size_fractal(val%fractal)

Expand Down Expand Up @@ -547,6 +552,7 @@ subroutine pmc_mpi_pack_aero_data(buffer, position, val)
call pmc_mpi_pack_integer_array(buffer, position, val%num_ions)
call pmc_mpi_pack_real_array(buffer, position, val%molec_weight)
call pmc_mpi_pack_real_array(buffer, position, val%kappa)
call pmc_mpi_pack_real_array(buffer, position, val%sigma)
call pmc_mpi_pack_string_array(buffer, position, val%source_name)
call pmc_mpi_pack_fractal(buffer, position, val%fractal)
call assert(183834856, &
Expand Down Expand Up @@ -578,6 +584,7 @@ subroutine pmc_mpi_unpack_aero_data(buffer, position, val)
call pmc_mpi_unpack_integer_array(buffer, position, val%num_ions)
call pmc_mpi_unpack_real_array(buffer, position, val%molec_weight)
call pmc_mpi_unpack_real_array(buffer, position, val%kappa)
call pmc_mpi_unpack_real_array(buffer, position, val%sigma)
call pmc_mpi_unpack_string_array(buffer, position, val%source_name)
call pmc_mpi_unpack_fractal(buffer, position, val%fractal)
call assert(188522823, &
Expand Down Expand Up @@ -760,6 +767,9 @@ subroutine aero_data_output_netcdf(aero_data, ncid)
call pmc_nc_write_real_1d(ncid, aero_data%kappa, &
"aero_kappa", (/ dimid_aero_species /), unit="1", &
long_name="hygroscopicity parameters (kappas) of aerosol species")
call pmc_nc_write_real_1d(ncid, aero_data%sigma, &
"aero_sigma", (/ dimid_aero_species /), unit="J/m2", &
long_name="surface tension (sigma) of aerosol species")
call fractal_output_netcdf(aero_data%fractal, ncid)

end subroutine aero_data_output_netcdf
Expand Down Expand Up @@ -801,6 +811,7 @@ subroutine aero_data_input_netcdf(aero_data, ncid)
call pmc_nc_read_integer_1d(ncid, aero_data%num_ions, "aero_num_ions")
call pmc_nc_read_real_1d(ncid, aero_data%molec_weight, "aero_molec_weight")
call pmc_nc_read_real_1d(ncid, aero_data%kappa, "aero_kappa")
call pmc_nc_read_real_1d(ncid, aero_data%sigma, "aero_sigma")

call pmc_nc_check(nf90_inq_varid(ncid, "aero_species", &
varid_aero_species))
Expand Down Expand Up @@ -899,6 +910,7 @@ subroutine aero_data_initialize(aero_data, camp_core)
allocate(aero_data%num_ions(num_spec))
allocate(aero_data%molec_weight(num_spec))
allocate(aero_data%kappa(num_spec))
allocate(aero_data%sigma(num_spec))
allocate(aero_data%camp_particle_spec_id(num_spec))

! Assume no aerosol water
Expand Down Expand Up @@ -936,6 +948,12 @@ subroutine aero_data_initialize(aero_data, camp_core)
call die_msg(944207343, "Missing kappa for aerosol species " &
// spec_names(i_spec)%string)
end if
prop_name = "sigma"
if (.not. property_set%get_real(prop_name, &
aero_data%sigma(i_spec))) then
call die_msg(944207343, "Missing sigma for aerosol species " &
// spec_names(i_spec)%string)
end if
prop_name = "PartMC name"
if (property_set%get_string(prop_name, str_val)) then
if (str_val == "H2O") then
Expand Down
Loading