NCAR / CUPiD

CUPiD is a “one stop shop” that enables and integrates timeseries file generation, data standardization, diagnostics, and metrics from all CESM components.
https://ncar.github.io/CUPiD/
Apache License 2.0
21 stars 19 forks source link

Compute global / hemispheric / regional reductions (e.g. averaging, integrating) #45

Open dabail10 opened 5 months ago

dabail10 commented 5 months ago

This is something the CVDP does. It creates global and hemispheric integrated quantities including:

others?

For the sea ice we need:

This uses tarea from the sea ice model (constant gridcell area from sea ice history files or grid files).

Convert aice to fraction if it is not already.

NH extent = where(aice.ge.0.15,tarea,0.) where tlat > 0. NH area = sum(aicetarea) for tlat > 0. x 1.0e-12 NH ice volume = sum(hitarea) for tlat > 0. x 1.0e-13 NH snow volume = sum(hs*tarea) for tlat > 0. x 1.0e-13

dabail10 commented 5 months ago

Is this already in python? @nusbaume @justin-richling

Does the ADF call the CVDP?

dabail10 commented 5 months ago

Here is some python code. Assuming that you have sea ice files uploaded:

ds_area = (ds.TAREA*ds.aice).where(TLAT>0.).sum(dim=['ni','nj'])

justin-richling commented 5 months ago

@dabail10 Yeah, we can call the CVDP from the ADF

dabail10 commented 5 months ago

Aha. I see that the ADF calls the CVDP NCL scripts.

justin-richling commented 5 months ago

Yeah, I should've mentions that. It runs in the background of the ADF via NCL scripts. I'm working with Adam Phillips to eventually get the major parts of the CVDP and CVDP-LE into python.

phillips-ad commented 5 months ago

@dabail10 the current plan is for a python-only CVDP release to happen in the latter half of 2024. That release will not have all the current CVDP/CVDP-LE capabilities in it. I will speak with you at a later date about what sea ice metrics we should carry over into the new python CVDP package.

dabail10 commented 5 months ago

Got it. I still think we should work on this one step asap. I will prototype something in python.

dabail10 commented 5 months ago

@klindsay28 has a number of functions for doing this type of calculation.