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

How to output surface roughness (e.g., Z0MV) in the CLM5.0 land surface model?

Shuai Li

Shuai Li
New Member
What version of the code are you using?
- I ran CESM 2.1.4 on NCAR HPC.


Have you made any changes to files in the source tree?
- I only changed the default “fsurdat”


Describe every step you took leading up to the problem:
- Specific steps: 1) create a new case with F2000climo compset
2) case setup
3) vi user_nl_clm, and specified on "hist_fincl1 = 'Z0MV'", "hist_fincl2 = ...", "hist_nhtfrq = 0, -24" "hist_mfilt = 1, 365" "fsurdat = ..." "use_init_interp = .true."
4) vi user_nl_cam, and specified on "fincl2", "mfilt = 1, 365", "nhtfrq = 0, -24"
5) ./preview_namelists
6) ./case.build


Describe your problem or question:
I want to output the roughness variable (e.g., Z0MV). I saw the solution in the previous post and tried it out. I used hist_finl1 = 'Z0MV' in user_nl_clm to specify its output.
But when I try to comment out the "use_cn" if statement to get Z0MV output:


if (use_cn) then
this%z0mv_patch(begp:endp) = spval
call hist_addfld1d (fname='Z0MV', units='m', &
avgflag='A', long_name='roughness length over vegetation, momentum', &
ptr_patch=this%z0mv_patch, default='inactive')
end if

I can't find which file or script for this statement (⬆️)
Can you tell me where I can find this statement?

I attached the log file if need it.
 

slevis

Moderator
Staff member
I typed
git grep -i "call hist_addfld1d (fname='z0mv'"
in my ctsm checkout and got
src/biogeophys/FrictionVelocityMod.F90: call hist_addfld1d (fname='Z0MV', units='m', &

This seems to be the line that you're looking for.
 

Shuai Li

Shuai Li
New Member
I typed
git grep -i "call hist_addfld1d (fname='z0mv'"
in my ctsm checkout and got
src/biogeophys/FrictionVelocityMod.F90: call hist_addfld1d (fname='Z0MV', units='m', &

This seems to be the line that you're looking for.
When I tried to type the command you mentioned in my case folder, there was no response. Is it because I am running CESM2.1.4 on Derecho instead of a local machine?
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
You need to do it in your source code, e.g.,

cd /glade/work/oleson/release-cesm2.1.4/components/clm/src
grep -r Z0MV *

gives:

biogeophys/FrictionVelocityMod.F90: call hist_addfld1d (fname='Z0MV', units='m', &
 

Shuai Li

Shuai Li
New Member
You need to do it in your source code, e.g.,

cd /glade/work/oleson/release-cesm2.1.4/components/clm/src
grep -r Z0MV *

gives:

biogeophys/FrictionVelocityMod.F90: call hist_addfld1d (fname='Z0MV', units='m', &
Hi Oleson,

Thanks a lot for your detailed response. I have found that file.

In addition, I am studying the climate effects of land cover change by replacing the default surface conditions (fsurdat) in CESM2. If I activate the output of Z0MV, will the simulated results (e.g., temperature, precipitation) be different from not activating it?
 

oleson

Keith Oleson
CSEG and Liaisons
Staff member
Turning on and off history fields should have no effect on model results.
 
Top