Search NASA⌕ Search

SEARCH · Search NASA

Results for “R CODES”

Search indexed NASA NTRS and DOE OSTI research on propulsion, heat transfer, battery materials and energy systems. Follow report and document links to the original sources.

Quote a phrase for an exact phrase match. Source license links do not imply unrestricted reuse.

At least 37 records · Page 2

Disentangling the Impacts of Microtopography and Shrub Distribution on Snow Depth in a Subarctic Watershed: Toward a Predictive Understanding of Snow Spatial Variability: Supporting Data and Code

This repository contains R code and associated datasets for reproducing the analysis described in the manuscript titled “Disentangling the Impacts of Microtopography and Shrub Distribution on Snow Depth in a Subarctic Watershed: Toward a Predictive Understanding of Snow Spatial Variability” (DOI: 10.1029/2024JG008604). The provided scripts facilitate a comprehensive analysis of snow depth variability influenced by microtopography and vegetation distribution in a subarctic watershed. Included datasets are high-resolution spatial maps of snow depth, terrain elevation, vegetation height, and distance from shrubs taller than 1 meter, all formatted as text files (.txt). These data are fully describe in doi:10.15485/2316038. Users can adapt the provided R scripts to accommodate different data formats or larger spatial domains, noting that some output files may require modification due to their size.The code includes implementations for boosted regression tree analysis adapted from methods outlined in Elith et al. (2008). Users interested in understanding or modeling landscape-scale snow distribution patterns, particularly in Arctic or subarctic ecosystems, will find this package useful. The Next-Generation Ecosystem Experiments: Arctic (NGEE Arctic), was a research effort to reduce uncertainty in Earth System Models by developing a predictive understanding of carbon-rich Arctic ecosystems and feedbacks to climate. NGEE Arctic was supported by the Department of Energy's Office of Biological and Environmental Research.The NGEE Arctic project had two field research sites: 1) located within the Arctic polygonal tundra coastal region on the Barrow Environmental Observatory (BEO) and the North Slope near Utqiagvik (Barrow), Alaska and 2) multiple areas on the discontinuous permafrost region of the Seward Peninsula north of Nome, Alaska.Through observations, experiments, and synthesis with existing datasets, NGEE Arctic provided an enhanced knowledge base for multi-scale modeling and contributed to improved process representation at global pan-Arctic scales within the Department of Energy's Earth system Model (the Energy Exascale Earth System Model, or E3SM), and specifically within the E3SM Land Model component (ELM).

54 ENVIRONMENTAL SCIENCES↗

Sap flow data from San Lorenzo, Panama (PA-SLZ), 2019

This data package contains sap flow data from the NGEE Tropics site in San Lorenzo, Panama (PA-SLZ) from 22 January 2019 to 31 December 2019. Sap flow measurements quantify plant-level transpiration, which varies across spatial and temporal scales. It is a key trait in understanding plant hydraulic functioning. Here sap flow was measured using ‘Granier-type’ thermal dissipation probes. Raw data downloaded from each data logger are in the 'Raw data' folder as CSV files, along with the Campbell data logger programs which can be read when opened with a text editor. The data was processed using the AquaFlux package in R. R code for preparing the data for use in AquaFlux is in the 'R code for pre-processing data folder'; it is saved as a text file that can be copy and pasted into R. The processed data for each data logger is in the 'Processed data' folder as CSV files. Documentation for the Granier sensors and AquaFlux package is in the ‘Manuals’ folder as PDF files.

54 ENVIRONMENTAL SCIENCES↗

Automation of PCXMC and ImPACT for NASA Astronaut Medical Imaging Dose and Risk Tracking

