Changeset 426 for trunk/src


Ignore:
Timestamp:
May 17, 2012, 10:58:49 AM (12 years ago)
Author:
sommeria
Message:

compiled matlab civ introduced in Batch mode,
minor bugs fixed for histogram of velocity

Location:
trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r421 r426  
    11771177    case 'Matlab'
    11781178        if batch
     1179            binary_list={'CivmBin'};
    11791180            % verifier MenuMatlab installe sur le cluster
    11801181            % difficile a faire a priori
     
    16071608                            return
    16081609                        end
    1609                         text_matlabscript=[...
    1610                         '#!/bin/bash \n'...
    1611                         '. /etc/sysprofile \n'...
    1612                         'matlab -nodisplay -nosplash -nojvm <<END_MATLAB \n'...
    1613                         'cd(''' path_civ '''); \n'...
    1614                         'civ_matlab(''' filename_xml ''',''' OutputFile '.nc''); \n'...
    1615                         'exit \n'...
    1616                         'END_MATLAB \n'];
    1617                         fprintf(fid,text_matlabscript);
     1610%                         text_matlabscript=[...
     1611%                         '#!/bin/bash \n'...
     1612%                         '. /etc/sysprofile \n'...
     1613%                         'matlab -nodisplay -nosplash -nojvm <<END_MATLAB \n'...
     1614%                         'cd(''' path_civ '''); \n'...
     1615%                         'civ_matlab(''' filename_xml ''',''' OutputFile '.nc''); \n'...
     1616%                         'exit \n'...
     1617%                         'END_MATLAB \n'];
     1618                        cmd=['#!/bin/bash \n '...
     1619                        '#$ -cwd \n '...
     1620                        'hostname && date \n '...
     1621                        'umask 002 \n'...
     1622                         Param.xml.CivmBin ' ' Param.xml.RunTime ' ' filename_xml ' ' OutputFile '.nc'];%allow writting access to created files for user group
     1623                   
     1624                        fprintf(fid,cmd);
    16181625                        fclose(fid);
    16191626                        if isunix
  • trunk/src/plot_field.m

    r421 r426  
    358358    end
    359359    testplot=ones(size(data.ListVarName));%default test for plotted variables
    360     xtitle=[xtitle data.ListVarName{coord_x_index}];
    361     eval(['coord_x{icell}=data.' data.ListVarName{coord_x_index} ';']);%coordinate variable set as coord_x
    362     if isfield(data,'VarAttribute')&& numel(data.VarAttribute)>=coord_x_index && isfield(data.VarAttribute{coord_x_index},'units')
    363         xtitle=[xtitle '(' data.VarAttribute{coord_x_index}.units '), '];
    364     else
    365         xtitle=[xtitle ', '];
    366     end
    367     eval(['coord_x{icell}=data.' data.ListVarName{coord_x_index} ';']);%coordinate variable set as coord_x
     360    coord_x_name{icell}=data.ListVarName{coord_x_index};
     361    coord_x{icell}=data.(data.ListVarName{coord_x_index});%coordinate variable set as coord_x
     362    if isempty(find(strcmp(coord_x_name{icell},coord_x_name(1:end-1)))) %xtitle not already selected
     363        xtitle=[xtitle coord_x_name{icell}];
     364        if isfield(data,'VarAttribute')&& numel(data.VarAttribute)>=coord_x_index && isfield(data.VarAttribute{coord_x_index},'units')
     365            xtitle=[xtitle '(' data.VarAttribute{coord_x_index}.units '), '];
     366        else
     367            xtitle=[xtitle ', '];
     368        end
     369    end
    368370    XMin(icell)=min(coord_x{icell});
    369371    XMax(icell)=max(coord_x{icell});
  • trunk/src/uvmat.m

    r425 r426  
    28522852        end
    28532853        plot_field(Histo,handles.histo_u);
     2854        hlegend=legend;
     2855        if isempty(FieldName_2)
     2856        set(hlegend,'String',FieldName)
     2857        else
     2858            set(hlegend,'String',{FieldName;FieldName_2})
     2859        end
     2860%         hh=get(handles.histo_u,'children');
     2861%         get(hh(1))
     2862%         get(hh(2))
    28542863    end
    28552864end
Note: See TracChangeset for help on using the changeset viewer.