TL;DR:
The field involved in development of software for the purpose of research is called Research Software Engineering (RSE). In the USA one resource for more information is https://us-rse.org/.
Details
I can't speak to standardizing research software. I'd caution that any attempt to standardize research software is fraught. After all, if we knew exactly what we were doing, it wouldn't be called research.
That said, there are definitely standards to developing research software, at multiple levels. For context, I have worked as an RSE and currently work as a research computing facilitator. I have built or facilitated a wide variety of research software solutions. The list that follows comes from my personal experience.
Numerical computing. The field of mathematics involved with understanding the behavior of approximate mathematical calculations in the context of finite representations of real numbers, i.e. floating point numbers. Practically, this informs us how to develop mathematical algorithms that will converge to an error tolerance as quickly as possible, rather than compounding floating point errors.
Software engineering best practices. Things like version control, unit and integration testing, issue tracking, developer and user documentation, minimize complexity, maximize readability, appropriate abstraction, assert pre/postconditions and invariants, code reviews, continuing education, etc.
Verifiability. Does the code produce outputs that are expected? This is distinct from unit and integration testing. The goal of testing is to check parts of the code do what they are intended to. The goal of verification is to check that the software output matches what the science says the output should be. This can be deceptively hard!
Each scientific domain may have a different approach to verification. Some may have multiple approaches, which can be a research subfield in its own right. Some may have not developed an effective means of verification.
Some may use rigid comparison of results to know values. Some may use stochastic comparisons, i.e., checking a distribution of outputs matches a known distribution. Sometimes a sensitivity study is suitable, i.e., varying inputs in a systematic way to observe the behavior of outputs. Very much like a Design of Experiments. Some may have to compare to proxy models.
Reproducibility. How easy is it for someone else to set up and reproduce your results using your code? There are myriad tools for this at different levels. RNG seeding, Anaconda environments, containers (Docker and Singularity), workflow managers (Snakemake, Nextflow, Pegasus, etc.), version control.
All of these are things Research Software Engineers should be aware of. Many of them will touch all of these at some point in their career, if for no other reason than they solve a lot of problems and make software engineering and deployment work easier.
If this sounds like the type of thing you are after, then you are absolutely looking for Research Software Engineering.
Physical Units Management
There may be various packages out there that manage physical units, and there may be some proprietary libraries used by groups in mission critical domains (Aerospace, Medical) to avoid costly (or deadly) errors.
For high-throughput applications, automatic unit management at runtime may be an unnecessary burden. For statically-typed languages, the types could be used to check unit errors at compile time, which could be fantastically helpful for catching errors early. However, you'd need to design a lot of classes (or use something like template metaprogramming) to allow changing types through multiplication. This is definitely possible in, for example, C++, but the up-front design and maintenance costs may be substantial, and it adds burden to developers.
Oftentimes in practice it's easier to use a modified Hungarian notation like the following block.
width_mm = 3
height_mm = 2
area_mm2 = width_mm * height_mm
mm_to_m = 10^-3
area_m2 = area_mm2 * mm_to_m^2
length_cm = 100
volume_mm3 = area_mm2 * length_cm
It should be immediately obvious from the variable names which lines are correct and which have errors. I'll leave it to you to figure out how to denote negative powers of units.
Bonus Information!
If there is any chance your research software will need to scale up, be sure to consult with your local Research Computing (RC) or High Performance Computing (HPC) staff before and during development. Most academic institutions have some amount of RC/HPC staff. They can help you design your work to ensure less friction when scaling up.
RSEs often work closely with RC/HPC folks for exactly this reason.
It may be helpful to read this recent blog post on what research software is: https://upstream.force11.org/defining-the-roles-of-research-software/. It has a categorization of research software into seven different types. The blog post goes into greater detail on each.
- Component of research instruments
- A complete research instrument
- Data analysis pipeline
- Data presentation or visualization tool
- Integrates components into a whole (glue code, workflow management)
- Is infrastructure, a platform, a framework, a library, a language, etc.
- Facilitates research-flavored collaboration
Summary
It is clear that there are many different types of research software, fulfilling many different roles and functions. This huge variety makes it hard to come up with a good classification that captures all aspects and does justice to all the hard work done by the developers of the software. Nevertheless, we hope that we have succeeded in proving a bit more insight into the value of research software, the importance of sustaining said software, and recognizing the people involved in developing the software.