Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
115cc20
Provide model's top-level pressure in Pa.
rmontuoro Dec 3, 2022
3a8b695
Fix write format for products diagnostic output.
rmontuoro Dec 3, 2022
5432de8
Remove unneded if block.
rmontuoro Dec 3, 2022
defbe68
Work in progress - end of day.
rmontuoro Dec 4, 2022
fe8888d
Preliminary changes to enable PT sources I/O in AQMIO.
rmontuoro Dec 4, 2022
21bbd5f
Work in progress - end of day.
rmontuoro Dec 6, 2022
a172095
Work in progress - end of day.
rmontuoro Dec 7, 2022
a5a8609
Work in progress - end of day.
rmontuoro Dec 8, 2022
2dc1345
Work in progress - end of day.
rmontuoro Dec 8, 2022
c846960
Ensure CTM_P3TDEMIS is set accordingly to the available point-source …
rmontuoro Dec 9, 2022
e5fb1c7
Work in progress - end of day.
rmontuoro Dec 9, 2022
2df610c
Run plumerise only if number of emission layers is greater than 1.
rmontuoro Dec 10, 2022
995b129
Add '_layers:' configuration option to set point-source emission layers.
rmontuoro Dec 11, 2022
742997f
Refactor fire and point source emission code.
rmontuoro Dec 12, 2022
92a25ee
Add NASA copyright notice.
rmontuoro Dec 12, 2022
641ecdd
Use one task/tile to read in point-source data.
rmontuoro Dec 13, 2022
6435318
Use local I/O flag consistently in AQM I/O.
rmontuoro Dec 16, 2022
bbb565c
Update point-source emission code to:
rmontuoro Dec 17, 2022
7751790
Update emission finalize method to include point sources.
rmontuoro Dec 17, 2022
b888892
Minor updates to the point-source and fire emission code
rmontuoro Dec 18, 2022
ef61ffa
Remove older code preventing unit conversion of grid coordinates.
rmontuoro Dec 20, 2022
20126f9
Add '_plume_top_fraction:' configuration option to enter empirical
rmontuoro Dec 21, 2022
82ded19
Initialize point source and fire emission maps in the proper sequence.
rmontuoro Dec 22, 2022
60aab11
Improve emission logging.
rmontuoro Dec 22, 2022
5351500
Minor cleanup.
rmontuoro Dec 22, 2022
143cb57
Debug run fixes
BrianCurtis-NOAA Jan 5, 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
5 changes: 4 additions & 1 deletion aqm_files.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ set(VDIFF "${CCTM_ROOT}/vdiff/acm2")
set(localCCTM "src/model/src")
list(APPEND aqm_CCTM_files
${AERO}/AERO_DATA.F
${AERO}/aero_depv.F
${AERO}/aero_driver.F
${AERO}/AERO_EMIS.F
${AERO}/AEROMET_DATA.F
Expand Down Expand Up @@ -236,8 +235,12 @@ list(APPEND aqm_CCTM_files
${localCCTM}/o3totcol.f
${localCCTM}/vdiffacmx.F
${localCCTM}/PTMAP.F
${localCCTM}/PT3D_DATA_MOD.F
${localCCTM}/PT3D_DEFN.F
${localCCTM}/PT3D_FIRE_DEFN.F
${localCCTM}/PT3D_STKS_DEFN.F
${localCCTM}/ASX_DATA_MOD.F
${localCCTM}/DUST_EMIS.F
${localCCTM}/AERO_PHOTDATA.F
${localCCTM}/aero_depv.F
)
5 changes: 5 additions & 0 deletions examples/aqm.rc
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,11 @@ myemis_frequency: hourly
# supported schemes are: sofiev, none
#
#myemis_plume_rise: sofiev
#
# Optionally, provide an empirical weight for the top plume layer.
# If this option is absent, or a value < 0.0 is provided, fire
# emissions will be distributed linearly among the plume layers
#myemis_plume_top_fraction: 0.8

# list of emission species
# input emissions can be manipulated by adding multiple
Expand Down
40 changes: 28 additions & 12 deletions src/aqm_cap.F90
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,12 @@ module AQM
use NUOPC_Model, inheritModel => SetServices

use aqm_comp_mod
use aqm_const_mod, only: rad_to_deg

implicit none

! -- import fields
integer, parameter :: importFieldCount = 35
integer, parameter :: importFieldCount = 36
character(len=*), dimension(importFieldCount), parameter :: &
importFieldNames = (/ &
"canopy_moisture_storage ", &
Expand All @@ -30,6 +31,7 @@ module AQM
"inst_net_sw_flx ", &
"inst_pbl_height ", &
"inst_pres_height_surface ", &
"inst_pres_interface ", &
"inst_pres_levels ", &
"inst_rainfall_amount ", &
"inst_sensi_heat_flx ", &
Expand Down Expand Up @@ -61,9 +63,6 @@ module AQM

private

real(ESMF_KIND_R8), parameter :: pi = 3.1415926535897931
real(ESMF_KIND_R8), parameter :: rad2deg = 180./pi

public SetServices

!-----------------------------------------------------------------------------
Expand Down Expand Up @@ -264,7 +263,7 @@ subroutine DataInitialize(model, rc)
real(ESMF_KIND_R8) :: dts
type(ESMF_Time) :: startTime
type(ESMF_TimeInterval) :: TimeStep
type(ESMF_CoordSys_Flag) :: aqmGridCoordSys
type(ESMF_CoordSys_Flag) :: coordSys
character(len=ESMF_MAXSTR) :: msgString, name


Expand Down Expand Up @@ -413,7 +412,7 @@ subroutine DataInitialize(model, rc)
end if

! -- get local coordinate arrays
call ESMF_GridGet(grid, coordSys=aqmGridCoordSys, rc=rc)
call ESMF_GridGet(grid, coordSys=coordSys, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, &
file=__FILE__)) &
Expand All @@ -427,13 +426,29 @@ subroutine DataInitialize(model, rc)
file=__FILE__)) &
return ! bail out

