diff --git a/cime_config/testdefs/testmods_dirs/clm/crop/user_nl_clm b/cime_config/testdefs/testmods_dirs/clm/crop/user_nl_clm index 4679194e9f..67042ea01a 100644 --- a/cime_config/testdefs/testmods_dirs/clm/crop/user_nl_clm +++ b/cime_config/testdefs/testmods_dirs/clm/crop/user_nl_clm @@ -1,7 +1,7 @@ hist_fincl1 += 'GDD0', 'GDD8', 'GDD10', 'GDD020', 'GDD820', 'GDD1020', 'GDDACCUM', 'GDDTSOI', 'A5TMIN', 'A10TMIN', - 'HUI' + 'HUI', 'GRAINN_TO_FOOD' ! The main point of including this field is to test the SUM history field infrastructure ! This is in the crop testmods because this field is mainly useful in transient crop runs @@ -10,7 +10,7 @@ hist_fincl2 += 'DYN_COL_SOIL_ADJUSTMENTS_C' ! Annual crop variables on per-sowing/per-harvest axes, per PFT. -hist_fincl3 = 'SDATES', 'SDATES_PERHARV', 'SYEARS_PERHARV', 'HDATES', 'GRAINC_TO_FOOD_PERHARV', 'GRAINC_TO_FOOD_ANN', 'HDATES', 'GDDHARV_PERHARV', 'GDDACCUM_PERHARV', 'HUI_PERHARV', 'SOWING_REASON_PERHARV', 'HARVEST_REASON_PERHARV', 'SWINDOW_STARTS', 'SWINDOW_ENDS' +hist_fincl3 = 'SDATES', 'SDATES_PERHARV', 'SYEARS_PERHARV', 'HDATES', 'GRAINC_TO_FOOD_PERHARV', 'GRAINC_TO_FOOD_ANN', 'GRAINN_TO_FOOD_PERHARV', 'GRAINN_TO_FOOD_ANN', 'GRAINC_TO_SEED_PERHARV', 'GRAINC_TO_SEED_ANN', 'GRAINN_TO_SEED_PERHARV', 'GRAINN_TO_SEED_ANN', 'HDATES', 'GDDHARV_PERHARV', 'GDDACCUM_PERHARV', 'HUI_PERHARV', 'SOWING_REASON_PERHARV', 'HARVEST_REASON_PERHARV', 'SWINDOW_STARTS', 'SWINDOW_ENDS' hist_nhtfrq(3) = 17520 hist_mfilt(3) = 1 hist_type1d_pertape(3) = 'PFTS' diff --git a/doc/ChangeLog b/doc/ChangeLog index 76286ce770..b3f1644af7 100644 --- a/doc/ChangeLog +++ b/doc/ChangeLog @@ -1,4 +1,49 @@ =============================================================== +Tag name: ctsm5.1.dev148 +Originator(s): samrabin (Sam Rabin, UCAR/TSS, samrabin@ucar.edu) +Date: Fri Nov 3 07:56:43 MDT 2023 +One-line Summary: Add GRAINN outputs + +Purpose and description of changes +---------------------------------- + +In response to a user request for GRAINN_TO_FOOD outputs, this adds *_N_TO_FOOD(_ANN) and *_N_TO_SEED(_ANN) outputs for reproductive N pools. These are off by default, unlike their C counterparts. Note that the results are not scientifically supported, and tests have revealed unrealistic values. (Also adds GRAINC_TO_SEED_ANN output.) + + +Significant changes to scientifically-supported configurations +-------------------------------------------------------------- + +Does this tag change answers significantly for any of the following physics configurations? +(Details of any changes will be given in the "Answer changes" section below.) + +[ ] clm5_1 + +[ ] clm5_0 + +[ ] ctsm5_0-nwp + +[ ] clm4_5 + + +Testing summary: +---------------- + + [PASS means all tests PASS; OK means tests PASS other than expected fails.] + + regular tests (aux_clm: https://github.com/ESCOMP/CTSM/wiki/System-Testing-Guide#pre-merge-system-testing): + + cheyenne ---- OK (with some fieldlist diffs) + izumi ------- PASS (with some fieldlist diffs) + + +Other details +------------- + +Pull Requests that document the changes (include PR ids): +* #2074 (https://github.com/ESCOMP/CTSM/pull/2074) + +=============================================================== +=============================================================== Tag name: ctsm5.1.dev147 Originator(s): samrabin (Sam Rabin, UCAR/TSS, samrabin@ucar.edu) Date: Mon Oct 30 16:53:20 MDT 2023 diff --git a/doc/ChangeSum b/doc/ChangeSum index 5e4f816f64..40dc6a2b6a 100644 --- a/doc/ChangeSum +++ b/doc/ChangeSum @@ -1,5 +1,6 @@ Tag Who Date Summary ============================================================================================================================ + ctsm5.1.dev148 samrabin 11/03/2023 Add GRAINN outputs ctsm5.1.dev147 samrabin 10/30/2023 Add sowing window input files ctsm5.1.dev146 glemieux 10/24/2023 FATES cross-grid seed dispersal ctsm5.1.dev145 slevis 10/19/2023 SNICAR snow albedo scheme updates diff --git a/doc/source/users_guide/setting-up-and-running-a-case/history_fields_fates.rst b/doc/source/users_guide/setting-up-and-running-a-case/history_fields_fates.rst index ab5f28012a..ec10de5080 100644 --- a/doc/source/users_guide/setting-up-and-running-a-case/history_fields_fates.rst +++ b/doc/source/users_guide/setting-up-and-running-a-case/history_fields_fates.rst @@ -26,15 +26,6 @@ AnnET - Annual ET BCDEP - total BC deposition (dry+wet) from atmosphere kg/m^2/s T BTRAN - transpiration beta factor unitless T BTRANMN - daily minimum of transpiration beta factor unitless T -CH4PROD - Gridcell total production of CH4 gC/m2/s T -CH4_EBUL_TOTAL_SAT - ebullition surface CH4 flux; (+ to atm) mol/m2/s F -CH4_EBUL_TOTAL_UNSAT - ebullition surface CH4 flux; (+ to atm) mol/m2/s F -CH4_SURF_AERE_SAT - aerenchyma surface CH4 flux for inundated area; (+ to atm) mol/m2/s T -CH4_SURF_AERE_UNSAT - aerenchyma surface CH4 flux for non-inundated area; (+ to atm) mol/m2/s T -CH4_SURF_DIFF_SAT - diffusive surface CH4 flux for inundated / lake area; (+ to atm) mol/m2/s T -CH4_SURF_DIFF_UNSAT - diffusive surface CH4 flux for non-inundated area; (+ to atm) mol/m2/s T -CH4_SURF_EBUL_SAT - ebullition surface CH4 flux for inundated / lake area; (+ to atm) mol/m2/s T -CH4_SURF_EBUL_UNSAT - ebullition surface CH4 flux for non-inundated area; (+ to atm) mol/m2/s T COL_CTRUNC - column-level sink for C truncation gC/m^2 F COL_NTRUNC - column-level sink for N truncation gN/m^2 F COSZEN - cosine of solar zenith angle none F @@ -61,7 +52,6 @@ DWT_PROD10C_GAIN - landcover change-driven add DWT_PROD10N_GAIN - landcover change-driven addition to 10-yr wood product pool gN/m^2/s F DWT_WOODPRODC_GAIN - landcover change-driven addition to wood product pools gC/m^2/s T DWT_WOODPRODN_GAIN - landcover change-driven addition to wood product pools gN/m^2/s T -DYN_COL_ADJUSTMENTS_CH4 - Adjustments in ch4 due to dynamic column areas; only makes sense at the column level: should n gC/m^2 F DYN_COL_SOIL_ADJUSTMENTS_C - Adjustments in soil carbon due to dynamic column areas; only makes sense at the column level: gC/m^2 F DYN_COL_SOIL_ADJUSTMENTS_N - Adjustments in soil nitrogen due to dynamic column areas; only makes sense at the column level gN/m^2 F DYN_COL_SOIL_ADJUSTMENTS_NH4 - Adjustments in soil NH4 due to dynamic column areas; only makes sense at the column level: sho gN/m^2 F @@ -147,8 +137,8 @@ FATES_LEAF_ALLOC - allocation to leaves in kg FATES_LITTER_IN - litter flux in kg carbon per m2 per second kg m-2 s-1 T FATES_LITTER_OUT - litter flux out in kg carbon (exudation, fragmentation, seed decay) kg m-2 s-1 T FATES_LSTEMMAINTAR - live stem maintenance autotrophic respiration in kg carbon per m2 per second kg m-2 s-1 T -FATES_MAINT_RESP - maintenance respiration in kg carbon per m2 land area per second, secondary patches kg m-2 s-1 T -FATES_MAINT_RESP_SECONDARY - maintenance respiration in kg carbon per m2 land area per second kg m-2 s-1 T +FATES_MAINT_RESP - maintenance respiration in kg carbon per m2 land area per second kg m-2 s-1 T +FATES_MAINT_RESP_SECONDARY - maintenance respiration in kg carbon per m2 land area per second, secondary patches kg m-2 s-1 T FATES_MAINT_RESP_UNREDUCED - diagnostic maintenance respiration if the low-carbon-storage reduction is ignored kg m-2 s-1 F FATES_MORTALITY_CFLUX_CANOPY - flux of biomass carbon from live to dead pools from mortality of canopy plants in kg carbon pe kg m-2 s-1 T FATES_MORTALITY_CFLUX_USTORY - flux of biomass carbon from live to dead pools from mortality of understory plants in kg carbo kg m-2 s-1 T @@ -193,9 +183,6 @@ FATES_VEGC - total biomass in live plant FATES_VEGC_ABOVEGROUND - aboveground biomass in kg carbon per m2 land area kg m-2 T FATES_WOOD_PRODUCT - total wood product from logging in kg carbon per m2 land area kg m-2 T FCEV - canopy evaporation W/m^2 T -FCH4 - Gridcell surface CH4 flux to atmosphere (+ to atm) kgC/m2/s T -FCH4TOCO2 - Gridcell oxidation of CH4 to CO2 gC/m2/s T -FCH4_DFSAT - CH4 additional flux due to changing fsat, natural vegetated and crop landunits only kgC/m2/s T FCO2 - CO2 flux to atmosphere (+ to atm) kgCO2/m2/s F FCOV - fractional impermeable area unitless T FCTR - canopy transpiration W/m^2 T @@ -207,8 +194,6 @@ FGR_R - Rural heat flux into soil/s FGR_U - Urban heat flux into soil/snow including snow melt W/m^2 F FH2OSFC - fraction of ground covered by surface water unitless T FH2OSFC_NOSNOW - fraction of ground covered by surface water (if no snow present) unitless F -FINUNDATED - fractional inundated area of vegetated columns unitless T -FINUNDATED_LAG - time-lagged inundated fraction of vegetated columns unitless F FIRA - net infrared (longwave) radiation W/m^2 T FIRA_ICE - net infrared (longwave) radiation (ice landunits only) W/m^2 F FIRA_R - Rural net infrared (longwave) radiation W/m^2 T @@ -352,7 +337,6 @@ M_SOM_PAS_N_TO_LEACHING - passive soil organic N leac M_SOM_SLO_C_TO_LEACHING - slow soil organic ma C leaching loss gC/m^2/s F M_SOM_SLO_N_TO_LEACHING - slow soil organic ma N leaching loss gN/m^2/s F NDEP_TO_SMINN - atmospheric N deposition to soil mineral N gN/m^2/s T -NEM - Gridcell net adjustment to net carbon exchange passed to atm. for methane production gC/m2/s T NET_NMIN - net rate of N mineralization gN/m^2/s T NFIX_TO_SMINN - symbiotic/asymbiotic N fixation to soil mineral N gN/m^2/s T NSUBSTEPS - number of adaptive timesteps in CLM timestep unitless F @@ -360,7 +344,6 @@ OBU - Monin-Obukhov length OCDEP - total OC deposition (dry+wet) from atmosphere kg/m^2/s T PARVEGLN - absorbed par by vegetation at local noon W/m^2 T PBOT - atmospheric pressure at surface (downscaled to columns in glacier regions) Pa T -PCH4 - atmospheric partial pressure of CH4 Pa T PCO2 - atmospheric partial pressure of CO2 Pa T POTENTIAL_IMMOB - potential N immobilization gN/m^2/s T POT_F_DENIT - potential denitrification flux gN/m^2/s T @@ -413,7 +396,6 @@ QIRRIG_FROM_GW_UNCONFINED - water added through unconfi QIRRIG_FROM_SURFACE - water added through surface water irrigation mm/s T QIRRIG_SPRINKLER - water added via sprinkler irrigation mm/s F QOVER - total surface runoff (includes QH2OSFC) mm/s T -QOVER_LAG - time-lagged surface runoff for soil columns mm/s F QPHSNEG - net negative hydraulic redistribution flux mm/s F QRGWL - surface runoff at glaciers (liquid only), wetlands, lakes; also includes melted ice runoff fro mm/s T QRUNOFF - total liquid runoff not including correction for land use change mm/s T @@ -495,6 +477,7 @@ SNOFSRVD - direct vis reflected solar SNOFSRVI - diffuse vis reflected solar radiation from snow W/m^2 T SNOINTABS - Fraction of incoming solar absorbed by lower snow layers - T SNOLIQFL - top snow layer liquid water fraction (land) fraction F +SNOMELT_ACCUM - accumulated snow melt for z0 m T SNOOCMCL - mass of OC in snow column kg/m2 T SNOOCMSL - mass of OC in top snow layer kg/m2 T SNORDSL - top snow layer effective grain radius m^-6 F @@ -578,7 +561,6 @@ TLAI - total projected leaf area i TOPO_COL - column-level topographic height m F TOPO_COL_ICE - column-level topographic height (ice landunits only) m F TOTCOLC - total column carbon, incl veg and cpool but excl product pools gC/m^2 T -TOTCOLCH4 - total belowground CH4 (0 for non-lake special landunits in the absence of dynamic landunits) gC/m2 T TOTCOLN - total column-level N, excluding product pools gN/m^2 T TOTECOSYSC - total ecosystem carbon, incl veg but excl cpool and product pools gC/m^2 T TOTECOSYSN - total ecosystem N, excluding product pools gN/m^2 T @@ -641,7 +623,6 @@ WBT - 2 m Stull Wet Bulb WBT_R - Rural 2 m Stull Wet Bulb C T WBT_U - Urban 2 m Stull Wet Bulb C T WIND - atmospheric wind velocity magnitude m/s T -WTGQ - surface tracer conductance m/s T Wind - atmospheric wind velocity magnitude m/s F Z0HG - roughness length over ground, sensible heat (vegetated landunits only) m F Z0MG - roughness length over ground, momentum (vegetated landunits only) m F @@ -652,7 +633,6 @@ ZBOT - atmospheric reference heigh ZETA - dimensionless stability parameter unitless F ZII - convective boundary height m F ZWT - water table depth (natural vegetated and crop landunits only) m T -ZWT_CH4_UNSAT - depth of water table for methane production used in non-inundated area m T ZWT_PERCH - perched water table depth (natural vegetated and crop landunits only) m T num_iter - number of iterations unitless F QICE_FORC elevclas qice forcing sent to GLC mm/s F @@ -757,8 +737,10 @@ FATES_MORTALITY_PF fates_levpft PFT-level mortality rate in FATES_NPLANT_PF fates_levpft total PFT-level number of individuals per m2 land area m-2 T FATES_NPLANT_SEC_PF fates_levpft total PFT-level number of individuals per m2 land area, secondary patches m-2 T FATES_NPP_PF fates_levpft total PFT-level NPP in kg carbon per m2 land area per second kg m-2 s-1 T -FATES_NPP_SE_PF fates_levpft total PFT-level NPP in kg carbon per m2 land area per second, secondary patches kg m-2 yr-1 T +FATES_NPP_SE_PF fates_levpft total PFT-level NPP in kg carbon per m2 land area per second, secondary patches kg m-2 s-1 T FATES_RECRUITMENT_PF fates_levpft PFT-level recruitment rate in number of individuals per m2 land area per year m-2 yr-1 T +FATES_SEEDS_IN_GRIDCELL_PF fates_levpft Site-level seed mass input from neighboring gridcells per pft kg F +FATES_SEEDS_OUT_GRIDCELL_PF fates_levpft Site-level seed mass output to neighboring gridcells per pft kg F FATES_STOREC_PF fates_levpft total PFT-level stored biomass in kg carbon per m2 land area kg m-2 T FATES_VEGC_PF fates_levpft total PFT-level biomass in kg of carbon per land area kg m-2 T FATES_VEGC_SE_PF fates_levpft total PFT-level biomass in kg of carbon per land area, secondary patches kg m-2 T @@ -1026,11 +1008,8 @@ ratio_k1 levdcmp ratio_k1 ratio_no3_co2 levdcmp ratio_no3_co2 ratio F soil_bulkdensity levdcmp soil_bulkdensity kg/m3 F soil_co2_prod levdcmp soil_co2_prod ug C / g soil / day F -CONC_CH4_SAT levgrnd CH4 soil Concentration for inundated / lake area mol/m3 F -CONC_CH4_UNSAT levgrnd CH4 soil Concentration for non-inundated area mol/m3 F FGR_SOIL_R levgrnd Rural downward heat flux at interface below each soil layer watt/m^2 F HK levgrnd hydraulic conductivity (natural vegetated and crop landunits only) mm/s F -O2_DECOMP_DEPTH_UNSAT levgrnd O2 consumption from HR and AR for non-inundated area mol/m3/s F SMP levgrnd soil matric potential (natural vegetated and crop landunits only) mm T SOILPSI levgrnd soil water potential in each soil layer MPa F TSOI levgrnd soil temperature (natural vegetated and crop landunits only) K T @@ -1056,8 +1035,6 @@ SNO_TK_ICE levsno Thermal conductivity (ice l SNO_T_ICE levsno Snow temperatures (ice landunits only) K F SNO_Z levsno Snow layer thicknesses m F SNO_Z_ICE levsno Snow layer thicknesses (ice landunits only) m F -CONC_O2_SAT levsoi O2 soil Concentration for inundated / lake area mol/m3 T -CONC_O2_UNSAT levsoi O2 soil Concentration for non-inundated area mol/m3 T FATES_FRAGMENTATION_SCALER_SL levsoi factor (0-1) by which litter/cwd fragmentation proceeds relative to max rate by soil layer T FATES_FROOTC_SL levsoi Total carbon in live plant fine-roots over depth kg m-3 T H2OSOI levsoi volumetric soil water (natural vegetated and crop landunits only) mm3/mm3 T diff --git a/doc/source/users_guide/setting-up-and-running-a-case/history_fields_nofates.rst b/doc/source/users_guide/setting-up-and-running-a-case/history_fields_nofates.rst index 8e914d8a70..b1ff4d70bd 100644 --- a/doc/source/users_guide/setting-up-and-running-a-case/history_fields_nofates.rst +++ b/doc/source/users_guide/setting-up-and-running-a-case/history_fields_nofates.rst @@ -4,9 +4,9 @@ CTSM History Fields (nofates) CAUTION: Not all variables are relevant / present for all CTSM cases. Key flags used in this CTSM case: -use_cn = T -use_crop = T -use_fates = F +use_cn = T +use_crop = T +use_fates = F =================================== ================ ============================================================================================== ================================================================= ======= CTSM History Fields @@ -28,6 +28,9 @@ ANNMAX_RETRANSN - annual max of retranslocate ANNSUM_COUNTER - seconds since last annual accumulator turnover s F ANNSUM_NPP - annual sum of NPP gC/m^2/yr F ANNSUM_POTENTIAL_GPP - annual sum of potential GPP gN/m^2/yr F +APPAR_TEMP - 2 m apparent temperature C T +APPAR_TEMP_R - Rural 2 m apparent temperature C T +APPAR_TEMP_U - Urban 2 m apparent temperature C T AR - autotrophic respiration (MR + GR) gC/m^2/s T ATM_O3 - atmospheric ozone partial pressure mol/mol F ATM_TOPO - atmospheric surface height m T @@ -137,6 +140,12 @@ DEADSTEMN_XFER - dead stem N transfer DEADSTEMN_XFER_TO_DEADSTEMN - dead stem N growth from storage gN/m^2/s F DENIT - total rate of denitrification gN/m^2/s T DGNETDT - derivative of net ground heat flux wrt soil temp W/m^2/K F +DISCOI - 2 m Discomfort Index C T +DISCOIS - 2 m Stull Discomfort Index C T +DISCOIS_R - Rural 2 m Stull Discomfort Index C T +DISCOIS_U - Urban 2 m Stull Discomfort Index C T +DISCOI_R - Rural 2 m Discomfort Index C T +DISCOI_U - Urban 2 m Discomfort Index C T DISPLA - displacement height (vegetated landunits only) m F DISPVEGC - displayed veg carbon, excluding storage and cpool gC/m^2 T DISPVEGN - displayed vegetation nitrogen gN/m^2 T @@ -193,6 +202,9 @@ ELAI - exposed one-sided leaf area EMG - ground emissivity proportion F EMV - vegetation emissivity proportion F EOPT - Eopt coefficient for VOC calc non F +EPT - 2 m Equiv Pot Temp K T +EPT_R - Rural 2 m Equiv Pot Temp K T +EPT_U - Urban 2 m Equiv Pot Temp K T ER - total ecosystem respiration, autotrophic + heterotrophic gC/m^2/s T ERRH2O - total water conservation error mm T ERRH2OSNO - imbalance in snow depth (liquid water) mm T @@ -296,6 +308,13 @@ FSR - reflected solar radiation FSRND - direct nir reflected solar radiation W/m^2 T FSRNDLN - direct nir reflected solar radiation at local noon W/m^2 T FSRNI - diffuse nir reflected solar radiation W/m^2 T +FSRSF - reflected solar radiation W/m^2 T +FSRSFND - direct nir reflected solar radiation W/m^2 T +FSRSFNDLN - direct nir reflected solar radiation at local noon W/m^2 T +FSRSFNI - diffuse nir reflected solar radiation W/m^2 T +FSRSFVD - direct vis reflected solar radiation W/m^2 T +FSRSFVDLN - direct vis reflected solar radiation at local noon W/m^2 T +FSRSFVI - diffuse vis reflected solar radiation W/m^2 T FSRVD - direct vis reflected solar radiation W/m^2 T FSRVDLN - direct vis reflected solar radiation at local noon W/m^2 T FSRVI - diffuse vis reflected solar radiation W/m^2 T @@ -310,6 +329,14 @@ F_DENIT - denitrification flux F_N2O_DENIT - denitrification N2O flux gN/m^2/s T F_N2O_NIT - nitrification N2O flux gN/m^2/s T F_NIT - nitrification flux gN/m^2/s T +FireComp_BC - fire emissions flux of BC kg/m2/sec F +FireComp_OC - fire emissions flux of OC kg/m2/sec F +FireComp_SO2 - fire emissions flux of SO2 kg/m2/sec F +FireEmis_TOT - Total fire emissions flux gC/m2/sec F +FireEmis_ZTOP - Top of vertical fire emissions distribution m F +FireMech_SO2 - fire emissions flux of SO2 kg/m2/sec F +FireMech_bc_a1 - fire emissions flux of bc_a1 kg/m2/sec F +FireMech_pom_a1 - fire emissions flux of pom_a1 kg/m2/sec F GAMMA - total gamma for VOC calc non F GAMMAA - gamma A for VOC calc non F GAMMAC - gamma C for VOC calc non F @@ -332,7 +359,12 @@ GRAINC - grain C (does not equal yie GRAINC_TO_FOOD - grain C to food gC/m^2/s T GRAINC_TO_FOOD_ANN - grain C to food harvested per calendar year; should only be output annually gC/m^2 F GRAINC_TO_SEED - grain C to seed gC/m^2/s T +GRAINC_TO_SEED_ANN - grain C to seed harvested per calendar year; should only be output annually gC/m^2 F GRAINN - grain N gN/m^2 T +GRAINN_TO_FOOD - grain N to food (not scientifically supported) gN/m^2/s F +GRAINN_TO_FOOD_ANN - grain N to food harvested per calendar year; should only be output annually (not scientificall gN/m^2 F +GRAINN_TO_SEED - grain N to seed (not scientifically supported) gN/m^2/s F +GRAINN_TO_SEED_ANN - grain N to seed harvested per calendar year; should only be output annually (not scientificall gN/m^2 F GRESP_STORAGE - growth respiration storage gC/m^2 F GRESP_STORAGE_TO_XFER - growth respiration shift storage to transfer gC/m^2/s F GRESP_XFER - growth respiration transfer gC/m^2 F @@ -373,6 +405,7 @@ INT_SNOW_ICE - accumulated swe (ice landun IWUELN - local noon intrinsic water use efficiency umolCO2/molH2O T JMX25T - canopy profile of jmax umol/m2/s T Jmx25Z - maximum rate of electron transport at 25 Celcius for canopy layers umol electrons/m2/s T +KBM1 - natural logarithm of Z0MG_P/Z0HG_P unitless F LAI240 - 240hr average of leaf area index m^2/m^2 F LAISHA - shaded projected leaf area index m^2/m^2 T LAISUN - sunlit projected leaf area index m^2/m^2 T @@ -854,6 +887,7 @@ SNOFSRVD - direct vis reflected solar SNOFSRVI - diffuse vis reflected solar radiation from snow W/m^2 T SNOINTABS - Fraction of incoming solar absorbed by lower snow layers - T SNOLIQFL - top snow layer liquid water fraction (land) fraction F +SNOMELT_ACCUM - accumulated snow melt for z0 m T SNOOCMCL - mass of OC in snow column kg/m2 T SNOOCMSL - mass of OC in top snow layer kg/m2 T SNORDSL - top snow layer effective grain radius m^-6 F @@ -913,6 +947,13 @@ SOM_SLO_N_1m - SOM_SLO N to 1 meter SOM_SLO_N_TO_SOM_ACT_N - decomp. of slow soil organic ma N to active soil organic N gN/m^2 F SOM_SLO_N_TO_SOM_PAS_N - decomp. of slow soil organic ma N to passive soil organic N gN/m^2 F SR - total soil respiration (HR + root resp) gC/m^2/s T +SSRE_FSR - surface snow effect on reflected solar radiation W/m^2 T +SSRE_FSRND - surface snow effect on direct nir reflected solar radiation W/m^2 T +SSRE_FSRNDLN - surface snow effect on direct nir reflected solar radiation at local noon W/m^2 T +SSRE_FSRNI - surface snow effect on diffuse nir reflected solar radiation W/m^2 T +SSRE_FSRVD - surface snow radiatve effect on direct vis reflected solar radiation W/m^2 T +SSRE_FSRVDLN - surface snow radiatve effect on direct vis reflected solar radiation at local noon W/m^2 T +SSRE_FSRVI - surface snow radiatve effect on diffuse vis reflected solar radiation W/m^2 T STORAGE_CDEMAND - C use from the C storage pool gC/m^2 F STORAGE_GR - growth resp for growth sent to storage for later display gC/m^2/s F STORAGE_NDEMAND - N demand during the offset period gN/m^2 F @@ -922,6 +963,12 @@ SUPPLEMENT_TO_SMINN - supplemental N supply SWBGT - 2 m Simplified Wetbulb Globe Temp C T SWBGT_R - Rural 2 m Simplified Wetbulb Globe Temp C T SWBGT_U - Urban 2 m Simplified Wetbulb Globe Temp C T +SWMP65 - 2 m Swamp Cooler Temp 65% Eff C T +SWMP65_R - Rural 2 m Swamp Cooler Temp 65% Eff C T +SWMP65_U - Urban 2 m Swamp Cooler Temp 65% Eff C T +SWMP80 - 2 m Swamp Cooler Temp 80% Eff C T +SWMP80_R - Rural 2 m Swamp Cooler Temp 80% Eff C T +SWMP80_U - Urban 2 m Swamp Cooler Temp 80% Eff C T SWdown - atmospheric incident solar radiation W/m^2 F SWup - upwelling shortwave radiation W/m^2 F SoilAlpha - factor limiting ground evap unitless F @@ -936,6 +983,9 @@ TBUILD_MAX - prescribed maximum interior TEMPAVG_T2M - temporary average 2m air temperature K F TEMPMAX_RETRANSN - temporary annual max of retranslocated N pool gN/m^2 F TEMPSUM_POTENTIAL_GPP - temporary annual sum of potential GPP gC/m^2/yr F +TEQ - 2 m Equiv Temp K T +TEQ_R - Rural 2 m Equiv Temp K T +TEQ_U - Urban 2 m Equiv Temp K T TFLOOR - floor temperature K F TG - ground temperature K T TG_ICE - ground temperature (ice landunits only) K F @@ -943,6 +993,12 @@ TG_R - Rural ground temperature TG_U - Urban ground temperature K F TH2OSFC - surface water temperature K T THBOT - atmospheric air potential temperature (downscaled to columns in glacier regions) K T +THIC - 2 m Temp Hum Index Comfort C T +THIC_R - Rural 2 m Temp Hum Index Comfort C T +THIC_U - Urban 2 m Temp Hum Index Comfort C T +THIP - 2 m Temp Hum Index Physiology C T +THIP_R - Rural 2 m Temp Hum Index Physiology C T +THIP_U - Urban 2 m Temp Hum Index Physiology C T TKE1 - top lake level eddy thermal conductivity W/(mK) T TLAI - total projected leaf area index m^2/m^2 T TOPO_COL - column-level topographic height m F @@ -1027,6 +1083,9 @@ VPD2M - 2m vapor pressure deficit VPD_CAN - canopy vapor pressure deficit kPa T Vcmx25Z - canopy profile of vcmax25 predicted by LUNA model umol/m2/s T WASTEHEAT - sensible heat flux from heating/cooling sources of urban waste heat W/m^2 T +WBA - 2 m Wet Bulb C T +WBA_R - Rural 2 m Wet Bulb C T +WBA_U - Urban 2 m Wet Bulb C T WBT - 2 m Stull Wet Bulb C T WBT_R - Rural 2 m Stull Wet Bulb C T WBT_U - Urban 2 m Stull Wet Bulb C T @@ -1043,12 +1102,15 @@ XSMRPOOL - temporary photosynthate C p XSMRPOOL_LOSS - temporary photosynthate C pool loss gC/m^2 F XSMRPOOL_RECOVER - C flux assigned to recovery of negative xsmrpool gC/m^2/s T Z0HG - roughness length over ground, sensible heat (vegetated landunits only) m F +Z0HG_P - patch roughness length over ground, sensible heat m F Z0HV - roughness length over vegetation, sensible heat m F Z0MG - roughness length over ground, momentum (vegetated landunits only) m F +Z0MG_P - patch roughness length over ground, momentum m F Z0MV - roughness length over vegetation, momentum m F Z0MV_DENSE - roughness length over vegetation, momentum, for dense canopy m F Z0M_TO_COUPLER - roughness length, momentum: gridcell average sent to coupler m F Z0QG - roughness length over ground, latent heat (vegetated landunits only) m F +Z0QG_P - patch roughness length over ground, latent heat m F Z0QV - roughness length over vegetation, latent heat m F ZBOT - atmospheric reference height m T ZETA - dimensionless stability parameter unitless F @@ -1270,6 +1332,9 @@ W_SCALAR levsoi Moisture (dryness) inhibiti GDDACCUM_PERHARV mxharvests At-harvest accumulated growing degree days past planting date for crop; should only be output ddays F GDDHARV_PERHARV mxharvests Growing degree days (gdd) needed to harvest; should only be output annually ddays F GRAINC_TO_FOOD_PERHARV mxharvests grain C to food per harvest; should only be output annually gC/m^2 F +GRAINC_TO_SEED_PERHARV mxharvests grain C to seed per harvest; should only be output annually gC/m^2 F +GRAINN_TO_FOOD_PERHARV mxharvests grain N to food per harvest; should only be output annually (not scientifically supported) gN/m^2 F +GRAINN_TO_SEED_PERHARV mxharvests grain N to seed per harvest; should only be output annually (not scientifically supported) gN/m^2 F HARVEST_REASON_PERHARV mxharvests Reason for each crop harvest; should only be output annually 1 = mature; 2 = max season length; 3 = incorrect Dec. 31 sowing; F HDATES mxharvests actual crop harvest dates; should only be output annually day of year F HUI_PERHARV mxharvests At-harvest accumulated heat unit index for crop; should only be output annually ddays F @@ -1278,11 +1343,15 @@ SOWING_REASON_PERHARV mxharvests Reason for sowing of each c SYEARS_PERHARV mxharvests actual sowing years for crops harvested this year; should only be output annually year F SDATES mxsowings actual crop sowing dates; should only be output annually day of year F SOWING_REASON mxsowings Reason for each crop sowing; should only be output annually unitless F -ALBD numrad surface albedo (direct) proportion F +SWINDOW_ENDS mxsowings crop sowing window end dates; should only be output annually day of year F +SWINDOW_STARTS mxsowings crop sowing window start dates; should only be output annually day of year F +ALBD numrad surface albedo (direct) proportion T +ALBDSF numrad diagnostic snow-free surface albedo (direct) proportion T ALBGRD numrad ground albedo (direct) proportion F ALBGRI numrad ground albedo (indirect) proportion F -ALBI numrad surface albedo (indirect) proportion F +ALBI numrad surface albedo (indirect) proportion T +ALBISF numrad diagnostic snow-free surface albedo (indirect) proportion T VEGWP nvegwcs vegetation water matric potential for sun/sha canopy,xyl,root segments mm T VEGWPLN nvegwcs vegetation water matric potential for sun/sha canopy,xyl,root at local noon mm T VEGWPPD nvegwcs predawn vegetation water matric potential for sun/sha canopy,xyl,root mm T -=================================== ================ ============================================================================================== ================================================================= ======= +=================================== ================ ============================================================================================== ================================================================= ======= diff --git a/src/biogeochem/CNPhenologyMod.F90 b/src/biogeochem/CNPhenologyMod.F90 index 5a3f02a1ee..997095a1df 100644 --- a/src/biogeochem/CNPhenologyMod.F90 +++ b/src/biogeochem/CNPhenologyMod.F90 @@ -2022,10 +2022,16 @@ subroutine CropPhenology(num_pcropp, filter_pcropp , & crop_inst%harvest_reason_thisyr_patch(p,s) = -1._r8 do k = repr_grain_min, repr_grain_max cnveg_carbonflux_inst%repr_grainc_to_food_perharv_patch(p,s,k) = 0._r8 + cnveg_carbonflux_inst%repr_grainc_to_seed_perharv_patch(p,s,k) = 0._r8 + cnveg_nitrogenflux_inst%repr_grainn_to_food_perharv_patch(p,s,k) = 0._r8 + cnveg_nitrogenflux_inst%repr_grainn_to_seed_perharv_patch(p,s,k) = 0._r8 end do end do do k = repr_grain_min, repr_grain_max cnveg_carbonflux_inst%repr_grainc_to_food_thisyr_patch(p,k) = 0._r8 + cnveg_carbonflux_inst%repr_grainc_to_seed_thisyr_patch(p,k) = 0._r8 + cnveg_nitrogenflux_inst%repr_grainn_to_food_thisyr_patch(p,k) = 0._r8 + cnveg_nitrogenflux_inst%repr_grainn_to_seed_thisyr_patch(p,k) = 0._r8 end do end if @@ -3081,6 +3087,7 @@ subroutine CNOffsetLitterfall (num_soilp, filter_soilp, & real(r8) :: cropseedc_deficit_to_restore ! amount of crop seed C deficit that will be restored from this grain pool (gC/m2) real(r8) :: cropseedn_deficit_to_restore ! amount of crop seed N deficit that will be restored from this grain pool (gN/m2) real(r8) :: repr_grainc_to_food_thispool ! amount added to / subtracted from repr_grainc_to_food for the pool in question (gC/m2/s) + real(r8) :: repr_grainn_to_food_thispool ! amount added to / subtracted from repr_grainn_to_food for the pool in question (gN/m2/s) !----------------------------------------------------------------------- associate( & @@ -3121,6 +3128,8 @@ subroutine CNOffsetLitterfall (num_soilp, filter_soilp, & repr_grainc_to_food_perharv => cnveg_carbonflux_inst%repr_grainc_to_food_perharv_patch, & ! Output: [real(r8) (:,:,:) ] grain C to food per harvest (gC/m2) repr_grainc_to_food_thisyr => cnveg_carbonflux_inst%repr_grainc_to_food_thisyr_patch, & ! Output: [real(r8) (:,:) ] grain C to food harvested this calendar year (gC/m2) repr_grainc_to_seed => cnveg_carbonflux_inst%repr_grainc_to_seed_patch , & ! Output: [real(r8) (:,:) ] grain C to seed (gC/m2/s) + repr_grainc_to_seed_perharv => cnveg_carbonflux_inst%repr_grainc_to_seed_perharv_patch, & ! Output: [real(r8) (:,:,:) ] grain C to seed per harvest (gC/m2) + repr_grainc_to_seed_thisyr => cnveg_carbonflux_inst%repr_grainc_to_seed_thisyr_patch, & ! Output: [real(r8) (:,:) ] grain C to seed harvested this calendar year (gC/m2) repr_structurec_to_cropprod => cnveg_carbonflux_inst%repr_structurec_to_cropprod_patch, & ! Output: [real(r8) (:,:) ] reproductive structure C to crop product pool (gC/m2/s) repr_structurec_to_litter => cnveg_carbonflux_inst%repr_structurec_to_litter_patch, & ! Output: [real(r8) (:,:) ] reproductive structure C to litter (gC/m2/s) leafc_to_biofuelc => cnveg_carbonflux_inst%leafc_to_biofuelc_patch , & ! Output: [real(r8) (:) ] leaf C to biofuel C (gC/m2/s) @@ -3130,7 +3139,11 @@ subroutine CNOffsetLitterfall (num_soilp, filter_soilp, & livestemn_to_litter => cnveg_nitrogenflux_inst%livestemn_to_litter_patch , & ! Output: [real(r8) (:) ] livestem N to litter (gN/m2/s) repr_grainn_to_food => cnveg_nitrogenflux_inst%repr_grainn_to_food_patch , & ! Output: [real(r8) (:,:) ] grain N to food (gN/m2/s) + repr_grainn_to_food_perharv => cnveg_nitrogenflux_inst%repr_grainn_to_food_perharv_patch, & ! Output: [real(r8) (:,:,:) ] grain N to food per harvest (gN/m2) + repr_grainn_to_food_thisyr => cnveg_nitrogenflux_inst%repr_grainn_to_food_thisyr_patch, & ! Output: [real(r8) (:,:) ] grain N to food harvested this calendar year (gN/m2) repr_grainn_to_seed => cnveg_nitrogenflux_inst%repr_grainn_to_seed_patch , & ! Output: [real(r8) (:,:) ] grain N to seed (gN/m2/s) + repr_grainn_to_seed_perharv => cnveg_nitrogenflux_inst%repr_grainn_to_seed_perharv_patch, & ! Output: [real(r8) (:,:,:) ] grain N to seed per harvest (gN/m2) + repr_grainn_to_seed_thisyr => cnveg_nitrogenflux_inst%repr_grainn_to_seed_thisyr_patch, & ! Output: [real(r8) (:,:) ] grain N to seed harvested this calendar year (gN/m2) repr_structuren_to_cropprod => cnveg_nitrogenflux_inst%repr_structuren_to_cropprod_patch, & ! Output: [real(r8) (:,:) ] reproductive structure N to crop product pool (gN/m2/s) repr_structuren_to_litter => cnveg_nitrogenflux_inst%repr_structuren_to_litter_patch, & ! Output: [real(r8) (:,:) ] reproductive structure N to litter (gN/m2/s) leafn_to_biofueln => cnveg_nitrogenflux_inst%leafn_to_biofueln_patch , & ! Output: [real(r8) (:) ] leaf N to biofuel N (gN/m2/s) @@ -3192,10 +3205,19 @@ subroutine CNOffsetLitterfall (num_soilp, filter_soilp, & cropseedc_deficit_to_restore = min(cropseedc_deficit_remaining, reproductivec(p,k)) cropseedc_deficit_remaining = cropseedc_deficit_remaining - cropseedc_deficit_to_restore repr_grainc_to_seed(p,k) = t1 * cropseedc_deficit_to_restore - + if (cropseedc_deficit_to_restore > 0._r8) then + repr_grainc_to_seed_perharv(p,h,k) = cropseedc_deficit_to_restore + repr_grainc_to_seed_thisyr(p,k) = repr_grainc_to_seed_thisyr(p,k) & + + repr_grainc_to_seed_perharv(p,h,k) + end if cropseedn_deficit_to_restore = min(cropseedn_deficit_remaining, reproductiven(p,k)) cropseedn_deficit_remaining = cropseedn_deficit_remaining - cropseedn_deficit_to_restore repr_grainn_to_seed(p,k) = t1 * cropseedn_deficit_to_restore + if (cropseedn_deficit_to_restore > 0._r8) then + repr_grainn_to_seed_perharv(p,h,k) = cropseedn_deficit_to_restore + repr_grainn_to_seed_thisyr(p,k) = repr_grainn_to_seed_thisyr(p,k) & + + repr_grainn_to_seed_perharv(p,h,k) + end if ! Send the remaining grain to the food product pool repr_grainc_to_food_thispool = cpool_to_reproductivec(p,k) - repr_grainc_to_seed(p,k) @@ -3207,8 +3229,15 @@ subroutine CNOffsetLitterfall (num_soilp, filter_soilp, & repr_grainc_to_food_thisyr(p,k) = repr_grainc_to_food_thisyr(p,k) & + repr_grainc_to_food_perharv(p,h,k) end if + repr_grainn_to_food_thispool = npool_to_reproductiven(p,k) - repr_grainn_to_seed(p,k) repr_grainn_to_food(p,k) = t1 * reproductiven(p,k) & + npool_to_reproductiven(p,k) - repr_grainn_to_seed(p,k) + if (reproductiven(p,k) + repr_grainn_to_food_thispool * dt > 0._r8) then + repr_grainn_to_food_perharv(p,h,k) = reproductiven(p,k) & + + repr_grainn_to_food_thispool * dt + repr_grainn_to_food_thisyr(p,k) = repr_grainn_to_food_thisyr(p,k) & + + repr_grainn_to_food_perharv(p,h,k) + end if end do do k = repr_structure_min, repr_structure_max diff --git a/src/biogeochem/CNVegCarbonFluxType.F90 b/src/biogeochem/CNVegCarbonFluxType.F90 index e930543e25..c7aa3469e2 100644 --- a/src/biogeochem/CNVegCarbonFluxType.F90 +++ b/src/biogeochem/CNVegCarbonFluxType.F90 @@ -148,6 +148,8 @@ module CNVegCarbonFluxType real(r8), pointer :: leafc_to_biofuelc_patch (:) ! leaf C to biofuel C (gC/m2/s) real(r8), pointer :: livestemc_to_biofuelc_patch (:) ! livestem C to biofuel C (gC/m2/s) real(r8), pointer :: repr_grainc_to_seed_patch (:,:) ! grain C to seed for prognostic crop(gC/m2/s) [patch, repr_grain_min:repr_grain_max] + real(r8), pointer :: repr_grainc_to_seed_perharv_patch (:,:,:) ! grain C to seed for prognostic crop accumulated by harvest (gC/m2) [patch, harvest, repr_grain_min:repr_grain_max]. Not per-second because this variable represents an accumulation over each growing season, to be instantaneously at the end of each calendar year, to provide output that's easier to work with. + real(r8), pointer :: repr_grainc_to_seed_thisyr_patch (:,:) ! grain C to seed for prognostic crop accumulated this calendar year (gC/m2) [patch, repr_grain_min:repr_grain_max]. Not per-second because this variable represents an accumulation over an entire calendar year, to be saved instantaneously at the end of each calendar year, to provide output that's easier to work with. ! maintenance respiration fluxes real(r8), pointer :: cpool_to_resp_patch (:) ! CNflex excess C maintenance respiration (gC/m2/s) @@ -672,6 +674,8 @@ subroutine InitAllocate(this, bounds, carbon_type, alloc_full_veg) allocate(this%leafc_to_biofuelc_patch (begp:endp)) ; this%leafc_to_biofuelc_patch (:) = nan allocate(this%livestemc_to_biofuelc_patch (begp:endp)) ; this%livestemc_to_biofuelc_patch (:) = nan allocate(this%repr_grainc_to_seed_patch(begp:endp, repr_grain_min:repr_grain_max)) ; this%repr_grainc_to_seed_patch (:,:) = nan + allocate(this%repr_grainc_to_seed_perharv_patch(begp:endp, 1:mxharvests, repr_grain_min:repr_grain_max)) ; this%repr_grainc_to_seed_perharv_patch (:,:,:) = nan + allocate(this%repr_grainc_to_seed_thisyr_patch(begp:endp, repr_grain_min:repr_grain_max)) ; this%repr_grainc_to_seed_thisyr_patch (:,:) = nan allocate(this%reproductivec_xfer_to_reproductivec_patch(begp:endp, nrepr)) this%reproductivec_xfer_to_reproductivec_patch(:,:) = nan allocate(this%cpool_reproductive_gr_patch (begp:endp, nrepr)) ; this%cpool_reproductive_gr_patch (:,:) = nan @@ -977,6 +981,8 @@ subroutine InitHistory(this, bounds, carbon_type) ptr_patch=this%livestemc_to_biofuelc_patch) this%repr_grainc_to_seed_patch(begp:endp,:) = spval + this%repr_grainc_to_seed_perharv_patch(begp:endp,:,:) = spval + this%repr_grainc_to_seed_thisyr_patch(begp:endp,:) = spval do k = repr_grain_min, repr_grain_max data1dptr => this%repr_grainc_to_seed_patch(:,k) call hist_addfld1d ( & @@ -986,6 +992,25 @@ subroutine InitHistory(this, bounds, carbon_type) avgflag='A', & long_name=get_repr_longname(k)//' C to seed', & ptr_patch=data1dptr) + data2dptr => this%repr_grainc_to_seed_perharv_patch(:,:,k) + call hist_addfld2d ( & + ! e.g., GRAINC_TO_SEED_PERHARV + fname=get_repr_hist_fname(k)//'C_TO_SEED_PERHARV', & + units='gC/m^2', & + type2d='mxharvests', & + avgflag='I', & + long_name=get_repr_longname(k)//' C to seed per harvest; should only be output annually', & + ptr_patch=data2dptr, & + default='inactive') + data1dptr => this%repr_grainc_to_seed_thisyr_patch(:,k) + call hist_addfld1d ( & + ! e.g., GRAINC_TO_SEED_ANN + fname=get_repr_hist_fname(k)//'C_TO_SEED_ANN', & + units='gC/m^2', & + avgflag='I', & + long_name=get_repr_longname(k)//' C to seed harvested per calendar year; should only be output annually', & + ptr_patch=data1dptr, & + default='inactive') end do end if @@ -3730,6 +3755,15 @@ subroutine RestartBulkOnly ( this, bounds, ncid, flag ) long_name=get_repr_longname(k)//' C to food per calendar year; should only be output annually', & units='gC/m2', & interpinic_flag='interp', readvar=readvar, data=data1dptr) + data1dptr => this%repr_grainc_to_seed_thisyr_patch(:,k) + ! e.g., grainc_to_seed_thisyr + varname = get_repr_rest_fname(k)//'c_to_seed_thisyr' + call restartvar(ncid=ncid, flag=flag, varname=varname, & + xtype=ncd_double, & + dim1name='pft', & + long_name=get_repr_longname(k)//' C to seed per calendar year; should only be output annually', & + units='gC/m2', & + interpinic_flag='interp', readvar=readvar, data=data1dptr) end do do k = 1, nrepr diff --git a/src/biogeochem/CNVegNitrogenFluxType.F90 b/src/biogeochem/CNVegNitrogenFluxType.F90 index 3217511c14..cdfab748f3 100644 --- a/src/biogeochem/CNVegNitrogenFluxType.F90 +++ b/src/biogeochem/CNVegNitrogenFluxType.F90 @@ -6,6 +6,7 @@ module CNVegNitrogenFluxType use clm_varpar , only : ndecomp_cascade_transitions, ndecomp_pools use clm_varpar , only : nlevdecomp_full, nlevdecomp, i_litr_min, i_litr_max use clm_varpar , only : nvegnpool + use clm_varpar , only : mxharvests use clm_varcon , only : spval, ispval, dzsoi_decomp use clm_varctl , only : use_nitrif_denitrif, use_crop use CNSharedParamsMod , only : use_fun, use_matrixcn @@ -14,7 +15,7 @@ module CNVegNitrogenFluxType use SoilBiogeochemDecompCascadeConType , only : decomp_cascade_con use dynSubgridControlMod , only : get_do_grossunrep use CropReprPoolsMod , only : nrepr, repr_grain_min, repr_grain_max, repr_structure_min, repr_structure_max - use CropReprPoolsMod , only : get_repr_rest_fname, get_repr_longname + use CropReprPoolsMod , only : get_repr_hist_fname, get_repr_rest_fname, get_repr_longname use LandunitType , only : lun use ColumnType , only : col use PatchType , only : patch @@ -132,11 +133,15 @@ module CNVegNitrogenFluxType ! litterfall fluxes real(r8), pointer :: livestemn_to_litter_patch (:) ! patch livestem N to litter (gN/m2/s) real(r8), pointer :: repr_grainn_to_food_patch (:,:) ! patch grain N to food for prognostic crop (gN/m2/s) [patch, repr_grain_min:repr_grain_max] + real(r8), pointer :: repr_grainn_to_food_perharv_patch (:,:,:) ! grain N to food for prognostic crop accumulated by harvest (gN/m2) [patch, harvest, repr_grain_min:repr_grain_max]. Not per-second because this variable represents an accumulation over each growing season, to be instantaneously at the end of each calendar year, to provide output that's easier to work with. + real(r8), pointer :: repr_grainn_to_food_thisyr_patch (:,:) ! grain N to food for prognostic crop accumulated this calendar year (gN/m2) [patch, repr_grain_min:repr_grain_max]. Not per-second because this variable represents an accumulation over an entire calendar year, to be saved instantaneously at the end of each calendar year, to provide output that's easier to work with. real(r8), pointer :: repr_structuren_to_cropprod_patch (:,:) ! patch reproductive structure N to crop product pool for prognostic crop (gN/m2/s) [patch, repr_structure_min:repr_structure_max] real(r8), pointer :: repr_structuren_to_litter_patch (:,:) ! patch reproductive structure N to litter for prognostic crop (gN/m2/s) [patch, repr_structure_min:repr_structure_max] real(r8), pointer :: leafn_to_biofueln_patch (:) ! patch leaf N to biofuel N (gN/m2/s) real(r8), pointer :: livestemn_to_biofueln_patch (:) ! patch livestem N to biofuel N (gN/m2/s) real(r8), pointer :: repr_grainn_to_seed_patch (:,:) ! patch grain N to seed for prognostic crop (gN/m2/s) [patch, repr_grain_min:repr_grain_max] + real(r8), pointer :: repr_grainn_to_seed_perharv_patch (:,:,:) ! grain N to seed for prognostic crop accumulated by harvest (gN/m2) [patch, harvest, repr_grain_min:repr_grain_max]. Not per-second because this variable represents an accumulation over each growing season, to be instantaneously at the end of each calendar year, to provide output that's easier to work with. + real(r8), pointer :: repr_grainn_to_seed_thisyr_patch (:,:) ! grain N to seed for prognostic crop accumulated this calendar year (gN/m2) [patch, repr_grain_min:repr_grain_max]. Not per-second because this variable represents an accumulation over an entire calendar year, to be saved instantaneously at the end of each calendar year, to provide output that's easier to work with. real(r8), pointer :: leafn_to_litter_patch (:) ! patch leaf N litterfall (gN/m2/s) real(r8), pointer :: leafn_to_retransn_patch (:) ! patch leaf N to retranslocated N pool (gN/m2/s) real(r8), pointer :: frootn_to_retransn_patch (:) ! patch fine root N to retranslocated N pool (gN/m2/s) @@ -475,6 +480,8 @@ subroutine InitAllocate(this, bounds, alloc_full_veg) allocate(this%npool_to_reproductiven_storage_patch(begp:endp, nrepr)); this%npool_to_reproductiven_storage_patch (:,:) = nan allocate(this%livestemn_to_litter_patch (begp:endp)) ; this%livestemn_to_litter_patch (:) = nan allocate(this%repr_grainn_to_food_patch(begp:endp, repr_grain_min:repr_grain_max)) ; this%repr_grainn_to_food_patch (:,:) = nan + allocate(this%repr_grainn_to_food_perharv_patch(begp:endp, 1:mxharvests, repr_grain_min:repr_grain_max)) ; this%repr_grainn_to_food_perharv_patch (:,:,:) = nan + allocate(this%repr_grainn_to_food_thisyr_patch(begp:endp, repr_grain_min:repr_grain_max)) ; this%repr_grainn_to_food_thisyr_patch (:,:) = nan allocate(this%repr_structuren_to_cropprod_patch(begp:endp, repr_structure_min:repr_structure_max)) this%repr_structuren_to_cropprod_patch(:,:) = nan allocate(this%repr_structuren_to_litter_patch(begp:endp, repr_structure_min:repr_structure_max)) @@ -482,6 +489,8 @@ subroutine InitAllocate(this, bounds, alloc_full_veg) allocate(this%leafn_to_biofueln_patch (begp:endp)) ; this%leafn_to_biofueln_patch (:) = nan allocate(this%livestemn_to_biofueln_patch (begp:endp)) ; this%livestemn_to_biofueln_patch (:) = nan allocate(this%repr_grainn_to_seed_patch(begp:endp, repr_grain_min:repr_grain_max)) ; this%repr_grainn_to_seed_patch (:,:) = nan + allocate(this%repr_grainn_to_seed_perharv_patch(begp:endp, 1:mxharvests, repr_grain_min:repr_grain_max)) ; this%repr_grainn_to_seed_perharv_patch (:,:,:) = nan + allocate(this%repr_grainn_to_seed_thisyr_patch(begp:endp, repr_grain_min:repr_grain_max)) ; this%repr_grainn_to_seed_thisyr_patch (:,:) = nan allocate(this%reproductiven_xfer_to_reproductiven_patch(begp:endp, nrepr)) this%reproductiven_xfer_to_reproductiven_patch(:,:) = nan allocate(this%reproductiven_storage_to_xfer_patch(begp:endp, nrepr)) ; this%reproductiven_storage_to_xfer_patch (:,:) = nan @@ -1034,6 +1043,71 @@ subroutine InitHistory(this, bounds) call hist_addfld1d (fname='NFERTILIZATION', units='gN/m^2/s', & avgflag='A', long_name='fertilizer added', & ptr_patch=this%fert_patch) + + this%repr_grainn_to_food_patch(begp:endp,:) = spval + this%repr_grainn_to_food_perharv_patch(begp:endp,:,:) = spval + this%repr_grainn_to_food_thisyr_patch(begp:endp,:) = spval + this%repr_grainn_to_seed_patch(begp:endp,:) = spval + this%repr_grainn_to_seed_perharv_patch(begp:endp,:,:) = spval + this%repr_grainn_to_seed_thisyr_patch(begp:endp,:) = spval + do k = repr_grain_min, repr_grain_max + data1dptr => this%repr_grainn_to_food_patch(:,k) + call hist_addfld1d ( & + ! e.g., GRAINN_TO_FOOD + fname=get_repr_hist_fname(k)//'N_TO_FOOD', & + units='gN/m^2/s', & + avgflag='A', & + long_name=get_repr_longname(k)//' N to food (not scientifically supported)', & + ptr_patch=data1dptr, & + default='inactive') + data1dptr => this%repr_grainn_to_seed_patch(:,k) + call hist_addfld1d ( & + ! e.g., GRAINN_TO_SEED + fname=get_repr_hist_fname(k)//'N_TO_SEED', & + units='gN/m^2/s', & + avgflag='A', & + long_name=get_repr_longname(k)//' N to seed (not scientifically supported)', & + ptr_patch=data1dptr, & + default='inactive') + data2dptr => this%repr_grainn_to_food_perharv_patch(:,:,k) + call hist_addfld2d ( & + ! e.g., GRAINN_TO_FOOD_PERHARV + fname=get_repr_hist_fname(k)//'N_TO_FOOD_PERHARV', & + units='gN/m^2', & + type2d='mxharvests', & + avgflag='I', & + long_name=get_repr_longname(k)//' N to food per harvest; should only be output annually (not scientifically supported)', & + ptr_patch=data2dptr, & + default='inactive') + data1dptr => this%repr_grainn_to_food_thisyr_patch(:,k) + call hist_addfld1d ( & + ! e.g., GRAINN_TO_FOOD_ANN + fname=get_repr_hist_fname(k)//'N_TO_FOOD_ANN', & + units='gN/m^2', & + avgflag='I', & + long_name=get_repr_longname(k)//' N to food harvested per calendar year; should only be output annually (not scientifically supported)', & + ptr_patch=data1dptr, & + default='inactive') + data2dptr => this%repr_grainn_to_seed_perharv_patch(:,:,k) + call hist_addfld2d ( & + ! e.g., GRAINN_TO_SEED_PERHARV + fname=get_repr_hist_fname(k)//'N_TO_SEED_PERHARV', & + units='gN/m^2', & + type2d='mxharvests', & + avgflag='I', & + long_name=get_repr_longname(k)//' N to seed per harvest; should only be output annually (not scientifically supported)', & + ptr_patch=data2dptr, & + default='inactive') + data1dptr => this%repr_grainn_to_seed_thisyr_patch(:,k) + call hist_addfld1d ( & + ! e.g., GRAINN_TO_SEED_ANN + fname=get_repr_hist_fname(k)//'N_TO_SEED_ANN', & + units='gN/m^2', & + avgflag='I', & + long_name=get_repr_longname(k)//' N to seed harvested per calendar year; should only be output annually (not scientifically supported)', & + ptr_patch=data1dptr, & + default='inactive') + end do end if if (use_crop .and. .not. use_fun) then @@ -1433,6 +1507,7 @@ subroutine Restart (this, bounds, ncid, flag ) logical :: readvar ! determine if variable is on initial file character(len=256) :: varname real(r8), pointer :: data1dptr(:) ! temp. pointer for slicing larger arrays + real(r8), pointer :: data2dptr(:,:) ! temp. pointer for slicing larger arrays !------------------------------------------------------------------------ if (use_crop) then @@ -1459,6 +1534,60 @@ subroutine Restart (this, bounds, ncid, flag ) units='gN/m2/s', & interpinic_flag='interp', readvar=readvar, data=data1dptr) end do + + ! Read or write variable(s) with mxharvests dimension + ! BACKWARDS_COMPATIBILITY(wjs/ssr, 2022-06-10) See note in CallRestartvarDimOK() + if (CallRestartvarDimOK(ncid, flag, 'mxharvests')) then + do k = repr_grain_min, repr_grain_max + data2dptr => this%repr_grainn_to_food_perharv_patch(:,:,k) + ! e.g., grainn_to_food_perharv + varname = get_repr_rest_fname(k)//'n_to_food_perharv' + call restartvar(ncid=ncid, flag=flag, varname=varname, & + xtype=ncd_double, & + dim1name='pft', & + dim2name='mxharvests', & + switchdim=.true., & + long_name=get_repr_longname(k)//' N to food per harvest; should only be output annually', & + units='gN/m2', & + readvar=readvar, & + scale_by_thickness=.false., & + interpinic_flag='interp', data=data2dptr) + data2dptr => this%repr_grainn_to_seed_perharv_patch(:,:,k) + ! e.g., grainn_to_seed_perharv + varname = get_repr_rest_fname(k)//'n_to_seed_perharv' + call restartvar(ncid=ncid, flag=flag, varname=varname, & + xtype=ncd_double, & + dim1name='pft', & + dim2name='mxharvests', & + switchdim=.true., & + long_name=get_repr_longname(k)//' N to seed per harvest; should only be output annually', & + units='gN/m2', & + readvar=readvar, & + scale_by_thickness=.false., & + interpinic_flag='interp', data=data2dptr) + end do + end if + + do k = repr_grain_min, repr_grain_max + data1dptr => this%repr_grainn_to_food_thisyr_patch(:,k) + ! e.g., grainn_to_food_thisyr + varname = get_repr_rest_fname(k)//'n_to_food_thisyr' + call restartvar(ncid=ncid, flag=flag, varname=varname, & + xtype=ncd_double, & + dim1name='pft', & + long_name=get_repr_longname(k)//' N to food per calendar year; should only be output annually', & + units='gN/m2', & + interpinic_flag='interp', readvar=readvar, data=data1dptr) + data1dptr => this%repr_grainn_to_seed_thisyr_patch(:,k) + ! e.g., grainn_to_seed_thisyr + varname = get_repr_rest_fname(k)//'n_to_seed_thisyr' + call restartvar(ncid=ncid, flag=flag, varname=varname, & + xtype=ncd_double, & + dim1name='pft', & + long_name=get_repr_longname(k)//' N to seed per calendar year; should only be output annually', & + units='gN/m2', & + interpinic_flag='interp', readvar=readvar, data=data1dptr) + end do end if if (use_crop) then