NCAR / ldcpy

Statistical and visual tools for gathering metrics and comparing Earth System Model data files. A common use case is comparing data that has been lossily compressed with the original data.
https://ldcpy.readthedocs.io/
Apache License 2.0
19 stars 2 forks source link

CAM budgets (derived variables) #253

Closed allibco closed 3 years ago

allibco commented 3 years ago

Figure out how to add checks for derived variables.

Examples from Julio B. for CAM:

The budgets I'm thinking of are pretty basic. The most basic is the top-of-model radiation budget "RESTOM" which is just

RESTOM = SUM_ij ( ( FSNT(i,j) - FLNT(i,j) )* area(i,j) ) / SUM_ij( area(i,j) )

where FSNT and FLNT are the CAM history variables for net top-of-model shortwave and longwave radiation fluxes. The area(i,j) is a variable that describes the horizontal area of each model grid cell in some unit. Sum_ij just means a horizontal sum. This could be a one dimensional sum for native output from some dycores.

Another important global mean variable is the mean global precipitation

global_PRECIP = SUM_ij( PRECT(i,j) * area(i,j) ) / SUM_ij( area(i,j) )

PRECT is the CAM variable for total precipitation. Sometimes it has to be constructed as the sum of large-scale precip PRECL and convective precip PRECC , i.e., PRECT=PRECC+PRECL.

Anyway it would be good to know how much (%-wise) compression affects these totals.

allibco commented 3 years ago

Asked Brain M. about time dimension:

When I’m looking at these, I think using annual averages (and then averaging them up for multi-year runs) is the best way to go. There are science applications where looking at individual months or seasons makes sense, but for validating the climate in a general sense, I think annual means are the appropriate starting place. Once you have annual averages, I think looking at both the time series and the long-term (>10y, preferably >30y) average are useful. Does that help?

allibco commented 3 years ago

Usually the months are all given the same weight, even though it would be better to weight them by the number of days. At least, I am pretty sure that is how seasonal/annual averages have been done with NCL in the AMWG diagnostics in the past.