Hi Yang,
We have found code that will convert potential temperature to temperature that you can use with CCSM model output. There is a fortran script found here,
http://www.ncl.ucar.edu/Support/talk...t-1609/potmp.f, and a ferret script called THETA_FO that you can find documented here,
http://ferret.pmel.noaa.gov/Ferret/d...ons/XPRESSIONS. Both of these functions are written to convert temperature to potential temperature, but to do the reverse calculation, all you have to do is reverse reference and in situ pressure in the function call. For example, for the ferret function
THETA_FO(SALT, TEMP, P, REF)
you would perform this calculation
THETA_FO(SALT, TEMP, REF, P).
Note that in the model we defined reference pressure as 0, so that is what you would want to use in your reverse calculation as well. We are unable to view the Ferret scirpt, but the fortran script is based on the following reference.
N.P. FOFONOFF
DEEP SEA RESEARCH
1977
We use a different equation than this within the POP2 model (the equation from Gill cited in the previous post) to calculate potential temperature, so the conversion back to in situ temperature may not be exact.
Susan