Skip to content

Commit

Permalink
Collection of small structural changes
Browse files Browse the repository at this point in the history
- Removes second topo_file entry in config.js
- Sets SP output off by default
- Removes whitespace in output_spec.csv
- Adds xarray and pypdf import for Docker container
- Adds Git SHA to restart and run_status files
  • Loading branch information
rarutter committed Nov 5, 2024
1 parent 0a09191 commit 3da38bc
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 4 deletions.
3 changes: 1 addition & 2 deletions config/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,11 @@
"fri_fire_file": "demo-data/cru-ts40_ar5_rcp85_ncar-ccsm4_toolik_field_station_10x10/fri-fire.nc",
"hist_exp_fire_file": "demo-data/cru-ts40_ar5_rcp85_ncar-ccsm4_toolik_field_station_10x10/historic-explicit-fire.nc",
"proj_exp_fire_file": "demo-data/cru-ts40_ar5_rcp85_ncar-ccsm4_toolik_field_station_10x10/projected-explicit-fire.nc",
"topo_file": "demo-data/cru-ts40_ar5_rcp85_ncar-ccsm4_toolik_field_station_10x10/topo.nc",
"output_dir": "output/",
"output_spec_file": "config/output_spec.csv",
"output_monthly": 1, //JSON specific
"output_nc_eq": 0,
"output_nc_sp": 1,
"output_nc_sp": 0,
"output_nc_tr": 1,
"output_nc_sc": 1,
"output_interval": 1
Expand Down
2 changes: 1 addition & 1 deletion config/output_spec.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ AVLN,Total soil available N,g/m2,,,invalid,invalid,invalid,,double,
BURNAIR2SOILN,Nitrogen deposit from fire emission,g/m2/time,,,invalid,invalid,invalid,invalid,double,
BURNSOIL2AIRC,Burned soil C,g/m2/time,,,invalid,invalid,invalid,invalid,double,
BURNSOIL2AIRN,Burned soil N,g/m2/time,,,invalid,invalid,invalid,invalid,double,
BURNTHICK,Ground burn thickness ,m,,,invalid,invalid,invalid,invalid,double,
BURNTHICK,Ground burn thickness,m,,,invalid,invalid,invalid,invalid,double,
BURNVEG2AIRC,Burned vegetation C to atmosphere,g/m2/time,,,invalid,invalid,invalid,invalid,double,
BURNVEG2AIRN,Burned vegetation N to atmosphere,g/m2/time,,,invalid,invalid,invalid,invalid,double,
BURNVEG2DEADC,Burned vegetation C to standing dead C,g/m2/time,,,invalid,invalid,invalid,invalid,double,
Expand Down
2 changes: 2 additions & 0 deletions requirements_general_dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ Sphinx==5.1.1
sphinx-rtd-theme==1.1.0
sphinx-toolbox==3.4.0
sphinx-argparse==0.4.0
xarray
pypdf

# for SA - maybe merits its own file??
scikit-learn
3 changes: 2 additions & 1 deletion src/RestartData.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1280,7 +1280,8 @@ void RestartData::create_empty_file(const std::string& fname,
temutil::nc( nc_def_var(ncid, "prvltrfcnA", NC_DOUBLE, 4, vartype4D_dimids, &prvltrfcnAV) );
temutil::nc( nc_put_att_double(ncid, prvltrfcnAV, "_FillValue", NC_DOUBLE, 1, &MISSING_D) );

/* Create Attributes?? */
/* Global Attributes */
temutil::nc( nc_put_att_text(ncid, NC_GLOBAL, "Git_SHA", strlen(GIT_SHA), GIT_SHA ) );

/* End Define Mode (not strictly necessary for netcdf 4) */
BOOST_LOG_SEV(glg, debug) << "Leaving 'define mode'...";
Expand Down
3 changes: 3 additions & 0 deletions src/TEM.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -929,6 +929,9 @@ void create_empty_run_status_file(const std::string& fname,
std::string runtime_units = "seconds";
temutil::nc( nc_put_att_text(ncid, total_runtimeV, "units", runtime_units.length(), runtime_units.c_str()) );

// Global attributes
temutil::nc( nc_put_att_text(ncid, NC_GLOBAL, "Git_SHA", strlen(GIT_SHA), GIT_SHA) );

/* End Define Mode (not strictly necessary for netcdf 4) */
BOOST_LOG_SEV(glg, debug) << "Leaving 'define mode' ["<<fname<<"]";
temutil::nc( nc_enddef(ncid) );
Expand Down

0 comments on commit 3da38bc

Please sign in to comment.