Repository navigation
Description
Scientific relevance
CESM has the urban representation that is sufficiently realistic to capture the urban climate dynamics. However, one limitation of the current model is that the urban land cover is static, which prevents CESM from capturing the urbanization effects on local urban climate.
In this project we propose to develop an urban surface dataset for future urbanization scenarios and to implement such dynamic urban land cover in CESM, which can serve as an option for future CLM versions. This enhancement to CESM will also enable researchers to supply their projection of land use change data and study the transient climate impact of LULCC.
Plan of implementation
- Preparation of urban land datasets
- Task 1: Generate a CLM surface dataset from scenario-based urban land use projection
Based on a set of data-driven projections of global urban land expansion under the framework of the shared socioeconomic pathways (SSPs) by Gao and O'Neill (2020) , originally at 10-year intervals for the 21st century, we plan to develop the annual surface dataset for CESM.
This current dataset represents the urban expansion based on SSP5-8.5 scenario, and assumes vegetation and cropland are replaced by urban when urbanization happens. The dataset spans between 2015 and 2100 and is at 0.9 × 1.25° resolution. This dataset is used in our development, and we will create surface datasets based on other SSP scenarios or for historical periods (1850 - present) when we have the data available.
- Task 2: Modify mksurfdata tool to generate surface datasets from dynamic urban grid datasets.
We plan to enhance the mksurfdata tool so that it can handle a series of urban land use grid datasets and generate the surface datasets for CLM automatically. This will be useful for the community to test any given urbanization or land use change scenario.
- Update to model code
- Task 3: Modify the code for urban energy and water processes
We will modify code in CLM to implement physical processes to address water and energy balance when dynamic urban land use change is adopted, and deal with biophysical process changes in regions that are converted from vegetated to urban.
- Task 4: Enable CESM to update surface dataset annually
Currently CESM runs the entire simulation based on the initial land cover data. We plan to modify the code so that the model can update land cover each year with a new surface dataset.
- Task 5: Offline and online tests.
We plan to test the code modification with active land components only, and then implement the change to fully-coupled CESM simulation.
Collaborators
Keer Zhang(@keerzhang1). Advisor: Dr Lei Zhao. We are working closely with Dr Keith Oleson (@olyson).
Activity
billsacks commentedon Jul 28, 2021
Thanks a lot for opening this issue and describing your plans.
You may be happy to know that the framework is already in place for task 3 (as described in https://escomp.github.io/ctsm-docs/versions/master/html/tech_note/Transient_Landcover/CLM50_Tech_Note_Transient_Landcover.html#mass-and-energy-conservation), so this will probably only involve relatively minor changes, if any. The relevant module is
https://github.com/escomp/CTSM/blob/master/src/biogeophys/TotalWaterAndHeatMod.F90
You'll just need to confirm that all of the relevant urban water and energy states are captured there.
For task 2, you will want to add the pct urban fields to the existing transient landuse file, which already provides time-varying fields for other variables like pct crop. Then task 4 will involve writing a module similar to https://github.com/escomp/CTSM/blob/master/src/dyn_subgrid/dyncropFileMod.F90 or https://github.com/escomp/CTSM/blob/master/src/dyn_subgrid/dynlakeFileMod.F90 which reads the relevant urban fields off of the file each year. One minor note is that you should probably also call the CheckUrban routine on each year's input:
CTSM/src/biogeophys/UrbanParamsType.F90
Line 705 in 84e970f
One other question you'll want to think about is how to initialize water and energy state variables when an urban column newly comes into existence. You basically have two options:
I'd be happy to help consult on some of the specific code changes that need to be made for this project.
olyson commentedon Jul 29, 2021
Thanks Bill, this was very useful information. We are meeting bi-weekly on this project and will contact you when we need help, thanks!
fang-bowen commentedon Jul 29, 2021
Thanks Bill, that's very helpful! We'll update this issue with any progress.
olyson commentedon Aug 11, 2021
@billsacks , I'm a bit confused by the PCT_CROP_MAX that you mentioned and similar variables that are intended to provide a reasonable mask field. We were going to do something similar for urban. I see those on the transient landcover dataset (created by mksurfdat) but I don't see where they are used in the clm code (unless it is a segmented field that doesn't allow for a search using grep). For lakes, it looks like the variable HASLAKE is read off the dataset if transient lakes are active, but I don't see a variable comparable to crops like, e.g., PCT_LAKE_MAX.
billsacks commentedon Aug 11, 2021
@olyson sorry for the confusion. This is something that got half-way implemented and then dropped. It's still intended, but fell off the priority list (first mine, then @slevisconsulting 's): see #229.
billsacks commentedon Aug 20, 2021
@olyson and I discussed BGC conservation by email and then in person today.
First, here's a copy of our email conversation so it's all in one place:
From Keith:
My reply:
And finally, a summary of our discussion today:
col%wtlunitandcol%wtgcelldo not give the true column areas for urban roads (urban roads always take up 1/3 of the non-roof portion of the landunit, regardless of their actual area). It may be that the only change needed for this to work right would be changingset_new_weightsindynColumnStateUpdaterMod, but we didn't look closely.col%wtgcellat face value in urban columns indynColumnStateUpdaterMod– i.e., for the sake of storing / conserving these BGC variables, we'll act as if that gives the true column weight on the grid cell. This way we'll end up storing all of the C & N from the vegetated column in the urban columns, and there shouldn't be any that is lost from the system. If that urban landunit later shrinks, the stored C & N should be restored symmetrically. It shouldn't really matter that it was stored in a non-physical way (e.g., with some C & N stored in urban walls), since the BGC variables are irrelevant over the urban areas and we just want to be able to restore the amount that was originally stored if an urban landunit grows and then later shrinks.dzsoi_decomp, which is the same for all columns, so this is already what we want. So it may be that the only thing that needs to change is the use of dz inch4_totcolch4: that will need to usedzsoi_decompover urban columns. (This begs the question of why this isn't already usingdzsoi_decompfor consistency with the C & N code; we're not sure about this.)Update ch4Mod.F90
Update ch4Mod.F90
fang-bowen commentedon Sep 27, 2021
Progress update:
During the past weeks we have made some progress on the following tasks:
Task 1 & 2: Earlier we have generated a surface dataset for code development and testing. The dataset is processed into
landuse.timeseriesfile to be read by the new dynamic urban module.We are looking at the mksurfdata_map tool and plan to automate this process for dataset generation.
Task 4: We have created a new module (
dyn_subgrid/dynurbanFileMod.F90) and made other necessary modification so that the model is able to readPCT_URBANinlanduse.timeseriesfile and update the urban fractions annually. This is verified by comparing the output with the input data.As for the initialization of new urban columns: we have created
PCT_URBAN_MAXvariable in ourlanduse.timeseriesfile, but since the functionality (of only initialize urban where it might come into existence) is not fully implemented, we are currently setting (user_nl_clm)run_zero_weight_urbanto.true.and running urban everywhere. We plan to evaluate the performance of this setting.Besides these, as Keith suggested I have made some flowcharts (calling tree/sequence) and found them helpful in understanding the code and the model structure. I will refine and share some relevant ones here soon.
Our priority for now:
Task 3: We are trying to understand how water and energy balance is handled for dynamic urban in the current code. Through some calculation we believe the scaling method (
c2l_scale_type='urbanf') makes sense, and so far we have not identify any states / processes that seem incompatible with dynamic urban.However Keith has a time-step level output (in
/glade/scratch/oleson/archive/ctsm51_ctsm51d049_1deg_GSWP3V1_SSP585_urbanonly_bowen/lnd/hist, 2019-12 to 2020-01) and we found the difference betweenHEAT_CONTENT1andHEAT_CONTENT2after the urban fraction changes does not match the aggregatedEFLX_DYNBALthroughout the later year.So, @billsacks, do you have any insight what could be the reason here? I can make some plots to show this if it helps.
By the way, I see some routines to "set start-of-run baseline values" (e.g.,
dyn_hwcontent_set_baselines). Will this baseline subtracting method affect ourdynbalfluxes here?dynamic_urban_update_2021_09_27.pdf
billsacks commentedon Sep 27, 2021
Good questions. The logic controlling this is pretty complex.
Regarding the mismatch between (
HEAT_CONTENT2 - HEAT_CONTENT1) andEFLX_DYNBAL: sorry, I forgot about this point when we talked before: The delta heat is adjusted with this code before computingEFLX_DYNBAL:CTSM/src/dyn_subgrid/dynConsBiogeophysMod.F90
Lines 557 to 562 in 3dcbc74
Briefly, the problem this addresses is that the runoff generated by the delta liquid term is already adding or subtracting some heat to/from the grid cell, so we need to correct the delta heat adjustment to account for that. I would be happy to try to explain this in more depth if you're interested – and also happy to hear any arguments that this correction shouldn't be done at all if anyone feels that way, because I'm still not 100% sure this is the right thing to do (but Inne Vanderkelen and I discussed this in depth a few years ago in the context of dynamic lakes, and it at least stood up to that inspection).
Regarding the baselines: No, I don't think this should have any impact on dynbal fluxes for urban, unless the urban area is growing into glacier or lake areas: These baseline values are used to account for "virtual" states in glacier and lake landunits, and I believe aren't used in other landunits (though I could be remembering wrong). This is another subtle thing that I'd be happy to discuss further if you'd like to understand it more, though I think you won't need to deal with this for urban.
olyson commentedon Oct 6, 2021
Performance notes for 5 year I2000 cases:
"allurban": 152 yrs/day, 289 pe-hr/simulated_year
normal: 172 yrs/day, 254 pe-hr/simulated_year
So, about 12% slower when running 3 urban landunits in every gridcell.
Face2sea commentedon Oct 21, 2021
@billsacks Hi Bill, I think we have verified that the heat, liquid water, and ice conservation are all working properly. Thanks for your help! We are now planning to move forward with creating the multi-scenario (SSP-RCP) dynamic urban landuse.timeseries data based on Gao and O'Neill (2020) dataset. Before we are doing so, do you have any suggestions that how we should prepare these datasets and codes to make them better comply with the overall data framework in CESM/CTSM.
olyson commentedon Oct 25, 2021
I spoke to Bill about this. Basically, we should proceed with implementing the raw dynamic urban data into mksurfdata. As long as we use a recent version of ctsm master, any ongoing work on the mksurfdata process should not affect us much, if at all. We can discuss further at our next meeting.
7 remaining items
keerzhang1 commentedon Nov 8, 2021
I wonder if we can do the following to make the expanding urban replace PCT_NATVEG first and then PCT_CROP:
(1) In mksurfdat.F90, normally the normalizedcheck_landuse will ensure the lake[1]+wet[1]+glacier[1]+urban[y]+natveg[y]+crop[y] to be 100. We modify the normalizedcheck_landuse so that it adjusts the natveg and crop assuming the lake,wetland, glacier, and urban all remain constant as the first year. Hence, it ensures lake[1]+wet[1]+glacier[1]+urban[1]+natveg[y]+crop[y] to be 100. Also, the normalizedcheck_landuse still replace bare soil with urban first, and then the natveg and crop proportionally.
CTSM/tools/mksurfdata_map/src/mksurfdat.F90
Line 1191 in 7a85024
(2) In the landuse.timseries data, we still generate the PCT_URBN which is the transient urban fractions (urban[y]).
(3) Then in the dynLandunitAreaMode.F90, the Landunit_sum might be >100 when urban expands, and this expanded urban will first take the istsoil, and then istcrop.
I also made a slide to show this workflow 2.pdf. Does this make sense? Thank you!
olyson commentedon Nov 8, 2021
Lei, can you propose a meeting for us to discuss this further? I'd suggest inviting @lawrencepj1 and maybe also @billsacks as well. I don't know enough about the history behind some of the choices made in mksurfdata to judge whether these proposed changes are reasonable.
billsacks commentedon Nov 8, 2021
@keerzhang1 thank you very much for all of your thoughts on this. I really appreciate that you are thinking through this carefully. I agree with @olyson that a meeting makes sense at this point (partly to discuss your recent proposals, which I don't fully understand, and partly to discuss this issue more generally), though I'll share some more thoughts in writing first:
I have spent some more time looking through the relevant code and thinking about this issue. It does look like
PCT_NATPFT + PCT_CROP = 100%is generally true prior tonormalizencheck_landuse. I am left with more questions than answers at the moment, though I am starting to realize that my last comment (about reducingPCT_NATPFTandPCT_CROPproportionally) may not have made sense.I think the important point here is what's done to create the raw datasets. I'm hoping that @lawrencepj1 can provide some insight here. At first I thought that urban should be treated the same as other special landunits. But now I'm realizing that what's really important is keeping the mksurfdat code consistent with the process for creating the raw datasets, and specifically the process for rescaling
PCT_NATPFTandPCT_CROPto sum to 100% on the raw datasets. The current mksurfdat code, where urban is treated differently from other special landunits in that it preferentially replaces bare ground, makes sense if urban is treated differently from other special landunits in the creation of the raw datasets – and specifically, if urban areas are represented as bare ground PFTs on the raw datasets.It would help me to know how various situations are represented on the raw datasets; for example, these three grid cells:
Grid cell 1: in reality:
Grid cell 2: in reality:
Grid cell 3: in reality:
I'd particularly like to know what
PCT_NATPFT,PCT_CROPandPCT_PFTlook like on the raw datasets in each of these cases. It seems like the important point is making sure that the mksurfdat code is set up in a way to reproduce reality in each of these situations (and others) given the process for creating the raw datasets.I do see the point that, for transient, it's a problem if we reduce
PCT_CROPon the landuse timeseries file when urban expands. It seems like this could be an issue for other landunits, too – like the upcoming feature to enable transient lakes. This might argue for preferentially taking all special landunit area fromPCT_NATVEG, but that might in turn require a change in how the raw datasets are constructed to keep everything consistent.This may actually require some even bigger rethinking, like:
PCT_CROPandPCT_NATVEGadd to 100% beforenormalizencheck_landuse, instead treating them the same as other landunits. (That may or may not help with the issues I'm struggling with. I'm not sure what other problems that might create, though.)One other comment is that, whatever we decide here, if there are behavior changes to the standard operation of mksurfdat, those should be done in their own branch/PR, not folded into the big transient urban PRs: we want to keep answer changes separate from answer-preserving feature additions. If it is easiest for you to fold all of these things together initially, then we should make sure we have a plan for separating them later (whether manually or with the help of git).
Face2sea commentedon Nov 9, 2021
@keerzhang1 @billsacks @lawrencepj1 @olyson Thank you all very much for these helpful information! @olyson yes, it is definitely a great idea to have a meeting to discuss these issues! I will create a doodle for everyone to find out a time shortly.
lawrencepj1 commentedon Nov 9, 2021
Hi Everyone @olyson @keerzhang1 @billsacks
Yes I agree a meeting would be good. In regard to Bill's comments on the raw datasets we currently have a PCT_URBAN specified but this is from MODIS and does not have the required breakdown into the urban classes. It could easily be included in the next version of the CLM raw data so that the nat veg, crop and other fractions are accounted for before mksurfdata as an alternative strategy if that was helpful.
cheers
Peter
olyson commentedon Nov 9, 2021
As Peter implies, the original raw multi-density urban dataset was independently derived from considerations (mainly population density) other than, for example, remotely-sensed data such as from MODIS. At the time of its implementation in mksurfdata, it was assumed that urban should replace bare ground preferentially because of their spectral similarity in remote sensing derived datasets of that period.
Face2sea commentedon Nov 10, 2021
@olyson @billsacks @lawrencepj1 @keerzhang1 @fang-bowen Here is the when2meet link for our meeting to discuss this further: https://www.when2meet.com/?13594604-RvqkA. Could you please indicate your availabilities in the link? I will find out a common time for everybody to set up the meeting. Thanks!
billsacks commentedon Nov 17, 2021
As we discussed on Monday: For now @keerzhang1 will do something simple in mksurfdata_map, getting dynamic urban to work without trying to address the issues identified above. However, before too long, we should overhaul how the PCT areas are determined in mksurfdata_map. I have opened a new issue for this: #1555 .
@keerzhang1 @Face2sea and @fang-bowen : thank you very much for bringing these issues to our attention and starting these important conversations around what is the right thing to do in mksurfdata_map!
billsacks commentedon Dec 8, 2021
See also #1572
olyson commentedon Sep 8, 2022
Tasks 2, 3, and 4 have essentially been completed. Task 5 (testing) has also been completed but will need to be repeated once the items below have been completed. Task 1 has been expanded below to include a new building temperature stream file and code to determine nlevurb from the surface datasets as originally described in PR #591 which was completed but never implemented into master.
1a. Incorporate new raw urban surface datasets for present day (2000), historical, and five SSPs (SSP1-2.6, SSP2-4.5, SSP3-7.0, SSP4-3.4, SSP5-8.5) developed primarily by @keerzhang1 from Gao and O'Neill (2021) and Gao and Pesaresi (2022). These datasets are available but have PCT_URBAN calculated with respect to the land area of the gridcell and will likely need to be replaced with PCT_URBAN calculated with respect to the total area of the gridcell based on recent discussions. The urban properties (morphological, radiative, and thermal) in these datasets are described in Oleson and Feddema (2019).
1b. A new building temperature stream file. It is available in inputdata at /glade/p/cesmdata/cseg/inputdata/lnd/clm2/urbandata/CLM50_tbuildmax_Oleson_2016_0.9x1.25_simyr1849-2106_c181017.nc, but needs to be converted to cdf5.
1c. Code changes in CTSM and mksurfdata (presumably mksurfdata_esmf) to read in nlevurb from the surface dataset instead of being hardcoded in clm_varpar.F90. This will ensure backward compatibility with older urban datasets (which have nlevurb=5 as opposed to the new datasets which have nlevurb=10).
The plan is to implement 1a-c on a branch off of ctsm5.2.mksurdata.
slevis-lmwg commentedon Sep 28, 2022
@olyson #1853 is now merged (in the ctsm5.2.mksurfdata branch).
Feel free to close this issue if appropriate.
olyson commentedon Sep 28, 2022
Thanks @slevisconsulting ! I'm going to close this because the tasks have been completed and I assume that the final surface and landuse timeseries datasets will be generated and incorporated into the namelists using the ctsm5.2.mksurfdata branch and then merged into main. Any objections?