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

Add ozone field from atm -> lnd #212

Merged
merged 6 commits into from
Aug 10, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
16 changes: 16 additions & 0 deletions cime_config/namelist_definition_drv_flds.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,4 +145,20 @@
</desc>
</entry>

<!-- ======================================================================================== -->
<!-- Ozone control -->
<!-- ======================================================================================== -->

<entry id="atm_ozone_frequency">
<type>char</type>
<category>ozone_coupling</category>
<group>ozone_coupling_nl</group>
<desc>
Frequency of surface ozone field passed from CAM to surface components.
Surface ozone is passed every coupling interval, but this namelist flag
indicates whether the timestep-level values are interpolated from a
coarser temporal resolution.
</desc>
</entry>
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the excepted settings for this option?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I went back and forth on whether to include valid values here. I tentatively decided not to list them here because of maintainability concerns: Nothing in this repository cares what the value of this variable is, since the code to read it in is in the CESM_share repository (ESCOMP/CESM_share#4). So I felt that listing the valid values here might be more painful than helpful, because if a new possible value is added, then this repository would need to be updated just for the sake of adding this new value to the valid_values list. Note that I did define the valid values in CAM's namelist_definition; there they serve the purpose of ensuring that any entries in user_nl_cam are valid.

However, I don't feel strongly on that point, so if you feel that it would be valuable to add the valid_values here, I'm happy to do so.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am fine with not listing valid values here.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For now I agree with @fvitt.


</entry_id>
17 changes: 15 additions & 2 deletions mediator/esmFldsExchange_cesm_mod.F90
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ module esmFldsExchange_cesm_mod

public :: esmFldsExchange_cesm

! currently required mapping files
! currently required mapping files
character(len=CX) :: glc2ice_rmap ='unset'
character(len=CX) :: glc2ocn_liq_rmap ='unset'
character(len=CX) :: glc2ocn_ice_rmap ='unset'
Expand Down Expand Up @@ -375,6 +375,19 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
end if
end if
! ---------------------------------------------------------------------
! to lnd: o3 at the lowest model level from atm
! ---------------------------------------------------------------------
if (phase == 'advertise') then
call addfld(fldListFr(compatm)%flds, 'Sa_o3')
call addfld(fldListTo(complnd)%flds, 'Sa_o3')
else
if ( fldchk(is_local%wrap%FBexp(complnd) , 'Sa_o3', rc=rc) .and. &
fldchk(is_local%wrap%FBImp(compatm,compatm ), 'Sa_o3', rc=rc)) then
call addmap(fldListFr(compatm)%flds, 'Sa_o3', complnd, mapbilnr, 'one', atm2lnd_map)
call addmrg(fldListTo(complnd)%flds, 'Sa_o3', mrg_from=compatm, mrg_fld='Sa_o3', mrg_type='copy')
end if
end if
! ---------------------------------------------------------------------
! to lnd: temperature at the lowest model level from atm
! ---------------------------------------------------------------------
if (phase == 'advertise') then
Expand Down Expand Up @@ -1838,7 +1851,7 @@ subroutine esmFldsExchange_cesm(gcomp, phase, rc)
! ---------------------------------------------------------------------
! Note that this is a field output by the atm/ocn flux computation
! If the aoflux grid is ogrid - then nothing needs to be done to send to the ocean
! All other mappings are set in med_phases_aoflux_mod.F90
! All other mappings are set in med_phases_aoflux_mod.F90
if (phase == 'advertise') then
call addfld(fldListMed_aoflux%flds , 'So_duu10n')
call addfld(fldListTo(compocn)%flds, 'So_duu10n')
Expand Down
4 changes: 4 additions & 0 deletions mediator/fd_cesm.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -318,6 +318,10 @@
canonical_units: 1e-6 mol/mol
description: atmosphere export - prognostic CO2 at the lowest model level
#
- standard_name: Sa_o3
canonical_units: mol/mol
description: atmosphere export - O3 in the lowest model layer (prognosed or prescribed)
#
- standard_name: Sa_topo
alias: inst_surface_height
canonical_units: m
Expand Down