Skip to content

Commit 38f4c3e

Browse files
committed
Migrated exsect to f90, added more annotations and references?
1 parent ab447bc commit 38f4c3e

16 files changed

+764
-858
lines changed

_setup.py

Lines changed: 0 additions & 81 deletions
This file was deleted.

meson.build

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ fortran_srcs = [
3838
'src/GLOW/ephoto_init.f90',
3939
'src/GLOW/ephoto.f90',
4040
'src/GLOW/etrans.f90',
41-
'src/GLOW/exsect.f',
41+
'src/GLOW/exsect.f90',
4242
'src/GLOW/fieldm.f',
4343
'src/GLOW/gchem.f90',
4444
'src/GLOW/geomag.f90',

pyproject.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ requires = [
1010
build-backend = "mesonpy"
1111

1212
[project]
13-
name = "glowpython"
14-
version = "5.0.0a1"
13+
name = "glowpython2"
14+
version = "0.0.0"
1515
requires-python = ">=3.7"
1616
authors = [
1717
{name = "Sunip K. Mukherjee", email = "sunipkmukherjee@gmail.com"},

refs/goes-r_euvs_model.pdf

3.46 MB
Binary file not shown.

refs/s40623-021-01435-y.pdf

1.74 MB
Binary file not shown.

src/GLOW/Makefile.glowbasic

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ DBGFLAGS += -fpe-all=0 # this traps all floating point exceptions
1717
#
1818
# Sources (in order of dependency):
1919
#
20-
SOURCES = cglow.f90 glowbasic.f90 glow.f90 bands.f90 conduct.f90 egrid.f90 ephoto.f90 etrans.f90 exsect.f fieldm.f gchem.f90 geomag.f90 maxt.f90 mzgrid.f90 qback.f90 rcolum.f90 rout.f90 snoem.f90 snoemint.f90 solzen.f90 ssflux.f90 iri90.f nrlmsise00.f ssflux_init.f90 ephoto_init.f90 snoem_init.f90 alt_grid.f90
20+
SOURCES = cglow.f90 glowbasic.f90 glow.f90 bands.f90 conduct.f90 egrid.f90 ephoto.f90 etrans.f90 exsect.f90 fieldm.f gchem.f90 geomag.f90 maxt.f90 mzgrid.f90 qback.f90 rcolum.f90 rout.f90 snoem.f90 snoemint.f90 solzen.f90 ssflux.f90 iri90.f nrlmsise00.f ssflux_init.f90 ephoto_init.f90 snoem_init.f90 alt_grid.f90
2121

2222
OBJS := $(addsuffix .o, $(basename $(SOURCES)))
2323
EXEC = glow.exe

src/GLOW/Makefile.glowbasic.gfort

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ DBGFLAGS += -fpe-all=0 # this traps all floating point exceptions
1717
#
1818
# Sources (in order of dependency):
1919
#
20-
SOURCES = cglow.f90 glowbasic.f90 glow.f90 bands.f90 conduct.f90 egrid.f90 ephoto.f90 etrans.f90 exsect.f fieldm.f gchem.f90 geomag.f90 maxt.f90 mzgrid.f90 qback.f90 rcolum.f90 rout.f90 snoem.f90 snoemint.f90 solzen.f90 ssflux.f90 iri90.f nrlmsise00.f ssflux_init.f90 ephoto_init.f90 snoem_init.f90 alt_grid.f90
20+
SOURCES = cglow.f90 glowbasic.f90 glow.f90 bands.f90 conduct.f90 egrid.f90 ephoto.f90 etrans.f90 exsect.f90 fieldm.f gchem.f90 geomag.f90 maxt.f90 mzgrid.f90 qback.f90 rcolum.f90 rout.f90 snoem.f90 snoemint.f90 solzen.f90 ssflux.f90 iri90.f nrlmsise00.f ssflux_init.f90 ephoto_init.f90 snoem_init.f90 alt_grid.f90
2121

2222
OBJS := $(addsuffix .o, $(basename $(SOURCES)))
2323
EXEC = glow.exe

src/GLOW/Makefile.glowdriver

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ DBGFLAGS += -fpe-all=0 # this traps all floating point exceptions
1717
#
1818
# Sources (in order of dependency):
1919
#
20-
SOURCES = cglow.f90 readtgcm.f90 output.f90 glowdriver.f90 glow.f90 bands.f90 conduct.f90 egrid.f90 ephoto.f90 etrans.f90 exsect.f fieldm.f gchem.f90 geomag.f90 maxt.f90 mzgrid.f90, qback.f90 rcolum.f90 rout.f90 snoem.f90 snoemint.f90 solzen.f90 ssflux.f90 tzgrid.f90, iri90.f nrlmsise00.f
20+
SOURCES = cglow.f90 readtgcm.f90 output.f90 glowdriver.f90 glow.f90 bands.f90 conduct.f90 egrid.f90 ephoto.f90 etrans.f90 exsect.f90 fieldm.f gchem.f90 geomag.f90 maxt.f90 mzgrid.f90, qback.f90 rcolum.f90 rout.f90 snoem.f90 snoemint.f90 solzen.f90 ssflux.f90 tzgrid.f90, iri90.f nrlmsise00.f
2121

2222
OBJS := $(addsuffix .o, $(basename $(SOURCES)))
2323
EXEC = glow.exe

src/GLOW/ephoto.f90

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -87,19 +87,19 @@ subroutine ephoto
8787
real :: fac,e1,e2,y,r1,r2
8888

8989
nnn = (/5,4,6/)
90-
tpot(1:nst,1) = (/13.61, 16.93, 18.63, 28.50, 40.00, 0.00/)
91-
tpot(1:nst,2) = (/12.07, 16.10, 18.20, 20.00, 0.00, 0.00/)
92-
tpot(1:nst,3) = (/15.60, 16.70, 18.80, 30.00, 34.80, 25.00/)
93-
auge = (/500.,500.,360./)
94-
augl = (/24.,24.,33./)
95-
bso2(1:12) = 0.
96-
bso2(13) = .01
97-
bso2(14) = .03
98-
bso2(15:21) = .10
99-
bso2(22:29) = .07
100-
bso2(30:34) = .03
101-
bso2(35:39) = .01
102-
bso2(40:lmax) = 0.
90+
tpot(1:nst,1) = (/13.61, 16.93, 18.63, 28.50, 40.00, 0.00/) ! ionization potential for O, eV [4S, 2Do, 2Po, 4Pe, 2Pe]
91+
tpot(1:nst,2) = (/12.07, 16.10, 18.20, 20.00, 0.00, 0.00/) ! ionization potential for O2, eV [X, a+A, b, dissoc.]
92+
tpot(1:nst,3) = (/15.60, 16.70, 18.80, 30.00, 34.80, 25.00/) ! ionization potential for N2, eV [X, A, B, C, F, dissoc.]
93+
auge = (/500.,500.,360./) ! mean energy of Auger electrons for O, O2, N2; eV
94+
augl = (/24.,24.,33./) ! wavelength threshold for Auger electrons for O, O2, N2; Angstroms
95+
bso2(1:12) = 0.0 ! yield of O(1S) from dissociation of O2
96+
bso2(13) = 0.01
97+
bso2(14) = 0.03
98+
bso2(15:21) = 0.10
99+
bso2(22:29) = 0.07
100+
bso2(30:34) = 0.03
101+
bso2(35:39) = 0.01
102+
bso2(40:lmax) = 0.0
103103

104104
! Zero arrays:
105105

@@ -110,13 +110,13 @@ subroutine ephoto
110110

111111
! Calculate attenuated solar flux at all altitudes and wavelengths:
112112

113-
do l=1,lmax
114-
do j=1,jmax
115-
tau(l)=0.
116-
do i=1,nmaj
117-
tau(l)=tau(l)+sigabs(i,l)*zcol(i,j)
113+
do l=1,lmax ! for all wavelengths
114+
do j=1,jmax ! for all altitudes
115+
tau(l)=0. ! initialize optical depth
116+
do i=1,nmaj ! for all species
117+
tau(l)=tau(l)+sigabs(i,l)*zcol(i,j) ! total optical depth
118118
enddo
119-
if (tau(l) < 20.) then
119+
if (tau(l) < 20.) then ! optical depth cutoff: 20.0, i.e. exp(-20) = 2.1e-9 ~ 0
120120
flux(l,j)=sflux(l)*exp(-tau(l))
121121
else
122122
flux(l,j) = 0.0

0 commit comments

Comments
 (0)