Bladeren bron

Renamed qobs to obsflow

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@58322 15284696-431f-4ddb-bdfa-cd5b030d7da7
Huidae Cho 11 jaren geleden
bovenliggende
commit
53b5692582

+ 5 - 5
raster/r.topmodel/file_io.c

@@ -173,9 +173,9 @@ void read_input(void)
     fclose(fp);
 
     /* Read Qobs file */
-    if (file.qobs) {
-	if ((fp = fopen(file.qobs, "r")) == NULL)
-	    G_fatal_error(_("Unable to open input file <%s>"), file.qobs);
+    if (file.obsflow) {
+	if ((fp = fopen(file.obsflow, "r")) == NULL)
+	    G_fatal_error(_("Unable to open input file <%s>"), file.obsflow);
 
 	misc.Qobs = (double *)G_malloc(input.ntimesteps * sizeof(double));
 
@@ -223,7 +223,7 @@ void write_output(void)
 	    ltime->tm_year, ltime->tm_mon, ltime->tm_mday,
 	    ltime->tm_hour, ltime->tm_min, ltime->tm_sec);
     fprintf(fp, "#\n");
-    if (file.qobs) {
+    if (file.obsflow) {
 	fprintf(fp, "# %-15s Model efficiency\n", "Em:");
 	fprintf(fp, "# %-15s Peak observed Q\n"
 		"# %77s\n", "Qobs_peak:", "[m^3/timestep]");
@@ -296,7 +296,7 @@ void write_output(void)
 
     fprintf(fp, "\n");
 
-    if (file.qobs) {
+    if (file.obsflow) {
 	fprintf(fp, "%-16s ", "Em:");
 	if (!Rast_is_d_null_value(&misc.Em))
 	    fprintf(fp, "%10.5lf\n", misc.Em);

+ 1 - 1
raster/r.topmodel/global.h

@@ -80,7 +80,7 @@ struct file
     char *topidxstats;
     char *input;
     char *output;
-    char *qobs;
+    char *obsflow;
 };
 
 /* Miscellaneous TOPMODEL variables */

+ 6 - 6
raster/r.topmodel/main.c

@@ -30,7 +30,7 @@ int main(int argc, char **argv)
 	struct Option *topidxstats;
 	struct Option *input;
 	struct Option *output;
-	struct Option *qobs;
+	struct Option *obsflow;
 	struct Option *timestep;
 	struct Option *topidxclass;
 	struct Option *topidx;
@@ -68,10 +68,10 @@ int main(int argc, char **argv)
     params.output = G_define_standard_option(G_OPT_F_OUTPUT);
     params.output->description = _("Name for output file");
 
-    params.qobs = G_define_standard_option(G_OPT_F_INPUT);
-    params.qobs->key = "qobs";
-    params.qobs->description = _("Name of observed flow file");
-    params.qobs->required = NO;
+    params.obsflow = G_define_standard_option(G_OPT_F_INPUT);
+    params.obsflow->key = "obsflow";
+    params.obsflow->description = _("Name of observed flow file");
+    params.obsflow->required = NO;
 
     params.timestep = G_define_option();
     params.timestep->key = "timestep";
@@ -130,7 +130,7 @@ int main(int argc, char **argv)
     file.topidxstats = params.topidxstats->answer;
     file.input = params.input->answer;
     file.output = params.output->answer;
-    file.qobs = params.qobs->answer;
+    file.obsflow = params.obsflow->answer;
 
     if (!params.timestep->answer)
 	params.timestep->answer = "0";

+ 1 - 1
raster/r.topmodel/r.topmodel.html

@@ -6,7 +6,7 @@ hydrologic model.
 <h3>Selected Parameters:</h3>
 
 <dl>
-<dt><b>qobs</b></dt>
+<dt><b>obsflow</b></dt>
 <dd>Compare simulated flows with observed flows and calculate the model
 efficiency.
 </dd>

+ 1 - 1
raster/r.topmodel/topmodel.c

@@ -310,7 +310,7 @@ void calculate_others(void)
     }
     misc.Qt_mean /= input.ntimesteps;
 
-    if (file.qobs) {
+    if (file.obsflow) {
 	misc.Em = calculate_efficiency();
 	for (i = 0; i < input.ntimesteps; i++) {
 	    if (!i || misc.Qobs_peak < misc.Qobs[i]) {