alex-s-gardner / GEMB

A 1D column that simulates snow/firn/ice processes and surface-atmosphere mass and energy exchanges
Apache License 2.0
5 stars 2 forks source link

Change GEMB output to NetCDF #12

Open chadagreene opened 4 months ago

chadagreene commented 4 months ago

Currently, the GEMB function saves its output as in .mat format. The .mat format is wonderfully easy to work with in Matlab, and there are packages in most other languages that can read .mat, but I think this may be a good time to move away from the proprietary format.

  1. Can we change the output of GEMB to NetCDF format?
  2. If yes, which variables should be included in the NetCDF? Would we want to include all of the variables listed in READMEout.txt? Including all of the variables within the structure S?

I'm hoping we can reduce the number of variables that are saved to "as much as necessary and nothing more".

alex-s-gardner commented 4 months ago

Yes to h5 format (netCDF doesn't make a s much sense for a point data)

which variables are saved needs to be flexible as need is study dependent

NJSchlegel commented 4 months ago

Adding the ability for nc output in a flexible way is great. Also, however, I think it would be preferential if we don't remove the ability to output in .mat format, since it is a loss of nice functionality. Maybe an add an option to specify output type?

chadagreene commented 4 months ago

Yep, it should be easy to allow either output format based on the extension.