Skip to content

Commit

Permalink
Added more const qualifiers.
Browse files Browse the repository at this point in the history
  • Loading branch information
lars2015 committed Sep 27, 2024
1 parent 07a6720 commit b602de3
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 48 deletions.
48 changes: 24 additions & 24 deletions src/jurassic.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,8 @@
/*****************************************************************************/

size_t atm2x(
ctl_t * ctl,
atm_t * atm,
const ctl_t * ctl,
const atm_t * atm,
gsl_vector * x,
int *iqa,
int *ipa) {
Expand Down Expand Up @@ -85,9 +85,9 @@ size_t atm2x(
/*****************************************************************************/

void atm2x_help(
double value,
int value_iqa,
int value_ip,
const double value,
const int value_iqa,
const int value_ip,
gsl_vector * x,
int *iqa,
int *ipa,
Expand Down Expand Up @@ -121,7 +121,7 @@ void cart2geo(
/*****************************************************************************/

void climatology(
ctl_t * ctl,
const ctl_t * ctl,
atm_t * atm) {

static double z[121] = {
Expand Down Expand Up @@ -2919,10 +2919,10 @@ double ctmo2(
/*****************************************************************************/

void copy_atm(
ctl_t * ctl,
const ctl_t * ctl,
atm_t * atm_dest,
atm_t * atm_src,
int init) {
const atm_t * atm_src,
const int init) {

/* Data size... */
const size_t s = (size_t) atm_src->np * sizeof(double);
Expand Down Expand Up @@ -2973,10 +2973,10 @@ void copy_atm(
/*****************************************************************************/

void copy_obs(
ctl_t * ctl,
const ctl_t * ctl,
obs_t * obs_dest,
obs_t * obs_src,
int init) {
const obs_t * obs_src,
const int init) {

/* Data size... */
const size_t s = (size_t) obs_src->nr * sizeof(double);
Expand Down Expand Up @@ -3011,7 +3011,7 @@ void copy_obs(
/*****************************************************************************/

int find_emitter(
ctl_t * ctl,
const ctl_t * ctl,
const char *emitter) {

for (int ig = 0; ig < ctl->ng; ig++)
Expand Down Expand Up @@ -3073,9 +3073,9 @@ void formod(
/*****************************************************************************/

void formod_continua(
ctl_t * ctl,
los_t * los,
int ip,
const ctl_t * ctl,
const los_t * los,
const int ip,
double *beta) {

static int ig_co2 = -999, ig_h2o = -999;
Expand Down Expand Up @@ -3119,7 +3119,7 @@ void formod_continua(
/*****************************************************************************/

void formod_fov(
ctl_t * ctl,
const ctl_t * ctl,
obs_t * obs) {

static double dz[NSHAPE], w[NSHAPE];
Expand Down Expand Up @@ -3481,9 +3481,9 @@ void formod_rfm(
/*****************************************************************************/

void formod_srcfunc(
ctl_t * ctl,
tbl_t * tbl,
double t,
const ctl_t * ctl,
const tbl_t * tbl,
const double t,
double *src) {

/* Determine index in temperature array... */
Expand Down Expand Up @@ -3518,7 +3518,7 @@ void geo2cart(
/*****************************************************************************/

void hydrostatic(
ctl_t * ctl,
const ctl_t * ctl,
atm_t * atm) {

const double mmair = 28.96456e-3, mmh2o = 18.0153e-3;
Expand Down Expand Up @@ -3584,8 +3584,8 @@ void hydrostatic(
/*****************************************************************************/

void idx2name(
ctl_t * ctl,
int idx,
const ctl_t * ctl,
const int idx,
char *quantity) {

if (idx == IDXP)
Expand Down Expand Up @@ -3629,7 +3629,7 @@ void idx2name(
/*****************************************************************************/

void init_srcfunc(
ctl_t * ctl,
const ctl_t * ctl,
tbl_t * tbl) {

char filename[2 * LEN];
Expand Down
48 changes: 24 additions & 24 deletions src/jurassic.h
Original file line number Diff line number Diff line change
Expand Up @@ -812,17 +812,17 @@ typedef struct {

/*! Compose state vector or parameter vector. */
size_t atm2x(
ctl_t * ctl,
atm_t * atm,
const ctl_t * ctl,
const atm_t * atm,
gsl_vector * x,
int *iqa,
int *ipa);

/*! Add element to state vector. */
void atm2x_help(
double value,
int value_iqa,
int value_ip,
const double value,
const int value_iqa,
const int value_ip,
gsl_vector * x,
int *iqa,
int *ipa,
Expand All @@ -837,7 +837,7 @@ void cart2geo(

/*! Interpolate climatological data. */
void climatology(
ctl_t * ctl,
const ctl_t * ctl,
atm_t * atm_mean);

/*! Compute carbon dioxide continuum (optical depth). */
Expand Down Expand Up @@ -869,21 +869,21 @@ double ctmo2(

/*! Copy and initialize atmospheric data. */
void copy_atm(
ctl_t * ctl,
const ctl_t * ctl,
atm_t * atm_dest,
atm_t * atm_src,
int init);
const atm_t * atm_src,
const int init);

/*! Copy and initialize observation data. */
void copy_obs(
ctl_t * ctl,
const ctl_t * ctl,
obs_t * obs_dest,
obs_t * obs_src,
int init);
const obs_t * obs_src,
const int init);

/*! Find index of an emitter. */
int find_emitter(
ctl_t * ctl,
const ctl_t * ctl,
const char *emitter);

/*! Determine ray paths and compute radiative transfer. */
Expand All @@ -894,14 +894,14 @@ void formod(

/*! Compute absorption coefficient of continua. */
void formod_continua(
ctl_t * ctl,
los_t * los,
int ip,
const ctl_t * ctl,
const los_t * los,
const int ip,
double *beta);

/*! Apply field of view convolution. */
void formod_fov(
ctl_t * ctl,
const ctl_t * ctl,
obs_t * obs);

/*! Compute radiative transfer for a pencil beam. */
Expand All @@ -919,9 +919,9 @@ void formod_rfm(

/*! Compute Planck source function. */
void formod_srcfunc(
ctl_t * ctl,
tbl_t * tbl,
double t,
const ctl_t * ctl,
const tbl_t * tbl,
const double t,
double *src);

/*! Convert geolocation to Cartesian coordinates. */
Expand All @@ -933,18 +933,18 @@ void geo2cart(

/*! Set hydrostatic equilibrium. */
void hydrostatic(
ctl_t * ctl,
const ctl_t * ctl,
atm_t * atm);

/*! Determine name of state vector quantity for given index. */
void idx2name(
ctl_t * ctl,
int idx,
const ctl_t * ctl,
const int idx,
char *quantity);

/*! Initialize source function table. */
void init_srcfunc(
ctl_t * ctl,
const ctl_t * ctl,
tbl_t * tbl);

/*! Interpolate atmospheric data. */
Expand Down

0 comments on commit b602de3

Please sign in to comment.