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

f05 and timing related questions in CESM2 beta version, and vertical level

Joanna Liu

Zehui Liu
New Member
Hi,
I recently tried to run cesm2_3_alpha17c/cesm2_3_alpha17d on a school server (Svante in MIT) and ran into the following problem:
1) I can't run FCnudge's f05_f05_mg17 grid resolution properly in CESM2.3, but it works fine in CESM2.2 version.CESM2.3 reports the following error after submitting the job:
vim ./run/cesm.log.224785.240424-003449
ERROR: surfdata_domain/ldomain lon/lat mismatch error 0.000000000000000E+0000.117493472584783
ENDRUN:ERROR: ERROR in surfrdMod.F90 at line 172
PS: the error report remains when I change to other compsets (any I or F compset).
2) CESM2.3 has no timing information on the Svante server, whereas CESM2.2 does.
After I run FCnudge f09_f09_mg17 normally, there is no timing output in the ./run/timing/. folder (even nothing in checkpoints), and no timing folder is generated in the case directory. I confirmed that the default setting of "CHECK_TIMING"=true in env_run.xml.
[zehui@fs03 FCnudged_GC-t2.1]$ ls ./run/timing/checkpoints
[zehui@fs03 FCnudged_GC-t2.1]$ ls ./run/timing/checkpoints/
[zehui@fs03 FCnudged_GC-t2.1]$
I'm not sure if it has anything to do with the server compilation settings (config_machines.xml, config_batch.xml and config_compiler.xml), but I made samilar changes to the CESM2.3 and CESM2.2 on Svante.
3) Where can I see the vertical layer settings supported by the mode? I'd like to add layers near ground level.

Looking forward to your answers!
Best, Zehui
 

Joanna Liu

Zehui Liu
New Member
I have responded to your other post.
Sorry, first time posting to the forum and I don't know how to withdraw a duplicate posting. However, I would also like to ask about the CAM vertical layer setting, is it based on the hyai, hybi and Ps parameters of the initial field (like f.e20.FC2010.f09_f09.144.GC_vbsext.001.cam.i.0007-01-01-00000.nc)? What is the constant P0 set to?
Or in which code are the parameter settings for the default 32 layers and other supportable layers recorded?
 

peverley

Courtney Peverley
Moderator
Hi Zehui

You are correct that the vertical coordinates are defined based on the initial file. You can see how the hybrid levels are defined (including base state surface pressure) in $CAM/src/utils/hycoef.F90. Looking at the code, it seems that it uses P0 from the initial file if it's present, but otherwise defaults to 1.0e5 (unless you're on Mars)

Hope that helps!
Courtney
 

Joanna Liu

Zehui Liu
New Member
Hi Zehui

You are correct that the vertical coordinates are defined based on the initial file. You can see how the hybrid levels are defined (including base state surface pressure) in $CAM/src/utils/hycoef.F90. Looking at the code, it seems that it uses P0 from the initial file if it's present, but otherwise defaults to 1.0e5 (unless you're on Mars)

Hope that helps!
Courtney
Hi Courtney, thanks for your reply! I also found this yesterday, and then if I want to add a layer between the original first and second layers of the model, how do I justify interpolating the initial file? Whether there are generic functions or what rules need to be followed?
Best, Zehui
 

aherring

Adam
Member
The hybrid coefficients are read in from the ncdata file, and the dimensions nlev need to match the -nlev cam config variable. To add an additional level you'll need to modify the ncdata file accordingly and set the xml variable in the case you're running: ./xmlchange CAM_CONFIG_OPTS='-nlev XX ' --append
 

aherring

Adam
Member
The hya coef's are for the pressure levels, and those increase with height. The hyb coef's are for the terrain following levels, and those decrease with height. I'd suggest using some low order interpolation if you're just adding a single level between two existing levels.
 

Joanna Liu

Zehui Liu
New Member
The hya coef's are for the pressure levels, and those increase with height. The hyb coef's are for the terrain following levels, and those decrease with height. I'd suggest using some low order interpolation if you're just adding a single level between two existing levels.
Hi Adam, many thanks for your reply. Did you mean that I can try to use linear interpolation on hya/hyb coef and might use middle values of the original first and second layers initital condition as the new layer's initial condition?
 

aherring

Adam
Member
Let me provide more specific instructions, after consulting with some other folks.

(1) compute the reference_P_profile_at_interfaces (ref_P hereafter): ref_P = p0*(hyai + hybi)
(2) interpolate to create a new ref_P level
(3) interpolate to find a new hyai value (hyai^)
(4) back out the hybi^ = (ref_P - P_0*hyai^)/P_0
(5) to find the mid-point hyam^, hybm^ values, take the arithmetic average of hyai^,hybi^ with the adjacent interface level.

I would probably just use linear interpolation.
 

Joanna Liu

Zehui Liu
New Member
Let me provide more specific instructions, after consulting with some other folks.

(1) compute the reference_P_profile_at_interfaces (ref_P hereafter): ref_P = p0*(hyai + hybi)
(2) interpolate to create a new ref_P level
(3) interpolate to find a new hyai value (hyai^)
(4) back out the hybi^ = (ref_P - P_0*hyai^)/P_0
(5) to find the mid-point hyam^, hybm^ values, take the arithmetic average of hyai^,hybi^ with the adjacent interface level.

I would probably just use linear interpolation.
Hi Adam, for vertical layer coordinates you are right, but the formula should be ref_P(i.j)=p0*hyai+Ps(i,j)*hybi. I mean for the initial atmospheric field, is it also possible to interpolate linearly? Because some atmospheric variables may not be linear in vertical distribution.
 

aherring

Adam
Member
You need to use the **reference** pressure profile for the method I just described. p0*hyai + ps*hybi is the actual pressure profile, not ref_P, which as you indicate is time and space varying.

I don't know how many fields you want to put in the inic file, but you only need PS, T, U, V, Q, in which case linear interpolation of Q may be a poor approximation, but interpolated over small distances like level thicknesses, linear should be sufficient.
 
Top