Scheduled Downtime
On Wednesday 09 March 2022 from 6am to 10am MT, the website will be down for maintenance

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