Scheduled Downtime
On Tuesday 24 October 2023 @ 5pm MT the forums will be in read only mode in preparation for the downtime. On Wednesday 25 October 2023 @ 5am MT, this website will be down for maintenance and expected to return online later in the morning.
Normal Operations
The forums are back online with normal operations. If you notice any issues or errors related to the forums, please reach out to help@ucar.edu

Question about the PFT output for regional-scale simulations using CLM5?

Status
Not open for further replies.

mengqi

mj
Member
Hi,

I have a question about the output of CLM5. I am working on a regional scale simulation using CLM5. I tried to get the daily average outpit for both grid-scale and patch-scale.

This is my user_nl_clm:

fsurdat = '/glade/u/home/mengqij/surface_dataset_corn/regional/surfdata_CO_region_78pfts_simyr2000_c231005.nc'
hist_fincl2 = FSDS', 'FSDSND', 'FSDSNI', 'FSDSVD', 'FSDSVI', 'FSA', 'FSR', 'SABV', 'SABG', 'PAR_sun', 'PAR_shade', 'FLDS', 'FIRA', 'FIRE', 'FSH', 'EFLX_SOIL_GRND', 'EFLX_LH_TOT', 'FCTR', 'FCEV', 'FGEV', 'FSQ', 'H2OCAN', 'H2OSFC', 'H2OSOI', 'RAIN_FROM_ATM', 'RAIN', 'QFLX_LIQ_GRND', 'QFLX_EVAP_TOT', 'QVEGE'
hist_fincl3 = FSDS', 'FSDSND', 'FSDSNI', 'FSDSVD', 'FSDSVI', 'FSA', 'FSR', 'SABV', 'SABG', 'PAR_sun', 'PAR_shade', 'FLDS', 'FIRA', 'FIRE', 'FSH', 'EFLX_SOIL_GRND', 'EFLX_LH_TOT', 'FCTR', 'FCEV', 'FGEV', 'FSQ', 'H2OCAN', 'H2OSFC', 'H2OSOI', 'RAIN_FROM_ATM', 'RAIN', 'QFLX_LIQ_GRND', 'QFLX_EVAP_TOT', 'QVEGE'
hist_dov2xy = .true., .false., .false.
hist_type1d_pertape = ' ', 'GRID', 'PFTS'
hist_nhtfrq = 0, -24, -24
hist_mfilt = 1, 365, 365

However, it does NOT work. I checked the log file but I have no idea what is going on. For reference, I attached the cesm.log file.

In addition, I revised the user_nl_clm,

fsurdat = '/glade/u/home/mengqij/surface_dataset_corn/regional/surfdata_CO_region_78pfts_simyr2000_c231005.nc'
hist_fincl2 = FSDS', 'FSDSND', 'FSDSNI', 'FSDSVD', 'FSDSVI', 'FSA', 'FSR', 'SABV', 'SABG', 'PAR_sun', 'PAR_shade', 'FLDS', 'FIRA', 'FIRE', 'FSH', 'EFLX_SOIL_GRND', 'EFLX_LH_TOT', 'FCTR', 'FCEV', 'FGEV', 'FSQ', 'H2OCAN', 'H2OSFC', 'H2OSOI', 'RAIN_FROM_ATM', 'RAIN', 'QFLX_LIQ_GRND', 'QFLX_EVAP_TOT', 'QVEGE'
hist_dov2xy = .true., .false.
hist_type1d_pertape = ' ', 'GRID'
hist_nhtfrq = 0, -24
hist_mfilt = 1, 365

It DOES work. Therefore, I assume the issue is from 'PFTS'. Could anyone please give me some insights? Thank you!!
 

Attachments

  • cesm.log.3990206.chadmin1.ib0.cheyenne.ucar.edu.231028-194442.txt
    16.2 KB · Views: 3

slevis

Moderator
Staff member
My first suggestion is to add a single quote before FSDS in case it solves the problem:
hist_fincl3 = FSDS', 'FSDSND', 'FSDSNI', 'FSDSVD', 'FSDSVI', 'FSA', 'FSR', 'SABV', 'SABG', 'PAR_sun', 'PAR_shade', 'FLDS', 'FIRA', 'FIRE', 'FSH', 'EFLX_SOIL_GRND', 'EFLX_LH_TOT', 'FCTR', 'FCEV', 'FGEV', 'FSQ', 'H2OCAN', 'H2OSFC', 'H2OSOI', 'RAIN_FROM_ATM', 'RAIN', 'QFLX_LIQ_GRND', 'QFLX_EVAP_TOT', 'QVEGE'
If still fails, then I would test with only one variable before adding variables to see if certain variables cause it to fail.
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
There is an issue if you request a variable at a sub-grid level that is lower/finer than the variable is available at. For example, requesting FSDS at the pft-level will cause an error because it is available only at the gridcell-level. See the following for a discussion on this:

 

mengqi

mj
Member
Hi @oleson.

One more question: here is the part of user_nl_clm:

hist_fincl2 = 'GPP', 'GRAINC', 'GRAINC_TO_FOOD', 'TV', 'GSSHA', 'GSSUN', 'HTOP', 'HBOT'
hist_dov2xy = .true., .false.
hist_type1d_pertape = ' ', 'PFTS'
hist_nhtfrq = 0, -24
hist_mfilt = 1, 365

For default output (grid-scale; monthly-averaged), for example, GPP (time, lat, long) is a three-dimensional variable including time, latitude, and longitude.
For patch-level output, GPP (time, pft) is a two-dimensional variable including time and PFT index.

I am working on a regional simulation. However, I was wondering if I could get a variable with time, latitude, longitude, and patch. For example, GPP (time, lat, long, pft). If so, I can easily check a patch under a certain latitude and longitude. Otherwise, I cannot find the patch that I want using GPP (time, pft).

Thanks in advance!
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
You can find the patch you want by using the subgrid information contained within your history file. Please see this post for an explanation/example (this is for column-level variables but applies to pft-level variables using the pft subgrid variable information):

 

mengqi

mj
Member
You can find the patch you want by using the subgrid information contained within your history file. Please see this post for an explanation/example (this is for column-level variables but applies to pft-level variables using the pft subgrid variable information):

Hi @oleson ,

Thanks for your insights! I have a follow-up question.

Dr. Lombardozzi showed me how to post-process PFT-level data (Sparse arrays and the CESM land model component — ESDS 0.1 documentation), and it worked well!
However, I'm still unclear on how to plot Column-level data (e.g., TG) on a map. I read the relevant post, but I'm struggling with this part. Could you provide a sample Python code or offer a bit more explanation?

Thank you!
 

slevis

Moderator
Staff member
You will need to program the code yourself; however, I will give you some pointers:
1) Use ncdump to make a text version of one of the history files.
2) When you look at the text version, you will see vector variables such as
cols1d_ixy(column)
cols1d_jxy(column)
cols1d_wtgcell(column)
and equivalent ones for the pft, landunit, and gridcell levels.

In a loop over all the columns you can get:
- The value of your column-level variable in every column
- The value of i in every column
- The value of j in every column
- The column's fraction of the gridcell (in case that's important) in every column

So with such a loop you can map column-level variables to 2D.
 
Status
Not open for further replies.
Top