From f91237cbc5f9c6f687a553b96505d53788344341 Mon Sep 17 00:00:00 2001 From: drnimbusrain Date: Tue, 7 Nov 2023 11:58:30 -0500 Subject: [PATCH 01/14] Initial commits of restructured NL and README for clarity. --- README.md | 46 +++++++++++++++++++++++++++---------------- input/namelist.canopy | 46 +++++++++++++++++++++++++++---------------- 2 files changed, 58 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 199da62d..9b5703f7 100644 --- a/README.md +++ b/README.md @@ -187,48 +187,60 @@ You can also [generate global inputs using Python (see python/global_data_proces | Namelist Option | Namelist Description and Units | | --------------- | ---------------------------------------------------------------------------------- | +| Input model format options | | `infmt_opt` | integer for choosing 1D text (= `1`) or 2D NetCDF input file format (= `0`, default) | +| Input model grid sizes | +| `nlat` | number of latitude cells (must match # of LAT in `file_vars` above) | +| `nlon` | number of longitude cells (must match # of LON in `file_vars` above) | +| Input model run times and interval | | `time_start` | Start/initial time stamp in YYYY-MM-DD-HH:MM:SS.SSSS for simulation/observation inputs | | `time_end` | End time stamp in YYYY-MM-DD-HH:MM:SS.SSSS for simulation/observation inputs | | `ntime` | Number of time steps for simulation/observation inputs | | `time_intvl` | Integer time interval for simulation/observation input time steps in seconds (default = 3600) | -| `nlat` | number of latitude cells (must match # of LAT in `file_vars` above) | -| `nlon` | number of longitude cells (must match # of LON in `file_vars` above) | +| Canopy model vertical layers | | `modlays` | number of model (below and above canopy) layers | | `modres` | above and below canopy model vertical resolution (m) | +| Contiguous canopy model thresholds | +| `lai_thresh` | user-set real value of LAI threshold for contiguous canopy (m2/m2) | +| `frt_thresh` | user-set real value of forest fraction threshold for contiguous canopy | +| `fch_thresh` | user-set real value of canopy height threshold for contiguous canopy (m) | +| Canopy model vegetation/land use input dataset options | +| `lu_opt` | integer for input model land use type (`0`: VIIRS 17 Cat (default) or `1`: MODIS-IGBP 20 Cat (valid LU types 1-10 and 12); input mapped to Massman et al.) | +| Canopy crop and shrub/savanna/grass extension options | +| `ssg_opt` | integer for using either input data (= `0`, default) or user set shrub/savanna/grass (SSG) vegetation type heights from namelist (= `1`). Currently, GEDI FCH input data only provides canopy heights for forests and not SSG. Warning: use of ssg_opt=1 will overide typically higher resolution input data (e.g., GEDI) forest canopy heights where the lower resolution vegtype data indicates SSG | +| `ssg_set` | user-set real value of constant SSG vegetation type heights (m) (only used if `ssg_opt=1`) | +| `crop_opt` | integer for using either input data (= `0`, default) or user set crop vegetation type heights from namelist (= `1`). Currently, GEDI FCH input data only provides canopy heights for forests and not crops. Warning: use of crop_opt=1 will overide typically higher resolution input data (e.g., GEDI) forest canopy heights where the lower resolution vegtype data indicates crops | +| `crop_set` | user-set real value of constant crop vegetation type heights (m) (only used if `crop_opt=1`) | +| Canopy physics and wind-specific options | | `ifcanwind` | logical canopy wind option (default: `.FALSE.`) | -| `ifcanwaf` | logical canopy WAF option (default: `.FALSE.`) **\*\*** | -| `ifcaneddy` | logical canopy eddy Kz option (default: `.FALSE.`) | -| `ifcanphot` | logical canopy photolysis option (default: `.FALSE.`) | -| `ifcanbio` | logical canopy biogenic emissions option (default: `.FALSE.`) | | `href_opt` | integer for using `href_set` in namelist (= `0`, default) or array from file (= `1`) | | `href_set` | user-set real value of reference height above canopy associated with input wind speed (m) (only used if `href_opt=0`) **\*\*\*** | | `z0ghc` | ratio of ground roughness length to canopy top height (Massman et al., 2017) | | `rsl_opt` | user-set option for either MOST or unified Roughness SubLayer (RSL) effects above and at canopy top (Uc).(= `0`, default: uses MOST and a constant lambdars factor only), (= `1`, under development: will use a more unified RSL approach from Bonan et al. (2018) and Abolafia-Rosenzweig et al., 2021) | | `lambdars` | Value representing influence of RSL effects (with `rsl_opt=0`) (Massman et al., 2017) | +| `pai_opt` | integer (`0`: PAI fixed from Katul et al. 2004 veg types-->default; `1`: PAI Massman et al. 2017 Eq. 19 calc; `2`: PAI from model LAI+WAI; `3`: user-set PAI value) | +| `pai_set` | user-set real value of PAI (default: `4.0`; only used if `pai_opt=3`) | +| `z0_opt` | integer (`0`: use model input or `1`: vegtype dependent z0 for first estimate) | +| Canopy fire/WAF-specific options | +| `ifcanwaf` | logical canopy WAF option (default: `.FALSE.`) **\*\*** | | `dx_opt` | `0`: Calculation of dx resolution/distance from lon; `1`: user-set dx grid resolution | | `dx_set` | user-set real value of grid resolution (m) only if `dx_opt=1` | | `flameh_opt` | `0`: Calculation of vegtype dependent flame height from FRP (i.e., fire intensity); Note: this uses the one of two FRP calculation methods based on `flameh_cal` below; `1`: user-set flameh; `2`: FRP calculation where available (active fires), elsewhere user-set `flameh`; `3`: FlameH override, i.e., only uses fraction of canopy height (`flameh_set` must be <=1.0) as a surrogate for `flameh`; `4`: FRP calculation where available (active fires) and FlameH override elsewhere (same as option 3); `5`: FRP/intensity dependent (i.e., sub-canopy vs. crown fires) calculation where available (active fires) and FlameH override elsewhere (same as option 3). If option 5 is used and crowning is calculated, then the total flame height (i.e., top of canopy=FCH) is used instead of 1/2 flame height. | | `flameh_cal` | `0`: Calculates the vegtype dependent flame height from FRP, based on Table 1 of Alexander and Cruz (2012) and assuming that flame height = flame length (overestimates flame height in high winds and/or slope conditions). `1`: Calculates the vegtype dependent flame height from FRP based on Table 2 and Equation 14 of Alexander and Cruz (2012). These relate flame height directly to crown scorch height, which is derived from FRP. This method assumes that the ambient temperature is in the experimental ranges from Table 3 of Alexander and Cruz (2012), and that the lethal temperature for burning foliage is 60.0 C. | | `flameh_set` | user-set real value of flame height (m) if `flameh_opt=1` or `2`, or `flameh` = fraction of canopy height (<=1.0), i.e., `flameh` override, if `flameh_opt=3`, `4`, or `5` | | `frp_fac` | user-set real value of tuning factor applied to FRP in calculation of flame height (default: 1.0). Used only if `flameh_opt=0`, `2`, `4`, or `5`. | -| `pai_opt` | integer (`0`: PAI fixed from Katul et al. 2004 veg types-->default; `1`: PAI Massman et al. 2017 Eq. 19 calc; `2`: PAI from model LAI+WAI; `3`: user-set PAI value) | -| `pai_set` | user-set real value of PAI (default: `4.0`; only used if `pai_opt=3`) | -| `lu_opt` | integer for input model land use type (`0`: VIIRS 17 Cat (default) or `1`: MODIS-IGBP 20 Cat (valid LU types 1-10 and 12); input mapped to Massman et al.) | -| `z0_opt` | integer (`0`: use model input or `1`: vegtype dependent z0 for first estimate) | +| Canopy eddy diffusivity-specific options | +| `ifcaneddy` | logical canopy eddy Kz option (default: `.FALSE.`) | +| Canopy radiation/photolysis-specific options | +| `ifcanphot` | logical canopy photolysis option (default: `.FALSE.`) | +| Canopy biogenic emissions-specific options | +| `ifcanbio` | logical canopy biogenic emissions option (default: `.FALSE.`) | | `bio_cce` | user-set real value of MEGAN biogenic emissions "canopy environment coefficient" used to tune emissions to model inputs/calculations (default: `0.21`, based on Silva et al. 2020) | | `biovert_opt` | user set biogenic vertical summing option (`0`: no sum, full leaf-level biogenic emissions, units=kg/m3/s; `1`: MEGANv3-like summing of LAD weighted activity coefficients using the canopy-app plant distributions, caution-- units=kg m-2 s-1 and puts the total emissions in the topmost canopy-app model layer only; `2`: Same as in option 1, but instead uses Gaussian/normally weighted activity coefficients acoss all sub-canopy layers -- also units of kg m-2 s-1 in topmost model layer; `3`: Same as in option 1, but instead uses evenly weighted activity coefficients acoss all sub-canopy layers -- also units of kg m-2 s-1 in topmost model layer | -| `ssg_opt` | integer for using either input data (= `0`, default) or user set shrub/savanna/grass (SSG) vegetation type heights from namelist (= `1`). Currently, GEDI FCH input data only provides canopy heights for forests and not SSG. Warning: use of ssg_opt=1 will overide typically higher resolution input data (e.g., GEDI) forest canopy heights where the lower resolution vegtype data indicates SSG | -| `ssg_set` | user-set real value of constant SSG vegetation type heights (m) (only used if `ssg_opt=1`) | -| `crop_opt` | integer for using either input data (= `0`, default) or user set crop vegetation type heights from namelist (= `1`). Currently, GEDI FCH input data only provides canopy heights for forests and not crops. Warning: use of crop_opt=1 will overide typically higher resolution input data (e.g., GEDI) forest canopy heights where the lower resolution vegtype data indicates crops | -| `crop_set` | user-set real value of constant crop vegetation type heights (m) (only used if `crop_opt=1`) | | `co2_opt` | user-set options for applying a CO2 inhibition factor for biogenic isoprene-only emissions using either the [Possell & Hewitt (2011)](https://doi.org/10.1111/j.1365-2486.2010.02306.x) (= `0`, default) or [Wilkinson et al. (2009)](https://doi.org/10.1111/j.1365-2486.2008.01803.x) method (= `1`). Use of option = `1` (Possell & Hewitt 2011) is especially recommended for sub-ambient CO2 concentrations. To turn off co2 inhibition factor set `co2_opt=2` | | `co2_set` | user-set real value of atmospheric co2 concentration (ppmv) (only used if `co2_opt=0` or `co2_opt=1`) | | `leafage_opt` | user-set options for applying leaf-age response to biogenic VOC emissions based on [Guenther et al. 2006](https://doi.org/10.5194/acp-6-3181-2006) (default is off i.e., `leafage_opt=1`, the corresponding $\gamma$ is set to 1). If turned on (`leafage_opt=0`), leafage $\gamma$ is calculated and the lai_tstep option needs to be set to ensure correct interpolation in this leafage_opt calculation. | | `lai_tstep` | user-defined options for the number of seconds in the interval at which LAI (Leaf Area Index) data is provided to the model. For instance, if LAI data is given on a daily basis, lai_tstep would be set to the number of seconds in a day (86,400 seconds). If LAI data is provided monthly, then lai_tstep would represent the total number of seconds in that month (e.g., 2,592,000 seconds for a 30-day month). This parameter helps in determining the frequency of LAI input and is crucial for interpolating LAI values to the model's hourly timesteps when the model's timestep (time_intvl) is smaller than the LAI input interval. | -| `lai_thresh` | user-set real value of LAI threshold for contiguous canopy (m2/m2) | -| `frt_thresh` | user-set real value of forest fraction threshold for contiguous canopy | -| `fch_thresh` | user-set real value of canopy height threshold for contiguous canopy (m) | **\*\*** If `modres` >> `flameh` then some error in WAF calculation will be incurred. Suggestion is to use relative fine `modres` (at least <= 0.5 m) compared to average flame heights (e.g., ~ 1.0 m) if WAF is required. diff --git a/input/namelist.canopy b/input/namelist.canopy index f55277e3..eca3189f 100755 --- a/input/namelist.canopy +++ b/input/namelist.canopy @@ -12,46 +12,58 @@ / &USERDEFS +!Input model format options infmt_opt = 0 +!Input model grid sizes + nlat = 43 + nlon = 86 +!Input model run times and interval time_start = '2022-07-01-11:00:00.0000' time_end = '2022-07-01-13:00:00.0000' ntime = 3 time_intvl = 3600 - nlat = 43 - nlon = 86 +!Canopy model vertical layers modlays = 100 modres = 0.5 +!Contiguous canopy model thresholds + lai_thresh = 0.1 + frt_thresh = 0.1 + fch_thresh = 0.5 +!Canopy model vegetation/land use input dataset options + lu_opt = 1 +!Canopy crop and shrub/savanna/grass extension options + ssg_opt = 0 + ssg_set = 1.0 + crop_opt = 0 + crop_set = 3.0 +!Canopy physics and wind-specific options ifcanwind = .TRUE. - ifcanwaf = .TRUE. - ifcaneddy = .TRUE. - ifcanphot = .TRUE. - ifcanbio = .TRUE. href_opt = 0 href_set = 10.0 z0ghc = 0.0025 rsl_opt = 0 lambdars = 1.25 + pai_opt = 0 + pai_set = 4.0 + z0_opt = 0 +!Canopy fire/WAF-specific options + ifcanwaf = .TRUE. dx_opt = 0 dx_set = 12000.0 flameh_opt = 2 flameh_cal = 0 flameh_set = 1.0 frp_fac = 1.0 - pai_opt = 0 - pai_set = 4.0 - lu_opt = 1 - z0_opt = 0 +!Canopy eddy diffusivity-specific options + ifcaneddy = .TRUE. +!Canopy radiation/photolysis-specific options + ifcanphot = .TRUE. +!Canopy biogenic emissions-specific options + ifcanbio = .TRUE. bio_cce = 0.21 biovert_opt = 0 - ssg_opt = 0 - ssg_set = 1.0 - crop_opt = 0 - crop_set = 3.0 co2_opt = 0 co2_set = 400.0 lai_tstep = 86400 leafage_opt = 1 - lai_thresh = 0.1 - frt_thresh = 0.1 - fch_thresh = 0.5 / From 5a2671dd7a883fd2de0c3f443041f18d23d55a20 Mon Sep 17 00:00:00 2001 From: drnimbusrain Date: Tue, 7 Nov 2023 12:07:03 -0500 Subject: [PATCH 02/14] Updated README. --- README.md | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.md b/README.md index 9b5703f7..70bbfd43 100644 --- a/README.md +++ b/README.md @@ -187,31 +187,31 @@ You can also [generate global inputs using Python (see python/global_data_proces | Namelist Option | Namelist Description and Units | | --------------- | ---------------------------------------------------------------------------------- | -| Input model format options | +| Input model format options-------------------------------------------------------------------------- | | `infmt_opt` | integer for choosing 1D text (= `1`) or 2D NetCDF input file format (= `0`, default) | -| Input model grid sizes | +| Input model grid sizes------------------------------------------------------------------------------ | | `nlat` | number of latitude cells (must match # of LAT in `file_vars` above) | | `nlon` | number of longitude cells (must match # of LON in `file_vars` above) | -| Input model run times and interval | +| Input model run times and interval------------------------------------------------------------------ | | `time_start` | Start/initial time stamp in YYYY-MM-DD-HH:MM:SS.SSSS for simulation/observation inputs | | `time_end` | End time stamp in YYYY-MM-DD-HH:MM:SS.SSSS for simulation/observation inputs | | `ntime` | Number of time steps for simulation/observation inputs | | `time_intvl` | Integer time interval for simulation/observation input time steps in seconds (default = 3600) | -| Canopy model vertical layers | +| Canopy model vertical layers------------------------------------------------------------------------ | | `modlays` | number of model (below and above canopy) layers | | `modres` | above and below canopy model vertical resolution (m) | | Contiguous canopy model thresholds | | `lai_thresh` | user-set real value of LAI threshold for contiguous canopy (m2/m2) | | `frt_thresh` | user-set real value of forest fraction threshold for contiguous canopy | | `fch_thresh` | user-set real value of canopy height threshold for contiguous canopy (m) | -| Canopy model vegetation/land use input dataset options | +| Canopy model vegetation/land use input dataset options---------------------------------------------- | | `lu_opt` | integer for input model land use type (`0`: VIIRS 17 Cat (default) or `1`: MODIS-IGBP 20 Cat (valid LU types 1-10 and 12); input mapped to Massman et al.) | -| Canopy crop and shrub/savanna/grass extension options | +| Canopy crop and shrub/savanna/grass extension options---------------------------------------------- | | `ssg_opt` | integer for using either input data (= `0`, default) or user set shrub/savanna/grass (SSG) vegetation type heights from namelist (= `1`). Currently, GEDI FCH input data only provides canopy heights for forests and not SSG. Warning: use of ssg_opt=1 will overide typically higher resolution input data (e.g., GEDI) forest canopy heights where the lower resolution vegtype data indicates SSG | | `ssg_set` | user-set real value of constant SSG vegetation type heights (m) (only used if `ssg_opt=1`) | | `crop_opt` | integer for using either input data (= `0`, default) or user set crop vegetation type heights from namelist (= `1`). Currently, GEDI FCH input data only provides canopy heights for forests and not crops. Warning: use of crop_opt=1 will overide typically higher resolution input data (e.g., GEDI) forest canopy heights where the lower resolution vegtype data indicates crops | | `crop_set` | user-set real value of constant crop vegetation type heights (m) (only used if `crop_opt=1`) | -| Canopy physics and wind-specific options | +| Canopy physics and wind-specific options---------------------------------------------------------- | | `ifcanwind` | logical canopy wind option (default: `.FALSE.`) | | `href_opt` | integer for using `href_set` in namelist (= `0`, default) or array from file (= `1`) | | `href_set` | user-set real value of reference height above canopy associated with input wind speed (m) (only used if `href_opt=0`) **\*\*\*** | @@ -221,7 +221,7 @@ You can also [generate global inputs using Python (see python/global_data_proces | `pai_opt` | integer (`0`: PAI fixed from Katul et al. 2004 veg types-->default; `1`: PAI Massman et al. 2017 Eq. 19 calc; `2`: PAI from model LAI+WAI; `3`: user-set PAI value) | | `pai_set` | user-set real value of PAI (default: `4.0`; only used if `pai_opt=3`) | | `z0_opt` | integer (`0`: use model input or `1`: vegtype dependent z0 for first estimate) | -| Canopy fire/WAF-specific options | +| Canopy fire/WAF-specific options-------------------------------------------------------------------- | | `ifcanwaf` | logical canopy WAF option (default: `.FALSE.`) **\*\*** | | `dx_opt` | `0`: Calculation of dx resolution/distance from lon; `1`: user-set dx grid resolution | | `dx_set` | user-set real value of grid resolution (m) only if `dx_opt=1` | @@ -229,11 +229,11 @@ You can also [generate global inputs using Python (see python/global_data_proces | `flameh_cal` | `0`: Calculates the vegtype dependent flame height from FRP, based on Table 1 of Alexander and Cruz (2012) and assuming that flame height = flame length (overestimates flame height in high winds and/or slope conditions). `1`: Calculates the vegtype dependent flame height from FRP based on Table 2 and Equation 14 of Alexander and Cruz (2012). These relate flame height directly to crown scorch height, which is derived from FRP. This method assumes that the ambient temperature is in the experimental ranges from Table 3 of Alexander and Cruz (2012), and that the lethal temperature for burning foliage is 60.0 C. | | `flameh_set` | user-set real value of flame height (m) if `flameh_opt=1` or `2`, or `flameh` = fraction of canopy height (<=1.0), i.e., `flameh` override, if `flameh_opt=3`, `4`, or `5` | | `frp_fac` | user-set real value of tuning factor applied to FRP in calculation of flame height (default: 1.0). Used only if `flameh_opt=0`, `2`, `4`, or `5`. | -| Canopy eddy diffusivity-specific options | +| Canopy eddy diffusivity-specific options----------------------------------------------------------- | | `ifcaneddy` | logical canopy eddy Kz option (default: `.FALSE.`) | -| Canopy radiation/photolysis-specific options | +| Canopy radiation/photolysis-specific options------------------------------------------------------- | | `ifcanphot` | logical canopy photolysis option (default: `.FALSE.`) | -| Canopy biogenic emissions-specific options | +| Canopy biogenic emissions-specific options--------------------------------------------------------- | | `ifcanbio` | logical canopy biogenic emissions option (default: `.FALSE.`) | | `bio_cce` | user-set real value of MEGAN biogenic emissions "canopy environment coefficient" used to tune emissions to model inputs/calculations (default: `0.21`, based on Silva et al. 2020) | | `biovert_opt` | user set biogenic vertical summing option (`0`: no sum, full leaf-level biogenic emissions, units=kg/m3/s; `1`: MEGANv3-like summing of LAD weighted activity coefficients using the canopy-app plant distributions, caution-- units=kg m-2 s-1 and puts the total emissions in the topmost canopy-app model layer only; `2`: Same as in option 1, but instead uses Gaussian/normally weighted activity coefficients acoss all sub-canopy layers -- also units of kg m-2 s-1 in topmost model layer; `3`: Same as in option 1, but instead uses evenly weighted activity coefficients acoss all sub-canopy layers -- also units of kg m-2 s-1 in topmost model layer | From 78a2c2697d96c1b6621b419da632daa1d9600bf1 Mon Sep 17 00:00:00 2001 From: drnimbusrain Date: Tue, 7 Nov 2023 13:05:27 -0500 Subject: [PATCH 03/14] Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 70bbfd43..f5f66a60 100644 --- a/README.md +++ b/README.md @@ -187,7 +187,7 @@ You can also [generate global inputs using Python (see python/global_data_proces | Namelist Option | Namelist Description and Units | | --------------- | ---------------------------------------------------------------------------------- | -| Input model format options-------------------------------------------------------------------------- | +| Input model format options | | | `infmt_opt` | integer for choosing 1D text (= `1`) or 2D NetCDF input file format (= `0`, default) | | Input model grid sizes------------------------------------------------------------------------------ | | `nlat` | number of latitude cells (must match # of LAT in `file_vars` above) | From ad359eee105e50b635abe8f86d2396396cbc6c2c Mon Sep 17 00:00:00 2001 From: drnimbusrain Date: Tue, 7 Nov 2023 13:08:29 -0500 Subject: [PATCH 04/14] Update README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index f5f66a60..45ad84fc 100644 --- a/README.md +++ b/README.md @@ -187,7 +187,7 @@ You can also [generate global inputs using Python (see python/global_data_proces | Namelist Option | Namelist Description and Units | | --------------- | ---------------------------------------------------------------------------------- | -| Input model format options | | + | Input model format options || | `infmt_opt` | integer for choosing 1D text (= `1`) or 2D NetCDF input file format (= `0`, default) | | Input model grid sizes------------------------------------------------------------------------------ | | `nlat` | number of latitude cells (must match # of LAT in `file_vars` above) | From 5476d52f380635acc1ebbcc354abe8c9fc7a7294 Mon Sep 17 00:00:00 2001 From: drnimbusrain Date: Tue, 7 Nov 2023 13:09:28 -0500 Subject: [PATCH 05/14] Updated README --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 45ad84fc..7f3f8aca 100644 --- a/README.md +++ b/README.md @@ -187,7 +187,7 @@ You can also [generate global inputs using Python (see python/global_data_proces | Namelist Option | Namelist Description and Units | | --------------- | ---------------------------------------------------------------------------------- | - | Input model format options || +| Input model format options || | `infmt_opt` | integer for choosing 1D text (= `1`) or 2D NetCDF input file format (= `0`, default) | | Input model grid sizes------------------------------------------------------------------------------ | | `nlat` | number of latitude cells (must match # of LAT in `file_vars` above) | From 4ddb64e216f04283343edf5d90b02a55cb104e7f Mon Sep 17 00:00:00 2001 From: drnimbusrain Date: Tue, 7 Nov 2023 13:16:18 -0500 Subject: [PATCH 06/14] Updated README --- README.md | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 7f3f8aca..ddc894af 100644 --- a/README.md +++ b/README.md @@ -187,31 +187,31 @@ You can also [generate global inputs using Python (see python/global_data_proces | Namelist Option | Namelist Description and Units | | --------------- | ---------------------------------------------------------------------------------- | -| Input model format options || +| | **Input model format options** | | `infmt_opt` | integer for choosing 1D text (= `1`) or 2D NetCDF input file format (= `0`, default) | -| Input model grid sizes------------------------------------------------------------------------------ | +| | **Input model grid sizes** | | `nlat` | number of latitude cells (must match # of LAT in `file_vars` above) | | `nlon` | number of longitude cells (must match # of LON in `file_vars` above) | -| Input model run times and interval------------------------------------------------------------------ | +| | **Input model run times and interval** | | `time_start` | Start/initial time stamp in YYYY-MM-DD-HH:MM:SS.SSSS for simulation/observation inputs | | `time_end` | End time stamp in YYYY-MM-DD-HH:MM:SS.SSSS for simulation/observation inputs | | `ntime` | Number of time steps for simulation/observation inputs | | `time_intvl` | Integer time interval for simulation/observation input time steps in seconds (default = 3600) | -| Canopy model vertical layers------------------------------------------------------------------------ | +| | **Canopy model vertical layers** | | `modlays` | number of model (below and above canopy) layers | | `modres` | above and below canopy model vertical resolution (m) | -| Contiguous canopy model thresholds | +| | **Contiguous canopy model thresholds** | | `lai_thresh` | user-set real value of LAI threshold for contiguous canopy (m2/m2) | | `frt_thresh` | user-set real value of forest fraction threshold for contiguous canopy | | `fch_thresh` | user-set real value of canopy height threshold for contiguous canopy (m) | -| Canopy model vegetation/land use input dataset options---------------------------------------------- | +| | **Canopy model vegetation/land use input dataset options** | | `lu_opt` | integer for input model land use type (`0`: VIIRS 17 Cat (default) or `1`: MODIS-IGBP 20 Cat (valid LU types 1-10 and 12); input mapped to Massman et al.) | -| Canopy crop and shrub/savanna/grass extension options---------------------------------------------- | +| | **Canopy crop and shrub/savanna/grass extension options** | | `ssg_opt` | integer for using either input data (= `0`, default) or user set shrub/savanna/grass (SSG) vegetation type heights from namelist (= `1`). Currently, GEDI FCH input data only provides canopy heights for forests and not SSG. Warning: use of ssg_opt=1 will overide typically higher resolution input data (e.g., GEDI) forest canopy heights where the lower resolution vegtype data indicates SSG | | `ssg_set` | user-set real value of constant SSG vegetation type heights (m) (only used if `ssg_opt=1`) | | `crop_opt` | integer for using either input data (= `0`, default) or user set crop vegetation type heights from namelist (= `1`). Currently, GEDI FCH input data only provides canopy heights for forests and not crops. Warning: use of crop_opt=1 will overide typically higher resolution input data (e.g., GEDI) forest canopy heights where the lower resolution vegtype data indicates crops | | `crop_set` | user-set real value of constant crop vegetation type heights (m) (only used if `crop_opt=1`) | -| Canopy physics and wind-specific options---------------------------------------------------------- | +| | **Canopy physics and wind-specific options** | | `ifcanwind` | logical canopy wind option (default: `.FALSE.`) | | `href_opt` | integer for using `href_set` in namelist (= `0`, default) or array from file (= `1`) | | `href_set` | user-set real value of reference height above canopy associated with input wind speed (m) (only used if `href_opt=0`) **\*\*\*** | @@ -221,7 +221,7 @@ You can also [generate global inputs using Python (see python/global_data_proces | `pai_opt` | integer (`0`: PAI fixed from Katul et al. 2004 veg types-->default; `1`: PAI Massman et al. 2017 Eq. 19 calc; `2`: PAI from model LAI+WAI; `3`: user-set PAI value) | | `pai_set` | user-set real value of PAI (default: `4.0`; only used if `pai_opt=3`) | | `z0_opt` | integer (`0`: use model input or `1`: vegtype dependent z0 for first estimate) | -| Canopy fire/WAF-specific options-------------------------------------------------------------------- | +| | **Canopy fire/WAF-specific options** | | `ifcanwaf` | logical canopy WAF option (default: `.FALSE.`) **\*\*** | | `dx_opt` | `0`: Calculation of dx resolution/distance from lon; `1`: user-set dx grid resolution | | `dx_set` | user-set real value of grid resolution (m) only if `dx_opt=1` | @@ -229,11 +229,11 @@ You can also [generate global inputs using Python (see python/global_data_proces | `flameh_cal` | `0`: Calculates the vegtype dependent flame height from FRP, based on Table 1 of Alexander and Cruz (2012) and assuming that flame height = flame length (overestimates flame height in high winds and/or slope conditions). `1`: Calculates the vegtype dependent flame height from FRP based on Table 2 and Equation 14 of Alexander and Cruz (2012). These relate flame height directly to crown scorch height, which is derived from FRP. This method assumes that the ambient temperature is in the experimental ranges from Table 3 of Alexander and Cruz (2012), and that the lethal temperature for burning foliage is 60.0 C. | | `flameh_set` | user-set real value of flame height (m) if `flameh_opt=1` or `2`, or `flameh` = fraction of canopy height (<=1.0), i.e., `flameh` override, if `flameh_opt=3`, `4`, or `5` | | `frp_fac` | user-set real value of tuning factor applied to FRP in calculation of flame height (default: 1.0). Used only if `flameh_opt=0`, `2`, `4`, or `5`. | -| Canopy eddy diffusivity-specific options----------------------------------------------------------- | +| | **Canopy eddy diffusivity-specific options** | | `ifcaneddy` | logical canopy eddy Kz option (default: `.FALSE.`) | -| Canopy radiation/photolysis-specific options------------------------------------------------------- | +| | **Canopy radiation/photolysis-specific options** | | `ifcanphot` | logical canopy photolysis option (default: `.FALSE.`) | -| Canopy biogenic emissions-specific options--------------------------------------------------------- | +| | **Canopy biogenic emissions-specific options** | | `ifcanbio` | logical canopy biogenic emissions option (default: `.FALSE.`) | | `bio_cce` | user-set real value of MEGAN biogenic emissions "canopy environment coefficient" used to tune emissions to model inputs/calculations (default: `0.21`, based on Silva et al. 2020) | | `biovert_opt` | user set biogenic vertical summing option (`0`: no sum, full leaf-level biogenic emissions, units=kg/m3/s; `1`: MEGANv3-like summing of LAD weighted activity coefficients using the canopy-app plant distributions, caution-- units=kg m-2 s-1 and puts the total emissions in the topmost canopy-app model layer only; `2`: Same as in option 1, but instead uses Gaussian/normally weighted activity coefficients acoss all sub-canopy layers -- also units of kg m-2 s-1 in topmost model layer; `3`: Same as in option 1, but instead uses evenly weighted activity coefficients acoss all sub-canopy layers -- also units of kg m-2 s-1 in topmost model layer | From eb3b1a7bda1071de5f09666c929006da38aff3c7 Mon Sep 17 00:00:00 2001 From: drnimbusrain Date: Tue, 7 Nov 2023 13:35:33 -0500 Subject: [PATCH 07/14] Also added python/README and example slurm script for global. --- python/README.md | 28 ++++++++++++++++++++++++++++ run_canopy_slurm.sh | 14 ++++++++++++++ 2 files changed, 42 insertions(+) create mode 100644 run_canopy_slurm.sh diff --git a/python/README.md b/python/README.md index 469a0b8f..ba2e53fa 100644 --- a/python/README.md +++ b/python/README.md @@ -84,3 +84,31 @@ You can also download and generate global gridded canopy-app inputs using Python ``` python global_data_process.py ``` +### Running global data + +1. Edit namelist for correct number of lat/lon grid points(`namelist.canopy`) + + For example: + ``` + nlat = 1536 + nlon = 3072 + ``` + +2. Global inputs require a lot of memory, suggest not running on head node: + + Slurm batch script suggestion: + ``` + #!/bin/bash -l + #SBATCH --partition=bigmem # big memory node + #SBATCH --job-name=canopy-app # name the job + #SBATCH --output=canopy-%j.out # write stdout to named file + #SBATCH --error=canopy-%j.err # write stdout to named file + #SBATCH --time=0-04:00:00 # Run for max of 00 hrs, 10 mins, 00 secs + #SBATCH --nodes=1 # Request N nodes + #SBATCH --ntasks=1 # Request n tasks + #SBATCH --mem-per-cpu=1000GB # Request nGB RAM per core + + conda activate canopy-app + python python/global_data_process.py + srun canopy + ``` diff --git a/run_canopy_slurm.sh b/run_canopy_slurm.sh new file mode 100644 index 00000000..ed114af7 --- /dev/null +++ b/run_canopy_slurm.sh @@ -0,0 +1,14 @@ +#!/bin/bash -l +#SBATCH --partition=bigmem # big memory node +#SBATCH --job-name=canopy-app # name the job +#SBATCH --output=canopy-%j.out # write stdout to named file +#SBATCH --error=canopy-%j.err # write stdout to named file +#SBATCH --time=0-04:00:00 # Run for max of 00 hrs, 10 mins, 00 secs +#SBATCH --nodes=1 # Request N nodes +#SBATCH --exclude=hop006,hop010,hop011 # Exclude some nodes (optional) +#SBATCH --ntasks=1 # Request n tasks +#SBATCH --mem-per-cpu=1000GB # Request nGB RAM per core + +conda activate canopy-app +python python/global_data_process.py +srun canopy From cd974bfc6e8e785ddeb533394c29f6a631177831 Mon Sep 17 00:00:00 2001 From: drnimbusrain Date: Tue, 7 Nov 2023 20:56:05 -0500 Subject: [PATCH 08/14] Updated example slurm and python global for new updates. --- python/README.md | 2 +- run_canopy_slurm.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/python/README.md b/python/README.md index ba2e53fa..25fdcda0 100644 --- a/python/README.md +++ b/python/README.md @@ -109,6 +109,6 @@ You can also download and generate global gridded canopy-app inputs using Python #SBATCH --mem-per-cpu=1000GB # Request nGB RAM per core conda activate canopy-app - python python/global_data_process.py + python python/global_data_process.py 2020071512000,2020071612000,2020071712000 srun canopy ``` diff --git a/run_canopy_slurm.sh b/run_canopy_slurm.sh index ed114af7..96801d92 100644 --- a/run_canopy_slurm.sh +++ b/run_canopy_slurm.sh @@ -10,5 +10,5 @@ #SBATCH --mem-per-cpu=1000GB # Request nGB RAM per core conda activate canopy-app -python python/global_data_process.py +python python/global_data_process.py 2020071512000,2020071612000,2020071712000 srun canopy From 24475079b950d2cd83847df373612c2c94885ca7 Mon Sep 17 00:00:00 2001 From: Wei-Ting Hung <107704243+angehung5@users.noreply.github.com> Date: Wed, 8 Nov 2023 11:03:47 -0500 Subject: [PATCH 09/14] Update README.md change required cpu time and mem for global script --- python/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/python/README.md b/python/README.md index 25fdcda0..f7699397 100644 --- a/python/README.md +++ b/python/README.md @@ -96,17 +96,17 @@ You can also download and generate global gridded canopy-app inputs using Python 2. Global inputs require a lot of memory, suggest not running on head node: - Slurm batch script suggestion: + Slurm batch script suggestion (cpu time = ~20-30 min for processing a single time step): ``` #!/bin/bash -l #SBATCH --partition=bigmem # big memory node #SBATCH --job-name=canopy-app # name the job #SBATCH --output=canopy-%j.out # write stdout to named file #SBATCH --error=canopy-%j.err # write stdout to named file - #SBATCH --time=0-04:00:00 # Run for max of 00 hrs, 10 mins, 00 secs + #SBATCH --time=0-02:00:00 # Run for max of 00 hrs, 10 mins, 00 secs #SBATCH --nodes=1 # Request N nodes #SBATCH --ntasks=1 # Request n tasks - #SBATCH --mem-per-cpu=1000GB # Request nGB RAM per core + #SBATCH --mem-per-cpu=60GB # Request nGB RAM per core conda activate canopy-app python python/global_data_process.py 2020071512000,2020071612000,2020071712000 From 1cb46aabd2df8ec35e9528120574b3cfa3ed4606 Mon Sep 17 00:00:00 2001 From: Wei-Ting Hung <107704243+angehung5@users.noreply.github.com> Date: Wed, 8 Nov 2023 11:05:24 -0500 Subject: [PATCH 10/14] Update run_canopy_slurm.sh change required cpu time and mem --- run_canopy_slurm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run_canopy_slurm.sh b/run_canopy_slurm.sh index 96801d92..80569966 100644 --- a/run_canopy_slurm.sh +++ b/run_canopy_slurm.sh @@ -3,11 +3,11 @@ #SBATCH --job-name=canopy-app # name the job #SBATCH --output=canopy-%j.out # write stdout to named file #SBATCH --error=canopy-%j.err # write stdout to named file -#SBATCH --time=0-04:00:00 # Run for max of 00 hrs, 10 mins, 00 secs +#SBATCH --time=0-02:00:00 # Run for max of 00 hrs, 10 mins, 00 secs #SBATCH --nodes=1 # Request N nodes #SBATCH --exclude=hop006,hop010,hop011 # Exclude some nodes (optional) #SBATCH --ntasks=1 # Request n tasks -#SBATCH --mem-per-cpu=1000GB # Request nGB RAM per core +#SBATCH --mem-per-cpu=60GB # Request nGB RAM per core conda activate canopy-app python python/global_data_process.py 2020071512000,2020071612000,2020071712000 From b6a2543fb47fd96d90c535a2f6d41b99448caa08 Mon Sep 17 00:00:00 2001 From: Wei-Ting Hung <107704243+angehung5@users.noreply.github.com> Date: Wed, 8 Nov 2023 14:35:36 -0500 Subject: [PATCH 11/14] Update README.md --- python/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/README.md b/python/README.md index f7699397..9390a79f 100644 --- a/python/README.md +++ b/python/README.md @@ -103,10 +103,10 @@ You can also download and generate global gridded canopy-app inputs using Python #SBATCH --job-name=canopy-app # name the job #SBATCH --output=canopy-%j.out # write stdout to named file #SBATCH --error=canopy-%j.err # write stdout to named file - #SBATCH --time=0-02:00:00 # Run for max of 00 hrs, 10 mins, 00 secs + #SBATCH --time=0-01:30:00 # Run for max of 00 hrs, 10 mins, 00 secs #SBATCH --nodes=1 # Request N nodes #SBATCH --ntasks=1 # Request n tasks - #SBATCH --mem-per-cpu=60GB # Request nGB RAM per core + #SBATCH --mem-per-cpu=12GB # Request nGB RAM per core conda activate canopy-app python python/global_data_process.py 2020071512000,2020071612000,2020071712000 From 8686cb4f7a19bfc22a0e8f27e181c8f18cf69a21 Mon Sep 17 00:00:00 2001 From: Wei-Ting Hung <107704243+angehung5@users.noreply.github.com> Date: Wed, 8 Nov 2023 14:36:04 -0500 Subject: [PATCH 12/14] Update run_canopy_slurm.sh --- run_canopy_slurm.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run_canopy_slurm.sh b/run_canopy_slurm.sh index 80569966..24fd93ff 100644 --- a/run_canopy_slurm.sh +++ b/run_canopy_slurm.sh @@ -3,11 +3,11 @@ #SBATCH --job-name=canopy-app # name the job #SBATCH --output=canopy-%j.out # write stdout to named file #SBATCH --error=canopy-%j.err # write stdout to named file -#SBATCH --time=0-02:00:00 # Run for max of 00 hrs, 10 mins, 00 secs +#SBATCH --time=0-01:30:00 # Run for max of 00 hrs, 10 mins, 00 secs #SBATCH --nodes=1 # Request N nodes #SBATCH --exclude=hop006,hop010,hop011 # Exclude some nodes (optional) #SBATCH --ntasks=1 # Request n tasks -#SBATCH --mem-per-cpu=60GB # Request nGB RAM per core +#SBATCH --mem-per-cpu=12GB # Request nGB RAM per core conda activate canopy-app python python/global_data_process.py 2020071512000,2020071612000,2020071712000 From e7091dd7718f49259c7b5232db03c8e363a3fc0c Mon Sep 17 00:00:00 2001 From: drnimbusrain Date: Wed, 8 Nov 2023 15:11:01 -0500 Subject: [PATCH 13/14] Updated python/README to be specific to Example 1 global processing --- python/README.md | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/python/README.md b/python/README.md index 25fdcda0..55ca28d5 100644 --- a/python/README.md +++ b/python/README.md @@ -84,9 +84,9 @@ You can also download and generate global gridded canopy-app inputs using Python ``` python global_data_process.py ``` -### Running global data +### Running global data (following Example 1 above) -1. Edit namelist for correct number of lat/lon grid points(`namelist.canopy`) +1. Edit namelist (`namelist.canopy`) for correct number of global lat/lon grid points For example: ``` @@ -94,7 +94,25 @@ You can also download and generate global gridded canopy-app inputs using Python nlon = 3072 ``` -2. Global inputs require a lot of memory, suggest not running on head node: +2. Edit namelist (`namelist.canopy`) for correctly named global input files and output prefix + + For example: + ``` + file_vars = 'input/gfs.t12z.20220715.sfcf000.canopy.nc' 'input/gfs.t12z.20220716.sfcf000.canopy.nc' 'input/gfs.t12z.20220717.sfcf000.canopy.nc' + file_out = 'output/2022-07-15-12-0000_global' + ``` + +3. Edit namelist (`namelist.canopy`) for correct time start/end and interval + + For example: + ``` + time_start = '2022-07-15-12:00:00.0000' + time_end = '2022-07-17-12:00:00.0000' + ntime = 3 + time_intvl = 86400 !!!For daily time steps (i.e., 24*3600) + ``` + +4. Run canopy-app: Running canopy-app with global inputs require a lot of memory, so suggest not running on head node: Slurm batch script suggestion: ``` From d4801b947482967f76e6ae550aea5f5886210024 Mon Sep 17 00:00:00 2001 From: drnimbusrain Date: Wed, 8 Nov 2023 15:20:09 -0500 Subject: [PATCH 14/14] Updated python README --- python/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/README.md b/python/README.md index 4c7187f7..81b9fcf4 100644 --- a/python/README.md +++ b/python/README.md @@ -89,7 +89,7 @@ You can also download and generate global gridded canopy-app inputs using Python ``` python global_data_process.py 2020070112000,2020070112001,2020070112002,2020070112003,2020070112004 ``` -### Running global data (following Example 1 above) +### Running global data process and canopy-app with global data (following Example 1 above) 1. Edit namelist (`namelist.canopy`) for correct number of global lat/lon grid points @@ -117,7 +117,7 @@ You can also download and generate global gridded canopy-app inputs using Python time_intvl = 86400 !!!For daily time steps (i.e., 24*3600) ``` -4. Run canopy-app: Running canopy-app with global inputs require a lot of memory, so suggest not running on head node: +4. Run global process and canopy-app: Running canopy-app globally requires a lot of memory, so suggest not running on head node: Slurm batch script suggestion (cpu time = ~20-30 min for processing a single time step): ```