! DO NOT EDIT THIS FILE ! But edit variable.f90 and scripts/generate.py ! Compiling and running is taken care of by the Makefile ## helper functions <% def rank(var): """the number of dimensions""" return len(var["shape"]) %> <% def shape(var): # convert dims to strings dims = (str(dim) for dim in var["shape"]) return ",".join(dims) %> %for variable in variables: ## only for rank1 vars %if rank(variable) > 0: allocate(s%${variable['name'].ljust(20)}(${shape(variable)})) %endif %endfor !directions for vi vim: filetype=fortran : syntax=fortran