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

Initial Gas Dry Deposition Feature Using Zhang et al. (2003) and ACCESS (Saylor 2013). #149

Draft
wants to merge 38 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
0c0e6a0
Initial commit of feature dry deposition branch (ozone).
drnimbusrain Feb 4, 2025
ac61eb7
Updated for working o3_ddep, single point only (need implementation).
drnimbusrain Feb 5, 2025
a30abba
Adding new ifcanddepgas option.
drnimbusrain Feb 11, 2025
94839ae
Initial netcdf version of ifcanddepgas for ozone.
drnimbusrain Feb 11, 2025
68b485e
Merge branch 'develop' into feature/drydep_zhang
drnimbusrain Feb 13, 2025
2f4bb86
Merge branch 'develop' into feature/drydep_zhang
drnimbusrain Feb 16, 2025
3484f62
Added ddep_o3 ncf and txt outputs.
drnimbusrain Feb 17, 2025
c5dc79b
Fixed negative temp correction error.
drnimbusrain Feb 17, 2025
b3d4c6f
Fixed typo...working ddep_o3 netcdf file output.
drnimbusrain Feb 18, 2025
5513e54
Added ddepgasspec option to choose species.
drnimbusrain Feb 20, 2025
99832aa
Added chemmechgas_opt and chemmechgas_tot for flexibility.
drnimbusrain Feb 24, 2025
86a4630
Added all RACM2 ddep gas species to netcdf and text outputs.
drnimbusrain Feb 25, 2025
a92dd4d
Changed NL to ddepspecgas_opt = 0
drnimbusrain Feb 25, 2025
bc3af44
Updated README for inital gas dry deposition option.
drnimbusrain Feb 26, 2025
c9402cf
Updated README
drnimbusrain Feb 26, 2025
ffb80a1
Updated README.
drnimbusrain Feb 26, 2025
b73dd93
Initial commit of soil ground resistance for gas drydep.
drnimbusrain Feb 27, 2025
5b619af
Added working gas ddep to soil, only for ozone NetCDF first.
drnimbusrain Feb 28, 2025
b004f6b
Updated NL.
drnimbusrain Feb 28, 2025
5c7b669
Updating NL.
drnimbusrain Feb 28, 2025
fa0f27e
Updating NL.
drnimbusrain Feb 28, 2025
8770836
Merge branch 'develop' into feature/drydep_zhang
drnimbusrain Feb 28, 2025
e7dc797
Updated gas ddep to soil for all species using soil temperature.
drnimbusrain Mar 5, 2025
4a21820
Default NL fix.
drnimbusrain Mar 5, 2025
63856d2
Updated point text files to be conistent location as before.
drnimbusrain Mar 5, 2025
d200877
Updating point txt files again for right soil temps at locations/times.
drnimbusrain Mar 5, 2025
9ae1016
Merge branch 'develop' into feature/drydep_zhang
drnimbusrain Mar 5, 2025
8b683b1
Merge branch 'develop' into feature/drydep_zhang
drnimbusrain Mar 5, 2025
6c9b9a1
Global test OK, updated tka profile with temp at hyblev1 inputs, READ…
drnimbusrain Mar 6, 2025
ac565a3
Reverted NL to default.
drnimbusrain Mar 6, 2025
dc4bfd3
Initiating speices other than o3 to FillValues
drnimbusrain Mar 6, 2025
ca68986
Formatting.
drnimbusrain Mar 6, 2025
1c6739e
Changed "rate" to "velocity" in output netCDF files.
drnimbusrain Mar 6, 2025
2157ee4
Modified canopy thresholds added ddep gas for barren vtypes.
drnimbusrain Mar 10, 2025
e466f8c
Updating NL for new ssg and crop options.
drnimbusrain Mar 10, 2025
0a6d7df
Adding ddep gas snow/ice category and dynamic with new "snowc_ave" in…
drnimbusrain Mar 13, 2025
ec649e9
Updated README.
drnimbusrain Mar 13, 2025
a146886
Updated NL to move ssg and crop opts around.
drnimbusrain Mar 13, 2025
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
90 changes: 80 additions & 10 deletions README.md

