Skip to content
Snippets Groups Projects
Commit e6e7be22 authored by Antoine Cyril David Hoffmann's avatar Antoine Cyril David Hoffmann :seedling:
Browse files

std N* writing

parent d3bb7cae
No related branches found
No related tags found
No related merge requests found
...@@ -81,6 +81,20 @@ while i < c; ...@@ -81,6 +81,20 @@ while i < c;
% Parse current namelist (set of variables) % Parse current namelist (set of variables)
S.(namelst) = parse_namelist(nmlst_bdy); S.(namelst) = parse_namelist(nmlst_bdy);
end end
if isfield(S,'GRID')
if isfield(S.GRID,'nx')
S.GRID.Nx = S.GRID.nx;
S.GRID = rmfield(S.GRID,'nx');
end
if isfield(S.GRID,'ny')
S.GRID.Ny = S.GRID.ny;
S.GRID = rmfield(S.GRID,'ny');
end
if isfield(S.GRID,'nz')
S.GRID.Nz = S.GRID.nz;
S.GRID = rmfield(S.GRID,'nz');
end
end
end end
function S = parse_namelist(strng) function S = parse_namelist(strng)
% Internal function to parse the body text of a namelist section. % Internal function to parse the body text of a namelist section.
...@@ -150,6 +164,7 @@ for k = 1:nvars, ...@@ -150,6 +164,7 @@ for k = 1:nvars,
% Eval the modified syntax in Matlab % Eval the modified syntax in Matlab
eval([vars{k} ' = ' arg]); eval([vars{k} ' = ' arg]);
end end
function [strng, is_lit] = parse_literal_strings(strng) function [strng, is_lit] = parse_literal_strings(strng)
% Parse the literal declarations of strings and change to Matlab syntax % Parse the literal declarations of strings and change to Matlab syntax
len = length(strng); len = length(strng);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment