PCLAeroParams / TChem-atm

https://PCLAeroParams.github.io/TChem-atm/
BSD 2-Clause "Simplified" License
1 stars 1 forks source link

Make example unit test for a MESA function using Skywalker data #59

Open odiazib opened 1 month ago

odiazib commented 1 month ago

Resolves

Skywalker files for the routine adjust_solid_aerosol, which is part of the MESA subroutine. Let's start this verification task with a simple routine.

We need to create a verification code using Skywalker. As an example, we can follow this example code. The executable of this code uses the YAML file adjust_solid_aerosol_input_ts_0.yaml as input and generates a Python file with outputs from the adjust_solid_aerosol routine in TChem-atm. This Python output file should have the same format as the adjust_solid_aerosol_output_ts_0.pyfile produced by the PartMC-Mosaic simulation. The test will pass if the difference between the files is below a specified threshold.

The validation files adjust_solid_aerosol_input_ts_0.yaml and adjust_solid_aerosol_output_ts_0.py were generated by PartMC-Mosaic, specifically by the script partmc/scenarios/1_urban_plume/1_run.sh.

codecov[bot] commented 4 days ago

Codecov Report

Attention: Patch coverage is 77.18121% with 34 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/verification/verification.cpp 53.48% 20 Missing :warning:
src/verification/mesa/mesa_driver.cpp 54.83% 14 Missing :warning:
Files with missing lines Coverage Δ
src/verification/mesa/adjust_solid_aerosol.cpp 100.00% <100.00%> (ø)
src/verification/mesa/mesa_driver.cpp 54.83% <54.83%> (ø)
src/verification/verification.cpp 53.48% <53.48%> (ø)
odiazib commented 3 days ago

@zdaq12, this PR should include all the parts needed to run verification tests with Skywalker. Additionally, I have compiled it on NVIDIA GPUs, and it is working. Thus, please review it, and then we can merge it into the main branch.