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

Distinguish between ocean and wetland in fsurdat files #2164

Merged

Conversation

slevis-lmwg
Copy link
Contributor

Description of changes

Add pctocn to mksurfdata_esmf and write PCT_OCEAN to fsurdat files.

Specific notes

Contributors other than yourself, if any:
@billsacks @ekluzek @mvertens

CTSM Issues Fixed (include github issue #):
Fixes #1886

Are answers expected to change (and if so in what way)?
No

Any User Interface Changes (namelist or namelist defaults changes)?
fsurdat contains PCT_OCEAN now

Testing performed, if any:
Code worked to generate the following fsurdat file /glade/work/slevis/git/mksurfdata_toolchain/tools/mksurfdata_esmf/surfdata_1.9x2.5_hist_78pfts_CMIP6_1850_c230914.nc
I will also need to change clm code to successfully read the new fsurdat file.

@slevis-lmwg slevis-lmwg self-assigned this Sep 15, 2023
@slevis-lmwg slevis-lmwg added the enhancement new capability or improved behavior of existing capability label Sep 15, 2023
@slevis-lmwg slevis-lmwg added this to the ctsm5.2.0 milestone Sep 15, 2023
@slevis-lmwg
Copy link
Contributor Author

slevis-lmwg commented Sep 15, 2023

Run all python tests

  • Unit tests PASS

  • Sys tests PASS

  • ./run_sys_tests -s clm_pymods --skip-compare --skip-generate FAIL
    LILACSMOKE FAIL expected due to pre-pctocn fsurdat file (i.e., does not include PCT_OCEAN; same reason all aux_clm tests will fail until we replace all fsurdat files)
    FSURDATMODIFYCTSM FAIL likely expected because not finding conda in this tag

  • add new /testinput files to repo

  • do not test aux_clm (will fail)

Generated new 78-pft (also 16-pft) 1-deg fsurdat/landuse files

surfdata_0.9x1.25_hist_78pfts_CMIP6_1850-2015_c231031.namelist
surfdata_0.9x1.25_hist_78pfts_CMIP6_1850-2015_c231031.nc
landuse.timeseries_0.9x1.25_hist_78_CMIP6_1850-2015_c231031.nc 

and old (i.e. without PCT_OCEAN)

surfdata_0.9x1.25_hist_78pfts_CMIP6_1850-2015_c231107.namelist
surfdata_0.9x1.25_hist_78pfts_CMIP6_1850-2015_c231107.nc
landuse.timeseries_0.9x1.25_hist_78_CMIP6_1850-2015_c231107.nc

Ran these cases with "cold start" initial conditions:
/glade/u/home/slevis/cases_ctsm5.2/i1850_f09_bgccrop
/glade/u/home/slevis/cases_ctsm5.2/i1850_f09_bgccrop_default
and got bfb, including after a restart.

@slevis-lmwg
Copy link
Contributor Author

slevis-lmwg commented Sep 17, 2023

Currently seeing diffs (not in day 1 but in day 2 and later) in a single grid cell: ncview indices (i,j) = (20,68) and (lat, lon) = (38.8,50)

I have compared the two fsurdat files used (old, without PCT_OCEAN, listed first and new listed second) and found different mapunits in the same grid cell:
/glade/work/slevis/git/mksurfdata_toolchain/tools/mksurfdata_esmf/surfdata_1.9x2.5_SSP5-8.5_78pfts_CMIP6_1850-2100_c230227.nc
'/glade/work/slevis/git/mksurfdata_toolchain/tools/mksurfdata_esmf/surfdata_1.9x2.5_hist_78pfts_CMIP6_1850_c230914.nc'

I generated a new copy of the "old" fsurdat file. Now mapunits are the same as in the new fsurdat.
I generated a new copy of the "old" as was done before, i.e. for transient. The mapunits are still the same as in the new fsurdat.

I will attribute the mapunit difference in that one grid cell to a change in the ctsm5.2 branch between tags
alpha-ctsm5.2.mksrf.15_ctsm5.1.dev123 and alpha-ctsm5.2.mksrf.14_ctsm5.1.dev111-5-gb1204ca46
or some change in cheyenne between late Feb and now.

src/main/surfrdMod.F90 Outdated Show resolved Hide resolved
@slevis-lmwg
Copy link
Contributor Author

Notes to self:
While working on izumi, I will try this test when looking for bfb answers:
SMS.f10_f10_mg37.I2000Clm51BgcCrop.izumi_gnu.clm-crop
First generate new fsurdats, one without ocean and one with ocean.

@slevis-lmwg
Copy link
Contributor Author

slevis-lmwg commented Oct 23, 2023

Last commit not tested on izumi because ./gen_mksurfdata_build.sh fails on izumi.

Testing on cheyenne with existing cases:
/glade/u/home/slevis/cases_ctsm5.2/i1850_f19_bgccrop_default
/glade/u/home/slevis/cases_ctsm5.2/i1850_f19_bgccrop

@slevis-lmwg
Copy link
Contributor Author

My latest modifications have not changed answers.
@swensosc would you like to look at my last two commits for confirmation that I did what you suggested?
If you have no further comments, this PR can be merged with the ctsm5.2.mksurfdata branch.

@slevis-lmwg
Copy link
Contributor Author

slevis-lmwg commented Nov 1, 2023

@swensosc thanks for your email (@swensosc looked at my code and was ok with my mods).
@swensosc suggested an additional test, where we work with a raw dataset that includes inland wetlands and confirm that everything works as intended. I like the suggestion.

Update:
The corresponding raw dataset (mksrf_lanwat.050425.nc) includes non-zero wetlands, so I just need to set no_inlandwet = .false. in mksurfdata_esmf for Sean's test. I generated the fsurdat file:

/glade/work/slevis/git/mksurfdata_toolchain/tools/mksurfdata_esmf/surfdata_0.9x1.25_hist_78pfts_CMIP6_1850_c231031.namelist
/glade/work/slevis/git/mksurfdata_toolchain/tools/mksurfdata_esmf/surfdata_0.9x1.25_hist_78pfts_CMIP6_1850_c231031.nc

Simulation pointing to this fsurdat /glade/scratch/slevis/i1850_f09_bgccrop/run completed successfully.

…etland_iss1886

Resolved conflicts:
python/ctsm/test/test_sys_fsurdat_modifier.py
python/ctsm/test/testinputs/default_data.cfg
python/ctsm/test/testinputs/modify_fsurdat_short.cfg
@slevis-lmwg
Copy link
Contributor Author

Updating to latest ctsm5.2.mksurfdata...
Conflict in python/ctsm/test/testinputs/modify_fsurdat_short.cfg suggests that I may need to remake this file
ctsm/test/testinputs/surfdata_5x5_amazon_hist_16pfts_CMIP6_2000_c231031.nc to a 78-pft file, but we'll see if tests pass.

@slevis-lmwg
Copy link
Contributor Author

PASS: make all
FAIL: clm_pymods same expected fails as before (see earlier post)

@slevis-lmwg slevis-lmwg marked this pull request as ready for review November 13, 2023 22:29
@slevis-lmwg slevis-lmwg merged commit 9583b22 into ESCOMP:ctsm5.2.mksurfdata Nov 13, 2023
2 checks passed
@slevis-lmwg slevis-lmwg deleted the ocn_v_wetland_iss1886 branch November 13, 2023 22:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement new capability or improved behavior of existing capability
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

3 participants