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

[production/AQM.v7] Ex-scripts can not call any python scripts from ~/sorc #982

Closed
JianpingHuang-NOAA opened this issue Dec 1, 2023 · 11 comments
Labels
enhancement New feature or request

Comments

@JianpingHuang-NOAA
Copy link

NCO SPA team noticed that exaqm_nexus_post_split.sh and exaqm_nexus_emission.sh call python script from ~/sorc.

Here is an example.

python3 ${ARL_NEXUS_DIR}/utils/python/nexus_nei2016_linker.py --src_dir ${NEXUS_INPUT_BASE_DIR} --date ${yyyymmdd} --work_dir ${DATAinput} -v "v2022-07"

This is against the NCO implementation standards

Please move those python scripts from ~/sorc to ~/ush and then allow ex-scripts to call those python scripts from ~/ush

It seems there are a lot of scripts run from the sorc/ directory. Please correct all of them.

Thanks ! @bbakernoaa @chan-hoo

@JianpingHuang-NOAA JianpingHuang-NOAA added the enhancement New feature or request label Dec 1, 2023
@chan-hoo
Copy link
Collaborator

chan-hoo commented Dec 1, 2023

@JianpingHuang-NOAA, you can add a copy command right before the above command line like:

cp {fp.py} {USHaqm}
{USHaqm}/python_script ...

Isn't this allowed either?

@JianpingHuang-NOAA
Copy link
Author

@chan-hoo Let me bring Carlos to answer your questions @CarlosMDiaz-NCO

@bbakernoaa
Copy link
Contributor

@chan-hoo @JianpingHuang-NOAA Would we also need to copy the ${ARL_NEXUS_DIR}/config to the parm location as well?

@CarlosMDiaz-NCO
Copy link

Files in sorc/ should not be referenced at all during run-time. The needed files can be copied into ush/, parm/, fix/, etc. as part of the build script and then the variables (e.g. PARMaqm_utils, ARL_NEXUS_DIR) updated.

What I've found so far that will need to be updated, either to scripts copied to ush/ or to config files copied to parm/ or fix/

ush/config_defaults.yaml:72:  ARL_NEXUS_DIR: '{{ [SORCdir, "arl_nexus"]|path_join }}
export PARMaqm_utils="${PARMaqm_utils:-${HOMEaqm}/sorc/AQM-utils/parm}"
scripts/exregional_fire_emission.sh:136:  python3 ${HOMEaqm}/sorc/AQM-utils/python_utils/RAVE_remake.allspecies.aqmna13km.g793.py --date "${yyyymmdd}" --cyc "${hh}" --input_fire "${input_fire}" --output_fire "${output_fire}"
scripts/exregional_aqm_ics.sh:119:python3 ${HOMEaqm}/sorc/AQM-utils/python_utils/add_aqm_ics.py --fv_tracer_file "${fv_tracer_file}" --wrk_ic_file "${wrk_ic_file}"
scripts/exregional_point_source.sh:80:  python3 ${HOMEaqm}/sorc/AQM-utils/python_utils/stack-pt-merge.py -s ${yyyymmddhh} -n ${nstep} -i ${PT_SRC_PRECOMB}

@chan-hoo
Copy link
Collaborator

chan-hoo commented Dec 1, 2023

@CarlosMDiaz-NCO, Thanks for the clarification. I'll add the copy commands for them to the build script app_build.sh.

@JianpingHuang-NOAA
Copy link
Author

@chan-hoo Can I open a PR to merge my branch into production/AQM.v7? We have made a lot of changes to address EE2 compliance. Is it ok for you to merge my PR before you make further changes?

@chan-hoo
Copy link
Collaborator

chan-hoo commented Dec 1, 2023

@JianpingHuang-NOAA, yes, please open it ASAP.

@JianpingHuang-NOAA
Copy link
Author

@chan-hoo I assume that you have received my PR 983

@chan-hoo
Copy link
Collaborator

chan-hoo commented Dec 1, 2023

@JianpingHuang-NOAA, your PR has a conflict. Once you resolve it, I'll merge it.

@JianpingHuang-NOAA
Copy link
Author

@chan-hoo Where is the conflict message?

@chan-hoo
Copy link
Collaborator

chan-hoo commented Dec 1, 2023

On the bottom

@chan-hoo chan-hoo closed this as completed Dec 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants