Skip to content

Commit

Permalink
Correct the get ag damage function name util
Browse files Browse the repository at this point in the history
  • Loading branch information
lrennels committed Apr 23, 2024
1 parent 10bdb81 commit ae1a2d0
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/utils/utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,11 @@ Return the name of the Moore agriculture GTAP damage function specification in
model `m`. This is a small helper function useful for internals like the mcs.
"""
function _get_mooreag_gtap(m::Model)
return m.md.namespace[:Agriculture].namespace[:gtap_label]

# model may not have been run yet, so need to get model parameter name to look
# up the value
model_param_name = Mimi.get_model_param_name(m, :Agriculture, :gtap_name)
Agriculture_gtap = Mimi.model_param(m, model_param_name).value

return Agriculture_gtap
end

0 comments on commit ae1a2d0

Please sign in to comment.