Brian Rose
brose@albany.edu

Here is some information about the CAM4 TRACMIP output, following guidelines for cmorizing requested by Aiko Voigt

Information and the vertical grid
---------------------------------

CAM4 uses the hybrid sigma-pressure coordinate, same as CAM3 and others.
The formula to compute pressure associated with a particular level, location and time is
```
hyam*P0 + hybm*PS
```
for variables at layer midpoints (scalars with 26 elements in the vertical).

For variables at layer interfaces (27 elements in the vertical) the formula is
```
hyai*P0 + hybi*PS
```
where hyam, hyai, hybm, hybi, P0, PS are all variable names in the CAM4 output files.

Applying these formulas gives the pressure in units of Pa.


Information about simulation times
----------------------------------
The start and end dates for each simulation are:
- aquaControlTRACMIP: 0001-01-01 -- 0045-12-31
- aqua4xCO2TRACMIP:   0046-01-01 -- 0085-12-31
- landControlTRACMIP: 0001-01-01 -- 0040-12-31
- land4xCO2TRACMIP:   0041-01-01 -- 0080-12-31
- landOrbitTRACMIP:   0041-01-01 -- 0080-12-31

Information about output streams
--------------------------------
- aquaControlTRACMIP Amon: 0001-01-01 -- 0045-12-31
- aquaControlTRACMIP Aday: 0036-01-01 -- 0045-12-31
- aquaControlTRACMIP A3hr: 0043-01-01 -- 0045-12-31
- aqua4xCO2TRACMIP   Amon: 0046-01-01 -- 0085-12-31
- aqua4xCO2TRACMIP   Aday: 0076-01-01 -- 0085-12-31
- aqua4xCO2TRACMIP   A3hr: 0073-01-01 -- 0085-12-31
- landControlTRACMIP Amon: 0001-01-01 -- 0040-12-31
- landControlTRACMIP Aday: 0031-01-01 -- 0040-12-31
- landControlTRACMIP A3hr: 0038-01-01 -- 0040-12-31
- land4xCO2TRACMIP   Amon: 0041-01-01 -- 0080-12-31
- land4xCO2TRACMIP   Aday: 0071-01-01 -- 0080-12-31
- land4xCO2TRACMIP   A3hr: 0078-01-01 -- 0080-12-31
- landOrbitTRACMIP   Amon: 0041-01-01 -- 0080-12-31
- landOrbitTRACMIP   Aday: 0071-01-01 -- 0080-12-31
- landOrbitTRACMIP   A3hr: 0078-01-01 -- 0080-12-31

Here is a key to map the CAM4 history files to the different output streams:
- `h0`: monthly output (Amon)
- `h1`: daily output (Aday)
- `h2`: 3-hourly output (A3hr), 4D fields (time, lev, lat, lon)
- `h3`: 3-hourly output (A3hr), 3D fields (time, lat, lon)


Information about derived fields
--------------------------------
Here are some formulas for computing certain standard variables from the CAM4 history fields:
In each case the upper-case quantities on the RHS of the expression are variable names in the CAM4 output.

Precipitation (all in kg/m2/s or equivalently in m/s):
pr = PRECC+PRECL
prsn = PRECSC+PRECSL
prc = PRECC

Surface orography (in meters):
orog = PHIS / 9.81

Radiative fluxes (all in W/m2):
!! Aiko: incorrect is rlus = FLNS - FLDS (rlus is positive up), correct is
rlus = FLNS + FLDS
rsus = FSDS - FSNS (rsus is positive up)
rsuscs = FSDSC - FSNSC (rsuscs is positive up)
rsut = SOLIN - FSNT (rsut is positive up)
rsutcs = SOLIN - FSNTC (rsutcs in positive up)
rtmt = FSNT - FLNT (rtmt is positive down)


Additional notes
--------------------
A few issues I noticed:

- Following Ross Dixon's CAM3 files, I have mapped the CAM4 field TSMX to tasmax (and similarly for min).
This is not strictly correct, as TSMX is the maximum *surface* temperature (i.e. skin temperature).
But max/min surface *air* temperature is not included in the CAM4 output.
- There are a number of other output fields in the CAM4 history files beyond what is listed in mt_TRACMIP_CAM4.txt.
I only included those fields that are mappable to variables listed in TRACMIP_Amon.txt
- All fields in the *.h0.* (monthly) and *.h1.* (daily) history files are time averages
- The *.h2.* history files are 3-hourly snapshots of 4D dynamical fields
- The *.h3.* history files are 3-hourly averages of 3D diagnostic fields