Large diffs are not rendered by default.

7,398 changes: 3,699 additions & 3,699 deletions input/gfs.t12z.20220630.sfcf023.canopy.txt

Large diffs are not rendered by default.

7,398 changes: 3,699 additions & 3,699 deletions input/gfs.t12z.20220701.sfcf000.canopy.txt

Large diffs are not rendered by default.

7,398 changes: 3,699 additions & 3,699 deletions input/gfs.t12z.20220701.sfcf001.canopy.txt

Large diffs are not rendered by default.

25 changes: 19 additions & 6 deletions input/namelist.canopy
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
! file_vars = 'input/gfs.t12z.20220630.sfcf023.canopy.txt' 'input/gfs.t12z.20220701.sfcf000.canopy.txt' 'input/gfs.t12z.20220701.sfcf001.canopy.txt'
file_out = 'output/southeast_us'

!Single Point Example
!Single Point Example (set infmt_opt=1, nlat=1, and nlon=1 below)
! Recommend set file_out prefix to initial 'YYYY-MM-DD-HH-MMSS_point_identifier'
! file_vars = 'input/point_file_20220630.sfcf023.txt' 'input/point_file_20220701.sfcf000.txt' 'input/point_file_20220701.sfcf001.txt'
! file_canvars = 'input/point_file_canvars_20220630.sfcf023.txt' 'input/point_file_canvars_20220701.sfcf000.txt' 'input/point_file_canvars_20220701.sfcf001.txt'
Expand Down Expand Up @@ -39,10 +39,14 @@
cf_thresh = 0.1
ch_thresh = 0.5
!Canopy crop and shrub/savanna/grass extension options
crop_opt = 0
crop_set = 3.0
ssg_opt = 0
ssg_set = 1.0
crop_opt = 1
crop_laiset = 0.2
crop_cfset = 0.2
crop_chset = 3.0
ssg_opt = 1
ssg_laiset = 0.2
ssg_cfset = 0.2
ssg_chset = 1.0
!Canopy physics and wind-specific options
ifcanwind = .TRUE.
href_opt = 0
Expand Down Expand Up @@ -79,7 +83,7 @@
lai_tstep = 86400
leafage_opt = 1
soim_opt = 1
soild1 = 5.0
soild1 = 5.0 !also needed for gas drydep below
soild2 = 25.0
soild3 = 70.0
soild4 = 150.0
Expand All @@ -89,4 +93,13 @@
ht_opt = 1
lt_opt = 1
hw_opt = 1
!Canopy gas dry deposition-specific options
ifcanddepgas = .TRUE.
ddepspecgas_opt = 0
chemmechgas_opt = 0
chemmechgas_tot = 31
soilcat_opt = 0
! soild1 = 5.0 needed here too, but defined above
hyblev1 = 20.0
snowc_set = 50.0
/
4 changes: 2 additions & 2 deletions input/point_file_20220630.sfcf023.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
lat,lon,ch,ugrd10m,vgrd10m,clu,lai,vtype,canfrac,fricv,csz,sfcr,mol,frp,href,sotyp,pressfc,dswrf,shtfl,tmpsfc,tmp2m,spfh2m,hpbl,prate_ave,soilw1,soilw2,soilw3,soilw4,wilt,ozone_w126
34.03,272.11,20.8692,-0.7485,0.3286,0.5214,3.7059,4,0.2966,0.1107,0.0416,0.8260,12.2366,0.0000,10.00,3,99731.6094,10.1607,-9.8159,292.9766,293.2202,0.0146,14.0288,0.0001,0.2591,0.2053,0.2134,0.2132,0.0470,85
lat,lon,ch,ugrd10m,vgrd10m,clu,lai,vtype,canfrac,fricv,csz,sfcr,mol,frp,href,sotyp,pressfc,dswrf,shtfl,tmpsfc,tmp2m,spfh2m,hpbl,prate_ave,soilw1,soilw2,soilw3,soilw4,wilt,ozone_w126,soilt1,soilt2,soilt3,soilt4,tmp_hyblev1,snowc_ave
34.03,272.11,20.8692,-0.7485,0.3286,0.5214,3.7059,4,0.2966,0.1107,0.0416,0.8260,12.2366,0.0000,10.00,3,99731.6094,10.1607,-9.8159,292.9766,293.2202,0.0146,14.0288,0.0001,0.2591,0.2053,0.2134,0.2132,0.0470,8,296.7590,292.8780,291.0586,289.1687,293.5712,0.0000
4 changes: 2 additions & 2 deletions input/point_file_20220701.sfcf000.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
lat,lon,ch,ugrd10m,vgrd10m,clu,lai,vtype,canfrac,fricv,csz,sfcr,mol,frp,href,sotyp,pressfc,dswrf,shtfl,tmpsfc,tmp2m,spfh2m,hpbl,prate_ave,soilw1,soilw2,soilw3,soilw4,wilt,ozone_w126
34.03,272.11,20.8692,0.1580,0.8375,0.5105,3.6504,4,0.2966,0.1548,0.2357,0.8260,-181.1201,0.0000,10.00,3,99809.6719,122.7623,1.8252,294.9718,294.9180,0.0157,85.5025,0.0000,0.2487,0.2256,0.2283,0.2307,0.0470,85
lat,lon,ch,ugrd10m,vgrd10m,clu,lai,vtype,canfrac,fricv,csz,sfcr,mol,frp,href,sotyp,pressfc,dswrf,shtfl,tmpsfc,tmp2m,spfh2m,hpbl,prate_ave,soilw1,soilw2,soilw3,soilw4,wilt,ozone_w126,soilt1,soilt2,soilt3,soilt4,tmp_hyblev1,snowc_ave
34.03,272.11,20.8692,0.1580,0.8375,0.5105,3.6504,4,0.2966,0.1548,0.2357,0.8260,-181.1201,0.0000,10.00,3,99809.6719,122.7623,1.8252,294.9718,294.9180,0.0157,85.5025,0.0000,0.2487,0.2256,0.2283,0.2307,0.0470,8,296.4849,292.8378,291.0165,289.1307,294.8045,0.0000
4 changes: 2 additions & 2 deletions input/point_file_20220701.sfcf001.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
lat,lon,ch,ugrd10m,vgrd10m,clu,lai,vtype,canfrac,fricv,csz,sfcr,mol,frp,href,sotyp,pressfc,dswrf,shtfl,tmpsfc,tmp2m,spfh2m,hpbl,prate_ave,soilw1,soilw2,soilw3,soilw4,wilt,ozone_w126
34.03,272.11,20.8692,-0.0656,0.8462,0.5105,3.6504,4,0.2966,0.1866,0.4319,0.8260,-16.3281,0.0000,10.00,3,99854.1172,336.8927,35.6389,296.9243,296.5100,0.0162,234.9751,0.0000,0.2477,0.2259,0.2283,0.2307,0.0470,85
lat,lon,ch,ugrd10m,vgrd10m,clu,lai,vtype,canfrac,fricv,csz,sfcr,mol,frp,href,sotyp,pressfc,dswrf,shtfl,tmpsfc,tmp2m,spfh2m,hpbl,prate_ave,soilw1,soilw2,soilw3,soilw4,wilt,ozone_w126,soilt1,soilt2,soilt3,soilt4,tmp_hyblev1,snowc_ave
34.03,272.11,20.8692,-0.0656,0.8462,0.5105,3.6504,4,0.2966,0.1866,0.4319,0.8260,-16.3281,0.0000,10.00,3,99854.1172,336.8927,35.6389,296.9243,296.5100,0.0162,234.9751,0.0000,0.2477,0.2259,0.2283,0.2307,0.0470,8,296.4400,292.8362,291.0190,289.1331,296.1222,0.0000
2 changes: 1 addition & 1 deletion run_canopy_slurm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
#SBATCH --nodes=1 # Request N nodes
#SBATCH --exclude=hop006,hop010,hop011 # Exclude some nodes (optional)
#SBATCH --ntasks=1 # Request n tasks
#SBATCH --mem-per-cpu=256GB # Request nGB RAM per core
#SBATCH --mem-per-cpu=1000GB # Request nGB RAM per core

