Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/wjiang/make bcs python #730

Closed
wants to merge 6 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ ecbuild_add_executable (TARGET mk_runofftbl.x SOURCES mk_runofftbl.F90 LIBS MAPL
ecbuild_add_executable (TARGET mkEASETilesParam.x SOURCES mkEASETilesParam.F90 LIBS MAPL ${this})

install(PROGRAMS make_bcs clsm_plots.pro create_README.csh DESTINATION bin)
install(PROGRAMS make_bcs.py make_cube_bcs.py make_ease_bcs.py make_latlon_bcs.py questionnarie_bcs.py DESTINATION bin)

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@
import argparse
import textwrap
import ruamel.yaml
from bcs_utils import *
from questionnarie_bcs import *
from make_ease_bcs import *
from make_latlon_bcs import *
from make_cube_bcs import *

# Define the argument parser
def parse_args():
Expand Down Expand Up @@ -55,23 +57,28 @@ def parse_args():
def main():

question_flag = False
config = ''

# Parse the command line arguments from parse_args() capturing the arguments and the rest
command_line_args, extra_args = parse_args()
print(f'command_line_args: {command_line_args}')
config_yaml = command_line_args.config_file

configs = []
if config_yaml:
config = yaml_to_config(config_yaml)
configs = [config]
else:
answers = ask_questions()
config = get_config_from_answers(answers)

make_ease_bcs(config)


configs = get_configs_from_answers(answers)
for config in configs :
if 'EASE' in config['grid_type']:
make_ease_bcs(config)
if 'Lat-Lon' in config['grid_type']:
make_latlon_bcs(config)
if 'Cubed-Sphere' in config['grid_type']:
make_cube_bcs(config)

if __name__ == '__main__' :
exit("The python version of make_bcs is not yet ready for general use. Until further notice, please use csh script make_bcs")
#exit("The python version of make_bcs is not yet ready for general use. Until further notice, please use csh script make_bcs")
main()

Loading