Skip to content

Commit

Permalink
v1.5.3 release based on SVN rev 7578
Browse files Browse the repository at this point in the history
  • Loading branch information
sa-cem-worker committed May 31, 2024
1 parent 859ab5a commit a0d8275
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
8 changes: 5 additions & 3 deletions model/hd-us/ginterface/ginterface.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* reserved. See the license file for disclaimer and full
* use/redistribution conditions.
*
* $Id: ginterface.c 7576 2024-05-30 03:47:52Z riz008 $
* $Id: ginterface.c 7578 2024-05-31 01:32:53Z riz008 $
*
*/

Expand Down Expand Up @@ -3957,6 +3957,8 @@ double ginterface_get_eta(void* hmodel, int b)
*/
int ginterface_is_window1(void *hmodel)
{
geometry_t* window = (geometry_t*) hmodel;
return (window->wn == 1);
if (hmodel == NULL)
return 1;
else
return (((geometry_t*)hmodel)->wn == 1);
}
8 changes: 5 additions & 3 deletions model/hd/ginterface/ginterface.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* reserved. See the license file for disclaimer and full
* use/redistribution conditions.
*
* $Id: ginterface.c 7576 2024-05-30 03:47:52Z riz008 $
* $Id: ginterface.c 7578 2024-05-31 01:32:53Z riz008 $
*
*/

Expand Down Expand Up @@ -3482,6 +3482,8 @@ double ginterface_get_eta(void* hmodel, int b)
*/
int ginterface_is_window1(void *hmodel)
{
geometry_t* window = (geometry_t*) hmodel;
return (window->wn == 1);
if (hmodel == NULL)
return 1;
else
return (((geometry_t*)hmodel)->wn == 1);
}
6 changes: 3 additions & 3 deletions model/lib/ecology/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* reserved. See the license file for disclaimer and full
* use/redistribution conditions.
*
* $Id: utils.c 7576 2024-05-30 03:47:52Z riz008 $
* $Id: utils.c 7578 2024-05-31 01:32:53Z riz008 $
*
*/

Expand Down Expand Up @@ -286,7 +286,7 @@ double get_parameter_value(ecology* e, char* s)

// Output parameter values to a netcdf file.

if (ginterface_is_window1(e->model)) {
if (!e->pre_build && ginterface_is_window1(e->model)) {
int var_exists = 0;
int varid;
int ncid = e->eco_params_ncid;
Expand Down Expand Up @@ -448,7 +448,7 @@ double try_parameter_value(ecology* e, char* s)
return NaN;
}else{
eco_write_setup(e,"Ecol. parameter tried to read %s and found %e \n",s,e->pinfo[index].value[0]);
if (ginterface_is_window1(e->model)) {
if (!e->pre_build && ginterface_is_window1(e->model)) {
int ncid = e->eco_params_ncid,varid;
var_exists = nc_inq_varid(ncid,s,&varid);

Expand Down

0 comments on commit a0d8275

Please sign in to comment.