|
| 1 | +#!/usr/bin/env python3 |
| 2 | +""" |
| 3 | +This script runs e3sm_diags with the lat_lon_native set to visualize native grid data. |
| 4 | +""" |
| 5 | + |
| 6 | +import os |
| 7 | +import sys |
| 8 | + |
| 9 | +from e3sm_diags.parameter.lat_lon_native_parameter import LatLonNativeParameter |
| 10 | +from e3sm_diags.run import runner |
| 11 | + |
| 12 | +# Create parameter object |
| 13 | +param = LatLonNativeParameter() |
| 14 | + |
| 15 | +# Basic parameters |
| 16 | +param.results_dir = "/lcrc/group/e3sm/public_html/diagnostic_output/ac.tvo/tests/lat_lon_native_file" |
| 17 | +# Create results directory if it doesn't exist |
| 18 | +if not os.path.exists(param.results_dir): |
| 19 | + os.makedirs(param.results_dir) |
| 20 | + |
| 21 | + |
| 22 | +# Model data |
| 23 | + |
| 24 | +##(1) |
| 25 | +#param.test_data_path = "/home/ac.zhang40/test" |
| 26 | +#param.test_name = "v3.LR.amip_0101" |
| 27 | +#param.short_test_name = "v3.LR.amip_0101" |
| 28 | +#param.reference_data_path = "/home/ac.zhang40/test" |
| 29 | +#param.ref_name = "v3.HR.test4" |
| 30 | +#param.short_ref_name = "v3.HR.test4" |
| 31 | +#param.seasons = ["DJF"] |
| 32 | + |
| 33 | + |
| 34 | +##(2) |
| 35 | +#param.test_data_path = "/home/ac.zhang40/test" |
| 36 | +#param.test_file = "v3.LR.amip_0101_DJF_climo.nc" |
| 37 | +#param.short_test_name = "v3.LR.amip_0101" |
| 38 | +#param.reference_data_path = "/home/ac.zhang40/test" |
| 39 | +#param.ref_file = "v3.HR.test4_DJF_climo.nc" |
| 40 | +#param.short_ref_name = "v3.HR.test4" |
| 41 | +#param.seasons = ["DJF"] |
| 42 | +##(3) |
| 43 | +param.test_data_path = "/lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051/archive/atm/hist" |
| 44 | +param.test_file = "v3.LR.historical_0051.eam.h0.1989-12.nc" |
| 45 | +#param.short_test_name = "v3.LR.amip_0101" |
| 46 | +param.reference_data_path = "/lcrc/group/e3sm2/ac.wlin/E3SMv3/v3.LR.historical_0051/archive/atm/hist" |
| 47 | +param.ref_file = "v3.LR.historical_0051.eam.h0.1989-12.nc" |
| 48 | +#param.reference_data_path = "/lcrc/group/e3sm2/ac.jwolfe/E3SMv3_dev/20250404.wcycl1850.ne120pg2_r025_RRSwISC6to18E3r5.test4.chrysalis/archive/atm/hist/" |
| 49 | +#param.ref_file = "20250404.wcycl1850.ne120pg2_r025_RRSwISC6to18E3r5.test4.chrysalis.eam.h0.0018-12.nc" |
| 50 | +param.short_ref_name = "v3.HR.test4" |
| 51 | +#param.seasons = ["DJF"] |
| 52 | +param.time_slices=["0"] |
| 53 | + |
| 54 | + |
| 55 | +param.case_id = "model_vs_model" |
| 56 | + |
| 57 | + |
| 58 | +# Native grid settings |
| 59 | +param.test_grid_file = "/lcrc/group/e3sm/diagnostics/grids/ne30pg2.nc" |
| 60 | +param.ref_grid_file = "/lcrc/group/e3sm/diagnostics/grids/ne30pg2.nc" |
| 61 | +#param.ref_grid_file = "/lcrc/group/e3sm/diagnostics/grids/ne120pg2.nc" |
| 62 | + |
| 63 | +param.split_periodic_elements = True |
| 64 | +param.antialiased = False |
| 65 | + |
| 66 | +# param.model_only = True |
| 67 | +param.run_type = "model_vs_model" |
| 68 | + |
| 69 | +# Run the single diagnostic, comment out for complete diagnostics. |
| 70 | +cfg_path = "auxiliary_tools/debug/968-native-grid-vis/run_lat_lon_native.cfg" |
| 71 | + |
| 72 | +sys.argv.extend(["--diags", cfg_path]) |
| 73 | + |
| 74 | +runner.sets_to_run = ["lat_lon_native"] |
| 75 | +runner.run_diags([param]) |
| 76 | + |
| 77 | + |
0 commit comments