GEUS-Glaciology-and-Climate / ice_discharge

Greenland Ice Sheet solid ice discharge from 1986 through last month
https://doi.org/10.5194/essd-12-1367-2020
GNU Lesser General Public License v3.0
8 stars 4 forks source link

Output format: NetCDF #17

Open mankoff opened 4 years ago

mankoff commented 4 years ago

Add NetCDF output in addition to CSV

mankoff commented 4 years ago

CF output implemented in e66afc0 but amended and over-written in a1f4ecc, but I'm not sure how to make this data set CF compliant.

Issues:

Output of cfchecks for the simplest product (GIS.nc) is:

CHECKING NetCDF FILE: ./out/GIS.nc
=====================
Using CF Checker Version 4.0.0
Checking against CF Version CF-1.7
Using Standard Name Table Version 72 (2020-03-10T11:52:02Z)
Using Area Type Table Version 9 (07 August 2018)
Using Standardized Region Name Table Version 4 (18 December 2018)

ERROR: (2.6.1): This netCDF file does not appear to contain CF Convention data.

------------------
Checking variable: time
------------------

------------------
Checking variable: discharge
------------------
ERROR: (3.3): Invalid standard_name: land_ice_volume_flow_rate_due_to_calving_and_ice_front_melting

------------------
Checking variable: err
------------------
ERROR: (3.3): Invalid standard_name: Uncertainty

------------------
Checking variable: coverage
------------------
ERROR: (3.3): Invalid standard_name: Coverage
INFO: (3.1): No units attribute set.  Please consider adding a units attribute for completeness.

ERRORS detected: 4
WARNINGS given: 0
INFORMATION messages: 1
aaschwanden commented 4 years ago

Since it now looks like you are using Gt year-1, tendency_of_land_ice_mass_due_to_calving_and_ice_front_melting should be the appropriate standard_name (at least that's what we are using in PISM.

mankoff commented 4 years ago

cfchecks still reports ERROR: (3.3): Invalid standard_name: tendency_of_land_ice_mass_due_to_calving_and_ice_front_melting presumably because this is a derived name (no error if I remove _and_ice_front_melting) and not a standard name. Still, an improvement. Thank you. I do note that there are standard names for both ice_front_melting and sea ice lateral_melting...

Do you think it is important for the NetCDF files to use standard units (kg m-2 s-1) ? I did not because I would also need to provide the frontal area (m-2) for each gate. I'm trying to find a balance between strict standard following and ease-of-use.

mankoff commented 4 years ago

Also, @aaschwanden, can you suggest a standard name for the uncertainty? Or should that be the same standard_name as discharge (tendency_of_land_ice_mass_due_to_calving_and_ice_front_melting) and the long_name of Error is the correct way to handle this?

aaschwanden commented 4 years ago

Shoot, I think you are right. I thought that tendency_of_land_ice_mass_due_to_calving_and_ice_front_melting had already been added to the list of standard names (we some discussion about those standard names within ISMIP6). If you want to be on the safe side, do not use a standard name, and instead put it in the long_name (same for the error).

From my perspective, something like tendency_of_land_ice_mass_due_to_discharge_at_grounding_line would be a more useful variable for book keeping because once it goes through the grounding line, it is "removed" from the ice sheet. If an outlet glacier has a (seasonal)? floating tongue, the mass accounting gets tricky. Ensuring conservation of mass within an ice sheet modeling, and properly summing up all the different fluxes is a major headache for us.

mankoff commented 4 years ago

I'm having trouble wrapping my head around tendency, defined in http://cfconventions.org/Data/cf-standard-names/docs/guidelines.html as tendency_of_X is derivative of X with respect to time.

The units are correct: [X] s-1. But what is X in my data? The mass? I don't think I'm reporting the derivative of mass with respect to time - that would be the annual change and be about 0 for the last decade because the discharge was steady at ~500 Gt. I'm reporting the mass flow rate.

I note that on the guidelines page above there is a generic name mass_transport with units kg s-1 - same units as tendency. My previous standard_name was land_ice_volume_flow_rate_due_to_calving_and_ice_front_melting but clearly "volume" was wrong and it is "mass". Perhaps it should be land_ice_mass_transport_due_to_calving_and_ice_front_melting?

aaschwanden commented 4 years ago

Yeah, we've struggled with this too. We've decided the only way we can make this "work" is by not strictly interpreting the discharge as a rate and say that if we have a total ice discharge of 500 Gt in a given year, than the tendency_of_ice_mass_due_to_discharge = 500 Gt/yr. Not sure this is correct but I don't know how to do better.