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 calculate the Geopotential in CESM

zhendf

fanfan zheng
New Member
Hi, everyone
Due to my carelessness, I forgot to output the variable geo-potential in the daily file xxx.h1.nc, but I have got the PS output. Could anyone tell me how the geo-potential calculated in the CESM? Thanks!!!
 

brianpm

Active Member
You might be able to approximate it if you have temperature and specific humidity saved. I think the way that CESM computes it is in:

$CAMROOT/src/atmos_phys/utilities/geopotential_t.F90
 

cacraig

Cheryl Craig
CSEG and Liaisons
Staff member
You can also trace the variable you wanted to output in the CAM code itself to see what would have been output. For instance, the variable "Z3" which is "Geopotential Height above sea level" is output in src/physics/cam/cam_diagnostics with an "outfld" call and is calculated as follows:
z3(:ncol,k) = state%zm(:ncol,k) + state%phis(:ncol)*rga

There is also a file which contains the geopotential calculations: src/physics/cam/geopotential.F90. I believe this is very similar to the file that brianpm mentioned above.

Hopefully one of these suggestions will help you.
 

zhendf

fanfan zheng
New Member
You can also trace the variable you wanted to output in the CAM code itself to see what would have been output. For instance, the variable "Z3" which is "Geopotential Height above sea level" is output in src/physics/cam/cam_diagnostics with an "outfld" call and is calculated as follows:


There is also a file which contains the geopotential calculations: src/physics/cam/geopotential.F90. I believe this is very similar to the file that brianpm mentioned above.

Hopefully one of these suggestions will help you.
Thank you very much,I will try it later!
 
Top