Skip to content

Commit

Permalink
Added better documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
jcandy committed Oct 30, 2024
1 parent 85e8b9c commit aa11a51
Showing 1 changed file with 18 additions and 4 deletions.
22 changes: 18 additions & 4 deletions cgyro/bin/cgyro_json
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,38 @@ import sys
import json
import numpy as np
import argparse
import textwrap
from pygacode.cgyro import data

garoot = os.environ['GACODE_ROOT']

def opts():

parser=argparse.ArgumentParser(description="CGYRO localdump utility")

mytext = '''\
output:
out.cgyro.localdump (complete localdump file)
json.cgyro.imas (IMAS data dictionary of inputs)
json.cgyro.localdump (useless JSON file containing inputs)
'''

parser = argparse.ArgumentParser(
formatter_class=argparse.RawTextHelpFormatter,
prog = 'cgyro_json',
description="CGYRO localdump utility",
epilog=textwrap.dedent(mytext))

parser.add_argument('-dir',
help="working directory",
help="working directory (default: cwd)",
type=str,
default='.')

args=parser.parse_args()

return args.dir

mydir = opts()+'/'
mydir = opts()

mydir = mydir+'/'

# Sanity checks:
if not os.path.isdir(mydir):
Expand Down

0 comments on commit aa11a51

Please sign in to comment.