Skip to content

new datm optional streams for ndep, presaero, co2 and o3#27

Merged
mvertens merged 35 commits into
NorESMhub:noresmfrom
mvertens:feature/new_datm_optional_streams
Jan 9, 2026
Merged

new datm optional streams for ndep, presaero, co2 and o3#27
mvertens merged 35 commits into
NorESMhub:noresmfrom
mvertens:feature/new_datm_optional_streams

Conversation

@mvertens
Copy link
Copy Markdown
Collaborator

@mvertens mvertens commented Dec 20, 2025

Description of changes

This introduces the following new stream modules that are optional and can be added to the datamode streams already in place:

Specific notes

The following new modules have been added

  • datm_pres_aero_mod.F90
  • datm_pres_co2_mod.F90
  • datm_pres_ndep_mod.F90
  • datm_pres_o3_mod.F90

For datm_pres_ndep_mod.F90:

  • also added new nitrogen deposition cmip7 stream which be accessed by the settings for DATM_PRESNDEP: clim_1850_cmip7 and hist_cmip7. These are currently not the default and need to be set vial an xmlchange command - e.g. ./xmlchage DATM_PRESNDEP=clim_1850_cmip7. Also note that for the cmip7 data, no unit conversion is done whereas for the default cmip6 data the input data is converted from g/m2/sec to kg/m2/sec.

For datm_pres_co2_mod.F90:

  • added the following logic which will change answers for non-CPLHIST mode
  if (datamode == 'CPLHIST') then
       Sa_co2diag(:) = strm_Sa_co2diag(:)
       Sa_co2prog(:) = strm_Sa_co2prog(:)
  else
       ! This is intentional since we don't have any Sa_co2prog - but for now
       ! will set Sa_co2prog equal to Sa_co2diag
       Sa_co2diag(:) = strm_Sa_co2diag(:)
       Sa_co2prog(:) = strm_Sa_co2diag(:)
  end if

Also removed references to water isotopes in DATM since this will be refactored in upcoming work.

Contributors other than yourself, if any: None

CDEPS Issues Fixed: #30

Are there dependencies on other component PRs: No

Are changes expected to change answers (bfb): bfb unless the cmip7 ndep is used, or when datm_pres_co2 is used

Any User Interface Changes: add new options for DATM_PRESNDEP

Testing performed:

  • ran aux_cdeps_noresm and compared to noresm3_0_beta09
    • the only diffs were for CO2_PROG which has been changed based on the above.
  • ran aux_blom_noresm and compared to noresm3_0_beta09
    • all results are bfb as well as expected fails EXCEPT for the ndep fields and Sa_co2prog fields from DATM
  • ran aux_clm_noresm and compared to ctsm5.4.002_noresm_v1
    • everything is bfb - but diffs are that atmImp_Sa_co2prog and lndExp_Sa_co2prog are both nonzero, and lndExp_Sa_o3 is now on the mediator history files

Hashes used for testing:
noresm3_0_beta09 with the above cdeps branch

@mvertens mvertens requested a review from mvdebolskiy December 20, 2025 10:56
@mvertens mvertens closed this Dec 29, 2025
@mvertens
Copy link
Copy Markdown
Collaborator Author

Reopening to make smaller PRs.

@mvertens mvertens reopened this Dec 31, 2025
@mvertens mvertens requested review from gold2718 and removed request for mvdebolskiy December 31, 2025 19:51
@mvertens mvertens self-assigned this Dec 31, 2025
Copy link
Copy Markdown
Collaborator

@gold2718 gold2718 left a comment

Choose a reason for hiding this comment

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

This mostly looks okay but I have a few suggestions. In addition to the suggestions below, there are a few that are not related to the recent changes:

Should dlnd/stream_definition_dlnd.xml be deleted?

In the stream_definition_dxxx.xml files, I think this line:

<?xml-stylesheet type="text/xsl" href="namelist_definition.xsl"?>

should be removed. The correct schema is in <root>/cime_config/stream_definition_v2.0.xsd, however, I'm not sure how to document this other than what is already in the top level <stream_data> tag.

I think the namelist_definition_dxxx.xml files also have an outdated and non-functional stylesheet header.

Comment thread datm/atm_comp_nuopc.F90 Outdated
Comment thread datm/datm_pres_aero_mod.F90 Outdated
Comment thread datm/datm_pres_aero_mod.F90 Outdated
Comment thread datm/datm_pres_aero_mod.F90 Outdated
Comment thread datm/datm_pres_co2_mod.F90 Outdated
Comment thread datm/datm_pres_ndep_mod.F90 Outdated
Comment thread datm/datm_pres_ndep_mod.F90 Outdated
Comment thread datm/datm_pres_co2_mod.F90 Outdated
Comment thread datm/datm_pres_o3_mod.F90 Outdated
Comment thread datm/datm_pres_o3_mod.F90 Outdated
@mvertens
Copy link
Copy Markdown
Collaborator Author

