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

Unable to locate lines which compute output variable

sur23beeb

ST
Member
I am unable to locate where in the source code some of the variables in the netcdf output files are being computed. For example: KPP_SRC_TEMP. This variable has units degC/s and is the KPP mixing term in the dT/dt equation (T = temperature). I have included this variable name in the tavg_contents file and I can see it is in the netcdf time-averaged history file as a 4D variable (time, z, y, x). But I am unable to locate the lines where the variable is computed when I try the following:
Bash:
grep -r KPP_SRC_TEMP cesm.sandboxes/cesm2.1.0/components/pop/
The output from the command:
Bash:
cesm.sandboxes/cesm2.1.0/components/pop/input_templates/tavg_contents_tracer_budget_terms:1  KPP_SRC_TEMP
cesm.sandboxes/cesm2.1.0/components/pop/.svn/pristine/5e/5e162f46f540863c65519bbc1f830992b3991590.svn-base:1  KPP_SRC_TEMP
There are other variables too that are being written out in the output files but am not sure where they are being computed.

Thanks for your help.
 

sur23beeb

ST
Member
Never mind! I found out where they are being written. That variable name is assembled from two strings, which is my grep command was not helpful.
 

ucas_qs

qiushi Zhang
Member
I am unable to locate where in the source code some of the variables in the netcdf output files are being computed. For example: KPP_SRC_TEMP. This variable has units degC/s and is the KPP mixing term in the dT/dt equation (T = temperature). I have included this variable name in the tavg_contents file and I can see it is in the netcdf time-averaged history file as a 4D variable (time, z, y, x). But I am unable to locate the lines where the variable is computed when I try the following:
Bash:
grep -r KPP_SRC_TEMP cesm.sandboxes/cesm2.1.0/components/pop/
The output from the command:
Bash:
cesm.sandboxes/cesm2.1.0/components/pop/input_templates/tavg_contents_tracer_budget_terms:1  KPP_SRC_TEMP
cesm.sandboxes/cesm2.1.0/components/pop/.svn/pristine/5e/5e162f46f540863c65519bbc1f830992b3991590.svn-base:1  KPP_SRC_TEMP
There are other variables too that are being written out in the output files but am not sure where they are being computed.

Thanks for your help.
Hello, I found that KPP_SRC_TEMP doesn't exist in my POP output files, so this is not the default output variable, is it?
If we want to output KPP_SRC_TEMP, can I just add this variable to the output stream 1 of gx1v6_tavg_contents?
Thanks for your reply!
 

sur23beeb

ST
Member
I hope you found the answer to your question. My issue got resolve as the string character describing the variable ("KPP_SRC_TEMP") is itself assembled together within the code. I was just trying to grep "KPP_SRC_TEMP" and not finding anything in the source code. But for the reason above, this is misleading. Yes, I think you should be able to add it to the output stream in the tavg_contents file and have it being written out in the monthly output stream.
 
Top