snowpack-model / snowpack

SNOWPACK model
GNU Lesser General Public License v3.0
10 stars 5 forks source link

Alpine-3D: Write grids to variable specific NetCDF file #17

Open EricKeenan opened 3 years ago

EricKeenan commented 3 years ago

Currently, all specified grids are written to a single NetCDF file. For my purposes, these files are becoming too large. For me, it would be preferred to write individual files for each individual year. We could also consider adding an experiment id with information about forcing, spinup, etc.

e.g.

WAIS_MERRA2_100m_spinup_T2M_1980_hourly.nc 
WAIS_MERRA2_100m_spinup_SWE_1980_hourly.nc
....
....
WAIS_MERRA2_100m_spinup_T2M_2020_hourly.nc 
WAIS_MERRA2_100m_spinup_SWE_2020_hourly.nc
nwever commented 3 years ago

Commit a0d010d8df117f3ed8414640b5c1df57dbb01b70 adds the option to split output NetCDF files by using the keys: NETCDF_SPLIT_BY_YEAR = TRUE NETCDF_SPLIT_BY_VAR = TRUE

Labelling the output file can be steered for now by the key GRID2DFILE.

EricKeenan commented 3 years ago

Thanks! The NETCDF_SPLIT_BY_YEAR = TRUE feature appears to work great. I have not yet tested NETCDF_SPLIT_BY_VAR = TRUE, but when I do I will report here.