To automate astronaut organ and effective dose calculations from occupational X-ray and computed tomography (CT) examinations incorporating PCXMC and ImPACT tools and to estimate the associated lifetime cancer risk per the National Council on Radiation Protection & Measurements (NCRP) using MATLAB(R). Methods: NASA follows guidance from the NCRP on its operational radiation safety program for astronauts. NCRP Report 142 recommends that astronauts be informed of the cancer risks from reported exposures to ionizing radiation from medical imaging. MATLAB(R) code was written to retrieve exam parameters for medical imaging procedures from a NASA database, calculate associated dose and risk, and return results to the database, using the Microsoft .NET Framework. This code interfaces with the PCXMC executable and emulates the ImPACT Excel spreadsheet to calculate organ doses from X-rays and CTs, respectively, eliminating the need to utilize the PCXMC graphical user interface (except for a few special cases) and the ImPACT spreadsheet. Results: Using MATLAB(R) code to interface with PCXMC and replicate ImPACT dose calculation allowed for rapid evaluation of multiple medical imaging exams. The user inputs the exam parameter data into the database and runs the code. Based on the imaging modality and input parameters, the organ doses are calculated. Output files are created for record, and organ doses, effective dose, and cancer risks associated with each exam are written to the database. Annual and post-flight exposure reports, which are used by the flight surgeon to brief the astronaut, are generated from the database. Conclusions: Automating PCXMC and ImPACT for evaluation of NASA astronaut medical imaging radiation procedures allowed for a traceable and rapid method for tracking projected cancer risks associated with over 12,000 exposures. This code will be used to evaluate future medical radiation exposures, and can easily be modified to accommodate changes to the risk calculation procedure.

Bahadori, Amir↗

Bioenergy cropping systems shape ant community composition and functional roles

R code and partial data for Haan, Helms, & Landis 2023, Bioenergy cropping systems shape ant community composition and functional roles, to be published in Frontiers in Conservation Science. The ant species list we use to generate the species matrix was uploaded previously (10.5281/zenodo.8215581) in association with another manuscript (Haan et al. 2023, Science Advances, Contrasting effects of bioenergy crops on biodiversity). Therefore here we include a small table with trait information for each species along with the R code used specifically for this manuscript.

ants↗

Substantial and overlooked greenhouse gas emissions from deep Arctic lake sediment - supporting data and code