conda activate canopy-app
python python/global_data_process.py 2022063012023,2022070112000,2022070112001
Expand Down
1 change: 1 addition & 0 deletions src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ OBJS := \
canopy_eddy_mod.o \
canopy_bioparm_mod.o \
canopy_bioemi_mod.o \
canopy_drydep_mod.o \
canopy_calcs.o \
canopy_write_txt.o \
canopy_dealloc.o \
Expand Down
139 changes: 139 additions & 0 deletions src/canopy_alloc.F90
Original file line number Diff line number Diff line change
Expand Up @@ -245,4 +245,143 @@ SUBROUTINE canopy_alloc
end if
end if

!-------------------------------------------------------------------------------
! Allocate arrays for Canopy Gas Dry Deposition Outputs
!-------------------------------------------------------------------------------

if (ifcanddepgas) then
write(*,*) 'Canopy gas dry deposition option selected'
write(*,*) '-------------------------------'
if (chemmechgas_opt == 0) then !RACM2 --> 31 species
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 1) then
if(.not.allocated(ddep_no)) allocate(ddep_no(nlat*nlon,modlays))
if(.not.allocated(ddep_no_3d)) allocate(ddep_no_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 2) then
if(.not.allocated(ddep_no2)) allocate(ddep_no2(nlat*nlon,modlays))
if(.not.allocated(ddep_no2_3d)) allocate(ddep_no2_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 3) then
if(.not.allocated(ddep_o3)) allocate(ddep_o3(nlat*nlon,modlays))
if(.not.allocated(ddep_o3_3d)) allocate(ddep_o3_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 4) then
if(.not.allocated(ddep_hono)) allocate(ddep_hono(nlat*nlon,modlays))
if(.not.allocated(ddep_hono_3d)) allocate(ddep_hono_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 5) then
if(.not.allocated(ddep_hno4)) allocate(ddep_hno4(nlat*nlon,modlays))
if(.not.allocated(ddep_hno4_3d)) allocate(ddep_hno4_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 6) then
if(.not.allocated(ddep_hno3)) allocate(ddep_hno3(nlat*nlon,modlays))
if(.not.allocated(ddep_hno3_3d)) allocate(ddep_hno3_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 7) then
if(.not.allocated(ddep_n2o5)) allocate(ddep_n2o5(nlat*nlon,modlays))
if(.not.allocated(ddep_n2o5_3d)) allocate(ddep_n2o5_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 8) then
if(.not.allocated(ddep_co)) allocate(ddep_co(nlat*nlon,modlays))
if(.not.allocated(ddep_co_3d)) allocate(ddep_co_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 9) then
if(.not.allocated(ddep_h2o2)) allocate(ddep_h2o2(nlat*nlon,modlays))
if(.not.allocated(ddep_h2o2_3d)) allocate(ddep_h2o2_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 10) then
if(.not.allocated(ddep_ch4)) allocate(ddep_ch4(nlat*nlon,modlays))
if(.not.allocated(ddep_ch4_3d)) allocate(ddep_ch4_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 11) then
if(.not.allocated(ddep_mo2)) allocate(ddep_mo2(nlat*nlon,modlays))
if(.not.allocated(ddep_mo2_3d)) allocate(ddep_mo2_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 12) then
if(.not.allocated(ddep_op1)) allocate(ddep_op1(nlat*nlon,modlays))
if(.not.allocated(ddep_op1_3d)) allocate(ddep_op1_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 13) then
if(.not.allocated(ddep_moh)) allocate(ddep_moh(nlat*nlon,modlays))
if(.not.allocated(ddep_moh_3d)) allocate(ddep_moh_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 14) then
if(.not.allocated(ddep_no3)) allocate(ddep_no3(nlat*nlon,modlays))
if(.not.allocated(ddep_no3_3d)) allocate(ddep_no3_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 15) then
if(.not.allocated(ddep_o3p)) allocate(ddep_o3p(nlat*nlon,modlays))
if(.not.allocated(ddep_o3p_3d)) allocate(ddep_o3p_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 16) then
if(.not.allocated(ddep_o1d)) allocate(ddep_o1d(nlat*nlon,modlays))
if(.not.allocated(ddep_o1d_3d)) allocate(ddep_o1d_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 17) then
if(.not.allocated(ddep_ho)) allocate(ddep_ho(nlat*nlon,modlays))
if(.not.allocated(ddep_ho_3d)) allocate(ddep_ho_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 18) then
if(.not.allocated(ddep_ho2)) allocate(ddep_ho2(nlat*nlon,modlays))
if(.not.allocated(ddep_ho2_3d)) allocate(ddep_ho2_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 19) then
if(.not.allocated(ddep_ora1)) allocate(ddep_ora1(nlat*nlon,modlays))
if(.not.allocated(ddep_ora1_3d)) allocate(ddep_ora1_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 20) then
if(.not.allocated(ddep_hac)) allocate(ddep_hac(nlat*nlon,modlays))
if(.not.allocated(ddep_hac_3d)) allocate(ddep_hac_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 21) then
if(.not.allocated(ddep_paa)) allocate(ddep_paa(nlat*nlon,modlays))
if(.not.allocated(ddep_paa_3d)) allocate(ddep_paa_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 22) then
if(.not.allocated(ddep_dhmob)) allocate(ddep_dhmob(nlat*nlon,modlays))
if(.not.allocated(ddep_dhmob_3d)) allocate(ddep_dhmob_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 23) then
if(.not.allocated(ddep_hpald)) allocate(ddep_hpald(nlat*nlon,modlays))
if(.not.allocated(ddep_hpald_3d)) allocate(ddep_hpald_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 24) then
if(.not.allocated(ddep_ishp)) allocate(ddep_ishp(nlat*nlon,modlays))
if(.not.allocated(ddep_ishp_3d)) allocate(ddep_ishp_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 25) then
if(.not.allocated(ddep_iepox)) allocate(ddep_iepox(nlat*nlon,modlays))
if(.not.allocated(ddep_iepox_3d)) allocate(ddep_iepox_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 26) then
if(.not.allocated(ddep_propnn)) allocate(ddep_propnn(nlat*nlon,modlays))
if(.not.allocated(ddep_propnn_3d)) allocate(ddep_propnn_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 27) then
if(.not.allocated(ddep_isopnb)) allocate(ddep_isopnb(nlat*nlon,modlays))
if(.not.allocated(ddep_isopnb_3d)) allocate(ddep_isopnb_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 28) then
if(.not.allocated(ddep_isopnd)) allocate(ddep_isopnd(nlat*nlon,modlays))
if(.not.allocated(ddep_isopnd_3d)) allocate(ddep_isopnd_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 29) then
if(.not.allocated(ddep_macrn)) allocate(ddep_macrn(nlat*nlon,modlays))
if(.not.allocated(ddep_macrn_3d)) allocate(ddep_macrn_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 30) then
if(.not.allocated(ddep_mvkn)) allocate(ddep_mvkn(nlat*nlon,modlays))
if(.not.allocated(ddep_mvkn_3d)) allocate(ddep_mvkn_3d(nlon,nlat,modlays))
end if
if (ddepspecgas_opt == 0 .or. ddepspecgas_opt == 31) then
if(.not.allocated(ddep_isnp)) allocate(ddep_isnp(nlat*nlon,modlays))
if(.not.allocated(ddep_isnp_3d)) allocate(ddep_isnp_3d(nlon,nlat,modlays))
end if
else
write(*,*) 'Wrong chemical mechanism option of ', chemmechgas_opt, ' in namelist...exiting'
write(*,*) 'Set chemmechgas_opt to only 0 (RACM2) for now'
call exit(2)
end if
end if

END SUBROUTINE canopy_alloc
Loading