if (aqmGridCoordSys == ESMF_COORDSYS_SPH_RAD) coord = coord * rad2deg

call aqm_model_domain_coord_set(item, coord, de=localDe, rc=rc)

if (aqm_rc_check(rc)) then
if (coordSys == ESMF_COORDSYS_SPH_RAD) then
call aqm_model_domain_coord_set(item, coord, scale=rad_to_deg, de=localDe, rc=rc)
if (aqm_rc_check(rc)) then
call ESMF_LogSetError(ESMF_RC_INTNRL_BAD, &
msg="Failed to set coordinates for air quality model", &
line=__LINE__, &
file=__FILE__, &
rcToReturn=rc)
return ! bail out
end if
else if (coordSys == ESMF_COORDSYS_SPH_DEG) then
call aqm_model_domain_coord_set(item, coord, de=localDe, rc=rc)
if (aqm_rc_check(rc)) then
call ESMF_LogSetError(ESMF_RC_INTNRL_BAD, &
msg="Failed to set coordinates for air quality model", &
line=__LINE__, &
file=__FILE__, &
rcToReturn=rc)
return ! bail out
end if
else
call ESMF_LogSetError(ESMF_RC_INTNRL_BAD, &
msg="Failed to set coordinates for air quality model", &
msg="Unsupported coordinate system - Failed to set coordinates for air quality model", &
line=__LINE__, &
file=__FILE__, &
rcToReturn=rc)
Expand All @@ -442,6 +457,7 @@ subroutine DataInitialize(model, rc)
end do

end do

deallocate(minIndexPDe, maxIndexPDe, minIndexPTile, maxIndexPTile, &
computationalLBound, computationalUBound, &
deToTileMap, localDeToDeMap, stat=localrc)
Expand Down
6 changes: 6 additions & 0 deletions src/aqm_comp_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -477,6 +477,12 @@ subroutine aqm_comp_import(state, fieldNames, rc)
line=__LINE__, &
file=__FILE__)) &
return ! bail
case ("inst_pres_interface")
call ESMF_FieldGet(field, localDe=localDe, farrayPtr=stateIn % pri, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
line=__LINE__, &
file=__FILE__)) &
return ! bail
case ("inst_pres_levels")
call ESMF_FieldGet(field, localDe=localDe, farrayPtr=stateIn % prl, rc=rc)
if (ESMF_LogFoundError(rcToCheck=rc, msg=ESMF_LOGERR_PASSTHRU, &
Expand Down
7 changes: 4 additions & 3 deletions src/drv/cmaq_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -443,11 +443,12 @@ subroutine cmaq_emis_init(rc)
type(aqm_internal_emis_type), pointer :: em

! -- local parameters
character(len=*), parameter :: etype(4) = (/ &
character(len=*), parameter :: etype(5) = (/ &
"anthropogenic", &
"biogenic ", &
"fengsha ", &
"gbbepx " &
"gbbepx ", &
"point-source " &
/)

! -- begin
Expand All @@ -465,7 +466,7 @@ subroutine cmaq_emis_init(rc)
if (associated(em)) then

select case (trim(etype(item)))
case ("anthropogenic", "gbbepx")
case ("anthropogenic", "gbbepx", "point-source")

! -- check if internal emissions reference table was allocated
if (aqm_rc_test(.not.associated(em % table), &
Expand Down
Loading