Setting up (high-res sparse) regional-grid CTSM simulations #1919
Replies: 7 comments 11 replies
-
Instructions for running CTSM-FATES on a sparse regional grid with WRF datm driver files Slevis placing files from this work in /glade/work/slevis/data_UCB/ca_fates_input_data/wrf_CA_sparse_grid Slevis: From github issue #1773 I compiled the following series of steps to set up simulations on cheyenne. Let us know if you encounter issues due to the switch to derecho, and we will attempt to update the instructions accordingly. A) Generate datm files from wrf output SKIP IF using one of the CTSM datm datasets. To run this high resolution regional case, we used downscaled 9 km WRF data for the western US (from Stefan Rahimi at UCLA). WRF output files differ significantly from CLM forcing files given the data format. In order to run CLM-FATES with WRF forcing, one has to reprocess original WRF files first. Xiulin Gao wrote a R script to do this(https://github.com/XiulinGao/FATES-CA-grassland-exp/blob/main/scripts/WRF-CLM-forcing.Rmd). If you use Python instead and want to write your own script, a few things to notice before you start:
B) Generate landmask.nc SKIP IF subsetting from global to regional while not changing land properties or the land mask. In the specific example we wish to limit the regional simulation to the grid cells specified by the landmask variable in landmask.nc (in this example, wrf_CA_ann_grass_bilinear.nc which was generated by Xiulin). The file must contain
This file’s grid matches the grid found in the datm files discussed previously. Circularity in some choices in the current process may make this a requirement. In particular, generating the fsurdat file ← from the mesh file ← from a datm file while modifying the mesh file from the landmask file. Theoretically, though the datm grid may span a larger region (even global) than the CTSM will run on. If you already have your fsurdat file, generate landmask.nc by copying your fsurdat to landmask.nc, then renaming the mask variable to landmask, then copying the fsurdat mask variable to landmask.nc again, and renaming that to mod_lnd_props. These steps can be accomplished with netcdf operators:
C) git clone CTSM
D) Generate mesh file from a 2d lat/lon file containing your regional grid & update mask… NB1. Alternate instructions exist here.
NB. This mesh file’s mask = 1 everywhere.
Before executing the line above, we set options as follows in the .cfg file:
The mask in mask_mesh.nc represents the inverse of the land mask, so E) git checkout ctsm5.2.mksurfdata SKIP IF you don’t still need to generate an fsurdat file. Use of the mksurfdata_esmf tool requires the ctsm5.2.mksurfdata branch. One could but should not have to clone the ctsm a second time to check out this branch. When merged with the main trunk of the CTSM (not as of the last edit of this post), users will not need to execute the extra step of checking out this branch:
F) Make CTSM surface dataset (fsurdat file) using the mksurfdata_esmf tool SKIP IF you don’t still need to generate an fsurdat file.
G) Run the CTSM
in env_build.xml so that datm knows the correct size of the regional grid. A more robust solution allows all new cases to include the correct nx ny values as posted here.
|
Beta Was this translation helpful? Give feedback.
-
Instructions for running regional CTSM-FATES at regular 1-degree resolution slevis: I wrote the following instructions while testing on izumi with this ctsm5.2 tag: A) Create case NOTE: You need "--mpilib mpi-serial" for simulations running on one processor, which is most common for single-point simulations. For regional simulations, omit this and select a pe-layout that works for your region. B) Generate fsurdat file NB. The --create-mesh option of this tool did not work for a while. The same functionality is accomplished here externally with step (C). C) Generate mesh files
OR D) Run the CTSM For faster turnaround, consider changing (see #1907 for a detailed investigation)
Before you build the case and submit the run, a note about restarts:
|
Beta Was this translation helpful? Give feedback.
-
@slevisconsulting the motivation for putting these instructions into a discussion was to provide a target for users looking for a workflow for regional subsetting. There seem to be at least two cases with different complexity: a basic regional subsetting and the more complex high-resolution sparse grid subsetting. As these are different and distinct workflows, it would make sense to split these into two separate discussion topics. They can certainly have a note to cross-reference to the other workflow, but for sharing with users in the community it would be easier to separate them as two discussion workflows. |
Beta Was this translation helpful? Give feedback.
-
@slevisconsulting adding a link to the generalized instructions from @adrifoster if it useful. #1833 |
Beta Was this translation helpful? Give feedback.
-
@slevisconsulting in the fourth step of mesh_generated_in_C I had a WARNING: |
Beta Was this translation helpful? Give feedback.
-
Similar to the first post in this discussion, a user attempted a single-point simulation using WRF output on a curvilinear grid as their datm driver. The difference from the first post is that this user wants single-point rather than a region. I found that the following changes were necessary for this to work: Do not specify mesh files in env_run.xml and user_nl_datm_streams. In user_nl_datm_streams, set (The user already had a single-point fsurdat file for their case.) |
Beta Was this translation helpful? Give feedback.
-
Recently running a case using transient historical CO2 with recycled WRF-reanalysis climate driver, ran into issues at the beginning. But after trying and changing model settings many times, I was able to get the model to run (but now facing a mass conservation check error, which should not be related to how I set up the model). As requested by @slevis-lmwg , I am documenting the changes I made to get the case going here:
I also used this compset "20TR_DATM%GSWP3v1_CLM50%FATES_SICE_SOCN_SROF_SGLC_SWAV" and seems 4-6 changes are set as above by the compset as default, so you can even skip 4-6. As the climate driver is not lined up with the CO2, and I recycle the climate driver, so in user_nl_datm_stream file, I also specified "co2tseries.20tr:year_first = yyyy" ,"co2tseries.20tr:year_last = yyyy","co2tseries.20tr:year_align = yyyy","co2tseries.20tr:taxmode = extend". just replace yyyy with whatever year you aim to use. |
Beta Was this translation helpful? Give feedback.
-
Context
This started as issue #1773 from which I linked a google doc (now out of date and obsolete) with step-by-step instructions intended initially for a case that @XiulinGao needed to run. To the google doc I had added step-by-step instructions for a simpler case that @jkshuman needed to run. I am copying the step-by-step instructions for the two cases here, and periodically including updates that are not going on the google doc.
Another use-case is the PPE sparse grid that @ekluzek is working on in #1731.
Documentation for non-sparse regional cases appears here.
These workflows should likely ultimately appear in the CTSM User's Guide.
Note
If subsetting from a global fsurdat file while not changing land properties or the land mask, follow the instructions for running regional FATES at regular 1-degree resolution (see Table of Contents).
Contents
Instructions for running CTSM-FATES on a sparse regional grid with WRF datm driver files
Instructions for running regional CTSM-FATES at regular 1-degree resolution (alternate workflow appears here)
Addendum for running CTSM-FATES single-point with WRF datm driver files
Beta Was this translation helpful? Give feedback.
All reactions