From dab09e813303bcdd947210820d315767b9ba7c39 Mon Sep 17 00:00:00 2001 From: Ben Andre Date: Mon, 14 Dec 2015 18:33:26 -0700 Subject: [PATCH 1/5] Add temporary files generated by patch to gitignore Testing: none --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index 2e758ff008..90d3b67942 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,10 @@ *.swp *~ +# patch temp files +*.orig +*.rej + # mac files .DS_Store From 308312f71e8e6ce01c61a3d436389d7fa79f94ae Mon Sep 17 00:00:00 2001 From: Ben Andre Date: Mon, 14 Dec 2015 18:51:49 -0700 Subject: [PATCH 2/5] Import ed_v0.1.0 changes into a branch from r120. Created patch file between clm4_5_1_r097 and ed_v010_21_clm4_5_1_r097 tags with the command: svn diff \ https://svn-ccsm-models.cgd.ucar.edu/clm2/trunk_tags/clm4_5_1_r097/ \ https://svn-ccsm-models.cgd.ucar.edu/clm2/branch_tags/ed_v0.1.0_tags/ed_v010_21_clm4_5_1_r097 > \ ed_v0.1.0-21_r097.patch Manually edit patch file to remove property changes. Manually edit patch file to change 'models/lnd' to 'components' in patch file paths. There are some failed hunks in SVN_EXTERNAL_DIRECTORIES that failed to apply and were ignored. It looks like most of these are irrelevent because of cime changes, but one may need to be revisited: https://svn-ccsm-models.cgd.ucar.edu/scripts/branch_tags/refKovenMuszala_tags/rkm_01_scripts4_141023 Testing: Branch has not been compiled or tested. --- .ChangeLogED | 735 ++++++++++++++++++ ChangeLog | 28 +- components/clm/doc/ChangeLog | 28 +- components/clm/src/CMakeLists.txt | 1 + .../src/ED/biogeochem/EDCohortDynamicsMod.F90 | 1 + .../ED/biogeochem/EDGrowthFunctionsMod.F90 | 14 +- .../src/ED/biogeochem/EDPatchDynamicsMod.F90 | 6 +- .../clm/src/ED/biogeochem/EDPhenologyType.F90 | 41 +- .../clm/src/ED/biogeochem/EDPhysiologyMod.F90 | 66 +- .../src/ED/biogeophys/EDPhotosynthesisMod.F90 | 12 +- .../src/ED/biogeophys/EDSurfaceAlbedoMod.F90 | 35 +- components/clm/src/ED/main/CMakeLists.txt | 1 + components/clm/src/ED/main/EDCLMLinkMod.F90 | 6 +- components/clm/src/ED/main/EDMainMod.F90 | 10 +- .../clm/src/ED/main/EDRestVectorMod.F90 | 190 ++++- .../clm/src/biogeochem/CNWoodProductsMod.F90 | 8 +- .../clm/src/biogeophys/BalanceCheckMod.F90 | 4 +- .../clm/src/biogeophys/CanopyFluxesMod.F90 | 2 - .../src/biogeophys/SurfaceRadiationMod.F90 | 1 - .../clm/src/biogeophys/TemperatureType.F90 | 32 +- components/clm/src/cpl/lnd_comp_mct.F90 | 3 +- components/clm/src/main/clm_driver.F90 | 24 +- components/clm/src/main/clm_instMod.F90 | 3 + components/clm/src/main/histFileMod.F90 | 3 +- components/clm/src/main/surfrdMod.F90 | 11 +- components/clm/src/utils/domainMod.F90 | 190 ++--- 26 files changed, 1176 insertions(+), 279 deletions(-) create mode 100644 .ChangeLogED diff --git a/.ChangeLogED b/.ChangeLogED new file mode 100644 index 0000000000..487890b938 --- /dev/null +++ b/.ChangeLogED @@ -0,0 +1,735 @@ +================================================================================ +This file describes what tags were created and why +================================================================================ +Originator: muszala +Date: 26 Feb 2015 +Model: clm-ed +Version: ed_v010_21_clm4_5_1_r097 +One-line: update scripts + +branch off of Charlie Koven scripts so I can add a cold deciduous test mod + +================================================================================ +Originator: muszala +Date: 26 Feb 2015 +Model: clm-ed +Version: ed_v010_20_clm4_5_1_r097 +One-line: fix issues found after merging up to 097 and merge in bug fix branch-tags + +- make sure no ed files are execuabtles +- make pio branch tag that allows things to run with -O0 -g +- resolve differences between older ed0.1.0 versions of EDRestVectorMod and this + tag +- remove extra accumul call for ED_GDD0 +- merge in changes from https://svn-ccsm-models.cgd.ucar.edu/clm2/branches/edPtBugFixes + https://svn-ccsm-models.cgd.ucar.edu/clm2/branch_tags/edPtBugFixes_tags + +This test now runs. It has not been running previously + +>>more TestStatus +PASS ERS_D_Mmpi-serial.1x1_brazil.ICLM45CNED.yellowstone_intel.clm-edTest +PASS ERS_D_Mmpi-serial.1x1_brazil.ICLM45CNED.yellowstone_intel.clm-edTest.memleak + + M . + M models/lnd/clm +M models/lnd/clm/src/biogeochem/CNWoodProductsMod.F90 + M models/lnd/clm/src/main/clm_varcon.F90 + M models/lnd/clm/src/main/clm_initializeMod.F90 +M models/lnd/clm/src/main/histFileMod.F90 + M models/lnd/clm/src/main/controlMod.F90 +M models/lnd/clm/src/main/clm_driver.F90 +M models/lnd/clm/src/main/surfrdMod.F90 +M models/lnd/clm/src/main/clm_instMod.F90 +M models/lnd/clm/src/ED/biogeochem/EDPhenologyType.F90 +M models/lnd/clm/src/ED/biogeochem/EDPhysiologyMod.F90 +M models/lnd/clm/src/ED/main/EDRestVectorMod.F90 +M models/lnd/clm/src/ED/main/EDMainMod.F90 + M models/lnd/clm/src/biogeophys/SoilTemperatureMod.F90 +M models/lnd/clm/src/biogeophys/TemperatureType.F90 + M models/lnd/clm/src/biogeophys/HumanIndexMod.F90 + M models/lnd/clm/src/biogeophys/BareGroundFluxesMod.F90 + M models/lnd/clm/src/biogeophys/CanopyFluxesMod.F90 +M SVN_EXTERNAL_DIRECTORIES +M .ChangeLogED + +================================================================================ +Originator: muszala +Date: 25 Feb 2015 +Model: clm-ed +Version: ed_v010_19_clm4_5_1_r097 +One-line: complete merge up to clm 097 + +Resolve differences in the 097 branch and trunk-tag. Testing OK against CLM 097. + +Two ED compset test have different values in the h0 file. Otherwise, test failures +are identical to those found in clm4_5_1_r097 testing. These are expected as ED work +has diverged from CLM implementations. + +FAIL SMS.f10_f10.ICLM45CNED.yellowstone_intel.clm-edTest.compare_hist.clm4_5_1_r097spm +FAIL SMS.f19_g16.ICLM45CNED.yellowstone_intel.clm-edTest.compare_hist.clm4_5_1_r097spm + +M models/lnd/clm/doc/ChangeLog +M models/lnd/clm/doc/ChangeSum +M models/lnd/clm/src/utils/domainMod.F90 +M models/lnd/clm/src/main/PatchType.F90 +M models/lnd/clm/src/main/CMakeLists.txt +M models/lnd/clm/src/main/clm_driver.F90 +M models/lnd/clm/src/ED/main/EDCLMLinkMod.F90 +M models/lnd/clm/src/ED/main/EDRestVectorMod.F90 +M models/lnd/clm/src/ED/main/EDMainMod.F90 +M models/lnd/clm/src/ED/main/CMakeLists.txt +M models/lnd/clm/src/ED/biogeophys/EDSurfaceAlbedoMod.F90 +M models/lnd/clm/src/biogeophys/TemperatureType.F90 +M models/lnd/clm/src/biogeophys/test/Irrigation_test/IrrigationWrapperMod.F90 +M models/lnd/clm/src/biogeophys/test/Irrigation_test/test_irrigation_singlepatch.pf +M models/lnd/clm/src/unit_test_shr/unittestSubgridMod.F90 +M models/lnd/clm/src/CMakeLists.txt +M SVN_EXTERNAL_DIRECTORIES +M ChangeLog +M ChangeSum + +================================================================================ +Originator: muszala +Date: 23 Feb 2015 +Model: clm-ed +Version: ed_v010_19_clm4_5_1_r096 +One-line: complete merge up to clm 096 + +While we've already merged up to 097 in a branch, there are portions of the +095->096 merge that are missing. Small step before doing the 'official' +merge from 096->097. + + M . +M .ChangeLogED +M ChangeLog +M ChangeSum +M SVN_EXTERNAL_DIRECTORIES + +================================================================================ +Originator: rosieafisher@gmail.com +Date: 10 Jan 2015 +Model: clm-ed +Version: ed_v010_19_clm4_5_1_r095 +One-line: incomplete merge up to clm 096 + +Merge from 095 to 096. Externals, ChangeLog and ChangeSum left out for some +reason + +================================================================================ +Originator: muszala +Date: 19 Nov 2014 +Model: clm-ed +Version: ed_v010_18_clm4_5_1_r095 +One-line: merge in mvertens refactor. + +This has been merged in from a branch-tag from mvertens and not from the offical +clm trunk-tag. That trunk-tag, when it is made, will be merged in at a later date +with a proper clm ChangeLog entry. + +This tag has been minimally tested for ED compsets and will be followed by updates to +clm 096 and 097 with full testing. + +M models/lnd/clm/bld/configure +M models/lnd/clm/doc/ChangeLog +M models/lnd/clm/src/utils/domainMod.F90 +M models/lnd/clm/src/utils/accumulMod.F90 +D models/lnd/clm/src/biogeochem/CNDecompCascadeConType.F90 +D models/lnd/clm/src/biogeochem/CNNitrifDenitrifMod.F90 +D models/lnd/clm/src/biogeochem/CNNitrogenFluxType.F90 +D models/lnd/clm/src/biogeochem/CNVerticalProfileMod.F90 +D models/lnd/clm/src/biogeochem/CNCarbonFluxType.F90 +D models/lnd/clm/src/biogeochem/CNCarbonStateType.F90 +D models/lnd/clm/src/biogeochem/CNDecompMod.F90 +D models/lnd/clm/src/biogeochem/CNStateType.F90 +D models/lnd/clm/src/biogeochem/CNAllocationMod.F90 +D models/lnd/clm/src/biogeochem/CNEcosystemDynMod.F90 +D models/lnd/clm/src/biogeochem/CNDecompCascadeBGCMod.F90 +D models/lnd/clm/src/biogeochem/CNNitrogenStateType.F90 +D models/lnd/clm/src/biogeochem/CNDecompCascadeCNMod.F90 +D models/lnd/clm/src/biogeochem/CNSoilLittVertTranspMod.F90 +A models/lnd/clm/src/biogeochem/CNVegCarbonFluxType.F90 +M models/lnd/clm/src/biogeochem/CNCStateUpdate2Mod.F90 +A models/lnd/clm/src/biogeochem/CNVegCarbonStateType.F90 +M models/lnd/clm/src/biogeochem/CNGapMortalityMod.F90 +M models/lnd/clm/src/biogeochem/CNGRespMod.F90 +M models/lnd/clm/src/biogeochem/CNNStateUpdate1Mod.F90 +M models/lnd/clm/src/biogeochem/CNBalanceCheckMod.F90 +A models/lnd/clm/src/biogeochem/CNVegStateType.F90 +M models/lnd/clm/src/biogeochem/CNNStateUpdate3Mod.F90 +M models/lnd/clm/src/biogeochem/CNDVDriverMod.F90 +M models/lnd/clm/src/biogeochem/CNFireMod.F90 +M models/lnd/clm/src/biogeochem/CNMRespMod.F90 +M models/lnd/clm/src/biogeochem/MEGANFactorsMod.F90 +A models/lnd/clm/src/biogeochem/CNVegNitrogenStateType.F90 +M models/lnd/clm/src/biogeochem/SatellitePhenologyMod.F90 +M models/lnd/clm/src/biogeochem/CNCIsoFluxMod.F90 +M models/lnd/clm/src/biogeochem/CNPrecisionControlMod.F90 +M models/lnd/clm/src/biogeochem/CNWoodProductsMod.F90 +M models/lnd/clm/src/biogeochem/ch4Mod.F90 +M models/lnd/clm/src/biogeochem/DUSTMod.F90 +M models/lnd/clm/src/biogeochem/CNDVLightMod.F90 +M models/lnd/clm/src/biogeochem/NutrientCompetitionMethodMod.F90 +M models/lnd/clm/src/biogeochem/CNPhenologyMod.F90 +M models/lnd/clm/src/biogeochem/ch4varcon.F90 +M models/lnd/clm/src/biogeochem/CNCStateUpdate1Mod.F90 +M models/lnd/clm/src/biogeochem/CNCStateUpdate3Mod.F90 +M models/lnd/clm/src/biogeochem/CNSharedParamsMod.F90 +M models/lnd/clm/src/biogeochem/CNDVType.F90 +M models/lnd/clm/src/biogeochem/NutrientCompetitionCLM45defaultMod.F90 +M models/lnd/clm/src/biogeochem/VOCEmissionMod.F90 +M models/lnd/clm/src/biogeochem/CNAnnualUpdateMod.F90 +A models/lnd/clm/src/biogeochem/C14BompbSpikeMod.F90 +M models/lnd/clm/src/biogeochem/CNNStateUpdate2Mod.F90 +M models/lnd/clm/src/biogeochem/CropType.F90 +M models/lnd/clm/src/biogeochem/CNNDynamicsMod.F90 +M models/lnd/clm/src/biogeochem/DryDepVelocity.F90 +A models/lnd/clm/src/biogeochem/CNVegNitrogenFluxType.F90 +M models/lnd/clm/src/biogeochem/CNVegStructUpdateMod.F90 +A models/lnd/clm/src/biogeochem/CNDriverMod.F90 +M models/lnd/clm/src/biogeochem/CNDVEstablishmentMod.F90 +M models/lnd/clm/src/biogeochem/CNC14DecayMod.F90 +D models/lnd/clm/src/main/EcophysConType.F90 +D models/lnd/clm/src/main/pftvarcon.F90 + M models/lnd/clm/src/main/clm_varcon.F90 +M models/lnd/clm/src/main/initInterp.F90 +M models/lnd/clm/src/main/clm_varpar.F90 +M models/lnd/clm/src/main/landunit_varcon.F90 +M models/lnd/clm/src/main/accumulMod.F90 +M models/lnd/clm/src/main/subgridWeightsMod.F90 +M models/lnd/clm/src/main/decompInitMod.F90 +MM models/lnd/clm/src/main/clm_initializeMod.F90 +M models/lnd/clm/src/main/subgridRestMod.F90 +M models/lnd/clm/src/main/ColumnType.F90 +M models/lnd/clm/src/main/subgridMod.F90 +M models/lnd/clm/src/main/PatchType.F90 +M models/lnd/clm/src/main/ndepStreamMod.F90 +M models/lnd/clm/src/main/lnd2atmType.F90 +M models/lnd/clm/src/main/atm2lndType.F90 +M models/lnd/clm/src/main/histFileMod.F90 +M models/lnd/clm/src/main/restFileMod.F90 +M models/lnd/clm/src/main/clm_varsur.F90 +M models/lnd/clm/src/main/LandunitType.F90 +M models/lnd/clm/src/main/GetGlobalValuesMod.F90 +MM models/lnd/clm/src/main/controlMod.F90 +M models/lnd/clm/src/main/initSubgridMod.F90 +M models/lnd/clm/src/main/filterMod.F90 +M models/lnd/clm/src/main/lnd2glcMod.F90 +M models/lnd/clm/src/main/clm_driver.F90 +M models/lnd/clm/src/main/clm_varctl.F90 +A models/lnd/clm/src/main/pftconMod.F90 +M models/lnd/clm/src/main/subgridAveMod.F90 +M models/lnd/clm/src/main/initGridCellsMod.F90 +M models/lnd/clm/src/main/atm2lndMod.F90 +M models/lnd/clm/src/main/lnd2atmMod.F90 +M models/lnd/clm/src/main/ncdio_pio.F90 +M models/lnd/clm/src/main/surfrdMod.F90 +M models/lnd/clm/src/main/decompMod.F90 +A models/lnd/clm/src/main/clm_instMod.F90 +M models/lnd/clm/src/main/reweightMod.F90 +M models/lnd/clm/src/main/readParamsMod.F90 +M models/lnd/clm/src/ED/biogeochem/EDCanopyStructureMod.F90 +A models/lnd/clm/src/ED/biogeochem/EDSharedParamsMod.F90 +M models/lnd/clm/src/ED/biogeochem/EDGrowthFunctionsMod.F90 +M models/lnd/clm/src/ED/biogeochem/EDCohortDynamicsMod.F90 +A models/lnd/clm/src/ED/biogeochem/EDPhenologyType.F90 +M models/lnd/clm/src/ED/biogeochem/EDPhysiologyMod.F90 +M models/lnd/clm/src/ED/biogeochem/EDPatchDynamicsMod.F90 +D models/lnd/clm/src/ED/main/EDBioType.F90 +D models/lnd/clm/src/ED/main/EDVecPatchType.F90 +M models/lnd/clm/src/ED/main/EDCLMLinkMod.F90 +M models/lnd/clm/src/ED/main/EDVecCohortType.F90 +M models/lnd/clm/src/ED/main/EDRestVectorMod.F90 +M models/lnd/clm/src/ED/main/EDInitMod.F90 +M models/lnd/clm/src/ED/main/EDMainMod.F90 +M models/lnd/clm/src/ED/main/EDTypesMod.F90 +M models/lnd/clm/src/ED/main/CMakeLists.txt +M models/lnd/clm/src/ED/fire/SFMainMod.F90 +D models/lnd/clm/src/ED/biogeophys/EDPhenologyMod.F90 +M models/lnd/clm/src/ED/biogeophys/EDAccumulateFluxesMod.F90 +M models/lnd/clm/src/ED/biogeophys/EDSurfaceAlbedoMod.F90 +M models/lnd/clm/src/ED/biogeophys/EDPhotosynthesisMod.F90 +M models/lnd/clm/src/ED/biogeophys/EDBtranMod.F90 +D models/lnd/clm/src/biogeophys/FrictionVelocityType.F90 +D models/lnd/clm/src/biogeophys/AerosolType.F90 +D models/lnd/clm/src/biogeophys/PhotosynthesisType.F90 +M models/lnd/clm/src/biogeophys/BalanceCheckMod.F90 +M models/lnd/clm/src/biogeophys/WaterfluxType.F90 +MM models/lnd/clm/src/biogeophys/SoilTemperatureMod.F90 +M models/lnd/clm/src/biogeophys/SnowSnicarMod.F90 +M models/lnd/clm/src/biogeophys/SnowHydrologyMod.F90 +M models/lnd/clm/src/biogeophys/LakeTemperatureMod.F90 +M models/lnd/clm/src/biogeophys/FrictionVelocityMod.F90 +M models/lnd/clm/src/biogeophys/SoilFluxesMod.F90 +M models/lnd/clm/src/biogeophys/TemperatureType.F90 +MM models/lnd/clm/src/biogeophys/HumanIndexMod.F90 +M models/lnd/clm/src/biogeophys/PhotosynthesisMod.F90 +M models/lnd/clm/src/biogeophys/LakeFluxesMod.F90 +M models/lnd/clm/src/biogeophys/AerosolMod.F90 +M models/lnd/clm/src/biogeophys/ActiveLayerMod.F90 +M models/lnd/clm/src/biogeophys/SurfaceResistanceMod.F90 +M models/lnd/clm/src/biogeophys/SoilStateType.F90 +M models/lnd/clm/src/biogeophys/SoilHydrologyType.F90 +M models/lnd/clm/src/biogeophys/HydrologyDrainageMod.F90 +M models/lnd/clm/src/biogeophys/UrbanAlbedoMod.F90 +MM models/lnd/clm/src/biogeophys/BareGroundFluxesMod.F90 +MM models/lnd/clm/src/biogeophys/CanopyFluxesMod.F90 +A models/lnd/clm/src/biogeophys/SoilStateInitTimeConstMod.F90 +M models/lnd/clm/src/biogeophys/RootBiophysMod.F90 +A models/lnd/clm/src/biogeophys/SoilHydrologyInitTimeConstMod.F90 +M models/lnd/clm/src/biogeophys/SurfaceRadiationMod.F90 +M models/lnd/clm/src/biogeophys/SoilWaterMovementMod.F90 +M models/lnd/clm/src/biogeophys/SoilMoistStressMod.F90 +M models/lnd/clm/src/biogeophys/UrbBuildTempOleson2015Mod.F90 +M models/lnd/clm/src/biogeophys/CanopyHydrologyMod.F90 +M models/lnd/clm/src/biogeophys/EnergyFluxType.F90 +M models/lnd/clm/src/biogeophys/CanopyStateType.F90 +M models/lnd/clm/src/biogeophys/UrbanFluxesMod.F90 +M models/lnd/clm/src/biogeophys/SurfaceAlbedoMod.F90 +M models/lnd/clm/src/biogeophys/UrbanRadiationMod.F90 +M models/lnd/clm/src/biogeophys/SoilHydrologyMod.F90 +M models/lnd/clm/src/biogeophys/IrrigationMod.F90 +M models/lnd/clm/src/biogeophys/CanopyTemperatureMod.F90 +M models/lnd/clm/src/biogeophys/HydrologyNoDrainageMod.F90 +M models/lnd/clm/src/biogeophys/LakeHydrologyMod.F90 +M models/lnd/clm/src/biogeophys/UrbanParamsType.F90 +A models/lnd/clm/src/soilbiogeochem/SoilBiogeochemDecompCascadeConType.F90 +A models/lnd/clm/src/soilbiogeochem/SoilBiogeochemNitrifDenitrifMod.F90 +A models/lnd/clm/src/soilbiogeochem/SoilBiogeochemStateType.F90 +A models/lnd/clm/src/soilbiogeochem/SoilBiogeochemNStateUpdate1Mod.F90 +A models/lnd/clm/src/soilbiogeochem/SoilBiogeochemNitrogenFluxType.F90 +A models/lnd/clm/src/soilbiogeochem/SoilBiogeochemDecompCascadeBGCMod.F90 +A models/lnd/clm/src/soilbiogeochem/SoilBiogeochemNLeachingMod.F90 +A models/lnd/clm/src/soilbiogeochem/SoilBiogeochemNitrogenStateType.F90 +A models/lnd/clm/src/soilbiogeochem/SoilBiogeochemVerticalProfileMod.F90 +A models/lnd/clm/src/soilbiogeochem/SoilBiogeochemCompetitionMod.F90 +A models/lnd/clm/src/soilbiogeochem/SoilBiogeochemDecompCascadeCNMod.F90 +A models/lnd/clm/src/soilbiogeochem/SoilBiogeochemPrecisionControlMod.F90 +A models/lnd/clm/src/soilbiogeochem/SoilBiogeochemNitrogenUptakeMod.F90 +A models/lnd/clm/src/soilbiogeochem/SoilBiogeochemPotentialMod.F90 +A models/lnd/clm/src/soilbiogeochem/SoilBiogeochemCarbonFluxType.F90 +A models/lnd/clm/src/soilbiogeochem/SoilBiogeochemLittVertTranspMod.F90 +A models/lnd/clm/src/soilbiogeochem/SoilBiogeochemDecompMod.F90 +A models/lnd/clm/src/soilbiogeochem/SoilBiogeochemCarbonStateType.F90 +A models/lnd/clm/src/soilbiogeochem +M models/lnd/clm/src/dyn_subgrid/dynLandunitAreaMod.F90 +M models/lnd/clm/src/dyn_subgrid/dynTimeInfoMod.F90 +M models/lnd/clm/src/dyn_subgrid/dynSubgridDriverMod.F90 +M models/lnd/clm/src/dyn_subgrid/dynHarvestMod.F90 +M models/lnd/clm/src/dyn_subgrid/dynFileMod.F90 +M models/lnd/clm/src/dyn_subgrid/dynConsBiogeochemMod.F90 +M models/lnd/clm/src/dyn_subgrid/dynPriorWeightsMod.F90 +M models/lnd/clm/src/dyn_subgrid/dynEDMod.F90 +M models/lnd/clm/src/dyn_subgrid/dynVarMod.F90 +M models/lnd/clm/src/dyn_subgrid/dynpftFileMod.F90 +M models/lnd/clm/src/dyn_subgrid/dynVarTimeInterpMod.F90 +M models/lnd/clm/src/dyn_subgrid/dynCNDVMod.F90 +M models/lnd/clm/src/dyn_subgrid/dynConsBiogeophysMod.F90 +M models/lnd/clm/src/dyn_subgrid/dynVarMod.F90.in +M models/lnd/clm/src/dyn_subgrid/dynVarTimeInterpMod.F90.in +M models/lnd/clm/src/dyn_subgrid/dynInitColumnsMod.F90 +M models/lnd/clm/src/unit_test_shr/unittestSubgridMod.F90 +M models/lnd/clm/src/CMakeLists.txt +M models/lnd/clm/src/cpl/lnd_comp_esmf.F90 +M models/lnd/clm/src/cpl/lnd_import_export.F90 +M models/lnd/clm/src/cpl/lnd_comp_mct.F90 +M SVN_EXTERNAL_DIRECTORIES +M ChangeLog + +================================================================================ +Originator: muszala +Date: 18 Nov 2014 +Model: clm-ed +Version: ed_v010_17_clm4_5_1_r095 +One-line: fix typos in .ChangeLogED + +M .ChangeLogED + +================================================================================ +Originator: muszala +Date: 18 Nov 2014 +Model: clm-ed +Version: ed_v010_16_clm4_5_1_r095 +One-line: merge up to clm4_5_1_r095 + +Merge from clm 092 to 095 + +M .ChangeLogED +M ChangeLog +M ChangeSum +M SVN_EXTERNAL_DIRECTORIES +M models/lnd/clm/bld/CLMBuildNamelist.pm +M models/lnd/clm/bld/clm.buildnml.csh +M models/lnd/clm/bld/listDefaultNamelist.pl +M models/lnd/clm/bld/namelist_files/namelist_defaults.xsl +M models/lnd/clm/bld/namelist_files/namelist_defaults_clm4_0.xml +M models/lnd/clm/bld/namelist_files/namelist_defaults_clm4_5.xml +M models/lnd/clm/bld/namelist_files/namelist_defaults_overall.xml +M models/lnd/clm/bld/namelist_files/namelist_definition_clm4_0.xml +M models/lnd/clm/bld/namelist_files/namelist_definition_clm4_5.xml +M models/lnd/clm/bld/test_build_namelist/t/input/namelist_defaults_clm4_5_test.xml +M models/lnd/clm/bld/test_build_namelist/t/input/namelist_definition_clm4_5_test.xml +M models/lnd/clm/bld/unit_testers/build-namelist_test.pl +M models/lnd/clm/bld/unit_testers/xFail/expectedClmTestFails.xml +M models/lnd/clm/bld/user_nl_clm +M models/lnd/clm/doc/ChangeLog +M models/lnd/clm/doc/ChangeSum +M models/lnd/clm/doc/UsersGuide/custom.xml +M models/lnd/clm/src/biogeochem/CNAllocationMod.F90 +M models/lnd/clm/src/biogeochem/CNDecompMod.F90 +M models/lnd/clm/src/biogeochem/CNEcosystemDynMod.F90 +M models/lnd/clm/src/biogeochem/CropType.F90 +A + models/lnd/clm/src/biogeochem/NutrientCompetitionCLM45defaultMod.F90 +A + models/lnd/clm/src/biogeochem/NutrientCompetitionFactoryMod.F90 +A + models/lnd/clm/src/biogeochem/NutrientCompetitionMethodMod.F90 +M models/lnd/clm/src/biogeophys/SoilWaterMovementMod.F90 +M models/lnd/clm/src/main/clm_driver.F90 +MM models/lnd/clm/src/main/clm_initializeMod.F90 +M models/lnd/clm/src/main/clm_varctl.F90 +MM models/lnd/clm/src/main/controlMod.F90 +M models/lnd/clm/src/main/readParamsMod.F90 +M models/lnd/clm/src/main/subgridAveMod.F90 +M models/lnd/clm/src_clm40/main/clm_varctl.F90 +M models/lnd/clm/src_clm40/main/controlMod.F90 + +================================================================================ +Originator: rosief +Date: 5 Nov 2014 +Model: clm-ed +Version: ed_v010_15_clm4_5_1_r092 +One-line: fix bug in ED_GDD0 handling + +We had wrongly fixed the ED_GDD issue, by ignoring the fact that it was also being +accumulated in EDPhenology. Also, in EDPhenology, there was a bug with switched +round 'day' and 'month' arguments, so that month was almost always >7 +and thus the accumulation was too often zeroed (meaning no leaf-on) + +M models/lnd/clm/src/ED/main/EDBioType.F90 +M models/lnd/clm/src/ED/main/EDCLMLinkMod.F90 +M models/lnd/clm/src/biogeophys/TemperatureType.F90 + +================================================================================ + +Originator: muszala +Date: 5 Nov 2014 +Model: clm-ed +Version: ed_v010_15_clm4_5_1_r092 +One-line: fix bug in ED_GDD0 handling + +There was a problem in TemperatureType.F90 in which ED_GDD0 was +not being accumulated. On writing the restart file for ED, this +field was sometimes causing the simulation to crash. To fix, +ED_GDD0 accumulate code was brought back into TemperatureType as +was phen_cd_status. + +M models/lnd/clm/src/ED/main/EDBioType.F90 +M models/lnd/clm/src/ED/main/EDCLMLinkMod.F90 +M models/lnd/clm/src/ED/main/EDRestVectorMod.F90 +M models/lnd/clm/src/biogeophys/TemperatureType.F90 +M models/lnd/clm/src/main/clm_driver.F90 + +================================================================================ +Originator: muszala +Date: 4 Nov 2014 +Model: clm-ed +Version: ed_v010_14_clm4_5_1_r092 +One-line: merge up to clm4_5_1_r092 + +M .ChangeLogED +M ChangeLog +M ChangeSum +M SVN_EXTERNAL_DIRECTORIES +M models/lnd/clm/bld/unit_testers/xFail/expectedClmTestFails.xml +M models/lnd/clm/doc/ChangeLog +M models/lnd/clm/doc/ChangeSum +M models/lnd/clm/src/biogeophys/FrictionVelocityMod.F90 +A + models/lnd/clm/src/main/dtypes.h +M models/lnd/clm/src/main/ncdio_pio.F90 +M models/lnd/clm/src/main/ncdio_pio.F90.in +M models/lnd/clm/src_clm40/biogeophys/FrictionVelocityMod.F90 +M models/lnd/clm/src_clm40/main/ncdio_pio.F90 +M models/lnd/clm/src_clm40/main/ncdio_pio.F90.in + +================================================================================ +Originator: muszala +Date: 4 Nov 2014 +Model: clm-ed +Version: ed_v010_14_clm4_5_1_r091 +One-line: reverting .ChangeLogED + +Trying to fiddle with the ChangeLog, but that might have stopped emails from +going out when a tag was made...reverting. + +M .ChangeLogED + +================================================================================ +Originator: muszala +Date: 3 Nov 2014 +Model: clm-ed +Version: ed_v010_13_clm4_5_1_r091 +One-line: merge up to clm4_5_1_r091 + +This merge from CLM address valgrind errors in CLM and RTM. + +M models/lnd/clm/bld/unit_testers/xFail/expectedClmTestFails.xml +M models/lnd/clm/doc/ChangeLog +M models/lnd/clm/doc/ChangeSum +M models/lnd/clm/src/biogeochem/VOCEmissionMod.F90 +M models/lnd/clm/src/main/histFileMod.F90 +M models/lnd/clm/src/main/ncdio_pio.F90 +M models/lnd/clm/src/main/ncdio_pio.F90.in +M SVN_EXTERNAL_DIRECTORIES +M ChangeLog +M ChangeSum + +================================================================================ +Originator: muszala +Date: 3 Nov 2014 +Model: clm-ed +Version: ed_v010_13_clm4_5_1_r090 +One-line: bring in mods from R. Fisher before merging up to clm4_5_1_r091 + +M models/lnd/clm/src/ED/main/EDCLMLinkMod.F90 +-- add some write statements +M models/lnd/clm/src/ED/biogeophys/EDSurfaceAlbedoMod.F90 +-- change chil handling + - chil = 0.01_r8 + + chil(p) = 0.01_r8 + +================================================================================ +Originator: muszala +Date: 16 Oct 2014 +Model: clm-ed +Version: ed_v010_12_clm4_5_1_r090 +One-line: merge from clm4_5_1_r086 to clm4_5_1_r090 + +M .ChangeLog_template +M models/lnd/clm/test/tools/input_tests_master +M models/lnd/clm/test/tools/tests_posttag_yong +M models/lnd/clm/test/tools/test_driver.sh +M models/lnd/clm/test/tools/tests_posttag_nompi_regression +M models/lnd/clm/test/tools/tests_pretag_yellowstone_nompi +D models/lnd/clm/tools/clm4_5/interpinic +D models/lnd/clm/tools/clm4_5/interpinic/interpinic.runoptions +D models/lnd/clm/tools/clm4_5/interpinic/clmi.I2000CLM45BGC.2000-01-01.10x15_simyr2000_c131104.nc +D models/lnd/clm/tools/clm4_5/interpinic/src +D models/lnd/clm/tools/clm4_5/interpinic/src/interpinic.F90 +D models/lnd/clm/tools/clm4_5/interpinic/src/shr_infnan_mod.F90 +D models/lnd/clm/tools/clm4_5/interpinic/src/Makefile.common +D models/lnd/clm/tools/clm4_5/interpinic/src/shr_isnan.c +D models/lnd/clm/tools/clm4_5/interpinic/src/shr_sys_mod.F90 +D models/lnd/clm/tools/clm4_5/interpinic/src/fmain.F90 +D models/lnd/clm/tools/clm4_5/interpinic/src/shr_log_mod.F90 +D models/lnd/clm/tools/clm4_5/interpinic/src/Mkdepends +D models/lnd/clm/tools/clm4_5/interpinic/src/Srcfiles +D models/lnd/clm/tools/clm4_5/interpinic/src/shr_isnan.h +D models/lnd/clm/tools/clm4_5/interpinic/src/Filepath +D models/lnd/clm/tools/clm4_5/interpinic/src/Makefile +D models/lnd/clm/tools/clm4_5/interpinic/src/shr_kind_mod.F90 +D models/lnd/clm/tools/clm4_5/interpinic/src/shr_const_mod.F90 +D models/lnd/clm/tools/clm4_5/interpinic/addmetadata +D models/lnd/clm/tools/clm4_5/interpinic/README +M models/lnd/clm/tools/SVN_EXTERNAL_DIRECTORIES +D models/lnd/clm/tools/shared/mkmapgrids/src +D models/lnd/clm/tools/shared/mkmapgrids/src/Makefile.common +D models/lnd/clm/tools/shared/mkmapgrids/src/domainMod.F90 +D models/lnd/clm/tools/shared/mkmapgrids/src/shr_sys_mod.F90 +D models/lnd/clm/tools/shared/mkmapgrids/src/shr_file_mod.F90 +D models/lnd/clm/tools/shared/mkmapgrids/src/nanMod.F90 +D models/lnd/clm/tools/shared/mkmapgrids/src/shr_log_mod.F90 +D models/lnd/clm/tools/shared/mkmapgrids/src/Mkdepends +D models/lnd/clm/tools/shared/mkmapgrids/src/Srcfiles +D models/lnd/clm/tools/shared/mkmapgrids/src/mkmapgrids.F90 +D models/lnd/clm/tools/shared/mkmapgrids/src/Filepath +D models/lnd/clm/tools/shared/mkmapgrids/src/Makefile +D models/lnd/clm/tools/shared/mkmapgrids/src/shr_kind_mod.F90 +D models/lnd/clm/tools/shared/mkmapgrids/mkmapgrids.namelist +D models/lnd/clm/tools/shared/mkmapgrids/mkmapgrids.csh +M models/lnd/clm/tools/shared/mkmapgrids/README +M models/lnd/clm/tools/README + M models/lnd/clm/tools +M models/lnd/clm/bld/configure +M models/lnd/clm/bld/unit_testers/xFail/expectedClmTestFails.xml +M models/lnd/clm/bld/namelist_files/namelist_defaults_clm4_5.xml +M models/lnd/clm/bld/namelist_files/namelist_definition_clm4_5.xml +M models/lnd/clm/bld/CLMBuildNamelist.pm +M models/lnd/clm/doc/ChangeLog +M models/lnd/clm/doc/ChangeSum +D models/lnd/clm/src/unit_test_mocks +D models/lnd/clm/src/unit_test_mocks/util_share +D models/lnd/clm/src/unit_test_mocks/util_share/ncdio_var.F90 +D models/lnd/clm/src/unit_test_mocks/util_share/restUtilMod_mock.F90 +D models/lnd/clm/src/unit_test_mocks/util_share/GetGlobalValuesMod_mock.F90 +D models/lnd/clm/src/unit_test_mocks/util_share/ncdio_var.F90.in +D models/lnd/clm/src/unit_test_mocks/util_share/restUtilMod_mock.F90.in +D models/lnd/clm/src/unit_test_mocks/util_share/clm_time_manager_mock.F90 +D models/lnd/clm/src/unit_test_mocks/util_share/ncdio_pio_mock.F90 +D models/lnd/clm/src/unit_test_mocks/util_share/spmdMod_mock.F90 +D models/lnd/clm/src/unit_test_mocks/util_share/do_genf90 +D models/lnd/clm/src/unit_test_mocks/util_share/CMakeLists.txt +D models/lnd/clm/src/unit_test_mocks/util_share/ncdio_pio_mock.F90.in +D models/lnd/clm/src/unit_test_mocks/csm_share +D models/lnd/clm/src/unit_test_mocks/csm_share/shr_sys_mod_mock.F90 +D models/lnd/clm/src/unit_test_mocks/csm_share/mct_mod_mock.F90 +D models/lnd/clm/src/unit_test_mocks/csm_share/CMakeLists.txt +D models/lnd/clm/src/unit_test_mocks/main +D models/lnd/clm/src/unit_test_mocks/main/CMakeLists.txt +D models/lnd/clm/src/unit_test_mocks/main/histFileMod_mock.F90 +D models/lnd/clm/src/unit_test_mocks/dyn_subgrid +D models/lnd/clm/src/unit_test_mocks/dyn_subgrid/dynFileMod_mock.F90 +D models/lnd/clm/src/unit_test_mocks/dyn_subgrid/CMakeLists.txt +D models/lnd/clm/src/unit_test_mocks/CMakeLists.txt +M models/lnd/clm/src/utils/CMakeLists.txt +A models/lnd/clm/src/biogeochem/CMakeLists.txt +M models/lnd/clm/src/biogeochem/VOCEmissionMod.F90 +M models/lnd/clm/src/biogeochem/DryDepVelocity.F90 +MM models/lnd/clm/src/main/clm_varcon.F90 +MM models/lnd/clm/src/main/clm_initializeMod.F90 +M models/lnd/clm/src/main/restFileMod.F90 +M models/lnd/clm/src/main/LandunitType.F90 +M models/lnd/clm/src/main/CMakeLists.txt +MM models/lnd/clm/src/main/controlMod.F90 +M models/lnd/clm/src/main/filterMod.F90 +M models/lnd/clm/src/main/clm_driver.F90 +M models/lnd/clm/src/ED/biogeochem/EDPhysiologyMod.F90 +M models/lnd/clm/src/ED/main/EDCLMLinkMod.F90 +M models/lnd/clm/src/ED/main/EDBioType.F90 +M models/lnd/clm/src/ED/main/EDRestVectorMod.F90 +M models/lnd/clm/src/ED/main/EDInitMod.F90 +M models/lnd/clm/src/ED/main/EDMainMod.F90 +A models/lnd/clm/src/ED/main/CMakeLists.txt +A models/lnd/clm/src/ED/biogeophys/EDPhenologyMod.F90 +M models/lnd/clm/src/README.unit_testing +M models/lnd/clm/src/biogeophys/BalanceCheckMod.F90 +M models/lnd/clm/src/biogeophys/WaterfluxType.F90 +MM models/lnd/clm/src/biogeophys/SoilTemperatureMod.F90 +M models/lnd/clm/src/biogeophys/SnowHydrologyMod.F90 +M models/lnd/clm/src/biogeophys/SoilFluxesMod.F90 +M models/lnd/clm/src/biogeophys/TemperatureType.F90 +A models/lnd/clm/src/biogeophys/HumanIndexMod.F90 +M models/lnd/clm/src/biogeophys/LakeFluxesMod.F90 +M models/lnd/clm/src/biogeophys/SoilStateType.F90 +M models/lnd/clm/src/biogeophys/HydrologyDrainageMod.F90 +MM models/lnd/clm/src/biogeophys/BareGroundFluxesMod.F90 +MM models/lnd/clm/src/biogeophys/CanopyFluxesMod.F90 +M models/lnd/clm/src/biogeophys/CMakeLists.txt +A models/lnd/clm/src/biogeophys/test/Irrigation_test/test_irrigation_deficit.pf +A models/lnd/clm/src/biogeophys/test/Irrigation_test/test_irrigation_multipatch.pf +A models/lnd/clm/src/biogeophys/test/Irrigation_test/IrrigationWrapperMod.F90 +A models/lnd/clm/src/biogeophys/test/Irrigation_test/test_irrigation_singlepatch.pf +A models/lnd/clm/src/biogeophys/test/Irrigation_test/CMakeLists.txt +A models/lnd/clm/src/biogeophys/test/Irrigation_test/README +A models/lnd/clm/src/biogeophys/test/Irrigation_test +A models/lnd/clm/src/biogeophys/test/HumanStress_test/test_humanstress.pf +A models/lnd/clm/src/biogeophys/test/HumanStress_test/CMakeLists.txt +A models/lnd/clm/src/biogeophys/test/HumanStress_test +M models/lnd/clm/src/biogeophys/test/CMakeLists.txt +A models/lnd/clm/src/biogeophys/UrbBuildTempOleson2015Mod.F90 +M models/lnd/clm/src/biogeophys/CanopyHydrologyMod.F90 +M models/lnd/clm/src/biogeophys/EnergyFluxType.F90 +M models/lnd/clm/src/biogeophys/UrbanFluxesMod.F90 +A models/lnd/clm/src/biogeophys/IrrigationMod.F90 +M models/lnd/clm/src/biogeophys/LakeHydrologyMod.F90 +M models/lnd/clm/src/biogeophys/UrbanParamsType.F90 +M models/lnd/clm/src/dyn_subgrid/CMakeLists.txt +A models/lnd/clm/src/unit_test_shr/test/unittestFilterBuilder_test/test_filterBuilder.pf +A models/lnd/clm/src/unit_test_shr/test/unittestFilterBuilder_test/CMakeLists.txt +A models/lnd/clm/src/unit_test_shr/test/unittestFilterBuilder_test +A models/lnd/clm/src/unit_test_shr/test/CMakeLists.txt +A models/lnd/clm/src/unit_test_shr/test +A models/lnd/clm/src/unit_test_shr/unittestFilterBuilderMod.F90 +A models/lnd/clm/src/unit_test_shr/unittestSimpleSubgridSetupsMod.F90 +M models/lnd/clm/src/unit_test_shr/unittestSubgridMod.F90 +M models/lnd/clm/src/unit_test_shr/CMakeLists.txt +M models/lnd/clm/src/CMakeLists.txt +A models/lnd/clm/src/unit_test_stubs/utils/restUtilMod_stub.F90 +A models/lnd/clm/src/unit_test_stubs/utils/do_genf90 +A models/lnd/clm/src/unit_test_stubs/utils/restUtilMod_stub.F90.in +A models/lnd/clm/src/unit_test_stubs/utils/CMakeLists.txt +A models/lnd/clm/src/unit_test_stubs/utils/clm_time_manager_stub.F90 +A models/lnd/clm/src/unit_test_stubs/utils/spmdMod_stub.F90 +A models/lnd/clm/src/unit_test_stubs/utils +A models/lnd/clm/src/unit_test_stubs/csm_share/shr_mpi_mod_stub.F90 +A models/lnd/clm/src/unit_test_stubs/csm_share/mct_mod_stub.F90 +A models/lnd/clm/src/unit_test_stubs/csm_share/CMakeLists.txt +A models/lnd/clm/src/unit_test_stubs/csm_share +A models/lnd/clm/src/unit_test_stubs/main/histFileMod_stub.F90 +A models/lnd/clm/src/unit_test_stubs/main/ncdio_var.F90 +A models/lnd/clm/src/unit_test_stubs/main/ncdio_pio_fake.F90 +A models/lnd/clm/src/unit_test_stubs/main/ncdio_var.F90.in +A models/lnd/clm/src/unit_test_stubs/main/GetGlobalValuesMod_stub.F90 +A models/lnd/clm/src/unit_test_stubs/main/do_genf90 +A models/lnd/clm/src/unit_test_stubs/main/ncdio_pio_fake.F90.in +A models/lnd/clm/src/unit_test_stubs/main/CMakeLists.txt +A models/lnd/clm/src/unit_test_stubs/main +A models/lnd/clm/src/unit_test_stubs/dyn_subgrid/dynFileMod_stub.F90 +A models/lnd/clm/src/unit_test_stubs/dyn_subgrid/CMakeLists.txt +A models/lnd/clm/src/unit_test_stubs/dyn_subgrid +A models/lnd/clm/src/unit_test_stubs/CMakeLists.txt +A models/lnd/clm/src/unit_test_stubs +M SVN_EXTERNAL_DIRECTORIES + +================================================================================ +Originator: muszala +Date: 16 Oct 2014 +Model: clm-ed +Version: ed_v010_12_clm4_5_1_r086 +One-line: bug fixes from R. Fisher. + +M models/lnd/clm/src/ED/biogeochem/EDPhysiologyMod.F90 +-- bring in CLM time manager code, remove old date handling +M models/lnd/clm/src/ED/biogeophys/EDSurfaceAlbedoMod.F90 +-- put albd(p,ib) and albi(p,ib) exprs back in place (they were commented out) +M models/lnd/clm/src/ED/biogeophys/EDPhotosynthesisMod.F90 +-- change jmax25top(FT) = 0.167_r8 * vcmax25top(FT) to +-- jmax25top(FT) = 1.67_r8 * vcmax25top(FT) +-- add else branch for no leaf area + +Note: I didn't make ed_v010_11_clm4_5_1_r086 so this current tag brings in + the changes in the prior tag. ed_v010_11 does not exist in the repo. + +================================================================================ +Originator: muszala +Date: 30 Sept 2014 +Model: clm-ed +Version: ed_v010_11_clm4_5_1_r086 +One-line: add .ChangeLogED and doc/ED + +A models/lnd/clm/doc/ED +A .ChangeLogED + +================================================================================ +Originator: muszala +Date: 25 Sept 2014 +Model: clm-ed +Version: ed_v010_10_clm4_5_1_r086 +One-line: official merge up to clm4_5_1_r086 + +Create branch tag after merge up to clm4_5_1_r085. ed_v010_10_clm4_5_1_r086 and +clm4_5_1_r086 are currently identical. + +================================================================================ +Originator: muszala +Date: 23 Sept 2014 +Model: clm-ed +Version: ed_v010_10_clm4_5_1_r085 +One-line: additional mods for ED from R Fisher + +M models/lnd/clm/src/main/lnd2atmMod.F90 +-- change intent of waterstate_vars to inout (fixes bug 2043) +M models/lnd/clm/src/main/clm_driver.F90 +-- add EDbio_vars to edmodel actual argument list +M models/lnd/clm/src/ED/biogeochem/EDCohortDynamicsMod.F90 +-- change leaves_off_switch and laimemory handling +M models/lnd/clm/src/ED/biogeochem/EDPhysiologyMod.F90 +-- rework cold deciduous and threshold code. add fragmentation_scaler routine +M models/lnd/clm/src/ED/main/EDMainMod.F90 +-- change argument lists to include EDbio_vars for ecosystem_dynamics +-- and phenology +M models/lnd/clm/src/ED/biogeophys/EDSurfaceAlbedoMod.F90 +-- overhaul ED norman radiation code +M models/lnd/clm/src/ED/biogeophys/EDPhotosynthesisMod.F90 +-- tweak calculation of jmax25top and tpu25top +M models/lnd/clm/src/biogeophys/SurfaceAlbedoMod.F90 + -- clean up two comments + +================================================================================ diff --git a/ChangeLog b/ChangeLog index 2ec83ff776..8d883bd1df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4266,27 +4266,12 @@ Changes answers relative to baseline: YES (but only because of bug 1998) =============================================================== Tag name: clm4_5_1_r089 Originator(s): erik (Erik) -Date: Mon Oct 13 13:46:43 MDT 2014 +Date: Fri Oct 10 13:52:12 MDT 2014 One-line Summary: Bring new urban building temperature to trunk as a clm5.0 feature as well as human-stress index calculations Purpose of changes: -New prognostic internal building air temperature methodology for CLM5.0. Retain the older simpler method -for CLM4.5. The namelist toggle to switch between them is: building_temp_method. By default for clm4_5 physics -the older method is used and for clm5_0 the newer one is used. Also add in a package of human-stress index -calculations. Again this is by default on for clm5_0 and off for clm4_5. - -The new building air temperature methodology, solves the system of equations for internal: air, roof, floor, -and wall (shade and sunlit) Temperatures. It uses the LAPACK subroutine DGESV to solve the system. It also -figures out the energy flux needed to either cool the building air temperature to a maximum allowed temperature -or to heat it to the minimum allowed temperature. - -Add in the new load balancing tool and the PyReshaper tool (changes multi-variable -monthly history files into single-variable time-series files). - -Remove the now unneeded clm4_5 interpinic as well as the mkmapgrids FORTRAN program. - Requirements for tag: Bring in new clm5_0 building temperature as option, Fix scripts bugs, bug 2053/2032 Test level of tag: regular @@ -4320,13 +4305,12 @@ Describe any changes made to the namelist: new namelists and namelist items List any changes to the defaults for the boundary datasets: None Describe any substantial timing or memory changes: - clm5_0 memory use is greater than clm4_5 due to human_stress_indices calculations - and output on history (I've seen it make up to a 20% difference) + clm5_0 memory use is about 20% greater than clm4_5 due to human_stress_indices calculations + and output on history Code reviewed by: self, oleson, sacks, mvertens, andre List any svn externals directories updated (csm_share, mct, etc.): scripts, Machines, rtm, cism, csm_share - Update to cesm1_3_alpha13c externals. Also add in load_balancing_tool and pyReshaper scripts to scripts4_141009 @@ -4339,7 +4323,7 @@ List any svn externals directories updated (csm_share, mct, etc.): scripts, Mach List all files eliminated: ---------- Remove clm4_5 interpinic, online interpinic supersedes it +--------- Remove clm4_5 interpinic, online interpinic superseeds it D models/lnd/clm/tools/clm4_5/interpinic D models/lnd/clm/tools/clm4_5/interpinic/* D models/lnd/clm/tools/clm4_5/interpinic/src/* @@ -4492,9 +4476,7 @@ CLM testing: CLM tag used for the baseline comparisons: clm4_5_1_r088 -Changes answers relative to baseline: No for CLM40 and CLM45 - But, answers DO change for CLM50 - (except scripts tag update changes history files for IG and irrigation compsets/tests) +Changes answers relative to baseline: No (except scripts tag update changes history files for IG compsets) =============================================================== diff --git a/components/clm/doc/ChangeLog b/components/clm/doc/ChangeLog index 2ec83ff776..8d883bd1df 100644 --- a/components/clm/doc/ChangeLog +++ b/components/clm/doc/ChangeLog @@ -4266,27 +4266,12 @@ Changes answers relative to baseline: YES (but only because of bug 1998) =============================================================== Tag name: clm4_5_1_r089 Originator(s): erik (Erik) -Date: Mon Oct 13 13:46:43 MDT 2014 +Date: Fri Oct 10 13:52:12 MDT 2014 One-line Summary: Bring new urban building temperature to trunk as a clm5.0 feature as well as human-stress index calculations Purpose of changes: -New prognostic internal building air temperature methodology for CLM5.0. Retain the older simpler method -for CLM4.5. The namelist toggle to switch between them is: building_temp_method. By default for clm4_5 physics -the older method is used and for clm5_0 the newer one is used. Also add in a package of human-stress index -calculations. Again this is by default on for clm5_0 and off for clm4_5. - -The new building air temperature methodology, solves the system of equations for internal: air, roof, floor, -and wall (shade and sunlit) Temperatures. It uses the LAPACK subroutine DGESV to solve the system. It also -figures out the energy flux needed to either cool the building air temperature to a maximum allowed temperature -or to heat it to the minimum allowed temperature. - -Add in the new load balancing tool and the PyReshaper tool (changes multi-variable -monthly history files into single-variable time-series files). - -Remove the now unneeded clm4_5 interpinic as well as the mkmapgrids FORTRAN program. - Requirements for tag: Bring in new clm5_0 building temperature as option, Fix scripts bugs, bug 2053/2032 Test level of tag: regular @@ -4320,13 +4305,12 @@ Describe any changes made to the namelist: new namelists and namelist items List any changes to the defaults for the boundary datasets: None Describe any substantial timing or memory changes: - clm5_0 memory use is greater than clm4_5 due to human_stress_indices calculations - and output on history (I've seen it make up to a 20% difference) + clm5_0 memory use is about 20% greater than clm4_5 due to human_stress_indices calculations + and output on history Code reviewed by: self, oleson, sacks, mvertens, andre List any svn externals directories updated (csm_share, mct, etc.): scripts, Machines, rtm, cism, csm_share - Update to cesm1_3_alpha13c externals. Also add in load_balancing_tool and pyReshaper scripts to scripts4_141009 @@ -4339,7 +4323,7 @@ List any svn externals directories updated (csm_share, mct, etc.): scripts, Mach List all files eliminated: ---------- Remove clm4_5 interpinic, online interpinic supersedes it +--------- Remove clm4_5 interpinic, online interpinic superseeds it D models/lnd/clm/tools/clm4_5/interpinic D models/lnd/clm/tools/clm4_5/interpinic/* D models/lnd/clm/tools/clm4_5/interpinic/src/* @@ -4492,9 +4476,7 @@ CLM testing: CLM tag used for the baseline comparisons: clm4_5_1_r088 -Changes answers relative to baseline: No for CLM40 and CLM45 - But, answers DO change for CLM50 - (except scripts tag update changes history files for IG and irrigation compsets/tests) +Changes answers relative to baseline: No (except scripts tag update changes history files for IG compsets) =============================================================== diff --git a/components/clm/src/CMakeLists.txt b/components/clm/src/CMakeLists.txt index 89e9f4f206..a3bb15cf8c 100644 --- a/components/clm/src/CMakeLists.txt +++ b/components/clm/src/CMakeLists.txt @@ -24,6 +24,7 @@ add_subdirectory(${CLM_ROOT}/src/biogeophys clm_biogeophys) add_subdirectory(${CLM_ROOT}/src/dyn_subgrid clm_dyn_subgrid) add_subdirectory(${CLM_ROOT}/src/main clm_main) add_subdirectory(${CLM_ROOT}/src/ED/main ed_main) +add_subdirectory(${CLM_ROOT}/src/ED/biogeophys ed_biogeophys) # Add general unit test directories (stubbed out files, etc.) add_subdirectory(unit_test_stubs) diff --git a/components/clm/src/ED/biogeochem/EDCohortDynamicsMod.F90 b/components/clm/src/ED/biogeochem/EDCohortDynamicsMod.F90 index 7fe96b45a5..ef3817dc37 100755 --- a/components/clm/src/ED/biogeochem/EDCohortDynamicsMod.F90 +++ b/components/clm/src/ED/biogeochem/EDCohortDynamicsMod.F90 @@ -211,6 +211,7 @@ subroutine allocate_live_biomass(cc_p) currentcohort%balive -currentcohort%bl- currentcohort%br - currentcohort%bsw, currentcohort%status_coh,currentcohort%balive write(iulog,*) 'actual vs predicted balive',ideal_balive,currentcohort%balive ,ratio_balive,leaf_frac write(iulog,*) 'leaf,root,stem',currentcohort%bl,currentcohort%br,currentcohort%bsw + write(iulog,*) 'pft',ft,pftcon%evergreen(ft),pftcon%season_decid(ft),leaves_off_switch endif currentCohort%b = currentCohort%bdead + currentCohort%balive diff --git a/components/clm/src/ED/biogeochem/EDGrowthFunctionsMod.F90 b/components/clm/src/ED/biogeochem/EDGrowthFunctionsMod.F90 index a497df202a..086d0f7775 100755 --- a/components/clm/src/ED/biogeochem/EDGrowthFunctionsMod.F90 +++ b/components/clm/src/ED/biogeochem/EDGrowthFunctionsMod.F90 @@ -103,6 +103,7 @@ real(r8) function Bleaf( cohort_in ) ! ============================================================================ type(ed_cohort_type), intent(in) :: cohort_in + real(r8) :: slascaler ! changes the target biomass according to the SLA if(cohort_in%dbh < 0._r8.or.cohort_in%pft == 0.or.cohort_in%dbh > 1000.0_r8)then write(iulog,*) 'problems in bleaf',cohort_in%dbh,cohort_in%pft @@ -111,12 +112,17 @@ real(r8) function Bleaf( cohort_in ) if(cohort_in%dbh <= EDecophyscon%max_dbh(cohort_in%pft))then bleaf = 0.0419_r8 * (cohort_in%dbh**1.56) * EDecophyscon%wood_density(cohort_in%pft)**0.55_r8 else - bleaf = 0.0419_r8 * (EDecophyscon%max_dbh(cohort_in%pft)**1.56) * EDecophyscon%wood_density(cohort_in%pft)**0.55_r8 - endif - + bleaf = 0.0419_r8 * (EDecophyscon%max_dbh(cohort_in%pft)**1.56) * EDecophyscon%wood_density(cohort_in%pft)**0.55_r8 + endif + slascaler = 0.03_r8/pftcon%slatop(cohort_in%pft) + bleaf = bleaf * slascaler + + !write(*,*) 'bleaf',bleaf, slascaler,cohort_in%pft + !Adjust for canopies that have become so deep that their bottom layer is not producing any carbon... !nb this will change the allometry and the effects of this remain untested. RF. April 2014 - bleaf = bleaf*cohort_in%canopy_trim + + bleaf = bleaf * cohort_in%canopy_trim return end function Bleaf diff --git a/components/clm/src/ED/biogeochem/EDPatchDynamicsMod.F90 b/components/clm/src/ED/biogeochem/EDPatchDynamicsMod.F90 index 826e7a60ac..397606ced1 100755 --- a/components/clm/src/ED/biogeochem/EDPatchDynamicsMod.F90 +++ b/components/clm/src/ED/biogeochem/EDPatchDynamicsMod.F90 @@ -1096,7 +1096,11 @@ subroutine fuse_2_patches(dp, rp) rp%frac_burnt = (dp%frac_burnt*dp%area + rp%frac_burnt*rp%area)/(dp%area + rp%area) rp%burnt_frac_litter(:) = (dp%burnt_frac_litter(:)*dp%area + rp%burnt_frac_litter(:)*rp%area)/(dp%area + rp%area) rp%btran_ft(:) = (dp%btran_ft(:)*dp%area + rp%btran_ft(:)*rp%area)/(dp%area + rp%area) - + rp%dleaf_litter_dt(:) = (dp%dleaf_litter_dt(:)*dp%area + rp%dleaf_litter_dt(:)*rp%area)/(dp%area+rp%area) + rp%leaf_litter_in(:) = (dp%leaf_litter_in(:)*dp%area + rp%leaf_litter_in(:)*rp%area)/(dp%area+rp%area) + rp%leaf_litter_out(:) = (dp%leaf_litter_out(:)*dp%area + rp%leaf_litter_out(:)*rp%area)/(dp%area+rp%area) + + rp%area = rp%area + dp%area !THIS MUST COME AT THE END! !insert donor cohorts into recipient patch diff --git a/components/clm/src/ED/biogeochem/EDPhenologyType.F90 b/components/clm/src/ED/biogeochem/EDPhenologyType.F90 index f948fc7024..00bcff7740 100644 --- a/components/clm/src/ED/biogeochem/EDPhenologyType.F90 +++ b/components/clm/src/ED/biogeochem/EDPhenologyType.F90 @@ -37,6 +37,7 @@ module EDPhenologyType ! Public procedures procedure, public :: accumulateAndExtract procedure, public :: init + procedure, public :: restart procedure, public :: initAccVars procedure, public :: initAccBuffer procedure, public :: clean @@ -51,6 +52,40 @@ module EDPhenologyType contains !------------------------------------------------------------------------------ + + !------------------------------------------------------------------------ + subroutine Restart(this, bounds, ncid, flag) + ! + ! !DESCRIPTION: + ! Read/Write module information to/from restart file. + ! + ! !USES: + use shr_log_mod , only : errMsg => shr_log_errMsg + use spmdMod , only : masterproc + use abortutils , only : endrun + use ncdio_pio , only : file_desc_t, ncd_double + use restUtilMod + ! + ! !ARGUMENTS: + class(ed_phenology_type) :: this + type(bounds_type), intent(in) :: bounds + type(file_desc_t), intent(inout) :: ncid + character(len=*) , intent(in) :: flag + + ! + ! !LOCAL VARIABLES: + integer :: j,c ! indices + logical :: readvar ! determine if variable is on initial file + !----------------------------------------------------------------------- + + call restartvar(ncid=ncid, flag=flag, varname='ED_GDD', xtype=ncd_double, & + dim1name='pft', & + long_name='growing degree days for ED', units='ddays', & + interpinic_flag='interp', readvar=readvar, data=this%ED_GDD_patch) + + + end subroutine restart + subroutine accumulateAndExtract( this, bounds, & t_ref2m_patch, & gridcell, latdeg, & @@ -78,6 +113,7 @@ subroutine accumulateAndExtract( this, bounds, & ! local variables ! ! update_accum_field expects a pointer, can't make this an allocatable + ! real(r8), pointer :: rbufslp(:) ! temporary single level - pft level integer :: g, p ! local index for gridcell and pft integer :: ier ! error code @@ -91,7 +127,7 @@ subroutine accumulateAndExtract( this, bounds, & ! Accumulate and extract GDD0 for ED do p = bounds%begp,bounds%endp - + g = gridcell(p) if (latdeg(g) >= 0._r8) then @@ -120,11 +156,10 @@ subroutine accumulateAndExtract( this, bounds, & if( latdeg(g) < 0._r8 .and. month < calParams%june ) then !do not accumulate in earlier half of year. rbufslp(p) = accumResetVal endif - end do call update_accum_field ( trim(this%accString), rbufslp, get_nstep() ) - call extract_accum_field ( trim(this%accstring), this%ED_GDD_patch, get_nstep() ) + call extract_accum_field ( trim(this%accString), this%ED_GDD_patch, get_nstep() ) deallocate(rbufslp) diff --git a/components/clm/src/ED/biogeochem/EDPhysiologyMod.F90 b/components/clm/src/ED/biogeochem/EDPhysiologyMod.F90 index ab543045de..969f8481b1 100755 --- a/components/clm/src/ED/biogeochem/EDPhysiologyMod.F90 +++ b/components/clm/src/ED/biogeochem/EDPhysiologyMod.F90 @@ -8,6 +8,7 @@ module EDPhysiologyMod use shr_kind_mod , only : r8 => shr_kind_r8 use clm_varctl , only : iulog + use spmdMod , only : masterproc use TemperatureType , only : temperature_type use SoilStateType , only : soilstate_type use WaterstateType , only : waterstate_type @@ -85,6 +86,7 @@ subroutine non_canopy_derivs( currentPatch, temperature_inst, soilstate_inst, wa currentPatch%leaf_litter_in(:) = 0.0_r8 currentPatch%root_litter_in(:) = 0.0_r8 + currentPatch%dleaf_litter_dt(:) = 0.0_r8 currentPatch%leaf_litter_out(:) = 0.0_r8 currentPatch%root_litter_out(:) = 0.0_r8 currentPatch%cwd_AG_in(:) = 0.0_r8 @@ -230,6 +232,8 @@ subroutine phenology( currentSite, ed_phenology_inst, temperature_inst, watersta ! ! !USES: use clm_varcon, only : tfrz + use clm_time_manager, only : get_days_per_year, get_curr_date + use clm_time_manager, only : get_ref_date, timemgr_datediff use EDTypesMod, only : udata ! ! !ARGUMENTS: @@ -247,6 +251,14 @@ subroutine phenology( currentSite, ed_phenology_inst, temperature_inst, watersta integer :: ncolddayslim ! critical no days underneath the threshold for leaf drop integer :: i integer :: timesincedleafon,timesincedleafoff,timesinceleafon,timesinceleafoff + integer :: refdate + integer :: curdate + + integer :: yr ! year (0, ...) + integer :: mon ! month (1, ..., 12) + integer :: day ! day of month (1, ..., 31) + integer :: sec ! seconds of the day + real(r8) :: gdd_threshold real(r8) :: a,b,c ! params of leaf-pn model from botta et al. 2000. real(r8) :: cold_t ! threshold below which cold days are counted @@ -256,13 +268,26 @@ subroutine phenology( currentSite, ed_phenology_inst, temperature_inst, watersta real(r8) :: off_time ! minimum number of days between leaf off and leaf on for drought phenology real(r8) :: temp_in_C ! daily averaged temperature in celcius real(r8) :: mindayson + real(r8) :: modelday + !------------------------------------------------------------------------ t_veg24 => temperature_inst%t_veg24_patch ! Input: [real(r8) (:)] avg pft vegetation temperature for last 24 hrs ED_GDD_patch => ed_phenology_inst%ED_GDD_patch ! Input: [real(r8) (:)] growing deg. days base 0 deg C (ddays) + g = currentSite%clmgcell + + call get_curr_date(yr, mon, day, sec) + curdate = yr*10000 + mon*100 + day + + call get_ref_date(yr, mon, day, sec) + refdate = yr*10000 + mon*100 + day + + call timemgr_datediff(refdate, 0, curdate, sec, modelday) + if ( masterproc ) write(iulog,*) 'modelday',modelday + ! Parameter of drought decid leaf loss in mm in top layer...FIX(RF,032414) ! - this is arbitrary and poorly understood. Needs work. ED_ drought_threshold = 0.15 @@ -315,11 +340,7 @@ subroutine phenology( currentSite, ed_phenology_inst, temperature_inst, watersta endif enddo - timesinceleafoff = t - currentSite%leafoffdate - if (t < currentSite%leafoffdate)then - timesinceleafoff = t +(365-currentSite%leafoffdate) - endif - + timesinceleafoff = modelday - currentSite%leafoffdate !LEAF ON: COLD DECIDUOUS. Needs to !1) have exceeded the growing degree day threshold !2) The leaves should not be on already @@ -327,17 +348,15 @@ subroutine phenology( currentSite, ed_phenology_inst, temperature_inst, watersta if (ED_GDD_patch(currentSite%oldest_patch%clm_pno) > gdd_threshold)then if (currentSite%status == 1)then if (currentSite%ncd >= 1)then - currentSite%status = 2 !alter status of site to 'leaves on' - currentSite%leafondate = t !record leaf on date - write(iulog,*) 'leaves on' + currentSite%status = 2 !alter status of site to 'leaves on' + currentSite%leafondate = t !record leaf on date + write(iulog,*) 'leaves on' endif !ncd endif !status endif !GDD - timesinceleafon = t - currentSite%leafondate - if (t < currentSite%leafondate)then - timesinceleafon = t +(365-currentSite%leafondate) - endif + timesinceleafon = modelday - currentSite%leafondate + !LEAF OFF: COLD THRESHOLD !Needs to: @@ -350,18 +369,18 @@ subroutine phenology( currentSite, ed_phenology_inst, temperature_inst, watersta if (timesinceleafon > mindayson)then if (currentSite%status == 2)then currentSite%status = 1 !alter status of site to 'leaves on' - currentSite%leafoffdate = t !record leaf off date - write(iulog,*) 'leaves off' + currentSite%leafoffdate = modelday !record leaf off date + write(iulog,*) 'leaves off cold' endif endif endif !LEAF OFF: COLD LIFESPAN THRESHOLD - if (timesinceleafoff > 360)then !remove leaves after a whole year when there is no 'off' period. - if (currentSite%status == 2)then + if(timesinceleafoff > 400)then !remove leaves after a whole year when there is no 'off' period. + if(currentSite%status == 2)then currentSite%status = 1 !alter status of site to 'leaves on' - currentSite%leafoffdate = t !record leaf off date - write(iulog,*) 'leaves off' + currentSite%leafoffdate = modelday !record leaf off date + write(iulog,*) 'leaves off time' endif endif @@ -476,10 +495,15 @@ subroutine phenology_leafonoff(currentSite) ! !LOCAL VARIABLES: type(ed_patch_type) , pointer :: currentPatch type(ed_cohort_type), pointer :: currentCohort + + real(r8) :: store_output ! the amount of the store to put into leaves - is a barrier against negative storage and C starvation. + !------------------------------------------------------------------------ currentPatch => CurrentSite%oldest_patch + store_output = 0.5_r8 + do while(associated(currentPatch)) currentCohort => currentPatch%tallest do while(associated(currentCohort)) @@ -492,7 +516,7 @@ subroutine phenology_leafonoff(currentSite) if (currentCohort%laimemory <= currentCohort%bstore)then currentCohort%bl = currentCohort%laimemory !extract stored carbon to make new leaves. else - currentCohort%bl = currentCohort%bstore !we can only put on as much carbon as there is in the store... + currentCohort%bl = currentCohort%bstore * store_output !we can only put on as much carbon as there is in the store... !nb. Putting all of bstore into leaves is C-starvation suicidal. The tendency for this could be parameterized endif currentCohort%balive = currentCohort%balive + currentCohort%bl ! Add deployed carbon to alive biomass pool @@ -525,8 +549,8 @@ subroutine phenology_leafonoff(currentSite) if (currentCohort%laimemory <= currentCohort%bstore)then currentCohort%bl = currentCohort%laimemory !extract stored carbon to make new leaves. else - currentCohort%bl = currentCohort%bstore !we can only put on as much carbon as there is in the store... - endif + currentCohort%bl = currentCohort%bstore * store_output !we can only put on as much carbon as there is in the store... + endif currentCohort%balive = currentCohort%balive + currentCohort%bl currentCohort%bstore = currentCohort%bstore - currentCohort%bl ! empty store currentCohort%laimemory = 0.0_r8 diff --git a/components/clm/src/ED/biogeophys/EDPhotosynthesisMod.F90 b/components/clm/src/ED/biogeophys/EDPhotosynthesisMod.F90 index 889c905412..93767f0a17 100644 --- a/components/clm/src/ED/biogeophys/EDPhotosynthesisMod.F90 +++ b/components/clm/src/ED/biogeophys/EDPhotosynthesisMod.F90 @@ -435,7 +435,7 @@ subroutine Photosynthesis_ED (bounds, fn, filterp, esat_tv, eair, oair, cair, & !RF - copied this from the CLM trunk code, but where did it come from, and how can we make these consistant? !jmax25top(FT) = (2.59_r8 - 0.035_r8*min(max((t10(p)-tfrz),11._r8),35._r8)) * vcmax25top(FT) - jmax25top(FT) = 0.167_r8 * vcmax25top(FT) + jmax25top(FT) = 1.67_r8 * vcmax25top(FT) tpu25top(FT) = 0.167_r8 * vcmax25top(FT) kp25top(FT) = 20000._r8 * vcmax25top(FT) @@ -776,7 +776,13 @@ subroutine Photosynthesis_ED (bounds, fn, filterp, esat_tv, eair, oair, cair, & enddo !sunsha loop !average leaf-level stomatal resistance rate over sun and shade leaves... rs_z(cl,ft,iv) = 1._r8/gs_z(cl,ft,iv) + else !No leaf area. This layer is present only because of stems. (leaves are off, or have reduced to 0 + currentPatch%psn_z(cl,ft,iv) = 0._r8 + rs_z(CL,FT,iv) = min(rsmax0, 1._r8/bbb(FT) * cf) + end if !is there leaf area? + + end if ! night or day end do ! iv canopy layer end if ! present(L,ft) ? rd_array @@ -811,8 +817,8 @@ subroutine Photosynthesis_ED (bounds, fn, filterp, esat_tv, eair, oair, cair, & !------------------------------------------------------------------------------ ! Convert from umolC/m2leaf/s to umolC/indiv/s ( x canopy area x 1m2 leaf area). tree_area = currentCohort%c_area/currentCohort%n - if(currentCohort%nv > 1)then - + if (currentCohort%nv > 1) then !is there canopy, and are the leaves on? + currentCohort%gpp_clm = sum(currentPatch%psn_z(cl,ft,1:currentCohort%nv-1) * & currentPatch%elai_profile(cl,ft,1:currentCohort%nv-1)) * tree_area currentCohort%rd = sum(lmr_z(cl,ft,1:currentCohort%nv-1) * & diff --git a/components/clm/src/ED/biogeophys/EDSurfaceAlbedoMod.F90 b/components/clm/src/ED/biogeophys/EDSurfaceAlbedoMod.F90 index 868bd98491..a061c5c275 100644 --- a/components/clm/src/ED/biogeophys/EDSurfaceAlbedoMod.F90 +++ b/components/clm/src/ED/biogeophys/EDSurfaceAlbedoMod.F90 @@ -149,8 +149,6 @@ subroutine ED_Norman_Radiation (bounds, & fsun_z => surfalb_inst%fsun_z_patch & ! Output: [real(r8) (:,:) ] sunlit fraction of canopy layer ) - - ! TODO (mv, 2014-10-29) the filter here is different than below ! this is needed to have the VOC's be bfb - this needs to be ! re-examined int he future @@ -281,7 +279,7 @@ subroutine ED_Norman_Radiation (bounds, & sb = (90._r8 - (acos(cosz)*180/pi)) * (pi / 180._r8) chil(p) = xl(ft) !min(max(xl(ft), -0.4_r8), 0.6_r8 ) if (abs(chil(p)) <= 0.01_r8) then - chil = 0.01_r8 + chil(p) = 0.01_r8 end if phi1b(p,ft) = 0.5_r8 - 0.633_r8*chil(p) - 0.330_r8*chil(p)*chil(p) phi2b(p,ft) = 0.877_r8 * (1._r8 - 2._r8*phi1b(p,ft)) !0 = horiz leaves, 1 - vert leaves. @@ -725,16 +723,23 @@ subroutine ED_Norman_Radiation (bounds, & ! Absorbed radiation, shaded and sunlit portions of leaf layers !here we get one unit of diffuse radiation... how much of !it is absorbed? - do iv = 1, currentPatch%nrad(L,ft) - if (radtype==1)then - currentPatch%fabd_sha_z(L,ft,iv) = Abs_dif_z(ft,iv) * (1._r8 - currentPatch%f_sun(L,ft,iv)) - currentPatch%fabd_sun_z(L,ft,iv) = Abs_dif_z(ft,iv) * currentPatch%f_sun(L,ft,iv) + & - Abs_dir_z(ft,iv) - else - currentPatch%fabi_sha_z(L,ft,iv) = Abs_dif_z(ft,iv) * (1._r8 - currentPatch%f_sun(L,ft,iv)) - currentPatch%fabi_sun_z(L,ft,iv) = Abs_dif_z(ft,iv) * currentPatch%f_sun(L,ft,iv) - end if - end do + + if (ib == 1) then ! only set the absorbed PAR for the visible light band. + do iv = 1, currentPatch%nrad(L,ft) + if (radtype==1) then + currentPatch%fabd_sha_z(L,ft,iv) = Abs_dif_z(ft,iv) * & + (1._r8 - currentPatch%f_sun(L,ft,iv)) + currentPatch%fabd_sun_z(L,ft,iv) = Abs_dif_z(ft,iv) * & + currentPatch%f_sun(L,ft,iv) + & + Abs_dir_z(ft,iv) + else + currentPatch%fabi_sha_z(L,ft,iv) = Abs_dif_z(ft,iv) * & + (1._r8 - currentPatch%f_sun(L,ft,iv)) + currentPatch%fabi_sun_z(L,ft,iv) = Abs_dif_z(ft,iv) * & + currentPatch%f_sun(L,ft,iv) + endif + end do + endif ! ib !==============================================================================! ! Sum fluxes @@ -886,7 +891,7 @@ subroutine ED_Norman_Radiation (bounds, & write(iulog,*) 'cp',currentPatch%area, currentPatch%patchno write(iulog,*) 'albgrd(c,ib)',albgrd(c,ib) - ! albd(p,ib) = albd(p,ib) + error + albd(p,ib) = albd(p,ib) + error end if else @@ -910,7 +915,7 @@ subroutine ED_Norman_Radiation (bounds, & write(iulog,*) 'CAP',currentPatch%canopy_area_profile(1,1:2,1) - ! albi(p,ib) = albi(p,ib) + error + albi(p,ib) = albi(p,ib) + error end if diff --git a/components/clm/src/ED/main/CMakeLists.txt b/components/clm/src/ED/main/CMakeLists.txt index 28dbfa2d77..5f8dbdcfb9 100644 --- a/components/clm/src/ED/main/CMakeLists.txt +++ b/components/clm/src/ED/main/CMakeLists.txt @@ -6,3 +6,4 @@ list(APPEND clm_sources ) sourcelist_to_parent(clm_sources) + diff --git a/components/clm/src/ED/main/EDCLMLinkMod.F90 b/components/clm/src/ED/main/EDCLMLinkMod.F90 index 5de402f35f..b0b559e9ca 100755 --- a/components/clm/src/ED/main/EDCLMLinkMod.F90 +++ b/components/clm/src/ED/main/EDCLMLinkMod.F90 @@ -606,6 +606,7 @@ subroutine ed_clm_link( this, bounds, ed_allsites_inst, ed_phenology_inst, & !update cohort quantitie s currentCohort => currentPatch%shortest do while(associated(currentCohort)) + ft = currentCohort%pft currentCohort%livestemn = currentCohort%bsw / pftcon%leafcn(currentCohort%pft) @@ -680,9 +681,11 @@ subroutine ed_clm_link( this, bounds, ed_allsites_inst, ed_phenology_inst, & ! currentPatch%total_canopy_area/currentPatch%area is fraction of this patch cover by plants ! currentPatch%area/AREA is the fraction of the soil covered by this patch. - clmpatch%wt_ed(p) = min(1.0_r8,(currentPatch%total_canopy_area/currentPatch%area)) * (currentPatch%area/AREA) + clmpatch%wt_ed(p) = min(1.0_r8,(currentPatch%total_canopy_area/currentPatch%area)) * & + (currentPatch%area/AREA) currentPatch%bare_frac_area = (1.0_r8 - min(1.0_r8,currentPatch%total_canopy_area/currentPatch%area)) * & (currentPatch%area/AREA) + ! write(iulog,*) 'bare frac',currentPatch%bare_frac_area total_patch_area = total_patch_area + clmpatch%wt_ed(p) + currentPatch%bare_frac_area total_bare_ground = total_bare_ground + currentPatch%bare_frac_area @@ -791,7 +794,6 @@ subroutine ed_update_history_variables( this, bounds, ed_allsites_inst, & begp => bounds%begp , & endp => bounds%endp & - ) ! ============================================================================ diff --git a/components/clm/src/ED/main/EDMainMod.F90 b/components/clm/src/ED/main/EDMainMod.F90 index ccabb1baed..66e929a386 100755 --- a/components/clm/src/ED/main/EDMainMod.F90 +++ b/components/clm/src/ED/main/EDMainMod.F90 @@ -5,6 +5,7 @@ module EDMainMod ! ============================================================================ use shr_kind_mod , only : r8 => shr_kind_r8 + use spmdMod , only : masterproc use decompMod , only : bounds_type use clm_varctl , only : iulog use atm2lndType , only : atm2lnd_type @@ -113,7 +114,9 @@ subroutine ed_driver( bounds, ed_allsites_inst, ed_clm_inst, ed_phenology_inst, call ed_clm_inst%ed_clm_link( bounds, ed_allsites_inst(bounds%begg:bounds%endg), & ed_phenology_inst, waterstate_inst, canopystate_inst) - write(iulog,*) 'leaving ed model',bounds%begg,bounds%endg,dayDiffInt + if (masterproc) then + write(iulog,*) 'leaving ed model',bounds%begg,bounds%endg,dayDiffInt + end if end subroutine ed_driver @@ -321,11 +324,12 @@ subroutine ed_integrate_state_variables(currentSite, soilstate_inst, temperature do p = 1,numpft_ed if(currentPatch%leaf_litter(p) shr_log_errMsg use shr_sys_mod , only : shr_sys_abort use clm_varctl , only : iulog + use spmdMod , only : masterproc use decompMod , only : bounds_type, get_clmlevel_gsmap use CanopyStateType , only : canopystate_type use WaterStateType , only : waterstate_type @@ -87,6 +88,16 @@ module EDRestVectorMod ! real(r8), pointer :: water_memory(:) real(r8), pointer :: old_stock(:) + real(r8), pointer :: cd_status(:) + real(r8), pointer :: dd_status(:) + real(r8), pointer :: ncd(:) + real(r8), pointer :: leafondate(:) + real(r8), pointer :: leafoffdate(:) + real(r8), pointer :: dleafondate(:) + real(r8), pointer :: dleafoffdate(:) + real(r8), pointer :: acc_NI(:) + + contains ! ! implement getVector and setVector @@ -176,6 +187,14 @@ subroutine deleteEDRestartVectorClass( this ) deallocate(this%areaRestart ) deallocate(this%water_memory ) deallocate(this%old_stock ) + deallocate(this%cd_status ) + deallocate(this%dd_status ) + deallocate(this%ncd ) + deallocate(this%leafondate ) + deallocate(this%leafoffdate ) + deallocate(this%dleafondate ) + deallocate(this%dleafoffdate ) + deallocate(this%acc_NI ) end subroutine deleteEDRestartVectorClass @@ -384,6 +403,46 @@ function newEDRestartVectorClass( bounds ) SHR_ASSERT(( retVal == allocOK ), errMsg(__FILE__, __LINE__)) new%old_stock(:) = 0.0_r8 + allocate(new%cd_status & + (new%vectorLengthStart:new%vectorLengthStop), stat=retVal) + SHR_ASSERT(( retVal == allocOK ), errMsg(__FILE__, __LINE__)) + new%cd_status(:) = 0_r8 + + allocate(new%dd_status & + (new%vectorLengthStart:new%vectorLengthStop), stat=retVal) + SHR_ASSERT(( retVal == allocOK ), errMsg(__FILE__, __LINE__)) + new%dd_status(:) = 0_r8 + + allocate(new%ncd & + (new%vectorLengthStart:new%vectorLengthStop), stat=retVal) + SHR_ASSERT(( retVal == allocOK ), errMsg(__FILE__, __LINE__)) + new%ncd(:) = 0_r8 + + allocate(new%leafondate & + (new%vectorLengthStart:new%vectorLengthStop), stat=retVal) + SHR_ASSERT(( retVal == allocOK ), errMsg(__FILE__, __LINE__)) + new%leafondate(:) = 0_r8 + + allocate(new%leafoffdate & + (new%vectorLengthStart:new%vectorLengthStop), stat=retVal) + SHR_ASSERT(( retVal == allocOK ), errMsg(__FILE__, __LINE__)) + new%leafoffdate(:) = 0_r8 + + allocate(new%dleafondate & + (new%vectorLengthStart:new%vectorLengthStop), stat=retVal) + SHR_ASSERT(( retVal == allocOK ), errMsg(__FILE__, __LINE__)) + new%dleafondate(:) = 0_r8 + + allocate(new%dleafoffdate & + (new%vectorLengthStart:new%vectorLengthStop), stat=retVal) + SHR_ASSERT(( retVal == allocOK ), errMsg(__FILE__, __LINE__)) + new%dleafoffdate(:) = 0_r8 + + allocate(new%acc_NI & + (new%vectorLengthStart:new%vectorLengthStop), stat=retVal) + SHR_ASSERT(( retVal == allocOK ), errMsg(__FILE__, __LINE__)) + new%acc_NI(:) = 0_r8 + end associate end function newEDRestartVectorClass @@ -405,7 +464,7 @@ subroutine setVectors( this, bounds, ed_allsites_inst ) ! !LOCAL VARIABLES: !----------------------------------------------------------------------- - write(iulog,*) 'edtime setVectors ',get_nstep() + if ( masterproc ) write(iulog,*) 'edtime setVectors ',get_nstep() if (this%DEBUG) then call this%printIoInfoLL ( bounds, ed_allsites_inst(bounds%begg:bounds%endg) ) @@ -718,6 +777,56 @@ subroutine doVectorIO( this, ncid, flag ) deallocate(gsmOP) + call restartvar(ncid=ncid, flag=flag, varname='ed_cd_status', xtype=ncd_double, & + dim1name=dimName, & + long_name='ed cold dec status', units='unitless', & + interpinic_flag='interp', data=this%cd_status, & + readvar=readvar) + + + call restartvar(ncid=ncid, flag=flag, varname='ed_dd_status', xtype=ncd_double, & + dim1name=dimName, & + long_name='ed drought dec status', units='unitless', & + interpinic_flag='interp', data=this%dd_status, & + readvar=readvar) + + + call restartvar(ncid=ncid, flag=flag, varname='ed_chilling days', xtype=ncd_double, & + dim1name=dimName, & + long_name='ed chilling day counter', units='unitless', & + interpinic_flag='interp', data=this%ncd, & + readvar=readvar) + + call restartvar(ncid=ncid, flag=flag, varname='ed_leafondate', xtype=ncd_double, & + dim1name=dimName, & + long_name='ed leafondate', units='unitless', & + interpinic_flag='interp', data=this%leafondate, & + readvar=readvar) + + call restartvar(ncid=ncid, flag=flag, varname='ed_leafoffdate', xtype=ncd_double, & + dim1name=dimName, & + long_name='ed leafoffdate', units='unitless', & + interpinic_flag='interp', data=this%leafoffdate, & + readvar=readvar) + + call restartvar(ncid=ncid, flag=flag, varname='ed_dleafondate', xtype=ncd_double, & + dim1name=dimName, & + long_name='ed dleafondate', units='unitless', & + interpinic_flag='interp', data=this%dleafondate, & + readvar=readvar) + + call restartvar(ncid=ncid, flag=flag, varname='ed_dleafoffdate', xtype=ncd_double, & + dim1name=dimName, & + long_name='ed dleafoffdate', units='unitless', & + interpinic_flag='interp', data=this%dleafoffdate, & + readvar=readvar) + + call restartvar(ncid=ncid, flag=flag, varname='ed_acc_NI', xtype=ncd_double, & + dim1name=dimName, & + long_name='ed nesterov index', units='unitless', & + interpinic_flag='interp', data=this%acc_NI, & + readvar=readvar) + end subroutine doVectorIO !-------------------------------------------------------------------------------! @@ -810,7 +919,23 @@ subroutine printDataInfoVector( this ) this%water_memory(iSta:iSto) write(iulog,*) trim(methodName)//' :: old_stock ', & this%old_stock(iSta:iSto) - + write(iulog,*) trim(methodName)//' :: cd_status', & + this%cd_status(iSta:iSto) + write(iulog,*) trim(methodName)//' :: dd_status', & + this%cd_status(iSta:iSto) + write(iulog,*) trim(methodName)//' :: ncd', & + this%ncd(iSta:iSto) + write(iulog,*) trim(methodName)//' :: leafondate', & + this%leafondate(iSta:iSto) + write(iulog,*) trim(methodName)//' :: leafoffdate', & + this%leafoffdate(iSta:iSto) + write(iulog,*) trim(methodName)//' :: dleafondate', & + this%dleafondate(iSta:iSto) + write(iulog,*) trim(methodName)//' :: dleafoffdate', & + this%dleafoffdate(iSta:iSto) + write(iulog,*) trim(methodName)//' :: acc_NI', & + this%acc_NI(iSta:iSto) + end subroutine printDataInfoVector !-------------------------------------------------------------------------------! @@ -903,6 +1028,15 @@ subroutine printDataInfoLL( this, bounds, ed_allsites_inst ) write(iulog,*) trim(methodName)//' age ' ,currentPatch%age write(iulog,*) trim(methodName)//' area ' ,currentPatch%area write(iulog,*) trim(methodName)//' old_stock ' ,ed_allsites_inst(g)%old_stock + write(iulog,*) trim(methodName)//' cd_status ' ,ed_allsites_inst(g)%status + write(iulog,*) trim(methodName)//' dd_status ' ,ed_allsites_inst(g)%dstatus + write(iulog,*) trim(methodName)//' ncd ' ,ed_allsites_inst(g)%ncd + write(iulog,*) trim(methodName)//' leafondate ' ,ed_allsites_inst(g)%leafondate + write(iulog,*) trim(methodName)//' leafoffdate ' ,ed_allsites_inst(g)%leafoffdate + write(iulog,*) trim(methodName)//' dleafondate ' ,ed_allsites_inst(g)%dleafondate + write(iulog,*) trim(methodName)//' dleafoffdate ' ,ed_allsites_inst(g)%dleafoffdate + write(iulog,*) trim(methodName)//' acc_NI' ,ed_allsites_inst(g)%acc_NI + currentPatch => currentPatch%younger @@ -910,9 +1044,9 @@ subroutine printDataInfoLL( this, bounds, ed_allsites_inst ) numPatches = numPatches + 1 enddo ! currentPatch do while endif - g = g + 1 write(iulog,*) trim(methodName)//' water_memory ',ed_allsites_inst(g)%water_memory(1) + g = g + 1 enddo @@ -1106,12 +1240,6 @@ subroutine convertCohortListToVector( this, bounds, ed_allsites_inst ) enddo ! currentCohort do while - if ( numCohort > numCohortsPerPatch ) then - write(iulog,*) 'offsetNumCohorts, numCohortsPerPatch ',countCohort, numCohortsPerPatch - call shr_sys_abort( 'error in convertCohortListToVector :: '//& - 'overrun of number of total cohorts in one patch. Try increasing cohorts for '//& - 'IO '//errMsg(__FILE__, __LINE__)) - endif ! ! deal with patch level fields here @@ -1120,6 +1248,16 @@ subroutine convertCohortListToVector( this, bounds, ed_allsites_inst ) this%age(incrementOffset) = currentPatch%age this%areaRestart(incrementOffset) = currentPatch%area this%old_stock(incrementOffset) = ed_allsites_inst(g)%old_stock + this%cd_status(incrementOffset) = ed_allsites_inst(g)%status + this%dd_status(incrementOffset) = ed_allsites_inst(g)%dstatus + this%ncd(incrementOffset) = ed_allsites_inst(g)%ncd + this%leafondate(incrementOffset) = ed_allsites_inst(g)%leafondate + this%leafoffdate(incrementOffset) = ed_allsites_inst(g)%leafoffdate + this%dleafondate(incrementOffset) = ed_allsites_inst(g)%dleafondate + this%dleafoffdate(incrementOffset)= ed_allsites_inst(g)%dleafoffdate + this%acc_NI(incrementOffset) = ed_allsites_inst(g)%acc_NI + + ! set cohorts per patch for IO this%cohortsPerPatch( incrementOffset ) = numCohort @@ -1164,9 +1302,6 @@ subroutine convertCohortListToVector( this, bounds, ed_allsites_inst ) countNclmax = incrementOffset countCohort = incrementOffset - write(iulog,*) 'incrementOffset, cohorts_per_gcell, numCohort, totalCohorts ', & - incrementOffset, cohorts_per_gcell, numCohort, totalCohorts - currentPatch => currentPatch%younger enddo ! currentPatch do while @@ -1179,14 +1314,6 @@ subroutine convertCohortListToVector( this, bounds, ed_allsites_inst ) countWaterMem = countWaterMem + 1 end do - if ( incrementOffset > cohorts_per_gcell ) then - write(iulog,*) 'incrementOffset, cohorts_per_gcell, numCohort, totalCohorts ', & - incrementOffset, cohorts_per_gcell, numCohort, totalCohorts - call shr_sys_abort( 'error in convertCohortListToVector :: '//& - 'overrun of number of total cohorts in this gcell. Try increasing cohorts for '//& - 'IO '//errMsg(__FILE__, __LINE__)) - endif - countWaterMem = incrementOffset endif ! is there soil check @@ -1468,12 +1595,6 @@ subroutine convertCohortVectorToList( this, bounds, ed_allsites_inst ) enddo ! currentPatch do while - if ( numCohort > numCohortsPerPatch ) then - write(iulog,*) 'CVTL offsetNumCohorts, numCohortsPerPatch ',countCohort, numCohortsPerPatch - call shr_sys_abort( 'error in convertCohortListToVector :: '//& - 'overrun of number of total cohorts in one patch. Try increasing cohorts for '//& - 'IO '//errMsg(__FILE__, __LINE__)) - endif ! FIX(SPM,032414) move to init if you can...or make a new init function currentPatch%leaf_litter(:) = 0.0_r8 @@ -1490,6 +1611,15 @@ subroutine convertCohortVectorToList( this, bounds, ed_allsites_inst ) currentPatch%age = this%age(incrementOffset) currentPatch%area = this%areaRestart(incrementOffset) ed_allsites_inst(g)%old_stock = this%old_stock(incrementOffset) + ed_allsites_inst(g)%status = this%cd_status(incrementOffset) + ed_allsites_inst(g)%dstatus = this%dd_status(incrementOffset) + ed_allsites_inst(g)%ncd = this%ncd(incrementOffset) + ed_allsites_inst(g)%leafondate = this%leafondate(incrementOffset) + ed_allsites_inst(g)%leafoffdate = this%leafoffdate(incrementOffset) + ed_allsites_inst(g)%dleafondate = this%dleafondate(incrementOffset) + ed_allsites_inst(g)%dleafoffdate = this%dleafoffdate(incrementOffset) + ed_allsites_inst(g)%acc_NI = this%acc_NI(incrementOffset) + ! set cohorts per patch for IO if (this%DEBUG) then @@ -1544,14 +1674,6 @@ subroutine convertCohortVectorToList( this, bounds, ed_allsites_inst ) countWaterMem = countWaterMem + 1 end do - if ( incrementOffset > cohorts_per_gcell ) then - write(iulog,*) 'CVTL incrementOffset, cohorts_per_gcell, numCohort, totalCohorts ', & - incrementOffset, cohorts_per_gcell, numCohort, totalCohorts - call shr_sys_abort( 'error in convertCohortListToVector :: '//& - 'overrun of number of total cohorts in this gcell. Try increasing cohorts for '//& - 'IO '//errMsg(__FILE__, __LINE__)) - endif - countWaterMem = incrementOffset endif ! is there soil check diff --git a/components/clm/src/biogeochem/CNWoodProductsMod.F90 b/components/clm/src/biogeochem/CNWoodProductsMod.F90 index 049b67a84a..1d962d9cef 100644 --- a/components/clm/src/biogeochem/CNWoodProductsMod.F90 +++ b/components/clm/src/biogeochem/CNWoodProductsMod.F90 @@ -38,13 +38,17 @@ subroutine CNWoodProducts(num_soilc, filter_soilc, & ! !ARGUMENTS: integer , intent(in) :: num_soilc ! number of soil columns in filter integer , intent(in) :: filter_soilc(:) ! filter for soil columns - type(cnveg_carbonstate_type) , intent(in) :: cnveg_carbonstate_inst + type(cnveg_carbonstate_type) , intent(inout) :: cnveg_carbonstate_inst + ! TODO(SPM, 012315) - c13_cnveg_carbonstate_inst and + ! c14_cnveg_carbonstate_inst are not used in this routine. + ! cnveg_carbonflux_inst and cnveg_nitrogenstate are used and set and should + ! be INOUT type(cnveg_carbonstate_type) , intent(in) :: c13_cnveg_carbonstate_inst type(cnveg_carbonstate_type) , intent(in) :: c14_cnveg_carbonstate_inst type(cnveg_carbonflux_type) , intent(inout) :: cnveg_carbonflux_inst type(cnveg_carbonflux_type) , intent(inout) :: c13_cnveg_carbonflux_inst type(cnveg_carbonflux_type) , intent(inout) :: c14_cnveg_carbonflux_inst - type(cnveg_nitrogenstate_type) , intent(in) :: cnveg_nitrogenstate_inst + type(cnveg_nitrogenstate_type) , intent(inout) :: cnveg_nitrogenstate_inst type(cnveg_nitrogenflux_type) , intent(inout) :: cnveg_nitrogenflux_inst ! ! !LOCAL VARIABLES: diff --git a/components/clm/src/biogeophys/BalanceCheckMod.F90 b/components/clm/src/biogeophys/BalanceCheckMod.F90 index e0a133d41e..35cc6081b9 100644 --- a/components/clm/src/biogeophys/BalanceCheckMod.F90 +++ b/components/clm/src/biogeophys/BalanceCheckMod.F90 @@ -670,8 +670,8 @@ subroutine BalanceCheck( bounds, num_do_smb_c, filter_do_smb_c, & write(iulog,*)'nstep = ',nstep write(iulog,*)'errsoi_col = ',errsoi_col(indexc) if (abs(errsoi_col(indexc)) > 1.e-4_r8 .and. (nstep > 2) ) then - write(iulog,*)'clm model is stopping' - call endrun(decomp_index=indexc, clmlevel=namec, msg=errmsg(__FILE__, __LINE__)) + !write(iulog,*)'clm model is stopping' + !call endrun(decomp_index=indexc, clmlevel=namec, msg=errmsg(__FILE__, __LINE__)) end if end if diff --git a/components/clm/src/biogeophys/CanopyFluxesMod.F90 b/components/clm/src/biogeophys/CanopyFluxesMod.F90 index c30e511350..1d2c41a9f8 100644 --- a/components/clm/src/biogeophys/CanopyFluxesMod.F90 +++ b/components/clm/src/biogeophys/CanopyFluxesMod.F90 @@ -460,7 +460,6 @@ subroutine CanopyFluxes(bounds, num_exposedvegp, filter_exposedvegp, & fn = num_exposedvegp filterp(1:fn) = filter_exposedvegp(1:fn) - ! ----------------------------------------------------------------- ! Time step initialization of photosynthesis variables ! ----------------------------------------------------------------- @@ -1264,7 +1263,6 @@ subroutine CanopyFluxes(bounds, num_exposedvegp, filter_exposedvegp, & end associate - end subroutine CanopyFluxes end module CanopyFluxesMod diff --git a/components/clm/src/biogeophys/SurfaceRadiationMod.F90 b/components/clm/src/biogeophys/SurfaceRadiationMod.F90 index b38f56b2fb..f52c26c75c 100644 --- a/components/clm/src/biogeophys/SurfaceRadiationMod.F90 +++ b/components/clm/src/biogeophys/SurfaceRadiationMod.F90 @@ -487,7 +487,6 @@ subroutine SurfaceRadiation(bounds, num_nourbanp, filter_nourbanp, & ) ! Determine seconds off current time step - dtime = get_step_size() call get_curr_date (year, month, day, secs) diff --git a/components/clm/src/biogeophys/TemperatureType.F90 b/components/clm/src/biogeophys/TemperatureType.F90 index a1998fcea9..82a167c9fd 100644 --- a/components/clm/src/biogeophys/TemperatureType.F90 +++ b/components/clm/src/biogeophys/TemperatureType.F90 @@ -1106,13 +1106,18 @@ subroutine InitAccBuffer (this, bounds) subgrid_type='pft', numlev=1, init_value=SHR_CONST_TKFRZ) end if - if ( use_ed ) then - - call init_accum_field (name='ED_GDD0', units='K', & - desc='growing degree-days base 0C from planting', accum_type='runaccum', accum_period=not_used, & - subgrid_type='pft', numlev=1, init_value=0._r8) - - end if + ! + ! I TODO (SPM , 022615) - along with (II) below, this is removed + ! in the ed branch. Seems like it's covered by the code in + ! EDPhenologyType.F90, but need to double check + ! + !if ( use_ed ) then + ! + !call init_accum_field (name='ED_GDD0', units='K', & + !desc='growing degree-days base 0C from planting', accum_type='runaccum', accum_period=not_used, & + !subgrid_type='pft', numlev=1, init_value=0._r8) + ! + !end if if ( crop_prog )then @@ -1218,10 +1223,14 @@ subroutine InitAccVars(this, bounds) this%t_ref2m_min_inst_u_patch(begp:endp) = spval end if - if ( use_ed ) then - call extract_accum_field ('ED_GDD0', rbufslp, nstep) - this%gdd0_patch(begp:endp) = rbufslp(begp:endp) - end if + ! + ! II TODO (SPM , 022615) - along with (I) above, this is removed + ! in the ed branch + ! + !if ( use_ed ) then + !call extract_accum_field ('ED_GDD0', rbufslp, nstep) + !this%gdd0_patch(begp:endp) = rbufslp(begp:endp) + !end if if ( crop_prog ) then @@ -1236,7 +1245,6 @@ subroutine InitAccVars(this, bounds) end if - deallocate(rbufslp) end subroutine InitAccVars diff --git a/components/clm/src/cpl/lnd_comp_mct.F90 b/components/clm/src/cpl/lnd_comp_mct.F90 index 7c395afda3..872008edf6 100644 --- a/components/clm/src/cpl/lnd_comp_mct.F90 +++ b/components/clm/src/cpl/lnd_comp_mct.F90 @@ -347,7 +347,7 @@ subroutine lnd_run_mct(EClock, cdata_l, x2l_l, l2x_l) !--------------------------------------------------------------------------- ! Determine processor bounds - + write(iulog,*) 'in run_mct' call get_proc_bounds(bounds) #if (defined _MEMTRACE) @@ -477,6 +477,7 @@ subroutine lnd_run_mct(EClock, cdata_l, x2l_l, l2x_l) #endif first_call = .false. + write(iulog,*) 'end run_mct' end subroutine lnd_run_mct diff --git a/components/clm/src/main/clm_driver.F90 b/components/clm/src/main/clm_driver.F90 index 840d619505..9390b62da9 100644 --- a/components/clm/src/main/clm_driver.F90 +++ b/components/clm/src/main/clm_driver.F90 @@ -212,7 +212,7 @@ subroutine clm_drv(doalb, nextsw_cday, declinp1, declin, rstwr, nlend, rdate) call SoilBiogeochemVerticalProfile(bounds_clump , & filter_inactive_and_active(nc)%num_soilc, filter_inactive_and_active(nc)%soilc , & filter_inactive_and_active(nc)%num_soilp, filter_inactive_and_active(nc)%soilp , & - canopystate_inst, soilstate_inst, soilbiogeochem_state_inst) + canopystate_inst, soilstate_inst, soilbiogeochem_state_inst) end if call t_stopf("decomp_vert") @@ -959,9 +959,18 @@ subroutine clm_drv(doalb, nextsw_cday, declinp1, declin, rstwr, nlend, rdate) ! Update history buffer ! ============================================================================ - call t_startf('hbuf') - call hist_update_hbuf(bounds_proc) - call t_stopf('hbuf') + + ! + ! TODO(SPM,012715) - XIX Note to CSEG. I had to put this logical block around + ! this call as it was updating the history buffer prematurely when ED was + ! running and happened to be restarted on the same timestep as a history + ! write + ! + if (.not. use_ed) then + call t_startf('hbuf') + call hist_update_hbuf(bounds_proc) + call t_stopf('hbuf') + end if ! ============================================================================ ! Call dv (dynamic vegetation) at last time step of year @@ -1019,6 +1028,13 @@ subroutine clm_drv(doalb, nextsw_cday, declinp1, declin, rstwr, nlend, rdate) atm2lnd_inst, soilstate_inst, temperature_inst, & waterstate_inst, canopystate_inst) + ! + ! TODO(SPM, 012715) - see note XIX above regarding hbuf updates + ! + call t_startf('hbuf') + call hist_update_hbuf(bounds_proc) + call t_stopf('hbuf') + call setFilters( bounds_clump, glc2lnd_inst%icemask_grc ) !reset surface albedo fluxes in case there is a mismatch between elai and canopy absorbtion. diff --git a/components/clm/src/main/clm_instMod.F90 b/components/clm/src/main/clm_instMod.F90 index 1ad760640e..452f3f07e1 100644 --- a/components/clm/src/main/clm_instMod.F90 +++ b/components/clm/src/main/clm_instMod.F90 @@ -385,7 +385,9 @@ subroutine clm_instInit(bounds) call c14_cnveg_carbonstate_inst%Init(bounds, carbon_type='c14', ratio=c14ratio, & c12_cnveg_carbonstate_inst=cnveg_carbonstate_inst) end if + call cnveg_carbonflux_inst%Init(bounds, carbon_type='c12') + if (use_c13) then call c13_cnveg_carbonflux_inst%Init(bounds, carbon_type='c13') end if @@ -555,6 +557,7 @@ subroutine clm_instRest(bounds, ncid, flag) end if if (use_ed) then + call ED_Phenology_inst%restart(bounds, ncid, flag=flag) call EDRest ( bounds, ncid, flag, ed_allsites_inst(bounds%begg:bounds%endg), & ed_clm_inst, ed_phenology_inst, waterstate_inst, canopystate_inst ) end if diff --git a/components/clm/src/main/histFileMod.F90 b/components/clm/src/main/histFileMod.F90 index 9f49e70e24..07361a9829 100644 --- a/components/clm/src/main/histFileMod.F90 +++ b/components/clm/src/main/histFileMod.F90 @@ -1041,7 +1041,7 @@ subroutine hist_update_hbuf_field_1d (t, f, bounds) if (type1d_out == nameg .or. type1d_out == grlnd) then if (type1d == namep) then ! In this and the following calls, we do NOT explicitly subset field using - ! bounds (e.g., we do NOT do field(bounds%begp:bounds%endp). This is because, + ! bounds (e.g., we do NOT do field(bounds%begp:bounds%endp). This is because, ! for some fields, the lower bound has been reset to 1 due to taking a pointer ! to an array slice. Thus, this code will NOT work properly if done within a ! threaded region! (See also bug 1786) @@ -2469,6 +2469,7 @@ subroutine htape_timeconst(t, mode) call ncd_io(varname='lon', data=ldomain%lonc, dim1name=grlnd, ncid=nfid(t), flag='write') call ncd_io(varname='lat', data=ldomain%latc, dim1name=grlnd, ncid=nfid(t), flag='write') end if + call ncd_io(varname='area' , data=ldomain%area, dim1name=grlnd, ncid=nfid(t), flag='write') call ncd_io(varname='landfrac', data=ldomain%frac, dim1name=grlnd, ncid=nfid(t), flag='write') call ncd_io(varname='landmask', data=ldomain%mask, dim1name=grlnd, ncid=nfid(t), flag='write') diff --git a/components/clm/src/main/surfrdMod.F90 b/components/clm/src/main/surfrdMod.F90 index d39d92dd77..9a966c9e26 100644 --- a/components/clm/src/main/surfrdMod.F90 +++ b/components/clm/src/main/surfrdMod.F90 @@ -193,8 +193,10 @@ subroutine surfrd_get_grid(begg, endg, ldomain, filename, glcfilename) ! Read in area, lon, lat if (istype_domain) then + call ncd_io(ncid=ncid, varname= 'area', flag='read', data=ldomain%area, & dim1name=grlnd, readvar=readvar) + ! convert from radians**2 to km**2 ldomain%area = ldomain%area * (re**2) if (.not. readvar) call endrun( msg=' ERROR: area NOT on file'//errMsg(__FILE__, __LINE__)) @@ -205,10 +207,13 @@ subroutine surfrd_get_grid(begg, endg, ldomain, filename, glcfilename) call ncd_io(ncid=ncid, varname= 'yc', flag='read', data=ldomain%latc, & dim1name=grlnd, readvar=readvar) + if (.not. readvar) call endrun( msg=' ERROR: yc NOT on file'//errMsg(__FILE__, __LINE__)) else + call ncd_io(ncid=ncid, varname= 'AREA', flag='read', data=ldomain%area, & dim1name=grlnd, readvar=readvar) + if (.not. readvar) call endrun( msg=' ERROR: AREA NOT on file'//errMsg(__FILE__, __LINE__)) call ncd_io(ncid=ncid, varname= 'LONGXY', flag='read', data=ldomain%lonc, & @@ -508,7 +513,11 @@ subroutine surfrd_get_data (begg, endg, ldomain, lfsurdat) write(iulog,*)' ERROR: surfdata/fatmgrid lon/lat mismatch error', rmaxlon,rmaxlat call endrun(msg=errMsg(__FILE__, __LINE__)) end if - call domain_clean(surfdata_domain) + + !~! TODO(SPM, 022015) - if we deallocate and clean ldomain here, then you + !~! get errors in htape_timeconst where the information is needed to write + !~! the *.h0* file + !~!call domain_clean(surfdata_domain) ! Obtain special landunit info diff --git a/components/clm/src/utils/domainMod.F90 b/components/clm/src/utils/domainMod.F90 index ea8a42ab6e..e887c2a0d8 100644 --- a/components/clm/src/utils/domainMod.F90 +++ b/components/clm/src/utils/domainMod.F90 @@ -1,22 +1,19 @@ module domainMod -!----------------------------------------------------------------------- -!BOP -! -! !MODULE: domainMod -! -! !DESCRIPTION: -! Module containing 2-d global surface boundary data information -! -! !USES: + + !----------------------------------------------------------------------- + ! !DESCRIPTION: + ! Module containing 2-d global surface boundary data information + ! + ! !USES: use shr_kind_mod, only : r8 => shr_kind_r8 use shr_sys_mod , only : shr_sys_abort use spmdMod , only : masterproc use clm_varctl , only : iulog -! -! !PUBLIC TYPES: + ! + ! !PUBLIC TYPES: implicit none private -! + ! public :: domain_type !--- this typically contains local domain info with arrays dim begg:endg --- @@ -37,62 +34,41 @@ module domainMod ! 0=SMB not required (default) ! (glcmask is just a guess at the appropriate mask, known at initialization - ! in contrast to icemask, which is the true mask obtained from glc) - character*16 :: set ! flag to check if domain is set + logical :: set ! flag to check if domain is set logical :: decomped ! decomposed locally or global copy end type domain_type type(domain_type) , public :: ldomain real(r8), allocatable, public :: lon1d(:), lat1d(:) ! 1d lat/lons for 2d grids -! -! !PUBLIC MEMBER FUNCTIONS: + ! + ! !PUBLIC MEMBER FUNCTIONS: public domain_init ! allocates/nans domain types public domain_clean ! deallocates domain types public domain_check ! write out domain info -! -! !REVISION HISTORY: -! Originally clm_varsur by Mariana Vertenstein -! Migrated from clm_varsur to domainMod by T Craig -! - character*16,parameter :: set = 'domain_set ' + ! character*16,parameter :: unset = 'NOdomain_unsetNO' -! -!EOP -!------------------------------------------------------------------------------ + !------------------------------------------------------------------------------ contains -!------------------------------------------------------------------------------ -!BOP -! -! !IROUTINE: domain_init -! -! !INTERFACE: + !------------------------------------------------------------------------------ subroutine domain_init(domain,isgrid2d,ni,nj,nbeg,nend,clmlevel) use shr_infnan_mod, only : nan => shr_infnan_nan, assignment(=) -! -! !DESCRIPTION: -! This subroutine allocates and nans the domain type -! -! !USES: -! -! !ARGUMENTS: - implicit none + ! + ! !DESCRIPTION: + ! This subroutine allocates and nans the domain type + ! + ! !ARGUMENTS: type(domain_type) :: domain ! domain datatype logical, intent(in) :: isgrid2d ! true => global grid is lat/lon integer, intent(in) :: ni,nj ! grid size, 2d integer , intent(in), optional :: nbeg,nend ! beg/end indices character(len=*), intent(in), optional :: clmlevel ! grid type -! -! !REVISION HISTORY: -! Created by T Craig -! -! -! !LOCAL VARIABLES: -!EOP + ! + ! !LOCAL VARIABLES: integer ier integer nb,ne -! -!------------------------------------------------------------------------------ + !------------------------------------------------------------------------------ nb = 1 ne = ni*nj @@ -103,7 +79,7 @@ subroutine domain_init(domain,isgrid2d,ni,nj,nbeg,nend,clmlevel) endif endif - if (domain%set == set) then + if ( domain%set .eq. .true. ) then call domain_clean(domain) endif allocate(domain%mask(nb:ne),domain%frac(nb:ne),domain%latc(nb:ne), & @@ -130,7 +106,7 @@ subroutine domain_init(domain,isgrid2d,ni,nj,nbeg,nend,clmlevel) domain%lonc = nan domain%area = nan - domain%set = set + domain%set = .true. if (domain%nbeg == 1 .and. domain%nend == domain%ns) then domain%decomped = .false. else @@ -140,38 +116,27 @@ subroutine domain_init(domain,isgrid2d,ni,nj,nbeg,nend,clmlevel) domain%pftm = -9999 domain%glcmask = 0 -end subroutine domain_init -!------------------------------------------------------------------------------ -!BOP -! -! !IROUTINE: domain_clean -! -! !INTERFACE: + end subroutine domain_init + + !------------------------------------------------------------------------------ subroutine domain_clean(domain) -! -! !DESCRIPTION: -! This subroutine deallocates the domain type -! -! !ARGUMENTS: - implicit none + ! + ! !DESCRIPTION: + ! This subroutine deallocates the domain type + ! + ! !ARGUMENTS: type(domain_type) :: domain ! domain datatype -! -! !REVISION HISTORY: -! Created by T Craig -! -! -! !LOCAL VARIABLES: -!EOP + ! + ! !LOCAL VARIABLES: integer ier -! -!------------------------------------------------------------------------------ - if (domain%set == set) then + !------------------------------------------------------------------------------ + if ( domain%set .eq. .true. ) then if (masterproc) then write(iulog,*) 'domain_clean: cleaning ',domain%ni,domain%nj endif deallocate(domain%mask,domain%frac,domain%latc, & - domain%lonc,domain%area,domain%pftm, & - domain%topo,domain%glcmask,stat=ier) + domain%lonc,domain%area,domain%pftm, & + domain%topo,domain%glcmask,stat=ier) if (ier /= 0) then call shr_sys_abort('domain_clean ERROR: deallocate mask, frac, lat, lon, area ') endif @@ -187,56 +152,39 @@ subroutine domain_clean(domain) domain%nj = huge(1) domain%nbeg = huge(1) domain%nend = huge(1) - domain%set = unset + domain%set = .false. domain%decomped = .true. -end subroutine domain_clean -!------------------------------------------------------------------------------ -!BOP -! -! !IROUTINE: domain_check -! -! !INTERFACE: + end subroutine domain_clean + + !------------------------------------------------------------------------------ subroutine domain_check(domain) -! -! !DESCRIPTION: -! This subroutine write domain info -! -! !USES: -! -! !ARGUMENTS: - implicit none + ! + ! !DESCRIPTION: + ! This subroutine write domain info + ! + ! !ARGUMENTS: type(domain_type),intent(in) :: domain ! domain datatype -! -! !REVISION HISTORY: -! Created by T Craig -! -! -! !LOCAL VARIABLES: -! -!EOP -!------------------------------------------------------------------------------ - - if (masterproc) then - write(iulog,*) ' domain_check set = ',trim(domain%set) - write(iulog,*) ' domain_check decomped = ',domain%decomped - write(iulog,*) ' domain_check ns = ',domain%ns - write(iulog,*) ' domain_check ni,nj = ',domain%ni,domain%nj - write(iulog,*) ' domain_check clmlevel = ',trim(domain%clmlevel) - write(iulog,*) ' domain_check nbeg,nend = ',domain%nbeg,domain%nend - write(iulog,*) ' domain_check lonc = ',minval(domain%lonc),maxval(domain%lonc) - write(iulog,*) ' domain_check latc = ',minval(domain%latc),maxval(domain%latc) - write(iulog,*) ' domain_check mask = ',minval(domain%mask),maxval(domain%mask) - write(iulog,*) ' domain_check frac = ',minval(domain%frac),maxval(domain%frac) - write(iulog,*) ' domain_check topo = ',minval(domain%topo),maxval(domain%topo) - write(iulog,*) ' domain_check area = ',minval(domain%area),maxval(domain%area) - write(iulog,*) ' domain_check pftm = ',minval(domain%pftm),maxval(domain%pftm) - write(iulog,*) ' domain_check glcmask = ',minval(domain%glcmask),maxval(domain%glcmask) - write(iulog,*) ' ' - endif - -end subroutine domain_check - -!------------------------------------------------------------------------------ + !------------------------------------------------------------------------------ + + if (masterproc) then + write(iulog,*) ' domain_check set = ',domain%set + write(iulog,*) ' domain_check decomped = ',domain%decomped + write(iulog,*) ' domain_check ns = ',domain%ns + write(iulog,*) ' domain_check ni,nj = ',domain%ni,domain%nj + write(iulog,*) ' domain_check clmlevel = ',trim(domain%clmlevel) + write(iulog,*) ' domain_check nbeg,nend = ',domain%nbeg,domain%nend + write(iulog,*) ' domain_check lonc = ',minval(domain%lonc),maxval(domain%lonc) + write(iulog,*) ' domain_check latc = ',minval(domain%latc),maxval(domain%latc) + write(iulog,*) ' domain_check mask = ',minval(domain%mask),maxval(domain%mask) + write(iulog,*) ' domain_check frac = ',minval(domain%frac),maxval(domain%frac) + write(iulog,*) ' domain_check topo = ',minval(domain%topo),maxval(domain%topo) + write(iulog,*) ' domain_check area = ',minval(domain%area),maxval(domain%area) + write(iulog,*) ' domain_check pftm = ',minval(domain%pftm),maxval(domain%pftm) + write(iulog,*) ' domain_check glcmask = ',minval(domain%glcmask),maxval(domain%glcmask) + write(iulog,*) ' ' + endif + + end subroutine domain_check end module domainMod From 89a6f184f5d085ade79d34e1f01dfd8292a5ac14 Mon Sep 17 00:00:00 2001 From: Ben Andre Date: Wed, 27 Jan 2016 14:50:42 -0700 Subject: [PATCH 3/5] Revert ed v0.1.0 changes to CLM unrelated to ED Revert CLM changes from ed v0.1.0 branch that are unrelated to ED. These include whitespace, comments and code changes to clm files that don't affect ED science. Diverging from the clm trunk will potentially cause merge conflicts with future clm merges and in one case (domainMod.F90, convert set from string to logical) introduce a bug. Test suite: not compiled or tested Test baseline: n/a Test namelist changes: none Test status: should be bit for bit with previous commit... Fixes: none User interface changes?: none Code review: self --- .../clm/src/biogeophys/CanopyFluxesMod.F90 | 2 + .../src/biogeophys/SurfaceRadiationMod.F90 | 1 + components/clm/src/main/clm_instMod.F90 | 2 - components/clm/src/main/histFileMod.F90 | 1 - components/clm/src/main/surfrdMod.F90 | 5 - components/clm/src/utils/domainMod.F90 | 190 +++++++++++------- 6 files changed, 124 insertions(+), 77 deletions(-) diff --git a/components/clm/src/biogeophys/CanopyFluxesMod.F90 b/components/clm/src/biogeophys/CanopyFluxesMod.F90 index 1d2c41a9f8..c30e511350 100644 --- a/components/clm/src/biogeophys/CanopyFluxesMod.F90 +++ b/components/clm/src/biogeophys/CanopyFluxesMod.F90 @@ -460,6 +460,7 @@ subroutine CanopyFluxes(bounds, num_exposedvegp, filter_exposedvegp, & fn = num_exposedvegp filterp(1:fn) = filter_exposedvegp(1:fn) + ! ----------------------------------------------------------------- ! Time step initialization of photosynthesis variables ! ----------------------------------------------------------------- @@ -1263,6 +1264,7 @@ subroutine CanopyFluxes(bounds, num_exposedvegp, filter_exposedvegp, & end associate + end subroutine CanopyFluxes end module CanopyFluxesMod diff --git a/components/clm/src/biogeophys/SurfaceRadiationMod.F90 b/components/clm/src/biogeophys/SurfaceRadiationMod.F90 index f52c26c75c..b38f56b2fb 100644 --- a/components/clm/src/biogeophys/SurfaceRadiationMod.F90 +++ b/components/clm/src/biogeophys/SurfaceRadiationMod.F90 @@ -487,6 +487,7 @@ subroutine SurfaceRadiation(bounds, num_nourbanp, filter_nourbanp, & ) ! Determine seconds off current time step + dtime = get_step_size() call get_curr_date (year, month, day, secs) diff --git a/components/clm/src/main/clm_instMod.F90 b/components/clm/src/main/clm_instMod.F90 index 452f3f07e1..4f79ba4322 100644 --- a/components/clm/src/main/clm_instMod.F90 +++ b/components/clm/src/main/clm_instMod.F90 @@ -385,9 +385,7 @@ subroutine clm_instInit(bounds) call c14_cnveg_carbonstate_inst%Init(bounds, carbon_type='c14', ratio=c14ratio, & c12_cnveg_carbonstate_inst=cnveg_carbonstate_inst) end if - call cnveg_carbonflux_inst%Init(bounds, carbon_type='c12') - if (use_c13) then call c13_cnveg_carbonflux_inst%Init(bounds, carbon_type='c13') end if diff --git a/components/clm/src/main/histFileMod.F90 b/components/clm/src/main/histFileMod.F90 index 07361a9829..a6e318aa5e 100644 --- a/components/clm/src/main/histFileMod.F90 +++ b/components/clm/src/main/histFileMod.F90 @@ -2469,7 +2469,6 @@ subroutine htape_timeconst(t, mode) call ncd_io(varname='lon', data=ldomain%lonc, dim1name=grlnd, ncid=nfid(t), flag='write') call ncd_io(varname='lat', data=ldomain%latc, dim1name=grlnd, ncid=nfid(t), flag='write') end if - call ncd_io(varname='area' , data=ldomain%area, dim1name=grlnd, ncid=nfid(t), flag='write') call ncd_io(varname='landfrac', data=ldomain%frac, dim1name=grlnd, ncid=nfid(t), flag='write') call ncd_io(varname='landmask', data=ldomain%mask, dim1name=grlnd, ncid=nfid(t), flag='write') diff --git a/components/clm/src/main/surfrdMod.F90 b/components/clm/src/main/surfrdMod.F90 index 9a966c9e26..ecce034f4f 100644 --- a/components/clm/src/main/surfrdMod.F90 +++ b/components/clm/src/main/surfrdMod.F90 @@ -193,10 +193,8 @@ subroutine surfrd_get_grid(begg, endg, ldomain, filename, glcfilename) ! Read in area, lon, lat if (istype_domain) then - call ncd_io(ncid=ncid, varname= 'area', flag='read', data=ldomain%area, & dim1name=grlnd, readvar=readvar) - ! convert from radians**2 to km**2 ldomain%area = ldomain%area * (re**2) if (.not. readvar) call endrun( msg=' ERROR: area NOT on file'//errMsg(__FILE__, __LINE__)) @@ -207,13 +205,10 @@ subroutine surfrd_get_grid(begg, endg, ldomain, filename, glcfilename) call ncd_io(ncid=ncid, varname= 'yc', flag='read', data=ldomain%latc, & dim1name=grlnd, readvar=readvar) - if (.not. readvar) call endrun( msg=' ERROR: yc NOT on file'//errMsg(__FILE__, __LINE__)) else - call ncd_io(ncid=ncid, varname= 'AREA', flag='read', data=ldomain%area, & dim1name=grlnd, readvar=readvar) - if (.not. readvar) call endrun( msg=' ERROR: AREA NOT on file'//errMsg(__FILE__, __LINE__)) call ncd_io(ncid=ncid, varname= 'LONGXY', flag='read', data=ldomain%lonc, & diff --git a/components/clm/src/utils/domainMod.F90 b/components/clm/src/utils/domainMod.F90 index e887c2a0d8..ea8a42ab6e 100644 --- a/components/clm/src/utils/domainMod.F90 +++ b/components/clm/src/utils/domainMod.F90 @@ -1,19 +1,22 @@ module domainMod - - !----------------------------------------------------------------------- - ! !DESCRIPTION: - ! Module containing 2-d global surface boundary data information - ! - ! !USES: +!----------------------------------------------------------------------- +!BOP +! +! !MODULE: domainMod +! +! !DESCRIPTION: +! Module containing 2-d global surface boundary data information +! +! !USES: use shr_kind_mod, only : r8 => shr_kind_r8 use shr_sys_mod , only : shr_sys_abort use spmdMod , only : masterproc use clm_varctl , only : iulog - ! - ! !PUBLIC TYPES: +! +! !PUBLIC TYPES: implicit none private - ! +! public :: domain_type !--- this typically contains local domain info with arrays dim begg:endg --- @@ -34,41 +37,62 @@ module domainMod ! 0=SMB not required (default) ! (glcmask is just a guess at the appropriate mask, known at initialization - ! in contrast to icemask, which is the true mask obtained from glc) - logical :: set ! flag to check if domain is set + character*16 :: set ! flag to check if domain is set logical :: decomped ! decomposed locally or global copy end type domain_type type(domain_type) , public :: ldomain real(r8), allocatable, public :: lon1d(:), lat1d(:) ! 1d lat/lons for 2d grids - ! - ! !PUBLIC MEMBER FUNCTIONS: +! +! !PUBLIC MEMBER FUNCTIONS: public domain_init ! allocates/nans domain types public domain_clean ! deallocates domain types public domain_check ! write out domain info - ! +! +! !REVISION HISTORY: +! Originally clm_varsur by Mariana Vertenstein +! Migrated from clm_varsur to domainMod by T Craig +! + character*16,parameter :: set = 'domain_set ' character*16,parameter :: unset = 'NOdomain_unsetNO' - !------------------------------------------------------------------------------ +! +!EOP +!------------------------------------------------------------------------------ contains - !------------------------------------------------------------------------------ +!------------------------------------------------------------------------------ +!BOP +! +! !IROUTINE: domain_init +! +! !INTERFACE: subroutine domain_init(domain,isgrid2d,ni,nj,nbeg,nend,clmlevel) use shr_infnan_mod, only : nan => shr_infnan_nan, assignment(=) - ! - ! !DESCRIPTION: - ! This subroutine allocates and nans the domain type - ! - ! !ARGUMENTS: +! +! !DESCRIPTION: +! This subroutine allocates and nans the domain type +! +! !USES: +! +! !ARGUMENTS: + implicit none type(domain_type) :: domain ! domain datatype logical, intent(in) :: isgrid2d ! true => global grid is lat/lon integer, intent(in) :: ni,nj ! grid size, 2d integer , intent(in), optional :: nbeg,nend ! beg/end indices character(len=*), intent(in), optional :: clmlevel ! grid type - ! - ! !LOCAL VARIABLES: +! +! !REVISION HISTORY: +! Created by T Craig +! +! +! !LOCAL VARIABLES: +!EOP integer ier integer nb,ne - !------------------------------------------------------------------------------ +! +!------------------------------------------------------------------------------ nb = 1 ne = ni*nj @@ -79,7 +103,7 @@ subroutine domain_init(domain,isgrid2d,ni,nj,nbeg,nend,clmlevel) endif endif - if ( domain%set .eq. .true. ) then + if (domain%set == set) then call domain_clean(domain) endif allocate(domain%mask(nb:ne),domain%frac(nb:ne),domain%latc(nb:ne), & @@ -106,7 +130,7 @@ subroutine domain_init(domain,isgrid2d,ni,nj,nbeg,nend,clmlevel) domain%lonc = nan domain%area = nan - domain%set = .true. + domain%set = set if (domain%nbeg == 1 .and. domain%nend == domain%ns) then domain%decomped = .false. else @@ -116,27 +140,38 @@ subroutine domain_init(domain,isgrid2d,ni,nj,nbeg,nend,clmlevel) domain%pftm = -9999 domain%glcmask = 0 - end subroutine domain_init - - !------------------------------------------------------------------------------ +end subroutine domain_init +!------------------------------------------------------------------------------ +!BOP +! +! !IROUTINE: domain_clean +! +! !INTERFACE: subroutine domain_clean(domain) - ! - ! !DESCRIPTION: - ! This subroutine deallocates the domain type - ! - ! !ARGUMENTS: +! +! !DESCRIPTION: +! This subroutine deallocates the domain type +! +! !ARGUMENTS: + implicit none type(domain_type) :: domain ! domain datatype - ! - ! !LOCAL VARIABLES: +! +! !REVISION HISTORY: +! Created by T Craig +! +! +! !LOCAL VARIABLES: +!EOP integer ier - !------------------------------------------------------------------------------ - if ( domain%set .eq. .true. ) then +! +!------------------------------------------------------------------------------ + if (domain%set == set) then if (masterproc) then write(iulog,*) 'domain_clean: cleaning ',domain%ni,domain%nj endif deallocate(domain%mask,domain%frac,domain%latc, & - domain%lonc,domain%area,domain%pftm, & - domain%topo,domain%glcmask,stat=ier) + domain%lonc,domain%area,domain%pftm, & + domain%topo,domain%glcmask,stat=ier) if (ier /= 0) then call shr_sys_abort('domain_clean ERROR: deallocate mask, frac, lat, lon, area ') endif @@ -152,39 +187,56 @@ subroutine domain_clean(domain) domain%nj = huge(1) domain%nbeg = huge(1) domain%nend = huge(1) - domain%set = .false. + domain%set = unset domain%decomped = .true. - end subroutine domain_clean - - !------------------------------------------------------------------------------ +end subroutine domain_clean +!------------------------------------------------------------------------------ +!BOP +! +! !IROUTINE: domain_check +! +! !INTERFACE: subroutine domain_check(domain) - ! - ! !DESCRIPTION: - ! This subroutine write domain info - ! - ! !ARGUMENTS: +! +! !DESCRIPTION: +! This subroutine write domain info +! +! !USES: +! +! !ARGUMENTS: + implicit none type(domain_type),intent(in) :: domain ! domain datatype - !------------------------------------------------------------------------------ - - if (masterproc) then - write(iulog,*) ' domain_check set = ',domain%set - write(iulog,*) ' domain_check decomped = ',domain%decomped - write(iulog,*) ' domain_check ns = ',domain%ns - write(iulog,*) ' domain_check ni,nj = ',domain%ni,domain%nj - write(iulog,*) ' domain_check clmlevel = ',trim(domain%clmlevel) - write(iulog,*) ' domain_check nbeg,nend = ',domain%nbeg,domain%nend - write(iulog,*) ' domain_check lonc = ',minval(domain%lonc),maxval(domain%lonc) - write(iulog,*) ' domain_check latc = ',minval(domain%latc),maxval(domain%latc) - write(iulog,*) ' domain_check mask = ',minval(domain%mask),maxval(domain%mask) - write(iulog,*) ' domain_check frac = ',minval(domain%frac),maxval(domain%frac) - write(iulog,*) ' domain_check topo = ',minval(domain%topo),maxval(domain%topo) - write(iulog,*) ' domain_check area = ',minval(domain%area),maxval(domain%area) - write(iulog,*) ' domain_check pftm = ',minval(domain%pftm),maxval(domain%pftm) - write(iulog,*) ' domain_check glcmask = ',minval(domain%glcmask),maxval(domain%glcmask) - write(iulog,*) ' ' - endif - - end subroutine domain_check +! +! !REVISION HISTORY: +! Created by T Craig +! +! +! !LOCAL VARIABLES: +! +!EOP +!------------------------------------------------------------------------------ + + if (masterproc) then + write(iulog,*) ' domain_check set = ',trim(domain%set) + write(iulog,*) ' domain_check decomped = ',domain%decomped + write(iulog,*) ' domain_check ns = ',domain%ns + write(iulog,*) ' domain_check ni,nj = ',domain%ni,domain%nj + write(iulog,*) ' domain_check clmlevel = ',trim(domain%clmlevel) + write(iulog,*) ' domain_check nbeg,nend = ',domain%nbeg,domain%nend + write(iulog,*) ' domain_check lonc = ',minval(domain%lonc),maxval(domain%lonc) + write(iulog,*) ' domain_check latc = ',minval(domain%latc),maxval(domain%latc) + write(iulog,*) ' domain_check mask = ',minval(domain%mask),maxval(domain%mask) + write(iulog,*) ' domain_check frac = ',minval(domain%frac),maxval(domain%frac) + write(iulog,*) ' domain_check topo = ',minval(domain%topo),maxval(domain%topo) + write(iulog,*) ' domain_check area = ',minval(domain%area),maxval(domain%area) + write(iulog,*) ' domain_check pftm = ',minval(domain%pftm),maxval(domain%pftm) + write(iulog,*) ' domain_check glcmask = ',minval(domain%glcmask),maxval(domain%glcmask) + write(iulog,*) ' ' + endif + +end subroutine domain_check + +!------------------------------------------------------------------------------ end module domainMod From df4a972d9761774677d81dedc299f03baaeb21e3 Mon Sep 17 00:00:00 2001 From: Ben Andre Date: Wed, 27 Jan 2016 14:52:59 -0700 Subject: [PATCH 4/5] Bugfix in ED restart variable name Fix an error in an ED restart variable name (space instead of underscore). Problem found by running 'ed' test suite on yellowstone intel, pgi, gnu. This change fixed a runtime problem with: ERS_D_Ld5.f19_g16.ICLM45ED.yellowstone_intel.clm-edTest but there are other tests that fail in the parent changeset. Test suite: ed yellowstone intel, gnu, pgi Test baseline: n/a Test namelist changes: none Test status: see above. Fixes see above Code reviews: self. --- components/clm/src/ED/main/EDRestVectorMod.F90 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/clm/src/ED/main/EDRestVectorMod.F90 b/components/clm/src/ED/main/EDRestVectorMod.F90 index 06e7be0e30..9efbb237b5 100755 --- a/components/clm/src/ED/main/EDRestVectorMod.F90 +++ b/components/clm/src/ED/main/EDRestVectorMod.F90 @@ -847,7 +847,7 @@ subroutine doVectorIO( this, ncid, flag ) readvar=readvar) - call restartvar(ncid=ncid, flag=flag, varname='ed_chilling days', xtype=ncd_double, & + call restartvar(ncid=ncid, flag=flag, varname='ed_chilling_days', xtype=ncd_double, & dim1name=dimName, & long_name='ed chilling day counter', units='unitless', & interpinic_flag='interp', data=this%ncd, & From 27f119e6aff0daf1fb3fca70dcf7867fdc60ce09 Mon Sep 17 00:00:00 2001 From: Ben Andre Date: Thu, 28 Jan 2016 12:31:36 -0700 Subject: [PATCH 5/5] Update test expected failures file Update the clm ExpectedTestFails file for the branch prior to submitting pull request to master. Code reviews: self Test suite: 'ed' yellowstone intel, gnu, pgi. Test baseline: ed-clm-eb26be69 Test namelist changes: none Test status: answer changing Restart still broken for all f09 and f19 simulations with all compilers. Science updates change answers from baseline. --- components/clm/cimetest/ExpectedTestFails.xml | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/components/clm/cimetest/ExpectedTestFails.xml b/components/clm/cimetest/ExpectedTestFails.xml index 6f2b451dfd..c4bf391ae4 100644 --- a/components/clm/cimetest/ExpectedTestFails.xml +++ b/components/clm/cimetest/ExpectedTestFails.xml @@ -39,4 +39,17 @@ FAIL ERI_D.ne30_g16.ICLM45BGC.edison_intel.clm-vrtlay FAIL ERS_Ld211_D_P144x1.f10_f10.ICNCP.edison_intel.clm-crop + + FAIL ERS_D_Ld5.f19_g16.ICLM45ED.yellowstone_pgi.clm-edTest.clm2.h0.nc : test compare clm2.h0 (.base and .rest files) + FAIL ERS_D_Ld5.f19_g16.ICLM45ED.yellowstone_pgi.clm-edTest.cpl.hi.nc : test compare cpl.hi (.base and .rest files) + FAIL ERS_D_Ld5.f09_g16.ICLM45ED.yellowstone_pgi.clm-edTest.clm2.h0.nc : test compare clm2.h0 (.base and .rest files) + FAIL ERS_D_Ld5.f09_g16.ICLM45ED.yellowstone_pgi.clm-edTest.cpl.hi.nc : test compare cpl.hi (.base and .rest files) + FAIL ERS_D_Ld5.f19_g16.ICLM45ED.yellowstone_gnu.clm-edTest.clm2.h0.nc : test compare clm2.h0 (.base and .rest files) + FAIL ERS_D_Ld5.f19_g16.ICLM45ED.yellowstone_gnu.clm-edTest.cpl.hi.nc : test compare cpl.hi (.base and .rest files) + FAIL ERS_D_Ld5.f09_g16.ICLM45ED.yellowstone_gnu.clm-edTest.clm2.h0.nc : test compare clm2.h0 (.base and .rest files) + FAIL ERS_D_Ld5.f09_g16.ICLM45ED.yellowstone_gnu.clm-edTest.cpl.hi.nc : test compare cpl.hi (.base and .rest files) + FAIL ERS_D_Ld5.f19_g16.ICLM45ED.yellowstone_intel.clm-edTest.clm2.h0.nc : test compare clm2.h0 (.base and .rest files) + FAIL ERS_D_Ld5.f19_g16.ICLM45ED.yellowstone_intel.clm-edTest.cpl.hi.nc : test compare cpl.hi (.base and .rest files) + FAIL ERS_D_Ld5.f09_g16.ICLM45ED.yellowstone_intel.clm-edTest.clm2.h0.nc : test compare clm2.h0 (.base and .rest files) + FAIL ERS_D_Ld5.f09_g16.ICLM45ED.yellowstone_intel.clm-edTest.cpl.hi.nc : test compare cpl.hi (.base and .rest files)