Changeset 25830


Ignore:
Timestamp:
12/07/20 18:07:59 (4 years ago)
Author:
Eric.Larour
Message:

CHG: fixed issue in saving in the wrong steps.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/branches/trunk-larour-SLPS2020/src/c/modules/QmuStatisticsx/QmuStatisticsx.cpp

    r25615 r25830  
    582582
    583583                                        sprintf(fieldname,"%s%s",fields[f],"Histogram");
    584                                         results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,allhisto,1,nbins,j+1,0));
     584                                        results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,allhisto,1,nbins,steps[j],0));
    585585
    586586                                        sprintf(fieldname,"%s%s",fields[f],"Max");
    587                                         results->AddResult(new GenericExternalResult<IssmDouble>(results->Size()+1,fieldname,*maxxs[counter],j+1,0));
     587                                        results->AddResult(new GenericExternalResult<IssmDouble>(results->Size()+1,fieldname,*maxxs[counter],steps[j],0));
    588588                                        sprintf(fieldname,"%s%s",fields[f],"Min");
    589                                         results->AddResult(new GenericExternalResult<IssmDouble>(results->Size()+1,fieldname,*minxs[counter],j+1,0));
     589                                        results->AddResult(new GenericExternalResult<IssmDouble>(results->Size()+1,fieldname,*minxs[counter],steps[j],0));
    590590                                }
    591591                        }
     
    609609
    610610                                        sprintf(fieldname,"%s%s",fields[f],"Histogram");
    611                                         results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,allhisto,size,nbins,j+1,0));
     611                                        results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,allhisto,size,nbins,steps[j],0));
    612612
    613613                                        sprintf(fieldname,"%s%s",fields[f],"Max");
    614                                         results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,maxxs[counter],size,1,j+1,0));
     614                                        results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,maxxs[counter],size,1,steps[j],0));
    615615                                        sprintf(fieldname,"%s%s",fields[f],"Min");
    616                                         results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,minxs[counter],size,1,j+1,0));
     616                                        results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,minxs[counter],size,1,steps[j],0));
    617617                                }
    618618                        }
     
    636636
    637637                                sprintf(fieldname,"%s%s",fields[f],"TimeMeanHistogram");
    638                                 results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,allhisto,1,nbins,1,0));
     638                                results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,allhisto,1,nbins,steps[0],0));
    639639
    640640                                sprintf(fieldname,"%s%s",fields[f],"TimeMeanMax");
    641                                 results->AddResult(new GenericExternalResult<IssmDouble>(results->Size()+1,fieldname,*maxmeans[f],1,0));
     641                                results->AddResult(new GenericExternalResult<IssmDouble>(results->Size()+1,fieldname,*maxmeans[f],steps[0],0));
    642642                                sprintf(fieldname,"%s%s",fields[f],"TimeMeaMin");
    643                                 results->AddResult(new GenericExternalResult<IssmDouble>(results->Size()+1,fieldname,*minmeans[f],1,0));
     643                                results->AddResult(new GenericExternalResult<IssmDouble>(results->Size()+1,fieldname,*minmeans[f],steps[0],0));
    644644                        }
    645645                } /*}}}*/
     
    659659
    660660                                sprintf(fieldname,"%s%s",fields[f],"TimeMeanHistogram");
    661                                 results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,allhisto,size,nbins,1,0));
     661                                results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,allhisto,size,nbins,steps[0],0));
    662662                                sprintf(fieldname,"%s%s",fields[f],"TimeMeanMax");
    663                                 results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,maxmeans[f],size,1,1,0));
     663                                results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,maxmeans[f],size,1,steps[0],0));
    664664                                sprintf(fieldname,"%s%s",fields[f],"TimeMeanMin");
    665                                 results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,minmeans[f],size,1,1,0));
     665                                results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,minmeans[f],size,1,steps[0],0));
    666666                        }
    667667                } /*}}}*/
     
    892892
    893893                                        sprintf(fieldname,"%s%s",fields[f],"Mean");
    894                                         results->AddResult(new GenericExternalResult<IssmDouble>(results->Size()+1,fieldname,mean,j+1,0));
     894                                        results->AddResult(new GenericExternalResult<IssmDouble>(results->Size()+1,fieldname,mean,steps[j],0));
    895895                                        sprintf(fieldname,"%s%s",fields[f],"Stddev");
    896                                         results->AddResult(new GenericExternalResult<IssmDouble>(results->Size()+1,fieldname,stddev,j+1,0));
     896                                        results->AddResult(new GenericExternalResult<IssmDouble>(results->Size()+1,fieldname,stddev,steps[j],0));
    897897                                }
    898898
     
    931931
    932932                                        sprintf(fieldname,"%s%s",fields[f],"Mean");
    933                                         results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,mean,size,1,j+1,0));
     933                                        results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,mean,size,1,steps[j],0));
    934934                                        sprintf(fieldname,"%s%s",fields[f],"Stddev");
    935                                         results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,stddev,size,1,j+1,0));
     935                                        results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,stddev,size,1,steps[j],0));
    936936                                }
    937937                        }
     
    961961
    962962                                sprintf(fieldname,"%s%s",fields[f],"TimeMean");
    963                                 results->AddResult(new GenericExternalResult<IssmDouble>(results->Size()+1,fieldname,mean,1,0));
     963                                results->AddResult(new GenericExternalResult<IssmDouble>(results->Size()+1,fieldname,mean,steps[0],0));
    964964                                sprintf(fieldname,"%s%s",fields[f],"TimeStddev");
    965                                 results->AddResult(new GenericExternalResult<IssmDouble>(results->Size()+1,fieldname,stddev,1,0));
     965                                results->AddResult(new GenericExternalResult<IssmDouble>(results->Size()+1,fieldname,stddev,steps[0],0));
    966966                        }
    967967                } /*}}}*/
     
    994994
    995995                                sprintf(fieldname,"%s%s",fields[f],"TimeMean");
    996                                 results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,mean,size,1,1,0));
     996                                results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,mean,size,1,steps[0],0));
    997997                                sprintf(fieldname,"%s%s",fields[f],"TimeStddev");
    998                                 results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,stddev,size,1,1,0));
     998                                results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,stddev,size,1,steps[0],0));
    999999                        }
    10001000                } /*}}}*/
     
    11421142                                       
    11431143                                        sprintf(fieldname,"%s%s",fields[f],"Samples");
    1144                                         results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,allx,nsamples,1,j+1,0));
     1144                                        results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,allx,nsamples,1,steps[j],0));
    11451145                                }
    11461146                        }
     
    11561156                                        char fieldname[1000];
    11571157                                        sprintf(fieldname,"%s%s",fields[f],"Samples");
    1158                                         results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,allx,nsamples,nindices,j+1,0));
     1158                                        results->AddResult(new GenericExternalResult<IssmPDouble*>(results->Size()+1,fieldname,allx,nsamples,nindices,steps[j],0));
    11591159                                }
    11601160                        }
     
    11901190
    11911191        sprintf(outputfilename,"%s/%s.stats",directory,model);
    1192         parameters->AddObject(new StringParam(OutputFileNameEnum,outputfilename));
     1192        parameters->AddObject(new StrigParam(OutputFileNameEnum,outputfilename));
    11931193
    11941194        /*Call OutputResults module:*/
Note: See TracChangeset for help on using the changeset viewer.