diff --git a/packages/class/src/class.ts b/packages/class/src/class.ts index 5b0f6b3..8292372 100644 --- a/packages/class/src/class.ts +++ b/packages/class/src/class.ts @@ -4,13 +4,6 @@ import type { ClassConfig } from "./config"; const rho = 1.2; /** Density of air [kg m-3] */ const cp = 1005.0; /** Specific heat of dry air [J kg-1 K-1] */ -// More constants that were stored as model props -// TODO: should these be settable via config? Or dynamically calculated? ??? -// const ac = 0.0; /** Cloud core fraction [-] */ // unused -const M = 0.0; /** Cloud core mass flux [m s-1] */ -const wqM = 0.0; /** Cloud core moisture flux [kg kg-1 m s-1] */ -// const wCO2M = 0; /** CO2 mass flux [ppm m s-1] */ // unused - /** * CLASS model definition * @property _cfg: object containing the model settings @@ -58,7 +51,7 @@ export class CLASS { /** Tendency of CLB [m s-1]*/ get htend(): number { - return this.we + this.ws + this.wf - M; + return this.we + this.ws; } /** Tendency of mixed-layer potential temperature [K s-1] */ @@ -72,29 +65,20 @@ export class CLASS { /** Tendency of potential temperature jump at h [K s-1] */ get dthetatend(): number { const w_th_ft = 0.0; // TODO: add free troposphere switch - return ( - this._cfg.mixedLayer.gammatheta * (this.we + this.wf - M) - - this.thetatend + - w_th_ft - ); + return this._cfg.mixedLayer.gammatheta - this.thetatend + w_th_ft; } /** Tendency of mixed-layer specific humidity [kg kg-1 s-1] */ get qtend(): number { return ( - (this._cfg.mixedLayer.wq - this.wqe - wqM) / this.h + - this._cfg.mixedLayer.advq + (this._cfg.mixedLayer.wq - this.wqe) / this.h + this._cfg.mixedLayer.advq ); } /** Tendency of specific humidity jump at h[kg kg-1 s-1] */ get dqtend(): number { const w_q_ft = 0; // TODO: add free troposphere switch - return ( - this._cfg.mixedLayer.gammaq * (this.we + this.wf - M) - - this.qtend + - w_q_ft - ); + return this._cfg.mixedLayer.gammaq - this.qtend + w_q_ft; } /** Entrainment velocity [m s-1]. */ @@ -114,11 +98,6 @@ export class CLASS { return -this._cfg.mixedLayer.divU * this.h; } - /** Mixed-layer growth due to radiative divergence [m s-1]. */ - get wf(): number { - return this._cfg.radiation.dFz / (rho * cp * this.dtheta); - } - /** Entrainment kinematic heat flux [K m s-1]. */ get wthetae(): number { return -this.we * this.dtheta; diff --git a/packages/class/src/config.ts b/packages/class/src/config.ts index 8781fd2..c578176 100644 --- a/packages/class/src/config.ts +++ b/packages/class/src/config.ts @@ -75,20 +75,10 @@ const mixedLayer = z }) .describe("Mixed layer"); -const radiation = z - .object({ - dFz: z.coerce - .number() - .default(0) - .describe("Cloud top radiative divergence [W m-2]"), - }) - .describe("Radiation"); - export const classConfig = z.object({ initialState: initialState.default({}), timeControl: timeControl.default({}), mixedLayer: mixedLayer.default({}), - radiation: radiation.default({}), }); export type ClassConfig = z.infer;