Welcome to AmesCAP’s Documentation!
AmesCAP is the name of the repository hosting the Community Analysis Pipeline (CAP), a Python-based command-line tool that performs analysis and creates plots from netCDF files output by the Mars Global Climate Model (MGCM). The MGCM and AmesCAP are developed and maintained by the Mars Climate Modeling Center (MCMC) at NASA’s Ames Research Center in Mountain View, CA.
CAP is inspired by the need for increased access to MGCM output. MGCM data products are notoriously complex because the output files are typically tens of GB in size, hold multi-dimensional arrays on model-specific computational grids, and require post-processing in order to make the data usable in scientific, engineering, and educational applications. From simple command-line calls to CAP executables, users can access functions that pressure-interpolate, regrid, perform tidal analyses and time averages (e.g., diurnal, hourly, composite days), and derive secondary variables from the data in MGCM output files.
CAP also has a robust plotting routine that requires no coding to use. CAP’s plotting routine references a template that CAP generates and the user modifies to specify the figures CAP will create. Templates are generalizable and can be referenced repeatedly to create plots from multiple data products. A web-based version of CAP’s plotting routine is in development and will soon be released through the NAS Data Portal. The Mars Climate Modeling Center Data Portal Web Interface is a point-and-click plotting tool that requires no coding or command-line interaction to use. The Web Interface can create plots from MGCM data hosted on the NAS Data Portal and it can even provide the user a netCDF file of the subset of the data from which the plots were created.
CAP is currently compatible with output from the MCMC’s Legacy and FV3-based MGCMs, which are publicly available on GitHub. Output from simulations performed by both of these models is provided by the MCMC on the NAS Data Portal here. CAP is also compatible with output from the Mars Weather Research and Forecasting Model (MarsWRF), soon to be available on the NAS Data Portal as well, and OpenMars.
Note
CAP is continually in development and we appreciate any feedback you have for us.
Contents:
- Install
- Quick Start Guide
- CAP Description
- Table of Contents
- Key CAP Features
- CAP Components
- Cheat Sheet
- Getting Help
- 1. MarsPull - Downloading Raw MGCM Output
- 2. MarsFiles - File Manipulations and Reduction
- 3. MarsVars - Performing Variable Operations
- 4. MarsInterp - Interpolating the Vertical Grid
- 5. MarsPlot - Plotting the Results
- 6. MarsPlot - File Analysis
- Inspecting Variable Content of netCDF Files
- Disabling or Adding a New Plot
- Adjusting the Color Range and Colormap
- Creating 1D Plots
- Customizing 1D Plots
- Putting Multiple Plots on the Same Page
- Putting Multiple 1D Plots on the Same Page
- Using a Different Start Date
- Accessing Simulations in Different Directories
- Overwriting Free Dimensions
- Performing Element-wise Operations
- Using Code Comments and Speeding Up Processing
- Changing Projections
- Adjusting Figure Format and Size
- Accessing CAP Libraries for Custom Plots
- Debugging
- Example Use Cases
- Table of Contents
- Activating CAP
- Part I: File Manipulations
- 1. MarsPlot’s Inspect Function
- 2. Editing Variable Names and Attributes
- 3. Splitting Files in Time
- 4. Deriving Secondary Variables
- 5. Time-Shifting Diurn Files
- 6. Pressure-Interpolating the Vertical Axis
- Part II
- Part II: Plotting with CAP
- Step 1: Creating the Template (Custom.in)
- Step 2: Editing Custom.in
- Step 3: Generating the Plots
- Customizing the Plots
- Custom Set 1 of 4: Zonal Mean Surface Plots Over Time
- Custom Set 2 of 4: Global Mean Column-Integrated Dust Optical Depth Over Time
- Custom Set 3 of 4: 50 Pa Temperatures at 3 AM and 3 PM
- Custom Set 4 of 4: Zonal Mean Circulation Cross-Sections
- End Credits
- MarsPull
- MarsFormat
- MarsFiles
- MarsVars
- Attributes
- Functions
- Module Contents
add_help()check_dependencies()check_variable_exists()compute_DP_3D()compute_DZ_3D()compute_DZ_full_pstd()compute_Ek()compute_Ep()compute_MF()compute_N()compute_Tco2()compute_Vg_sed()compute_WMFF()compute_dustref_per_pa()compute_dustref_per_z()compute_mmr()compute_p_3D()compute_rho()compute_scorer()compute_theta()compute_w()compute_w_net()compute_xzTau()compute_zfull()compute_zhalf()debug_wrapper()ensure_file_closed()force_close_netcdf_files()get_existing_var_name()main()patched_print_message()process_add_variables()safe_copy_replace()safe_move_file()safe_print()safe_remove_file()C_dstC_iceCpKbM_co2NNaQext_dstQext_iceRRdReff_dstReff_iceS0T0Tpoleamuamu_co2argscap_strdebugexit_codefilepathfill_valuegmass_co2master_listn0original_print_messageparserpsrfrgasrho_airrho_dstrho_icesigma
- MarsInterp
- MarsPlot
- Attributes
- Classes
- Functions
- Module Contents
CustomTickerFig_1DFig_2DFig_2D_lat_levFig_2D_lon_latFig_2D_lon_levFig_2D_lon_timeFig_2D_time_latFig_2D_time_levMY_func()clean_comma_whitespace()create_exec()create_name()debug_wrapper()fig_layout()filter_input()format_lon_lat()get_Ncdf_num()get_figure_header()get_lat_index()get_level_index()get_list_varfull()get_lon_index()get_overwrite_dim_1D()get_overwrite_dim_2D()get_time_index()get_tod_index()main()make_template()mean_func()namelist_parser()prep_file()progress()rT()read_axis_options()remove_whitespace()select_range()shift_data()split_varfull()add_sol_time_axisargscurrent_versiondebugdegrexit_codeinclude_NaNslon_coord_typenamespaceparser
- MarsCalendar
- amescap
- autoapi