-
Notifications
You must be signed in to change notification settings - Fork 435
Add python version of mkatmsrffile to replace fortran #6506
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
Conversation
|
@wlin7 please review |
@wlin7 I'd really like someone who uses this tool to approve. Can you suggest anyone else? |
@rljacob , @brhillman went very deep onto using this tool. He will be a best person to review this. |
@wlin7 can you give this another look? |
@wlin7 please approve. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this PR can be improved further before merging. I strongly recommend a unit test that we can add to the growing gh ci suite.
053980a
to
846531d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With a test in hand, this is ready to go:
https://github.com/E3SM-Project/E3SM/actions/runs/10692384555/job/29640697312?pr=6506#step:5:1475
File and parameter values:
map_file : map_1x1_to_ne30pg2_traave_c20240903.nc
vegetation_file : regrid_vegetation.nc
soil_water_file : clim_soilw.nc
output_root : ./
output_file : .//atm_srf_ne30pg2_20240903.nc
dst_grid : ne30pg2
map_file n_a : 64800
map_file n_b : 21600
successfully created atmsrf file: .//atm_srf_ne30pg2_20240903.nc
Add new tool in components/eam/tools/mkatmsrffile/mkatmsrffile.py, which is a python rewrite of the older fortran tool, which now lives in components/eam/tools/mkatmsrffile/old_mkatmsrffile. The old version was problematic to use because the build configuration was often broken. The new python version efficiently applies the input map weighting efficiently due to the numba package, which is included in the E3SM unified environment. [BFB]
Add new tool in
components/eam/tools/mkatmsrffile/mkatmsrffile.py
, which is a python rewrite of theolder fortran tool, which now lives in
components/eam/tools/mkatmsrffile/old_mkatmsrffile
. The old version wasproblematic to use because the build configuration was often broken. The new python version efficiently
applies the input map weighting efficiently due to the numba package, which is included in the E3SM unified environment.
[BFB]