mvertens commented Jan 4, 2026

@gold2718 - I have only updated the files in datm/*.F90 with these suggestions. I think they are relevant to all of the data component files - but I will defer that to the major refactor PR #28.

@mvertens mvertens requested a review from gold2718 January 5, 2026 10:51
Copy link
Copy Markdown
Collaborator

@gold2718 gold2718 left a comment

Choose a reason for hiding this comment

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

This looks great now, thanks!

@gold2718 gold2718 added the enhancement New feature or request label Jan 5, 2026
@github-project-automation github-project-automation Bot moved this from Todo to In Progress in NorESM Development Jan 5, 2026
@gold2718 gold2718 added this to the noresm3_0_beta10 milestone Jan 5, 2026
billsacks added a commit to ESCOMP/CDEPS that referenced this pull request Jan 8, 2026
…l_streams2

new datm optional streams 

### Description of changes

This introduces the following new stream modules that are optional and can be added to the datamode streams already in place:

### Specific notes
The following new modules have been added
 - datm_pres_aero_mod.F90,  datm_pres_co2_mod.F90,  datm_pres_ndep_mod.F90,  datm_pres_o3_mod.F90

For datm_pres_ndep_mod.F90:
- added new streams clim_1850_cmip7, clim_2000_cmip7, clim_2010_cmip7, and hist_cmip7 (currently these are only used by NorESM)
- renamed the following streams
   - clim_1850 -> clim_1850_cmip6
   - clim_2000 -> clim_2000_cmip6
   - ciim_2010 -> clim_2010_cmip6
   - hist -> hist_cmip6
  by default for CESM, the following cmip6 streams will be used (whereas for NorESM, the cmip7 streams are used)
Note that for the cmip7 data, no unit conversion is done whereas for the default cmip6 data the input data is converted from` g/m2/sec` to `kg/m2/sec`.

For datm_pres_co2_mod.F90:   
- added the following logic which will change answers for non-CPLHIST mode
```F90
  if (datamode == 'CPLHIST') then
       Sa_co2diag(:) = strm_Sa_co2diag(:)
       Sa_co2prog(:) = strm_Sa_co2prog(:)
  else
       ! This is intentional since we don't have any Sa_co2prog - but for now
       ! will set Sa_co2prog equal to Sa_co2diag
       Sa_co2diag(:) = strm_Sa_co2diag(:)
       Sa_co2prog(:) = strm_Sa_co2diag(:)
  end if
```

Also 
- removed references to water isotopes in DATM modules since this will be refactored in upcoming work.
- removed style sheet references in all component namelist_definition_dXXX.xml and stream_definition_dXXX.xml since they are not used.

Contributors other than yourself, if any: None

CDEPS Issues Fixed: #370 
The following tests now have correct values of o3 sent to 
```
ERI_D_Ld11.ne30pg3_ne30pg3_mtn14.I1850Clm60FatesNocompSpinup.betzy_gnu.clm-FatesColdSpinupAD
ERS_D_Ld11.ne30pg3_ne30pg3_mtn14.I1850Clm60FatesNocompSpinup.betzy_intel.clm-FatesColdSpinup
SMS_D_Ld1000_P1536.ne30pg3_ne30pg3_mtn14.I1850Clm60FatesNocompSpinup.betzy_gnu.clm-FatesColdSpinup
```
Are there dependencies on other component PRs: This PR contains all the changes from CDEPS PR #368.

Are changes expected to change answers (bfb): bfb except for Sa_o3 bug fix and when DATM_PRES_CO2 is used.

Any User Interface Changes: add new options for DATM_PRESNDEP

Testing performed: Successfully carried out aux_cdeps_noresm, aux_blom_noresm and aux_clm_noresm with a corresonding PR in NorESMhub (see testing description in NorESMhub#27).

Hashes used for testing:
Copy link
Copy Markdown
Collaborator

@gold2718 gold2718 left a comment

Choose a reason for hiding this comment

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

Please make the one small fix before merging but otherwise, this looks good.

integer :: mpicom
integer :: logunit
character(len=CS) :: lnd2rof_tracers
character(*),parameter :: subName = '(shr_lnd2rof_tracers_readnl) '
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please fix this:

Suggested change
character(*),parameter :: subName = '(shr_lnd2rof_tracers_readnl) '
character(len=*),parameter :: subName = '(shr_lnd2rof_tracers_readnl) '

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This is code used by UFS and needs to stay in sync with ESCOMP moving forwards.

@mvertens mvertens merged commit 2b7920a into NorESMhub:noresm Jan 9, 2026
@github-project-automation github-project-automation Bot moved this from In Progress to Done in NorESM Development Jan 9, 2026
@mvertens mvertens deleted the feature/new_datm_optional_streams branch January 9, 2026 17:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

o3 not sent by datm even though flds_preso3 = .true.

2 participants