This data package contains data, descriptions, and code-based analyses that were used to support conclusions drawn in “Substantial and overlooked greenhouse gas emissions from deep Arctic lake sediment”, by Freitas et al. (2025) (https://doi.org/10.1038/s41561-024-01614-y). The study evaluated greenhouse gas production along a deep sediment core (20 m) taken in 2018 from below Goldstream Lake, a field site approximately 15 km north of Fairbanks, Alaska.The file “ESSDive_NFreitas_2024_flmd.csv” includes an overview of all other csv files in this data package, namely: sediment descriptions (depth and type of sediment), sediment characterizations (bulk density, gravimetric water content, total carbon, etc.), calculated respiration and temperature sensitivity values associated with year-long incubations of the sediment core, and the R code used to process the dataset. Additional details regarding the content of these files and how the calculations were performed are described in the Methods section of this archive. The “data_dictionary_ESSDive_NFreitas_2024_dd.csv” is a data dictionary for all files included in the data package. Each row in the data dictionary represents a column name in a given file. The Next-Generation Ecosystem Experiments: Arctic (NGEE Arctic), was a research effort to reduce uncertainty in Earth System Models by developing a predictive understanding of carbon-rich Arctic ecosystems and feedbacks to climate. NGEE Arctic was supported by the Department of Energy's Office of Biological and Environmental Research. The NGEE Arctic project had two field research sites: 1) located within the Arctic polygonal tundra coastal region on the Barrow Environmental Observatory (BEO) and the North Slope near Utqiagvik (Barrow), Alaska and 2) multiple areas on the discontinuous permafrost region of the Seward Peninsula north of Nome, Alaska.Through observations, experiments, and synthesis with existing datasets, NGEE Arctic provided an enhanced knowledge base for multi-scale modeling and contributed to improved process representation at global pan-Arctic scales within the Department of Energy's Earth system Model (the Energy Exascale Earth System Model, or E3SM), and specifically within the E3SM Land Model component (ELM).Data package updates- August 2024: Title was updated, R code now includes a process for calculating potential production across the whole sediment column, the "sediment_column_production_potentials_ESSDive_NFreitas_2024.csv" is the associated data output file, and the file level metadata and data dictionaries were updated to reflect the contents of the additional csv file.- October 2024: Title was updated, and a statement was added to Step 2 of the Methods that describes that samples were collected (and exported) in a responsible manner and in accordance with relevant permits and local laws.- January 2025: Updated the associated manuscript details in the Abstract (manuscript title, publication date, DOI link) and in the Related References section (full citation).

54 ENVIRONMENTAL SCIENCES↗

A Scalable Architecture of a Structured LDPC Decoder

We present a scalable decoding architecture for a certain class of structured LDPC codes. The codes are designed using a small (n,r) protograph that is replicated Z times to produce a decoding graph for a (Z x n, Z x r) code. Using this architecture, we have implemented a decoder for a (4096,2048) LDPC code on a Xilinx Virtex-II 2000 FPGA, and achieved decoding speeds of 31 Mbps with 10 fixed iterations. The implemented message-passing algorithm uses an optimized 3-bit non-uniform quantizer that operates with 0.2dB implementation loss relative to a floating point decoder.

optical communications↗

Sensitivity Coefficients Calculated for the Prompt Neutron Decay Constant At or Near Delayed Critical

The derivation of a non-invasive prompt neutron decay constant sensitivity coefficient is provided in this work. The computation of the sensitivity coefficient derived in this work does not require modification of Monte Carlo source code and is based on capabilities available in Monte Carlo N-Particle R© Code Version 6.2. The prompt neutron decay constant sensitivity coefficients are calculated for 44-group and 252-group energy structures for specific nuclide-reaction pairs in the Jezebel benchmark experiment. The nuclide-reaction pairs investigated in this work include Pu- 239(n,f), Pu-240(n,f), and Pu-241(n,f). Physical explanations of the sensitivity profiles exhibited by the 252-group energy structure are investigated for the prompt neutron multiplication factor, mean neutron lifetime, and prompt neutron decay constant. The prompt neutron decay constant sensitivity coefficients calculated for the 44-group and 252-group energy structure of Pu-239(n,f) are compared. Lastly, the 44-group energy structure sensitivity coefficients calculated are used for nuclear-data induced uncertainty quantification of the neutron multiplication factor. This work shows that a reduction in the nuclear data-induced uncertainty of the neutron multiplication factor is possible for all nuclide-reaction pairs investigated when prompt neutron decay constant sensitivity coefficients are utilized. This is important for new critical experiment design optimization studies of measurement configurations. This work provides a basis for more detailed sensitivity analysis and uncertainty quantification of nuclide, reaction, and energy-specific cross section data.

73 NUCLEAR PHYSICS AND RADIATION PHYSICS↗

Rate 5/6 Trellis-coded 8-PSK

Some new short constraint length codes are described for satellite channels which are constant-envelope and which have spectral and energy efficiencies intermediate to other recent coded techniques, namely r = 2/3 coded 8-PSK and r = 3/4 coded 16-PSK. Two intervals of 8-PSK transmission are used to form a modulation base for r = 5/6 Trellis codes. A particularly attractive design is an eight-state code, producing 6.2 dB gain on the Gaussian channel over uncoded 8-PSK, yet sacrificing only 16 percent in spectral efficiency.

Wilson, S. G.↗

Code associated with "Assessing the Effect of a Deep-Rooted Grass on Belowground Carbon Storage in Cultivated Land: Insights from a Multi-Site US Study"

R code associated with "Assessing the Effect of a Deep-Rooted Grass on Belowground Carbon Storage in Cultivated Land: Insights from a Multi-Site US Study" These scripts can be used to analyze the accompanying dataset: https://doi.org/10.5281/zenodo.16620529. (1) resampling_functions.R : Creates functions for resampling data for nonparametric bootstrapping (2) bootstrap_depth_profiles.R : Applies resampling functions to the dataset (3) gapfill_masscalcs.R : Prepares data for equivalent mass calculations (4) get_14C_EM.R : Applies soilR to obtain the 14C end member for mixing model calculations (5) mass_aggregate.R : Performs equivalent mass and mass weighted averaging calculations.

Carbon↗

COMPASS-FME Terrestrial Ecosystem Manipulation to Probe the Effects of Storm Treatments (TEMPEST) Experiment Tree Inventory

This is the tree inventory (diameter, species, and live/dead status) data from the Terrestrial Ecosystem Manipulation to Probe the Effects of Storm Treatments (TEMPEST) experimental site. This manipulative, ecosystem-scale TEMPEST experiment is part of the COMPASS-FME (Coastal Observations, Mechanisms, and Predictions Across Systems and Scales: Field Measurements and Experiments; see https://compass.pnnl.gov/FME/COMPASSFME) project. It addresses the potential for freshwater and estuarine-water disturbance events to alter tree function, species composition, and ecosystem processes in a deciduous coastal forest in eastern Maryland, USA. The experiment uses a large-unit (2000 m2), un-replicated experimental design, with three 50 m × 40 m plots serving as control, freshwater, and estuarine-water treatments.This dataset includes:- An overall dataset README file.- The tree inventory data in both "wide" and "long" forms. These contain the same information but are structured differently, with the former more useful for human viewers and the latter more amenable for programmatic analyses.- A key to the species/genus codes used, which follow the U.S. Department of Agriculture's PLANTS schema (https://plants.usda.gov/).- A copy of the R code used to generate the wide- and long-form data files.All files are comma-separated value (CSV) and no special software is required to read them.

54 ENVIRONMENTAL SCIENCES↗

A Double Bootstrap Approach to Superposed Epoch Analysis to Evaluate Response Uncertainty

The association between climate variability and episodic events, such as the antecedent moisture conditions prior to wildfire or the cooling following volcanic eruptions, is commonly assessed using Superposed Epoch Analysis (SEA). In SEA the epochal response is typically calculated as the average climate conditions prior to and following all event years or their deviation from climatology. However, the magnitude and significance of the inferred climate association may be sensitive to the selection or omission of individual key years, potentially resulting in a biased assessment of the relationship between these events and climate. Here we describe and test a modified double-bootstrap SEA that generates multiple unique draws of the key years and evaluates the sign, magnitude, and significance of event-climate relationships within a probabilistic framework. This multiple resampling helps quantify multiple uncertainties inherent in conventional applications of SEA within dendrochronology and paleoclimatology. We demonstrate our modified SEA by evaluating the volcanic cooling signal in a Northern Hemisphere tree-ring temperature reconstruction and the link between drought and wildfire events in the western United States. Finally, we make our Matlab and R code available to be adapted for future SEA applications.

Dendroclimatology↗

Lagrangian particle model for 3D simulation of pellets and SPI fragments in tokamaks

A 3D numerical model for the ablation of pellets and shattered pellet injection (SPI) fragments in tokamaks in the plasma disruption mitigation and fueling parameter space has been developed based on the Lagrangian particle code [R. Samulyak, X. Wang, H.-S. Chen, Lagrangian Particle Method for Compressible Fluid Dynamics, J. Comput. Phys., 362 (2018), 1-19]. The pellet code implements the low magnetic Reynolds number MHD equations, kinetic models for the electronic heating, a pellet surface ablation model, an equation of state that supports multiple ionization states, radiation, and a model for grad-B drift of the ablated material across the magnetic field. The Lagrangian particle algorithm is highly adaptive, capable of simulating a large number of fragments in 3D while eliminating numerical difficulties of dealing with the tokamak background plasma. The code has achieved good agreement with theory for spherically symmetric ablation flows. Axisymmetric simulations of neon and deuterium pellets in magnetic fields ranging from 1 to 6 Tesla have been compared with previous simulations using the FronTier code, and very good agreement has also been obtained. Furthermore, the main physics contribution of the paper is a detailed study of the influence of 3D effects, in particular grad-B drift, on pellet ablation rates and properties of ablation clouds. Smaller reductions of ablation rates in magnetic fields compared to axially symmetric simulations have been demonstrated because the ablated material is not confined to narrowing channels in the presence of grad-B drift. Contribution of various factors in the grad-B drift model has also been quantified.

97 MATHEMATICS AND COMPUTING↗

FUN-BioCROP model with litter decomposition parameters derived from the LIDET dataset

This repository contains the code and data necessary to run the FUN-BioCROP (Fixation and Uptake of Nitrogen-Bioenergy Carbon, Rhizosphere, Organisms, and Protection) model with litter decomposition parameters derived from a modified Monte Carlo simulation that used the Long-term Intersite Decomposition Experiment Team dataset. Related publication:Juice, S.M., Ridgeway, J.R., Hartman, M.D., Parton, W.J., Berardi, D.M., Sulman, B.N., Allen, K.E., & Brzostek, E.R. Reparameterizing litter decomposition using a simplified Monte Carlo method improves litter decay simulated by a microbial model and alters bioenergy soil carbon estimates. Description of Files: FUNBioCROP_LIDET Study.Rmd R code with FUN-BioCROP model that can be run with 10 different sets of parameters for litter decomposition (Baseline, LIDET, or eight other best parameter sets identified in the modified Monte Carlo simulation. CORPSE Functions_Bioenergy_V2.R Code with CORPSE model functions, called by FUNBioCROP_LIDET Study.Rmd Model Input Data: bulk.csv, bulk_till.csv, rhizo.csv, rhizo_till.csv, litter.csv Initial C and N (kg C or N/m2) pool values for each soil compartment, final values from spin up. All five files have the same columns: (Column - Description - Units) uFastC - Unprotected fast decomposing carbon - kg carbon/m2 uSlowC - Unprotected slow decomposing carbon - kg carbon/m2 uNecroC - Unprotected necromass carbon - kg carbon/m2 pFastC - Protected fast decomposing carbon - kg carbon/m2 pSlowC - Protected slow decomposing carbon - kg carbon/m2 pNecroC - Protected necromass carbon - kg carbon/m2 livingMicrobeC - Carbon in living microbial biomass - kg carbon/m2 uFastN - Unprotected fast decomposing nitrogen - kg nitrogen/m2 uSlowN - Unprotected slow decomposing nitrogen - kg nitrogen/m2 uNecroN - Unprotected necromass nitrogen - kg nitrogen/m2 pFastN - Protected fast decomposing nitrogen - kg nitrogen/m2 pSlowN - Protected slow decomposing nitrogen - kg nitrogen/m2 pNecroN - Protected necromass nitrogen - kg nitrogen/m2 inorganicN - Inorganic nitrogen - kg nitrogen/m2 CO2 - Carbon in carbon dioxide - kg carbon/m2 livingMicrobeN - Nitrogen in living microbial biomass - kg nitrogen/m2 Model Input Data: FluxTower_AvgSoilT.csv: Average daily soil temperature (oC) at 10 cm depth at University of Illinois Urbana-Champaign (UIUC) Energy Farm flux tower from 7/2008-3/2016. (One year of averaged data) Model Input Data: FluxTower_AvgSoilVWC.csv: Average daily soil volumetric water content (VWC) at 10 cm depth at UIUC Energy Farm flux tower from 7/2008-3/2016. (One year of averaged data) Model Input Data: input_CCS_LIDET Study.csv: This file has daily data to run FUN-BioCROP (Column - Description - Units): yr - calendar year - year doy - day of year (1 to 365) (no leap year) - day anpp - aboveground NPP (DayCent) - kg C/m2/day bnpp - belowground NPP (DayCent) - kg C/m2/day aglivc - live aboveground biomass carbon (DayCent) - kg C/m2 bglivcj - live juvenile fine root biomass carbon (DayCent) - kg C/m2 bglivcm - live mature fine root biomass carbon (DayCent) - kg C/m2 aglivn - live aboveground biomass nitrogen (DayCent) - kg N/m2 bglivnj - live juvenile fine root biomass nitrogen (DayCent) - kg N/m2 bglivnm - live mature fine root biomass nitrogen (DayCent) - kg N/m2 nyr - simulation year - year cult - indicates a cultivation event (0 or 1) crop - indicates a new crop (0 or 1) fert - indicates a fertilizer event (0 or 1) frst - indicates the first day of the growing season (0 or 1) harv - indicates a harvest event (0 or 1) last - indicates the end of the growing season (0 or 1) croptype - crop type (0=none; 1=alfalfa; 2=corn; 3=grass clover pasture; 4=soybean; 5=wheat) cropsrl - crop specific root length - mm/g root cultrhizmix - fraction of rhizosphere mixed with bulk soil during cultivation (0.0-1.0) - fraction cultlitmix - fraction of litter mixed with bulk soil during cultivation (0.0-1.0) - fraction harvremov - fraction of above ground biomass removed during harvest (0.0-1.0) - fraction fertamt - fertilization amount - g N/m2 lifehist - plant life history (0 = annual, 1 = perennial) froot_turnover_c - amount of C in fine root turnover - kg C/m2 froot_turnover_n - amount of N in fine root turnover - kg N/m2 agrd_turnover_c - amount of C in aboveground biomass turnover - kg C/m2 agrd_turnover_n - amount of N in aboveground biomass turnover - kg N/m2 leaf_litter_fastfrac - Fast decomposing fraction of leaf litter (0.0-1.0) - fraction root_litter_fastfrac - Fast decomposing fraction of root litter (0.0-1.0) - fraction root_diameter - root diameter - mm root_length - root length - mm root/m2 rhizo_frac - fraction of total soil volume that is rhizosphere (0.0 - 1.0) - fraction date - date in format YYYY-MM-DD Instructions: Save the model code ("FUN-BioCROP_LIDET Study.Rmd") and accompanything files (data streams and CORPSE function code) in the same folder. In model code "Chunk 3: Load CORPSE Data Streams" set the working directory (setwd) to the folder with the files saved in step #1. In "Chunk 5: Define LIDET parameter sets" select the litter decomposition parameter set to be used in the run, and comment out all other sets. If changing any parameter values, edit them in "Chunk 6: Load parameters." Run all chunks up to and including "Chunk 10: Prepare Data for Export." In "Chunk 11: Export Output Data" edit data frames for export and filenames, as necessary. "Chunk 12: Graph Total Soil C" makes a figure of C remaining over the model run period. Description of each model chunk (in file FUN-BioCROP_LIDET Study.Rmd): Chunk 1: Remove all functions, clear memory. Removes all functions from R environment, clears the memory. Chunk 2: Load Packages. Loads packages necessary to run the code. Chunk 3: Load CORPSE Data Streams. Sets the working directory and loads the data files necessary to run CORPSE. Chunk 4: Load CORPSE Functions. Loads the R script with CORPSE functions from the working directory, "CORPSE Functions_Bioenergy_V2.R". Chunk 5: Define LIDET parameter sets. Has ten different parameter sets for litter decomposition tested in this study: Baseline parameters, LIDET parameters, and the other 8 best performing parameter sets identified in the modified Monte Carlo. To run the model, all but one parameter set must be commented out. Chunk 6: Load Parameters. Loads all fixed parameters to run the model. Data frame with definitions of parameters is in the CORPSE function script "CORPSE Functions_Bioenergy_V2.R" Chunk 7: Prepare Data Streams. Takes data streams loaded in Chunk 3 and puts them in the format necessary to run the model. The model is coded to run at least two sites at a time, so if only one site is being run it must be run in duplicate. Individual data tables of daily values are created in this chunk from the input data file. Chunk 8: Set Initial Conditions. Creates data tables of soil C and N pools for each soil compartment (rhizo_till, rhizo, bulk_till, bulk, litter) and loads initial values into the data tables. Creates lists for each soil compartment to hold model output. Chunk 9: Load FUN Data and Set Up Matrices. Uses DayCent data to calculate FUN input data: root and leaf N demand, total N demand, plant CN, leaf N available for retranslocation, and litter production. Creates matrices for FUN model outputs. Chunk 10: Run Model. Runs the model. Chunk 11: Prepare Data for Export. Combines data from each day saved as lists into data frames for each soil compartment. Adds values from all soil compartments together to calculate total soil values, creates separate data frames for each soil C and N pool (e.g., protected slow C) for the total soil value. Adds different C and N pools together to calculate total soil C and N for all layers. Creates data frame of ratio of protected to unprotected SOC. Organizes FUN data for export. Chunk 12: Export Results. Exports CSV files of model results to the working directory. Chunk 13: Graph Total Soil C. Makes figure of C remaining over time. Related Links: Original FUN-BioCROP model: https://github.com/BrzostekEcologyLab/FUN-BioCROP LIDET dataset: https://andlter.forestry.oregonstate.edu/data/abstract.aspx?dbcode=TD023

Juice, Stephanie↗