Skip to content

noresm3_0_044_cam6_4_121: new nearest_lat mapalgo in cdeps - does not requre a mesh - #301

Merged
gold2718 merged 10 commits into
NorESMhub:noresm_developfrom
mvertens:feature/new_co2_mapalgo
Aug 12, 2026
Merged

noresm3_0_044_cam6_4_121: new nearest_lat mapalgo in cdeps - does not requre a mesh#301
gold2718 merged 10 commits into
NorESMhub:noresm_developfrom
mvertens:feature/new_co2_mapalgo

Conversation

@mvertens

@mvertens mvertens commented Jul 25, 2026

Copy link
Copy Markdown

Summary

Added new nearest_lat mapping option for CO2 surface source override. Previously the stream was always regridded with bilinear, which required a mesh file. The nearest_lat option lets forcing data that is purely latitude-based (lat/time or lat/lev/time) be mapped directly onto the model grid without a mesh file.

Changes

src/cpl/nuopc/atm_stream_co2.F90

  • Added two new namelist variables: stream_co2_surface_source_mapalgo (defaults to nearest_lat) and stream_co2_surface_source_lat_dimname.
  • If tream_co2_surface_source_mapalgo is set to 'nearest_lat - then
    • The mesh file must be set to 'none'
    • The stream_co2_surface_source_lat_dimname must be set (currently should be 'lat') for the datasets that are being used

bld/build-namelist

  • Requires the two new variables to be defined when co2_surface_source is .true..
  • Adds a consistency check: if mapalgo is nearest_lat, the mesh filename must be none.

bld/namelist_files/namelist_definition.xml

  • Documents the two new namelist entries and updates the mesh-filename entry to note it must be none for nearest_lat.

NOTE: - this PR requires the companion CDEPS change that implements the mesh-free nearest_lat mapalgo - NorESMhub/CDEPS#40.

Testing:
Using the following compset/resolution

--compset 1850_CAM70%LT%NORESM%CAMoslo_CLM60%FATES-NCFB%NORESM_CICE_BLOM%HYB%ECO_MOSART_DGLC%NOEVOLVE_SWAV_SESP 
--res ne16pg3_tn14

And the following namelist setting in user_nl_cam

co2_surface_source = .true.
stream_co2_surface_source_data_filename = 
stream_co2_surface_source_data_filename = '$DIN_LOC_ROOT/atm/waccm/lb/cmip7_ghg_version20260727/ghg_cmip7_CMIP_CR-CMIP-1-0-0_1750-2023_monthly_gnz_0p5degLat_version20260727.nc'
stream_co2_surface_source_data_varname = 'CO2_LBC'
stream_co2_surface_source_mesh_filename = 'none'
stream_co2_surface_source_mapalgo = 'nearest_lat'
stream_co2_surface_source_lat_dimname = 'lat'
stream_co2_surface_source_taxmode = 'extend'
stream_co2_surface_source_year_first = 1850
stream_co2_surface_source_year_last = 2023
stream_co2_surface_source_year_align = 1

Verified that the resulting coupler history file looked correct.

@mvertens
mvertens marked this pull request as draft July 25, 2026 18:34
mvertens added 2 commits July 26, 2026 22:39
Summary: Patch for bad ozone forcing file and NFHIST start date adjustment

Contributors: @gold2718, @mvertens
Reviewers: @mvertens
Purpose of changes: ESCOMP#298
Github PR URL: NorESMhub#299
Changes made to build system: None
Changes made to the namelist: None
Changes to the defaults for the boundary datasets: None
Substantial timing or memory changes: None
Details:
- Change start date for NFHIST compsets to match NHIST (1850)
- Add correct start dates for NF1850, NF2000, and NFAMIP compsets
- Use a (temporary?) patched prescribed ozone file for HIST compsets
@mvertens
mvertens marked this pull request as ready for review July 27, 2026 08:03
@mvertens

mvertens commented Jul 27, 2026

Copy link
Copy Markdown
Author

@DirkOlivie @gold2718 - currently using the nearest_lat mapping requires new files that have a _time.nc suffix (the original files did not have valid values for the time variables). I'd like to replace the files in atm/waccm/lb/cmip7_ghg_version20260607/ that have no _time suffix with those that do have the _time suffix for backwards compatibility. In that case there are no different files that have to be used in order to leverage the co2 surface override capability.

@mvertens
mvertens requested a review from gold2718 July 28, 2026 14:26

@gold2718 gold2718 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I have a question and there is at least one typo.

Comment thread bld/namelist_files/namelist_definition.xml Outdated
Comment thread bld/build-namelist
Comment thread src/cpl/nuopc/atm_stream_co2.F90 Outdated
@mvertens
mvertens requested a review from gold2718 August 11, 2026 19:37

@gold2718 gold2718 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks great, thanks!

@gold2718
gold2718 merged commit 2c17182 into NorESMhub:noresm_develop Aug 12, 2026
2 checks passed
@gold2718 gold2718 changed the title new nearest_lat mapalgo in cdeps - does not requre a mesh noresm3_0_044_cam6_4_121: new nearest_lat mapalgo in cdeps - does not requre a mesh Aug 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants