diff --git a/ChangeLog b/ChangeLog index 4fa3316719..f88b98888a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,151 @@ =============================================================== +Tag name: clm4_5_8_r178 +Originator(s): sacks (Bill Sacks) +Date: Sun Apr 17 19:28:55 MDT 2016 +One-line Summary: Remove some consistency checks, and merge crop_prog with use_crop in code + +Purpose of changes +------------------ + +(1) Remove some consistency checks that were doing more harm than good: + + (a) Make init_interp_fill_missing_with_natveg unnecessary for natural veg + and crop output points. This is mainly to support the common use case of + interpolating from non-crop to crop, without requiring the user to set + this flag. + + (b) Remove check_finidat_fsurdat_consistency - now never do this check. This + consistency check was causing more problems than it solved, both for + users and developers (e.g., requiring us to change initial conditions + files whenever we made new versions of the surface dataset). + +(2) Remove crop_prog logical variable from the code. This was identical to + use_crop, and so it was confusing to have these two separate variables. Uses + of crop_prog have been replaced by uses of use_crop. + + +Notes of particular relevance for users +--------------------------------------- + +Caveats for users (e.g., need to interpolate initial conditions): none + +Changes to CLM's user interface (e.g., new/renamed XML or namelist variables): +- No longer need to set init_interp_fill_missing_with_natveg when interpolating +from non-crop to crop + +Changes made to namelist defaults (e.g., changed parameter values): none + +Changes to the datasets (e.g., parameter, surface or initial files): none + +Substantial timing or memory changes: none + + +Code reviews and testing +------------------------ + +Code reviewed by: self + +CLM testing: + + [PASS means all tests PASS and OK means tests PASS other than expected fails.] + + build-namelist tests: + + yellowstone - pass (ran bld/unit_testers tests) + + unit-tests (components/clm/src): + + yellowstone - pass + + tools-tests (components/clm/test/tools): + + yellowstone - not run + + PTCLM testing (components/clm/tools/shared/PTCLM/test): + + yellowstone - not run + + regular tests (aux_clm40, aux_clm45): + + yellowstone_intel - pass + yellowstone_pgi - pass + yellowstone_gnu (clm45 only) - pass + hobart_nag - pass + +CLM tag used for the baseline comparisons: clm4_5_8_r177 + + +Answer changes +-------------- + +Changes answers relative to baseline: NO + + +Detailed list of changes +------------------------ + +List any svn externals directories updated (cime, rtm, cism, etc.): none + +List all files eliminated: + +========= Make init_interp_fill_missing_with_natveg unnecessary for natural veg + and crop output points +D components/clm/cime_config/testdefs/testmods_dirs/clm/interp_f19_noncrop2crop/user_nl_clm +D components/clm/cime_config/testdefs/testmods_dirs/clm/interp_f19_noncrop2crop/include_user_mods +D components/clm/cime_config/testdefs/testmods_dirs/clm/interp_f19_noncrop2crop/README +D components/clm/cime_config/testdefs/testmods_dirs/clm/interp_f19_noncrop2crop + +List all files added and what they do: + +List all existing files that have been modified, and describe the changes: + +========= Make init_interp_fill_missing_with_natveg unnecessary for natural veg + and crop output points +M components/clm/src/init_interp/initInterpMindist.F90 +M components/clm/src/init_interp/test/initInterpMindist_test/test_init_interp_mindist.pf +M components/clm/cime_config/testdefs/testmods_dirs/clm/clm50KitchenSink/user_nl_clm +M components/clm/cime_config/testdefs/testlist_clm.xml + +========= Remove check_finidat_fsurdat_consistency - now never do this check +M components/clm/src/main/restFileMod.F90 +M components/clm/bld/namelist_files/namelist_definition_clm4_5.xml + +========= Remove crop_prog - use use_crop in its place +M components/clm/src/ED/main/EDCLMLinkMod.F90 +M components/clm/src/biogeophys/EnergyFluxType.F90 +M components/clm/src/biogeophys/TemperatureType.F90 +M components/clm/src/biogeophys/WaterStateType.F90 +M components/clm/src/soilbiogeochem/SoilBiogeochemNStateUpdate1Mod.F90 +M components/clm/src/soilbiogeochem/SoilBiogeochemStateType.F90 +M components/clm/src/soilbiogeochem/SoilBiogeochemNitrogenFluxType.F90 +M components/clm/src/soilbiogeochem/SoilBiogeochemNitrogenStateType.F90 +M components/clm/src/soilbiogeochem/SoilBiogeochemCarbonStateType.F90 +M components/clm/src/dyn_subgrid/dynSubgridControlMod.F90 +M components/clm/src/unit_test_stubs/main/histFileMod_stub.F90 +M components/clm/src/biogeochem/CNFUNMod.F90 +M components/clm/src/biogeochem/CNVegNitrogenStateType.F90 +M components/clm/src/biogeochem/CNPrecisionControlMod.F90 +M components/clm/src/biogeochem/CNPhenologyMod.F90 +M components/clm/src/biogeochem/CropType.F90 +M components/clm/src/biogeochem/CNVegNitrogenFluxType.F90 +M components/clm/src/biogeochem/CNDriverMod.F90 +M components/clm/src/biogeochem/CNVegCarbonFluxType.F90 +M components/clm/src/biogeochem/CNVegCarbonStateType.F90 +M components/clm/src/biogeochem/CNNStateUpdate1Mod.F90 +M components/clm/src/biogeochem/CNBalanceCheckMod.F90 +M components/clm/src/biogeochem/CNVegStateType.F90 +M components/clm/src/main/clm_varctl.F90 +M components/clm/src/main/clm_driver.F90 +M components/clm/src/main/clm_initializeMod.F90 +M components/clm/src/main/initGridCellsMod.F90 +M components/clm/src/main/histFileMod.F90 +M components/clm/src/main/clm_varpar.F90 +M components/clm/src/main/pftconMod.F90 +M components/clm/src/main/surfrdMod.F90 +M components/clm/src/main/clm_instMod.F90 + +=============================================================== +=============================================================== Tag name: clm4_5_8_r177 Originator(s): sacks (Bill Sacks) Date: Thu Apr 14 14:00:25 MDT 2016 diff --git a/components/clm/bld/namelist_files/namelist_definition_clm4_5.xml b/components/clm/bld/namelist_files/namelist_definition_clm4_5.xml index d34e935713..ed08581bc3 100644 --- a/components/clm/bld/namelist_files/namelist_definition_clm4_5.xml +++ b/components/clm/bld/namelist_files/namelist_definition_clm4_5.xml @@ -1792,12 +1792,6 @@ If TRUE, apply harvest from flanduse_timeseries file. - -If TRUE (which is the default), check consistency between surface dataset used to create the finidat file -and the current fsurdat. This check is only done for a transient run. - - If TRUE (which is the default), check consistency between year on the finidat file @@ -1857,6 +1851,11 @@ If FALSE (which is the default): If an output type cannot be found in the input code aborts If TRUE: If an output type cannot be found in the input, fill with closest natural veg column (using bare soil for patch-level variables) + +NOTE: Natural vegetation and crop landunits always behave as if this were true. e.g., if +we can't find a column with the same type as a given crop column in the output, then we +always fill with the closest natural veg patch / column, regardless of the value of this +flag. So interpolation from non-crop to crop cases can be done without setting this flag. diff --git a/components/clm/cime_config/testdefs/testlist_clm.xml b/components/clm/cime_config/testdefs/testlist_clm.xml index a52d8a3c36..9e55c90f90 100644 --- a/components/clm/cime_config/testdefs/testlist_clm.xml +++ b/components/clm/cime_config/testdefs/testlist_clm.xml @@ -659,7 +659,7 @@ yellowstone - yellowstone + yellowstone yellowstone diff --git a/components/clm/cime_config/testdefs/testmods_dirs/clm/clm50KitchenSink/user_nl_clm b/components/clm/cime_config/testdefs/testmods_dirs/clm/clm50KitchenSink/user_nl_clm index b986d2b212..3ce14036cc 100644 --- a/components/clm/cime_config/testdefs/testmods_dirs/clm/clm50KitchenSink/user_nl_clm +++ b/components/clm/cime_config/testdefs/testmods_dirs/clm/clm50KitchenSink/user_nl_clm @@ -1,5 +1,4 @@ finidat = '$DIN_LOC_ROOT/lnd/clm2/initdata_map/clmi.IG1850CRUCLM50BGC.0481-01-01.1.9x2.5_g1v6_gl5_simyr1850_c160127.nc' -init_interp_fill_missing_with_natveg = .true. limit_irrigation = .false. leaf_mr_vcm = 0.015d00 use_bedrock = .true. diff --git a/components/clm/cime_config/testdefs/testmods_dirs/clm/interp_f19_noncrop2crop/README b/components/clm/cime_config/testdefs/testmods_dirs/clm/interp_f19_noncrop2crop/README deleted file mode 100644 index bd55a74158..0000000000 --- a/components/clm/cime_config/testdefs/testmods_dirs/clm/interp_f19_noncrop2crop/README +++ /dev/null @@ -1,7 +0,0 @@ -This testmods directory allows interpolating non-crop to crop; this requires -init_interp_fill_missing_with_natveg since we have a new crop landunit that -doesn't exist in the input file. - -Note: if we stop supporting out-of-the-box f19 initial conditions files, this -could be changed to f09 (or whatever resolution we provide initial conditions -for). diff --git a/components/clm/cime_config/testdefs/testmods_dirs/clm/interp_f19_noncrop2crop/include_user_mods b/components/clm/cime_config/testdefs/testmods_dirs/clm/interp_f19_noncrop2crop/include_user_mods deleted file mode 100644 index b786856cdc..0000000000 --- a/components/clm/cime_config/testdefs/testmods_dirs/clm/interp_f19_noncrop2crop/include_user_mods +++ /dev/null @@ -1 +0,0 @@ -../interp_f19_noncrop diff --git a/components/clm/cime_config/testdefs/testmods_dirs/clm/interp_f19_noncrop2crop/user_nl_clm b/components/clm/cime_config/testdefs/testmods_dirs/clm/interp_f19_noncrop2crop/user_nl_clm deleted file mode 100644 index 515c0bb033..0000000000 --- a/components/clm/cime_config/testdefs/testmods_dirs/clm/interp_f19_noncrop2crop/user_nl_clm +++ /dev/null @@ -1,3 +0,0 @@ -! Because this testmod directory is used for interpolation from non-crop to crop -! (which adds a crop landunit), we need the following setting: -init_interp_fill_missing_with_natveg = .true. diff --git a/components/clm/doc/ChangeLog b/components/clm/doc/ChangeLog index 4fa3316719..f88b98888a 100644 --- a/components/clm/doc/ChangeLog +++ b/components/clm/doc/ChangeLog @@ -1,4 +1,151 @@ =============================================================== +Tag name: clm4_5_8_r178 +Originator(s): sacks (Bill Sacks) +Date: Sun Apr 17 19:28:55 MDT 2016 +One-line Summary: Remove some consistency checks, and merge crop_prog with use_crop in code + +Purpose of changes +------------------ + +(1) Remove some consistency checks that were doing more harm than good: + + (a) Make init_interp_fill_missing_with_natveg unnecessary for natural veg + and crop output points. This is mainly to support the common use case of + interpolating from non-crop to crop, without requiring the user to set + this flag. + + (b) Remove check_finidat_fsurdat_consistency - now never do this check. This + consistency check was causing more problems than it solved, both for + users and developers (e.g., requiring us to change initial conditions + files whenever we made new versions of the surface dataset). + +(2) Remove crop_prog logical variable from the code. This was identical to + use_crop, and so it was confusing to have these two separate variables. Uses + of crop_prog have been replaced by uses of use_crop. + + +Notes of particular relevance for users +--------------------------------------- + +Caveats for users (e.g., need to interpolate initial conditions): none + +Changes to CLM's user interface (e.g., new/renamed XML or namelist variables): +- No longer need to set init_interp_fill_missing_with_natveg when interpolating +from non-crop to crop + +Changes made to namelist defaults (e.g., changed parameter values): none + +Changes to the datasets (e.g., parameter, surface or initial files): none + +Substantial timing or memory changes: none + + +Code reviews and testing +------------------------ + +Code reviewed by: self + +CLM testing: + + [PASS means all tests PASS and OK means tests PASS other than expected fails.] + + build-namelist tests: + + yellowstone - pass (ran bld/unit_testers tests) + + unit-tests (components/clm/src): + + yellowstone - pass + + tools-tests (components/clm/test/tools): + + yellowstone - not run + + PTCLM testing (components/clm/tools/shared/PTCLM/test): + + yellowstone - not run + + regular tests (aux_clm40, aux_clm45): + + yellowstone_intel - pass + yellowstone_pgi - pass + yellowstone_gnu (clm45 only) - pass + hobart_nag - pass + +CLM tag used for the baseline comparisons: clm4_5_8_r177 + + +Answer changes +-------------- + +Changes answers relative to baseline: NO + + +Detailed list of changes +------------------------ + +List any svn externals directories updated (cime, rtm, cism, etc.): none + +List all files eliminated: + +========= Make init_interp_fill_missing_with_natveg unnecessary for natural veg + and crop output points +D components/clm/cime_config/testdefs/testmods_dirs/clm/interp_f19_noncrop2crop/user_nl_clm +D components/clm/cime_config/testdefs/testmods_dirs/clm/interp_f19_noncrop2crop/include_user_mods +D components/clm/cime_config/testdefs/testmods_dirs/clm/interp_f19_noncrop2crop/README +D components/clm/cime_config/testdefs/testmods_dirs/clm/interp_f19_noncrop2crop + +List all files added and what they do: + +List all existing files that have been modified, and describe the changes: + +========= Make init_interp_fill_missing_with_natveg unnecessary for natural veg + and crop output points +M components/clm/src/init_interp/initInterpMindist.F90 +M components/clm/src/init_interp/test/initInterpMindist_test/test_init_interp_mindist.pf +M components/clm/cime_config/testdefs/testmods_dirs/clm/clm50KitchenSink/user_nl_clm +M components/clm/cime_config/testdefs/testlist_clm.xml + +========= Remove check_finidat_fsurdat_consistency - now never do this check +M components/clm/src/main/restFileMod.F90 +M components/clm/bld/namelist_files/namelist_definition_clm4_5.xml + +========= Remove crop_prog - use use_crop in its place +M components/clm/src/ED/main/EDCLMLinkMod.F90 +M components/clm/src/biogeophys/EnergyFluxType.F90 +M components/clm/src/biogeophys/TemperatureType.F90 +M components/clm/src/biogeophys/WaterStateType.F90 +M components/clm/src/soilbiogeochem/SoilBiogeochemNStateUpdate1Mod.F90 +M components/clm/src/soilbiogeochem/SoilBiogeochemStateType.F90 +M components/clm/src/soilbiogeochem/SoilBiogeochemNitrogenFluxType.F90 +M components/clm/src/soilbiogeochem/SoilBiogeochemNitrogenStateType.F90 +M components/clm/src/soilbiogeochem/SoilBiogeochemCarbonStateType.F90 +M components/clm/src/dyn_subgrid/dynSubgridControlMod.F90 +M components/clm/src/unit_test_stubs/main/histFileMod_stub.F90 +M components/clm/src/biogeochem/CNFUNMod.F90 +M components/clm/src/biogeochem/CNVegNitrogenStateType.F90 +M components/clm/src/biogeochem/CNPrecisionControlMod.F90 +M components/clm/src/biogeochem/CNPhenologyMod.F90 +M components/clm/src/biogeochem/CropType.F90 +M components/clm/src/biogeochem/CNVegNitrogenFluxType.F90 +M components/clm/src/biogeochem/CNDriverMod.F90 +M components/clm/src/biogeochem/CNVegCarbonFluxType.F90 +M components/clm/src/biogeochem/CNVegCarbonStateType.F90 +M components/clm/src/biogeochem/CNNStateUpdate1Mod.F90 +M components/clm/src/biogeochem/CNBalanceCheckMod.F90 +M components/clm/src/biogeochem/CNVegStateType.F90 +M components/clm/src/main/clm_varctl.F90 +M components/clm/src/main/clm_driver.F90 +M components/clm/src/main/clm_initializeMod.F90 +M components/clm/src/main/initGridCellsMod.F90 +M components/clm/src/main/histFileMod.F90 +M components/clm/src/main/clm_varpar.F90 +M components/clm/src/main/pftconMod.F90 +M components/clm/src/main/surfrdMod.F90 +M components/clm/src/main/clm_instMod.F90 + +=============================================================== +=============================================================== Tag name: clm4_5_8_r177 Originator(s): sacks (Bill Sacks) Date: Thu Apr 14 14:00:25 MDT 2016 diff --git a/components/clm/doc/ChangeSum b/components/clm/doc/ChangeSum index 562dcfb128..1907b614d9 100644 --- a/components/clm/doc/ChangeSum +++ b/components/clm/doc/ChangeSum @@ -1,5 +1,6 @@ Tag Who Date Summary ============================================================================================================================ + clm4_5_8_r178 sacks 04/17/2016 Remove some consistency checks, and merge crop_prog with use_crop in code clm4_5_8_r177 sacks 04/14/2016 Move CN product pools to gridcell level clm4_5_8_r176 sacks 04/13/2016 Calculate active flags and filters earlier in initialization clm4_5_8_r175 sacks 04/09/2016 For glc_mec, change downscaling and where SMB is computed diff --git a/components/clm/doc/UsersGuide/clm_ug.xml b/components/clm/doc/UsersGuide/clm_ug.xml index cdc62ca892..1b9acbd912 100644 --- a/components/clm/doc/UsersGuide/clm_ug.xml +++ b/components/clm/doc/UsersGuide/clm_ug.xml @@ -162,7 +162,7 @@ The purpose of this guide is to instruct both the novice and experienced user, a -$URL: https://svn-ccsm-models.cgd.ucar.edu/clm2/trunk_tags/clm4_5_8_r177/components/clm/doc/UsersGuide/clm_ug.xml $ +$URL: https://svn-ccsm-models.cgd.ucar.edu/clm2/trunk_tags/clm4_5_8_r178/components/clm/doc/UsersGuide/clm_ug.xml $ &build_date; diff --git a/components/clm/src/ED/main/EDCLMLinkMod.F90 b/components/clm/src/ED/main/EDCLMLinkMod.F90 index 5257751e2d..15c96a73bb 100755 --- a/components/clm/src/ED/main/EDCLMLinkMod.F90 +++ b/components/clm/src/ED/main/EDCLMLinkMod.F90 @@ -250,7 +250,7 @@ subroutine InitHistory(this, bounds) ! ! !USES: use clm_varpar , only : ndecomp_cascade_transitions, ndecomp_pools - use clm_varpar , only : nlevdecomp, nlevdecomp_full, crop_prog + use clm_varpar , only : nlevdecomp, nlevdecomp_full use clm_varcon , only : spval use histFileMod, only : hist_addfld1d, hist_addfld2d, hist_addfld_decomp ! diff --git a/components/clm/src/biogeochem/CNBalanceCheckMod.F90 b/components/clm/src/biogeochem/CNBalanceCheckMod.F90 index cc145101e5..8a7c4499b9 100644 --- a/components/clm/src/biogeochem/CNBalanceCheckMod.F90 +++ b/components/clm/src/biogeochem/CNBalanceCheckMod.F90 @@ -226,7 +226,7 @@ subroutine NBalanceCheck(this, bounds, num_soilc, filter_soilc, & ! Perform nitrogen mass conservation check ! ! !USES: - use clm_varpar, only : crop_prog + use clm_varctl, only : use_crop ! ! !ARGUMENTS: class(cn_balance_type) , intent(inout) :: this @@ -296,7 +296,7 @@ subroutine NBalanceCheck(this, bounds, num_soilc, filter_soilc, & col_ninputs(c) = col_ninputs(c) + ffix_to_sminn(c) ! for FUN, free living fixation is a seprate flux. RF. endif - if (crop_prog) then + if (use_crop) then col_ninputs(c) = col_ninputs(c) + fert_to_sminn(c) + soyfixn_to_sminn(c) end if diff --git a/components/clm/src/biogeochem/CNDriverMod.F90 b/components/clm/src/biogeochem/CNDriverMod.F90 index ce9a515e07..7809478064 100644 --- a/components/clm/src/biogeochem/CNDriverMod.F90 +++ b/components/clm/src/biogeochem/CNDriverMod.F90 @@ -11,6 +11,7 @@ module CNDriverMod use decompMod , only : bounds_type use perf_mod , only : t_startf, t_stopf use clm_varctl , only : use_century_decomp, use_nitrif_denitrif, use_nguardrail + use clm_varctl , only : use_crop use CNVegStateType , only : cnveg_state_type use CNVegCarbonStateType , only : cnveg_carbonstate_type use CNVegCarbonFluxType , only : cnveg_carbonflux_type @@ -99,7 +100,7 @@ subroutine CNDriverNoLeaching(bounds, ! stays synchronized with albedo calculations. ! ! !USES: - use clm_varpar , only: crop_prog, nlevgrnd, nlevdecomp_full + use clm_varpar , only: nlevgrnd, nlevdecomp_full use clm_varpar , only: nlevdecomp, ndecomp_cascade_transitions, ndecomp_pools use subgridAveMod , only: p2c, p2c_2d use CropType , only: crop_type @@ -182,8 +183,8 @@ subroutine CNDriverNoLeaching(bounds, real(r8):: cn_decomp_pools(bounds%begc:bounds%endc,1:nlevdecomp,1:ndecomp_pools) real(r8):: p_decomp_cpool_loss(bounds%begc:bounds%endc,1:nlevdecomp,1:ndecomp_cascade_transitions) !potential C loss from one pool to another real(r8):: pmnf_decomp_cascade(bounds%begc:bounds%endc,1:nlevdecomp,1:ndecomp_cascade_transitions) !potential mineral N flux, from one pool to another - real(r8):: arepr(bounds%begp:bounds%endp) ! reproduction allocation coefficient (only used for crop_prog) - real(r8):: aroot(bounds%begp:bounds%endp) ! root allocation coefficient (only used for crop_prog) + real(r8):: arepr(bounds%begp:bounds%endp) ! reproduction allocation coefficient (only used for use_crop) + real(r8):: aroot(bounds%begp:bounds%endp) ! root allocation coefficient (only used for use_crop) integer :: begp,endp integer :: begc,endc @@ -276,7 +277,7 @@ subroutine CNDriverNoLeaching(bounds, call t_stopf('CNFFixation') end if - if (crop_prog) then + if (use_crop) then call CNNFert(bounds, num_soilc,filter_soilc, & cnveg_nitrogenflux_inst, soilbiogeochem_nitrogenflux_inst) diff --git a/components/clm/src/biogeochem/CNFUNMod.F90 b/components/clm/src/biogeochem/CNFUNMod.F90 index 74d6539d7b..4350954de1 100644 --- a/components/clm/src/biogeochem/CNFUNMod.F90 +++ b/components/clm/src/biogeochem/CNFUNMod.F90 @@ -204,7 +204,7 @@ subroutine CNFUN(bounds,num_soilc, filter_soilc,num_soilp& ! !USES: use clm_time_manager, only : get_step_size, get_curr_date, get_days_per_year - use clm_varpar , only : nlevdecomp, crop_prog + use clm_varpar , only : nlevdecomp use clm_varcon , only : secspday, smallValue, fun_period, tfrz, dzsoi_decomp, spval use clm_varctl , only : use_nitrif_denitrif use PatchType , only : patch diff --git a/components/clm/src/biogeochem/CNNStateUpdate1Mod.F90 b/components/clm/src/biogeochem/CNNStateUpdate1Mod.F90 index d5e4205f1a..240a5266ac 100644 --- a/components/clm/src/biogeochem/CNNStateUpdate1Mod.F90 +++ b/components/clm/src/biogeochem/CNNStateUpdate1Mod.F90 @@ -8,7 +8,7 @@ module CNNStateUpdate1Mod use shr_kind_mod , only: r8 => shr_kind_r8 use clm_time_manager , only : get_step_size use clm_varpar , only : nlevdecomp, ndecomp_pools, ndecomp_cascade_transitions - use clm_varpar , only : crop_prog, i_met_lit, i_cel_lit, i_lig_lit, i_cwd + use clm_varpar , only : i_met_lit, i_cel_lit, i_lig_lit, i_cwd use clm_varctl , only : iulog, use_nitrif_denitrif use clm_varcon , only : nitrif_n2o_loss_frac use pftconMod , only : npcropmin, pftcon diff --git a/components/clm/src/biogeochem/CNPhenologyMod.F90 b/components/clm/src/biogeochem/CNPhenologyMod.F90 index 18af868dc0..467bfa8d31 100644 --- a/components/clm/src/biogeochem/CNPhenologyMod.F90 +++ b/components/clm/src/biogeochem/CNPhenologyMod.F90 @@ -281,7 +281,7 @@ subroutine CNPhenologyInit(bounds) ! ! !USES: use clm_time_manager, only: get_step_size - use clm_varpar , only: crop_prog + use clm_varctl , only: use_crop use clm_varcon , only: secspday ! ! !ARGUMENTS: @@ -335,7 +335,7 @@ subroutine CNPhenologyInit(bounds) ! Call any subroutine specific initialization routines ! ----------------------------------------- - if ( crop_prog ) call CropPhenologyInit(bounds) + if ( use_crop ) call CropPhenologyInit(bounds) end subroutine CNPhenologyInit @@ -2604,7 +2604,7 @@ subroutine CNGrainToProductPools(bounds, num_soilp, filter_soilp, num_soilc, fil ! grain-to-food fluxes into the column-level grain-to-cropprod fluxes ! ! !USES: - use clm_varpar , only : crop_prog + use clm_varctl , only : use_crop use clm_varctl , only : use_grainproduct use subgridAveMod , only : p2c ! @@ -2623,10 +2623,10 @@ subroutine CNGrainToProductPools(bounds, num_soilp, filter_soilp, num_soilc, fil character(len=*), parameter :: subname = 'CNGrainToProductPools' !----------------------------------------------------------------------- - ! Explicitly checking crop_prog is probably unnecessary here (because presumably - ! use_grainproduct is only true if crop_prog is true), but we do it for safety because - ! the grain*_to_food_patch fluxes are not set if crop_prog is false. - if (crop_prog .and. use_grainproduct) then + ! Explicitly checking use_crop is probably unnecessary here (because presumably + ! use_grainproduct is only true if use_crop is true), but we do it for safety because + ! the grain*_to_food_patch fluxes are not set if use_crop is false. + if (use_crop .and. use_grainproduct) then do fp = 1, num_soilp p = filter_soilp(fp) cnveg_carbonflux_inst%grainc_to_cropprodc_patch(p) = & diff --git a/components/clm/src/biogeochem/CNPrecisionControlMod.F90 b/components/clm/src/biogeochem/CNPrecisionControlMod.F90 index 186e524bc1..35413ed434 100644 --- a/components/clm/src/biogeochem/CNPrecisionControlMod.F90 +++ b/components/clm/src/biogeochem/CNPrecisionControlMod.F90 @@ -35,8 +35,7 @@ subroutine CNPrecisionControl(num_soilp, filter_soilp, & ! Force leaf and deadstem c and n to 0 if they get too small. ! ! !USES: - use clm_varctl , only : iulog, use_c13, use_c14 - use clm_varpar , only : crop_prog + use clm_varctl , only : iulog, use_c13, use_c14, use_crop use pftconMod , only : nc3crop ! ! !ARGUMENTS: @@ -237,7 +236,7 @@ subroutine CNPrecisionControl(num_soilp, filter_soilp, & endif end if - if ( crop_prog .and. patch%itype(p) >= nc3crop )then + if ( use_crop .and. patch%itype(p) >= nc3crop )then ! grain C and N if (abs(cs%grainc_patch(p)) < ccrit) then pc = pc + cs%grainc_patch(p) @@ -524,7 +523,7 @@ subroutine CNPrecisionControl(num_soilp, filter_soilp, & endif end if - if ( crop_prog .and. patch%itype(p) >= nc3crop )then + if ( use_crop .and. patch%itype(p) >= nc3crop )then ! xsmrpool (C only) if (abs(cs%xsmrpool_patch(p)) < ccrit) then pc = pc + cs%xsmrpool_patch(p) diff --git a/components/clm/src/biogeochem/CNVegCarbonFluxType.F90 b/components/clm/src/biogeochem/CNVegCarbonFluxType.F90 index 61fc289736..e6655b0ea4 100644 --- a/components/clm/src/biogeochem/CNVegCarbonFluxType.F90 +++ b/components/clm/src/biogeochem/CNVegCarbonFluxType.F90 @@ -11,9 +11,9 @@ module CNVegCarbonFluxType use decompMod , only : bounds_type use SoilBiogeochemDecompCascadeConType , only : decomp_cascade_con use clm_varpar , only : ndecomp_cascade_transitions, ndecomp_pools - use clm_varpar , only : crop_prog, nlevdecomp_full, nlevgrnd, nlevdecomp + use clm_varpar , only : nlevdecomp_full, nlevgrnd, nlevdecomp use clm_varcon , only : spval, dzsoi_decomp - use clm_varctl , only : use_cndv, use_c13, use_nitrif_denitrif + use clm_varctl , only : use_cndv, use_c13, use_nitrif_denitrif, use_crop use landunit_varcon , only : istsoil, istcrop, istdlak use pftconMod , only : npcropmin use LandunitType , only : lun @@ -745,7 +745,7 @@ subroutine InitHistory(this, bounds, carbon_type) if (carbon_type == 'c12') then - if (crop_prog) then + if (use_crop) then this%grainc_to_food_patch(begp:endp) = spval call hist_addfld1d (fname='GRAINC_TO_FOOD', units='gC/m^2/s', & avgflag='A', long_name='grain C to food', & @@ -3255,7 +3255,7 @@ subroutine Restart ( this, bounds, ncid, flag ) logical :: readvar ! determine if variable is on initial file !------------------------------------------------------------------------ - if (crop_prog) then + if (use_crop) then call restartvar(ncid=ncid, flag=flag, varname='grainc_xfer_to_grainc', xtype=ncd_double, & dim1name='pft', & @@ -3577,7 +3577,7 @@ subroutine SetValues ( this, & this%grainc_to_cropprodc_patch(i) = value_patch end do - if ( crop_prog )then + if ( use_crop )then do fi = 1,num_patch i = filter_patch(fi) this%xsmrpool_to_atm_patch(i) = value_patch @@ -3813,7 +3813,7 @@ subroutine Summary_carbonflux(this, & this%livestem_mr_patch(p) + & this%livecroot_mr_patch(p) end if - if ( crop_prog .and. patch%itype(p) >= npcropmin )then + if ( use_crop .and. patch%itype(p) >= npcropmin )then this%mr_patch(p) = & this%mr_patch(p) + & this%grain_mr_patch(p) @@ -3829,7 +3829,7 @@ subroutine Summary_carbonflux(this, & this%cpool_deadstem_gr_patch(p) + & this%cpool_livecroot_gr_patch(p) + & this%cpool_deadcroot_gr_patch(p) - if ( crop_prog .and. patch%itype(p) >= npcropmin )then + if ( use_crop .and. patch%itype(p) >= npcropmin )then this%current_gr_patch(p) = this%current_gr_patch(p) + & this%cpool_grain_gr_patch(p) end if @@ -3843,7 +3843,7 @@ subroutine Summary_carbonflux(this, & this%transfer_deadstem_gr_patch(p) + & this%transfer_livecroot_gr_patch(p) + & this%transfer_deadcroot_gr_patch(p) - if ( crop_prog .and. patch%itype(p) >= npcropmin )then + if ( use_crop .and. patch%itype(p) >= npcropmin )then this%transfer_gr_patch(p) = this%transfer_gr_patch(p) + & this%transfer_grain_gr_patch(p) end if @@ -3857,7 +3857,7 @@ subroutine Summary_carbonflux(this, & this%cpool_livecroot_storage_gr_patch(p) + & this%cpool_deadcroot_storage_gr_patch(p) - if ( crop_prog .and. patch%itype(p) >= npcropmin )then + if ( use_crop .and. patch%itype(p) >= npcropmin )then this%storage_gr_patch(p) = this%storage_gr_patch(p) + & this%cpool_grain_storage_gr_patch(p) end if @@ -3869,7 +3869,7 @@ subroutine Summary_carbonflux(this, & this%storage_gr_patch(p) ! autotrophic respiration (AR) adn - if ( crop_prog .and. patch%itype(p) >= npcropmin )then + if ( use_crop .and. patch%itype(p) >= npcropmin )then this%ar_patch(p) = & this%mr_patch(p) + & this%gr_patch(p) + & @@ -3927,7 +3927,7 @@ subroutine Summary_carbonflux(this, & this%cpool_to_deadstemc_patch(p) + & this%deadstemc_xfer_to_deadstemc_patch(p) - if ( crop_prog .and. patch%itype(p) >= npcropmin )then + if ( use_crop .and. patch%itype(p) >= npcropmin )then this%agnpp_patch(p) = & this%agnpp_patch(p) + & this%cpool_to_grainc_patch(p) + & @@ -4014,7 +4014,7 @@ subroutine Summary_carbonflux(this, & this%hrv_gresp_storage_to_litter_patch(p) + & this%hrv_gresp_xfer_to_litter_patch(p) - if ( crop_prog .and. patch%itype(p) >= npcropmin )then + if ( use_crop .and. patch%itype(p) >= npcropmin )then this%litfall_patch(p) = & this%litfall_patch(p) + & this%livestemc_to_litter_patch(p) + & diff --git a/components/clm/src/biogeochem/CNVegCarbonStateType.F90 b/components/clm/src/biogeochem/CNVegCarbonStateType.F90 index 22bd1131c3..dbafd2915e 100644 --- a/components/clm/src/biogeochem/CNVegCarbonStateType.F90 +++ b/components/clm/src/biogeochem/CNVegCarbonStateType.F90 @@ -10,9 +10,8 @@ module CNVegCarbonStateType use shr_const_mod , only : SHR_CONST_PDB use shr_log_mod , only : errMsg => shr_log_errMsg use pftconMod , only : noveg, npcropmin, pftcon - use clm_varpar , only : crop_prog use clm_varcon , only : spval, c3_r2, c4_r2 - use clm_varctl , only : iulog, use_cndv + use clm_varctl , only : iulog, use_cndv, use_crop use decompMod , only : bounds_type use abortutils , only : endrun use spmdMod , only : masterproc @@ -214,7 +213,7 @@ subroutine InitHistory(this, bounds, carbon_type) if (carbon_type == 'c12') then - if (crop_prog) then + if (use_crop) then this%grainc_patch(begp:endp) = spval call hist_addfld1d (fname='GRAINC', units='gC/m^2', & avgflag='A', long_name='grain C (does not equal yield)', & @@ -863,7 +862,7 @@ subroutine InitCold(this, bounds, ratio, carbon_type, c12_cnveg_carbonstate_inst this%woodc_patch(p) = 0._r8 this%totc_patch(p) = 0._r8 - if ( crop_prog )then + if ( use_crop )then this%grainc_patch(p) = 0._r8 this%grainc_storage_patch(p) = 0._r8 this%grainc_xfer_patch(p) = 0._r8 @@ -895,7 +894,7 @@ subroutine InitCold(this, bounds, ratio, carbon_type, c12_cnveg_carbonstate_inst this%gresp_xfer_patch(p) + & this%cpool_patch(p) - if ( crop_prog )then + if ( use_crop )then this%totvegc_patch(p) = & this%totvegc_patch(p) + & this%grainc_patch(p) + & @@ -1793,7 +1792,7 @@ subroutine Restart ( this, bounds, ncid, flag, carbon_type, c12_cnveg_carbonsta ! patch prognostic crop variables !-------------------------------- - if (crop_prog) then + if (use_crop) then call restartvar(ncid=ncid, flag=flag, varname='grainc', xtype=ncd_double, & dim1name='pft', long_name='grain C', units='gC/m2', & interpinic_flag='interp', readvar=readvar, data=this%grainc_patch) @@ -1965,7 +1964,7 @@ subroutine SetValues ( this, & this%woodc_patch(i) = value_patch this%totvegc_patch(i) = value_patch this%totc_patch(i) = value_patch - if ( crop_prog ) then + if ( use_crop ) then this%grainc_patch(i) = value_patch this%grainc_storage_patch(i) = value_patch this%grainc_xfer_patch(i) = value_patch @@ -2073,7 +2072,7 @@ subroutine Summary_carbonstate(this, bounds, num_soilc, filter_soilc, num_soilp, this%gresp_storage_patch(p) + & this%gresp_xfer_patch(p) - if ( crop_prog .and. patch%itype(p) >= npcropmin )then + if ( use_crop .and. patch%itype(p) >= npcropmin )then this%storvegc_patch(p) = & this%storvegc_patch(p) + & this%grainc_storage_patch(p) + & diff --git a/components/clm/src/biogeochem/CNVegNitrogenFluxType.F90 b/components/clm/src/biogeochem/CNVegNitrogenFluxType.F90 index 2adbf171bf..17d428b876 100644 --- a/components/clm/src/biogeochem/CNVegNitrogenFluxType.F90 +++ b/components/clm/src/biogeochem/CNVegNitrogenFluxType.F90 @@ -4,9 +4,9 @@ module CNVegNitrogenFluxType use shr_infnan_mod , only : nan => shr_infnan_nan, assignment(=) use shr_log_mod , only : errMsg => shr_log_errMsg use clm_varpar , only : ndecomp_cascade_transitions, ndecomp_pools - use clm_varpar , only : nlevdecomp_full, nlevdecomp, crop_prog + use clm_varpar , only : nlevdecomp_full, nlevdecomp use clm_varcon , only : spval, ispval, dzsoi_decomp - use clm_varctl , only : use_nitrif_denitrif, use_vertsoilc + use clm_varctl , only : use_nitrif_denitrif, use_vertsoilc, use_crop use CNSharedParamsMod , only : use_fun use decompMod , only : bounds_type use abortutils , only : endrun @@ -514,7 +514,7 @@ subroutine InitHistory(this, bounds) ! ! !USES: use shr_infnan_mod , only : nan => shr_infnan_nan, assignment(=) - use clm_varpar , only : nlevsno, nlevgrnd, crop_prog + use clm_varpar , only : nlevsno, nlevgrnd use histFileMod , only : hist_addfld1d, hist_addfld2d, hist_addfld_decomp ! ! !ARGUMENTS: @@ -922,21 +922,21 @@ subroutine InitHistory(this, bounds) avgflag='A', long_name='total patch-level fire N loss', & ptr_patch=this%fire_nloss_patch) - if (crop_prog) then + if (use_crop) then this%fert_patch(begp:endp) = spval call hist_addfld1d (fname='FERT', units='gN/m^2/s', & avgflag='A', long_name='fertilizer added', & ptr_patch=this%fert_patch) end if - if (crop_prog) then + if (use_crop) then this%soyfixn_patch(begp:endp) = spval call hist_addfld1d (fname='SOYFIXN', units='gN/m^2/s', & avgflag='A', long_name='soybean fixation', & ptr_patch=this%soyfixn_patch) end if - if (crop_prog) then + if (use_crop) then this%fert_counter_patch(begp:endp) = spval call hist_addfld1d (fname='FERT_COUNTER', units='seconds', & avgflag='A', long_name='time left to fertilize', & @@ -1169,7 +1169,6 @@ subroutine InitCold(this, bounds) ! Initializes time varying variables used only in coupled carbon-nitrogen mode (CN): ! ! !USES: - use clm_varpar , only : crop_prog use landunit_varcon , only : istsoil, istcrop ! ! !ARGUMENTS: @@ -1214,7 +1213,7 @@ subroutine InitCold(this, bounds) do p = bounds%begp,bounds%endp l = patch%landunit(p) - if ( crop_prog )then + if ( use_crop )then this%fert_counter_patch(p) = spval this%fert_patch(p) = 0._r8 this%soyfixn_patch(p) = 0._r8 @@ -1284,7 +1283,6 @@ subroutine Restart (this, bounds, ncid, flag ) ! Read/write CN restart data for carbon state ! ! !USES: - use clm_varpar, only : crop_prog use restUtilMod use ncdio_pio ! @@ -1301,7 +1299,7 @@ subroutine Restart (this, bounds, ncid, flag ) real(r8), pointer :: ptr1d(:) ! temp. pointers for slicing larger arrays !------------------------------------------------------------------------ - if (crop_prog) then + if (use_crop) then call restartvar(ncid=ncid, flag=flag, varname='fert_counter', xtype=ncd_double, & dim1name='pft', & long_name='', units='', & @@ -1313,42 +1311,42 @@ subroutine Restart (this, bounds, ncid, flag ) interpinic_flag='interp', readvar=readvar, data=this%fert_patch) end if - if (crop_prog) then + if (use_crop) then call restartvar(ncid=ncid, flag=flag, varname='grainn_xfer_to_grainn', xtype=ncd_double, & dim1name='pft', & long_name='grain N growth from storage', units='gN/m2/s', & interpinic_flag='interp', readvar=readvar, data=this%grainn_xfer_to_grainn_patch) end if - if (crop_prog) then + if (use_crop) then call restartvar(ncid=ncid, flag=flag, varname='livestemn_to_litter', xtype=ncd_double, & dim1name='pft', & long_name='livestem N to litter', units='gN/m2/s', & interpinic_flag='interp', readvar=readvar, data=this%livestemn_to_litter_patch) end if - if (crop_prog) then + if (use_crop) then call restartvar(ncid=ncid, flag=flag, varname='grainn_to_food', xtype=ncd_double, & dim1name='pft', & long_name='grain N to food', units='gN/m2/s', & interpinic_flag='interp', readvar=readvar, data=this%grainn_to_food_patch) end if - if (crop_prog) then + if (use_crop) then call restartvar(ncid=ncid, flag=flag, varname='npool_to_grainn', xtype=ncd_double, & dim1name='pft', & long_name='allocation to grain N', units='gN/m2/s', & interpinic_flag='interp', readvar=readvar, data=this%npool_to_grainn_patch) end if - if (crop_prog) then + if (use_crop) then call restartvar(ncid=ncid, flag=flag, varname='npool_to_grainn_storage', xtype=ncd_double, & dim1name='pft', & long_name='allocation to grain N storage', units='gN/m2/s', & interpinic_flag='interp', readvar=readvar, data=this%npool_to_grainn_storage_patch) end if - if (crop_prog) then + if (use_crop) then call restartvar(ncid=ncid, flag=flag, varname='grainn_storage_to_xfer', xtype=ncd_double, & dim1name='pft', & long_name='grain N shift storage to transfer', units='gN/m2/s', & @@ -1622,7 +1620,7 @@ subroutine SetValues ( this, & this%grainn_to_cropprodn_patch(i) = value_patch end do - if ( crop_prog )then + if ( use_crop )then do fi = 1,num_patch i = filter_patch(fi) this%livestemn_to_litter_patch(i) = value_patch diff --git a/components/clm/src/biogeochem/CNVegNitrogenStateType.F90 b/components/clm/src/biogeochem/CNVegNitrogenStateType.F90 index 0b4d5ad984..7ef7e39b0a 100644 --- a/components/clm/src/biogeochem/CNVegNitrogenStateType.F90 +++ b/components/clm/src/biogeochem/CNVegNitrogenStateType.F90 @@ -6,11 +6,12 @@ module CNVegNitrogenStateType use shr_infnan_mod , only : isnan => shr_infnan_isnan, nan => shr_infnan_nan, assignment(=) use shr_log_mod , only : errMsg => shr_log_errMsg use clm_varpar , only : ndecomp_cascade_transitions, ndecomp_pools, nlevcan - use clm_varpar , only : nlevdecomp_full, nlevdecomp, crop_prog + use clm_varpar , only : nlevdecomp_full, nlevdecomp use clm_varcon , only : spval, ispval, dzsoi_decomp, zisoi use landunit_varcon , only : istcrop, istsoil use clm_varctl , only : use_nitrif_denitrif, use_vertsoilc, use_century_decomp use clm_varctl , only : iulog, override_bgc_restart_mismatch_dump + use clm_varctl , only : use_crop use CNSharedParamsMod , only : use_fun use decompMod , only : bounds_type use pftconMod , only : npcropmin, noveg, pftcon @@ -186,7 +187,7 @@ subroutine InitHistory(this, bounds) ! patch state variables !------------------------------- - if (crop_prog) then + if (use_crop) then this%grainn_patch(begp:endp) = spval call hist_addfld1d (fname='GRAINN', units='gN/m^2', & avgflag='A', long_name='grain N', & @@ -434,7 +435,7 @@ subroutine InitCold(this, bounds, & this%leafn_storage_xfer_acc_patch(p) = 0._r8 this%storage_ndemand_patch(p) = 0._r8 - if ( crop_prog )then + if ( use_crop )then this%grainn_patch(p) = 0._r8 this%grainn_storage_patch(p) = 0._r8 this%grainn_xfer_patch(p) = 0._r8 @@ -640,7 +641,7 @@ subroutine Restart ( this, bounds, ncid, flag ) dim1name='pft', long_name='', units='', & interpinic_flag='interp', readvar=readvar, data=this%ntrunc_patch) - if (crop_prog) then + if (use_crop) then call restartvar(ncid=ncid, flag=flag, varname='grainn', xtype=ncd_double, & dim1name='pft', long_name='grain N', units='gN/m2', & interpinic_flag='interp', readvar=readvar, data=this%grainn_patch) @@ -760,7 +761,7 @@ subroutine SetValues ( this, & this%totn_patch(i) = value_patch end do - if ( crop_prog )then + if ( use_crop )then do fi = 1,num_patch i = filter_patch(fi) this%grainn_patch(i) = value_patch @@ -858,7 +859,7 @@ subroutine Summary_nitrogenstate(this, bounds, num_soilc, filter_soilc, num_soil this%npool_patch(p) + & this%retransn_patch(p) - if ( crop_prog .and. patch%itype(p) >= npcropmin )then + if ( use_crop .and. patch%itype(p) >= npcropmin )then this%dispvegn_patch(p) = & this%dispvegn_patch(p) + & this%grainn_patch(p) diff --git a/components/clm/src/biogeochem/CNVegStateType.F90 b/components/clm/src/biogeochem/CNVegStateType.F90 index 77fa5601e9..fb1bbdfba1 100644 --- a/components/clm/src/biogeochem/CNVegStateType.F90 +++ b/components/clm/src/biogeochem/CNVegStateType.F90 @@ -6,8 +6,8 @@ module CNVegStateType use decompMod , only : bounds_type use abortutils , only : endrun use spmdMod , only : masterproc - use clm_varpar , only : nlevsno, nlevgrnd, nlevlak, nlevsoi, crop_prog - use clm_varctl , only : use_cn, iulog, fsurdat + use clm_varpar , only : nlevsno, nlevgrnd, nlevlak, nlevsoi + use clm_varctl , only : use_cn, iulog, fsurdat, use_crop use clm_varcon , only : spval, ispval, grlnd use landunit_varcon, only : istsoil, istcrop use LandunitType , only : lun @@ -247,7 +247,7 @@ subroutine InitHistory(this, bounds) begp = bounds%begp; endp= bounds%endp begc = bounds%begc; endc= bounds%endc - if ( crop_prog) then + if ( use_crop) then this%gddmaturity_patch(begp:endp) = spval call hist_addfld1d (fname='GDDHARV', units='ddays', & avgflag='A', long_name='Growing degree days (gdd) needed to harvest', & @@ -795,7 +795,7 @@ subroutine Restart(this, bounds, ncid, flag) long_name='', units='', & interpinic_flag='interp', readvar=readvar, data=this%annavg_t2m_col) - if (crop_prog) then + if (use_crop) then call restartvar(ncid=ncid, flag=flag, varname='htmx', xtype=ncd_double, & dim1name='pft', long_name='max height attained by a crop during year', units='m', & diff --git a/components/clm/src/biogeochem/CropType.F90 b/components/clm/src/biogeochem/CropType.F90 index 7f91180424..faf8f151e7 100644 --- a/components/clm/src/biogeochem/CropType.F90 +++ b/components/clm/src/biogeochem/CropType.F90 @@ -16,8 +16,7 @@ module CropType use abortutils , only : endrun use decompMod , only : bounds_type use clm_varcon , only : spval - use clm_varpar , only : crop_prog - use clm_varctl , only : iulog + use clm_varctl , only : iulog, use_crop ! ! !PUBLIC TYPES: implicit none @@ -77,7 +76,7 @@ subroutine Init(this, bounds) call this%InitAllocate(bounds) - if (crop_prog) then + if (use_crop) then call this%InitHistory(bounds) end if @@ -155,7 +154,7 @@ subroutine InitAccBuffer (this, bounds) ! To accumulate a field, it must first be defined in subroutine [initAccVars] ! and then accumulated by calls to [updateAccVars]. ! - ! Should only be called if crop_prog is true + ! Should only be called if use_crop is true ! ! !USES use accumulMod , only : init_accum_field @@ -249,7 +248,7 @@ subroutine Restart(this, bounds, ncid, flag) character(len=*), parameter :: subname = 'Restart' !----------------------------------------------------------------------- - if (crop_prog) then + if (use_crop) then allocate(temp1d(bounds%begp:bounds%endp)) if (flag == 'write') then do p= bounds%begp,bounds%endp @@ -324,7 +323,7 @@ subroutine CropUpdateAccVars(this, bounds, t_ref2m_patch, t_soisno_col) ! ! !DESCRIPTION: ! Update accumulated variables. Should be called every time step. - ! Should only be called if crop_prog is true. + ! Should only be called if use_crop is true. ! ! !USES: use accumulMod , only : update_accum_field, extract_accum_field, accumResetVal @@ -438,7 +437,7 @@ subroutine CropRestIncYear (this) !----------------------------------------------------------------------- ! Update restyear only when running with prognostic crop - if ( crop_prog )then + if ( use_crop )then ! Update restyear when it's the start of a new year - but don't do that at the ! very start of the run diff --git a/components/clm/src/biogeophys/EnergyFluxType.F90 b/components/clm/src/biogeophys/EnergyFluxType.F90 index f76356ffa6..3a72b466c1 100644 --- a/components/clm/src/biogeophys/EnergyFluxType.F90 +++ b/components/clm/src/biogeophys/EnergyFluxType.F90 @@ -148,7 +148,7 @@ subroutine InitAllocate(this, bounds) ! ! !USES: use shr_infnan_mod , only : nan => shr_infnan_nan, assignment(=) - use clm_varpar , only : nlevsno, nlevgrnd, nlevlak, crop_prog + use clm_varpar , only : nlevsno, nlevgrnd, nlevlak implicit none ! ! !ARGUMENTS: @@ -252,7 +252,7 @@ subroutine InitHistory(this, bounds, is_simple_buildtemp) ! ! !USES: use shr_infnan_mod , only : nan => shr_infnan_nan, assignment(=) - use clm_varpar , only : nlevsno, nlevgrnd, crop_prog + use clm_varpar , only : nlevsno, nlevgrnd use clm_varctl , only : use_cn use histFileMod , only : hist_addfld1d, hist_addfld2d, no_snow_normal use ncdio_pio , only : ncd_inqvdlen diff --git a/components/clm/src/biogeophys/TemperatureType.F90 b/components/clm/src/biogeophys/TemperatureType.F90 index 21f2209e42..259b4b8861 100644 --- a/components/clm/src/biogeophys/TemperatureType.F90 +++ b/components/clm/src/biogeophys/TemperatureType.F90 @@ -7,8 +7,8 @@ module TemperatureType use shr_log_mod , only : errMsg => shr_log_errMsg use decompMod , only : bounds_type use abortutils , only : endrun - use clm_varctl , only : use_cndv, iulog ,use_luna - use clm_varpar , only : nlevsno, nlevgrnd, nlevlak, nlevlak, nlevurb, crop_prog + use clm_varctl , only : use_ed, use_cndv, iulog, use_luna, use_crop + use clm_varpar , only : nlevsno, nlevgrnd, nlevlak, nlevlak, nlevurb use clm_varcon , only : spval, ispval use GridcellType , only : grc use LandunitType , only : lun @@ -394,7 +394,7 @@ subroutine InitHistory(this, bounds, is_simple_buildtemp, is_prog_buildtemp ) avgflag='A', long_name='soil temperature in top 10cm of soil', & ptr_col=this%t_soi10cm_col, set_urb=spval) - if (use_cndv .or. crop_prog) then + if (use_cndv .or. use_crop) then active = "active" else active = "inactive" @@ -404,14 +404,14 @@ subroutine InitHistory(this, bounds, is_simple_buildtemp, is_prog_buildtemp ) avgflag='A', long_name='10-day running mean of 2-m temperature', & ptr_patch=this%t_a10_patch, default=active) - if (use_cn .and. crop_prog )then + if (use_cn .and. use_crop )then this%t_a5min_patch(begp:endp) = spval call hist_addfld1d (fname='A5TMIN', units='K', & avgflag='A', long_name='5-day running mean of min 2-m temperature', & ptr_patch=this%t_a5min_patch, default='inactive') end if - if (use_cn .and. crop_prog )then + if (use_cn .and. use_crop )then this%t_a10min_patch(begp:endp) = spval call hist_addfld1d (fname='A10TMIN', units='K', & avgflag='A', long_name='10-day running mean of min 2-m temperature', & @@ -520,14 +520,14 @@ subroutine InitHistory(this, bounds, is_simple_buildtemp, is_prog_buildtemp ) avgflag='A', long_name='vegetation temperature (last 240hrs)', & ptr_patch=this%t_veg240_patch, default='inactive') - if (crop_prog) then + if (use_crop) then this%gdd0_patch(begp:endp) = spval call hist_addfld1d (fname='GDD0', units='ddays', & avgflag='A', long_name='Growing degree days base 0C from planting', & ptr_patch=this%gdd0_patch, default='inactive') end if - if (crop_prog) then + if (use_crop) then this%gdd8_patch(begp:endp) = spval call hist_addfld1d (fname='GDD8', units='ddays', & avgflag='A', long_name='Growing degree days base 8C from planting', & @@ -932,7 +932,7 @@ subroutine Restart(this, bounds, ncid, flag, is_simple_buildtemp, is_prog_buildt long_name='urban canopy air temperature', units='K', & interpinic_flag='interp', readvar=readvar, data=this%taf_lun) - if (crop_prog) then + if (use_crop) then call restartvar(ncid=ncid, flag=flag, varname='gdd1020', xtype=ncd_double, & dim1name='pft', long_name='20 year average of growing degree-days base 10C from planting', units='ddays', & interpinic_flag='interp', readvar=readvar, data=this%gdd1020_patch) @@ -1096,7 +1096,7 @@ subroutine InitAccBuffer (this, bounds) desc='10-day running mean of 2-m temperature', accum_type='runmean', accum_period=-10, & subgrid_type='pft', numlev=1,init_value=SHR_CONST_TKFRZ+20._r8) - if ( crop_prog )then + if ( use_crop )then call init_accum_field (name='TDM10', units='K', & desc='10-day running mean of min 2-m temperature', accum_type='runmean', accum_period=-10, & subgrid_type='pft', numlev=1, init_value=SHR_CONST_TKFRZ) @@ -1106,7 +1106,19 @@ subroutine InitAccBuffer (this, bounds) subgrid_type='pft', numlev=1, init_value=SHR_CONST_TKFRZ) end if +<<<<<<< HEAD if ( crop_prog )then +======= + 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 ( use_crop )then +>>>>>>> 17ae361c ! All GDD summations are relative to the planting date (Kucharik & Brye 2003) call init_accum_field (name='GDD0', units='K', & @@ -1181,7 +1193,7 @@ subroutine InitAccVars(this, bounds) call extract_accum_field ('T10', rbufslp, nstep) this%t_a10_patch(begp:endp) = rbufslp(begp:endp) - if (crop_prog) then + if (use_crop) then call extract_accum_field ('TDM10', rbufslp, nstep) this%t_a10min_patch(begp:endp)= rbufslp(begp:endp) @@ -1210,7 +1222,16 @@ subroutine InitAccVars(this, bounds) this%t_ref2m_min_inst_u_patch(begp:endp) = spval end if +<<<<<<< HEAD if ( crop_prog ) then +======= + if ( use_ed ) then + call extract_accum_field ('ED_GDD0', rbufslp, nstep) + this%gdd0_patch(begp:endp) = rbufslp(begp:endp) + end if + + if ( use_crop ) then +>>>>>>> 17ae361c call extract_accum_field ('GDD0', rbufslp, nstep) this%gdd0_patch(begp:endp) = rbufslp(begp:endp) @@ -1362,7 +1383,7 @@ subroutine UpdateAccVars (this, bounds) call update_accum_field ('T10', this%t_ref2m_patch, nstep) call extract_accum_field ('T10', this%t_a10_patch, nstep) - if ( crop_prog )then + if ( use_crop )then ! Accumulate and extract TDM10 do p = begp,endp diff --git a/components/clm/src/biogeophys/WaterStateType.F90 b/components/clm/src/biogeophys/WaterStateType.F90 index 3a17980a30..7db3db4bdd 100644 --- a/components/clm/src/biogeophys/WaterStateType.F90 +++ b/components/clm/src/biogeophys/WaterStateType.F90 @@ -242,7 +242,7 @@ subroutine InitHistory(this, bounds) use shr_infnan_mod , only : nan => shr_infnan_nan, assignment(=) use clm_varctl , only : create_glacier_mec_landunit, use_cn, use_lch4 use clm_varctl , only : hist_wrtch4diag - use clm_varpar , only : nlevsno, crop_prog + use clm_varpar , only : nlevsno use histFileMod , only : hist_addfld1d, hist_addfld2d, no_snow_normal, no_snow_zero ! ! !ARGUMENTS: diff --git a/components/clm/src/dyn_subgrid/dynSubgridControlMod.F90 b/components/clm/src/dyn_subgrid/dynSubgridControlMod.F90 index 1e1d3245ff..6d85f5a7b0 100644 --- a/components/clm/src/dyn_subgrid/dynSubgridControlMod.F90 +++ b/components/clm/src/dyn_subgrid/dynSubgridControlMod.F90 @@ -154,7 +154,7 @@ subroutine check_namelist_consistency ! Check consistency of namelist settingsn ! ! !USES: - use clm_varctl , only : iulog, use_cndv, use_ed, use_crop, use_cn + use clm_varctl , only : iulog, use_cndv, use_ed, use_cn, use_crop ! ! !ARGUMENTS: ! diff --git a/components/clm/src/init_interp/initInterpMindist.F90 b/components/clm/src/init_interp/initInterpMindist.F90 index d594dd0ec8..13aea29942 100644 --- a/components/clm/src/init_interp/initInterpMindist.F90 +++ b/components/clm/src/init_interp/initInterpMindist.F90 @@ -51,6 +51,7 @@ module initInterpMindist ! Private methods + private :: do_fill_missing_with_natveg private :: is_sametype private :: is_baresoil @@ -107,6 +108,10 @@ subroutine set_mindist(begi, endi, bego, endo, activei, activeo, subgridi, subgr ! If false: if an output type cannot be found in the input, code aborts ! If true: if an output type cannot be found in the input, fill with closest natural ! veg column (using bare soil for patch-level variables) + ! + ! NOTE: always treated as true for natural veg and crop landunits/columns/patches in + ! the output - e.g., if we can't find the right column type to fill crop, we always + ! use the closest natural veg column, regardless of the value of this flag. logical , intent(in) :: fill_missing_with_natveg integer , intent(out) :: mindist_index(bego:endo) @@ -171,8 +176,11 @@ subroutine set_mindist(begi, endi, bego, endo, activei, activeo, subgridi, subgr end if end do - ! If output type is not contained in input dataset, then use closest bare soil - if ( fill_missing_with_natveg .and. distmin == spval) then + ! If output type is not contained in input dataset, then use closest bare soil, + ! if this point is one for which we fill missing with natveg. + if ( distmin == spval .and. & + do_fill_missing_with_natveg( & + fill_missing_with_natveg, no, subgrido, subgrid_special_indices)) then do ni = begi, endi if (activei(ni)) then if ( is_baresoil(ni, subgridi, subgrid_special_indices)) then @@ -201,9 +209,6 @@ subroutine set_mindist(begi, endi, bego, endo, activei, activeo, subgridi, subgr write(iulog,*) 'with the closest natural veg column in the input' write(iulog,*) '(using bare soil for patch-level variables).' write(iulog,*) 'So, you should consider whether that is what you want.' - write(iulog,*) ' ' - write(iulog,*) 'If you are interpolating a non-crop case to a crop case,' - write(iulog,*) 'then this IS what you should do.' call endrun(msg=errMsg(__FILE__, __LINE__)) end if @@ -215,6 +220,48 @@ subroutine set_mindist(begi, endi, bego, endo, activei, activeo, subgridi, subgr end subroutine set_mindist + !----------------------------------------------------------------------- + function do_fill_missing_with_natveg(fill_missing_with_natveg, & + no, subgrido, subgrid_special_indices) + ! + ! !DESCRIPTION: + ! Returns true if the given output point, if missing, should be filled with the + ! closest natural veg point. + ! + ! !ARGUMENTS: + logical :: do_fill_missing_with_natveg ! function result + + ! whether we should fill ALL missing points with natveg + logical, intent(in) :: fill_missing_with_natveg + + integer , intent(in) :: no + type(subgrid_type), intent(in) :: subgrido + type(subgrid_special_indices_type), intent(in) :: subgrid_special_indices + ! + ! !LOCAL VARIABLES: + + character(len=*), parameter :: subname = 'do_fill_missing_with_natveg' + !----------------------------------------------------------------------- + + if (subgrido%name == 'gridcell') then + ! It makes no sense to try to fill missing with natveg for gridcell-level values + do_fill_missing_with_natveg = .false. + else if (fill_missing_with_natveg) then + ! User has asked for all missing points to be filled with natveg + do_fill_missing_with_natveg = .true. + else if (subgrid_special_indices%is_vegetated_landunit(subgrido%ltype(no))) then + ! Even if user hasn't asked for it, we fill missing vegetated points (natural veg + ! and crop) with the closest natveg point. This is mainly to support the common + ! use case of interpolating non-crop to crop, but also supports adding a new PFT + ! type. + do_fill_missing_with_natveg = .true. + else + do_fill_missing_with_natveg = .false. + end if + + end function do_fill_missing_with_natveg + + !======================================================================= logical function is_sametype (ni, no, subgridi, subgrido, subgrid_special_indices) diff --git a/components/clm/src/init_interp/test/initInterpMindist_test/test_init_interp_mindist.pf b/components/clm/src/init_interp/test/initInterpMindist_test/test_init_interp_mindist.pf index d0c5c1154f..4b5df8872f 100644 --- a/components/clm/src/init_interp/test/initInterpMindist_test/test_init_interp_mindist.pf +++ b/components/clm/src/init_interp/test/initInterpMindist_test/test_init_interp_mindist.pf @@ -397,8 +397,7 @@ contains @Test subroutine noncrop_to_crop_specific_crop_from_natveg(this) ! For interpolation from a non-crop case to a crop case, ensure that crop columns - ! take their info from the natural veg column in the input. This requires - ! fill_missing_with_natveg = .true. + ! take their info from the natural veg column in the input. class(TestInitInterpMindist), intent(inout) :: this type(subgrid_type) :: subgridi, subgrido integer :: my_ctype @@ -431,14 +430,68 @@ contains lat = [(my_lat, i=1,3)], & lon = [(my_lon, i=1,3)]) + ! For most landunits, we would need to set fill_missing_with_natveg to accomplish + ! this. However, it should be done for a crop output point even with + ! fill_missing_with_natveg .false. call wrap_set_mindist(subgridi, subgrido, mindist_index, & - fill_missing_with_natveg = .true.) + fill_missing_with_natveg = .false.) @assertEqual(2, mindist_index(1)) end associate end subroutine noncrop_to_crop_specific_crop_from_natveg + @Test + subroutine newveg_uses_baresoil(this) + ! If there's a new vegetation (patch) type, this should take inputs from the closest + ! bare soil point. + ! + ! In terms of code coverage, this is largely redundant with + ! noncrop_to_crop_specific_crop_from_natveg. But I'm keeping it for now since it + ! tests a different use case. + class(TestInitInterpMindist), intent(inout) :: this + type(subgrid_type) :: subgridi, subgrido + integer, parameter :: my_ptype = 5 + real(r8), parameter :: my_lat = 31._r8 + real(r8), parameter :: my_lon = 41._r8 + integer :: i + integer :: mindist_index(1) + + associate( & + ipft_bare => subgrid_special_indices%ipft_not_vegetated, & + icol_natveg => subgrid_special_indices%icol_vegetated_or_bare_soil, & + ilun_natveg => subgrid_special_indices%ilun_vegetated_or_bare_soil & + ) + + subgrido = create_subgrid_info( & + npts = 1, & + name = 'pft', & + ptype = [my_ptype], & + ctype = [icol_natveg], & + ltype = [ilun_natveg], & + lat = [my_lat], & + lon = [my_lon]) + + subgridi = create_subgrid_info( & + npts = 3, & + name = 'pft', & + ptype = [ipft_bare + 1, ipft_bare, ipft_bare + 2], & + ctype = [(icol_natveg, i=1,3)], & + ltype = [(ilun_natveg, i=1,3)], & + lat = [(my_lat, i=1,3)], & + lon = [(my_lon, i=1,3)]) + + ! For most landunits, we would need to set fill_missing_with_natveg to accomplish + ! this. However, it should be done for a natural veg output point even with + ! fill_missing_with_natveg .false. + call wrap_set_mindist(subgridi, subgrido, mindist_index, & + fill_missing_with_natveg = .false.) + + @assertEqual(2, mindist_index(1)) + + end associate + end subroutine newveg_uses_baresoil + @Test subroutine baresoil_ignores_special_landunits(this) ! This test ensures that, when finding a match for a bare soil patch, we ignore diff --git a/components/clm/src/main/clm_driver.F90 b/components/clm/src/main/clm_driver.F90 index 92f3c3071e..41f23c4868 100644 --- a/components/clm/src/main/clm_driver.F90 +++ b/components/clm/src/main/clm_driver.F90 @@ -11,9 +11,10 @@ module clm_driver use shr_kind_mod , only : r8 => shr_kind_r8 use clm_varctl , only : wrtdia, iulog, create_glacier_mec_landunit, use_ed use clm_varctl , only : use_cn, use_lch4, use_voc, use_noio, use_c13, use_c14 + use clm_varctl , only : use_crop use clm_time_manager , only : get_nstep, is_beg_curr_day use clm_time_manager , only : get_prev_date - use clm_varpar , only : nlevsno, nlevgrnd, crop_prog + use clm_varpar , only : nlevsno, nlevgrnd use spmdMod , only : masterproc, mpicom use decompMod , only : get_proc_clumps, get_clump_bounds, get_proc_bounds, bounds_type use filterMod , only : filter, filter_inactive_and_active @@ -937,7 +938,7 @@ subroutine clm_drv(doalb, nextsw_cday, declinp1, declin, rstwr, nlend, rdate) t_a10_patch=temperature_inst%t_a10_patch, & t_ref2m_patch=temperature_inst%t_ref2m_patch) - if (crop_prog) then + if (use_crop) then call crop_inst%CropUpdateAccVars(bounds_proc, & temperature_inst%t_ref2m_patch, temperature_inst%t_soisno_col) end if diff --git a/components/clm/src/main/clm_initializeMod.F90 b/components/clm/src/main/clm_initializeMod.F90 index 8186ef702e..169b3d8cc9 100644 --- a/components/clm/src/main/clm_initializeMod.F90 +++ b/components/clm/src/main/clm_initializeMod.F90 @@ -256,10 +256,11 @@ subroutine initialize2( ) use shr_scam_mod , only : shr_scam_getCloseLatLon use seq_drydep_mod , only : n_drydep, drydep_method, DD_XLND use accumulMod , only : print_accum_fields - use clm_varpar , only : nlevsno, crop_prog + use clm_varpar , only : nlevsno use clm_varcon , only : spval use clm_varctl , only : finidat, finidat_interp_source, finidat_interp_dest, fsurdat use clm_varctl , only : use_century_decomp, single_column, scmlat, scmlon, use_cn, use_ed + use clm_varctl , only : use_crop use clm_varorb , only : eccen, mvelpp, lambm0, obliqr use clm_time_manager , only : get_step_size, get_curr_calday use clm_time_manager , only : get_curr_date, get_nstep, advance_timestep @@ -584,7 +585,7 @@ subroutine initialize2( ) call bgc_vegetation_inst%initAccVars(bounds_proc) - if (crop_prog) then + if (use_crop) then call crop_inst%initAccVars(bounds_proc) end if diff --git a/components/clm/src/main/clm_instMod.F90 b/components/clm/src/main/clm_instMod.F90 index a6710e80bb..32df96eccb 100644 --- a/components/clm/src/main/clm_instMod.F90 +++ b/components/clm/src/main/clm_instMod.F90 @@ -7,9 +7,9 @@ module clm_instMod ! !USES: use shr_kind_mod , only : r8 => shr_kind_r8 use decompMod , only : bounds_type - use clm_varpar , only : crop_prog, ndecomp_pools, nlevdecomp_full + use clm_varpar , only : ndecomp_pools, nlevdecomp_full use clm_varctl , only : use_cn, use_c13, use_c14, use_lch4, use_cndv, use_ed, use_voc - use clm_varctl , only : use_century_decomp + use clm_varctl , only : use_century_decomp, use_crop use clm_varcon , only : h2osno_max, bdsno, c13ratio, c14ratio use landunit_varcon , only : istice, istice_mec, istsoil use perf_mod , only : t_startf, t_stopf @@ -166,7 +166,7 @@ end subroutine clm_instReadNML subroutine clm_instInit(bounds) ! ! !USES: - use clm_varpar , only : nlevsno, numpft, crop_prog + use clm_varpar , only : nlevsno, numpft use controlMod , only : nlfilename, fsurdat use domainMod , only : ldomain use SoilBiogeochemDecompCascadeBGCMod , only : init_decompcascade_bgc @@ -416,7 +416,7 @@ subroutine clm_instInit(bounds) call bgc_vegetation_inst%InitAccBuffer(bounds) - if (crop_prog) then + if (use_crop) then call crop_inst%InitAccBuffer(bounds) end if diff --git a/components/clm/src/main/clm_varctl.F90 b/components/clm/src/main/clm_varctl.F90 index dd6634bf86..849273751b 100644 --- a/components/clm/src/main/clm_varctl.F90 +++ b/components/clm/src/main/clm_varctl.F90 @@ -113,19 +113,21 @@ module clm_varctl character(len=fname_len), public :: finidat_interp_dest = 'finidat_interp_dest.nc' !---------------------------------------------------------- - ! Irrigate logic + ! Crop & Irrigation logic !---------------------------------------------------------- - ! do not irrigate by default - logical, public :: irrigate = .false. - - !---------------------------------------------------------- - ! Landunit logic - !---------------------------------------------------------- + ! If prognostic crops are turned on + logical, public :: use_crop = .false. ! true => separate crop landunit is not created by default logical, public :: create_crop_landunit = .false. + ! do not irrigate by default + logical, public :: irrigate = .false. + + ! true => limit irrigation when river storage + logical, public :: limit_irrigation = .false. + !---------------------------------------------------------- ! Other subgrid logic !---------------------------------------------------------- @@ -242,12 +244,6 @@ module clm_varctl logical, public :: use_dynroot = .false. ! true => use dynamic root module - !---------------------------------------------------------- - ! lake evaporation / irrigation limitation switch - !---------------------------------------------------------- - - logical, public :: limit_irrigation = .false. ! true => limit irrigation when river storage - !---------------------------------------------------------- ! glacier_mec control variables: default values (may be overwritten by namelist) ! NOTE: glc_smb must have the same values for CLM and GLC @@ -320,7 +316,6 @@ module clm_varctl logical, public :: use_century_decomp = .false. logical, public :: use_cn = .false. logical, public :: use_cndv = .false. - logical, public :: use_crop = .false. logical, public :: use_grainproduct = .false. logical, public :: use_fertilizer = .false. logical, public :: use_ozone = .false. diff --git a/components/clm/src/main/clm_varpar.F90 b/components/clm/src/main/clm_varpar.F90 index 6cbe03d64b..863c515f4b 100644 --- a/components/clm/src/main/clm_varpar.F90 +++ b/components/clm/src/main/clm_varpar.F90 @@ -7,9 +7,9 @@ module clm_varpar ! !USES: use shr_kind_mod , only: r8 => shr_kind_r8 use spmdMod , only: masterproc - use clm_varctl , only: use_extralakelayers, use_vertsoilc, use_crop + use clm_varctl , only: use_extralakelayers, use_vertsoilc use clm_varctl , only: use_century_decomp, use_c13, use_c14 - use clm_varctl , only: iulog, create_crop_landunit, irrigate + use clm_varctl , only: iulog, use_crop, create_crop_landunit, irrigate use clm_varctl , only: use_vichydro, soil_layerstruct ! ! !PUBLIC TYPES: @@ -51,7 +51,6 @@ module clm_varpar integer :: numpft = mxpft ! actual # of pfts (without bare) integer :: numcft = 64 ! actual # of crops (includes unused CFTs that are merged into other CFTs) - logical :: crop_prog = .true. ! If prognostic crops is turned on integer :: maxpatch_urb= 5 ! max number of urban patches (columns) in urban landunit integer :: maxpatch_pft ! max number of plant functional types in naturally vegetated landunit (namelist setting) @@ -110,11 +109,9 @@ subroutine clm_varpar_init() if (use_crop) then numpft = mxpft ! actual # of patches (without bare) numcft = 64 ! actual # of crops - crop_prog = .true. ! If prognostic crops is turned on else numpft = numveg ! actual # of patches (without bare) numcft = 2 ! actual # of crops - crop_prog = .false. ! If prognostic crops is turned on end if ! For arrays containing all Patches (natural veg & crop), determine lower and upper bounds diff --git a/components/clm/src/main/histFileMod.F90 b/components/clm/src/main/histFileMod.F90 index cbfc4ed6a4..202244a1f4 100644 --- a/components/clm/src/main/histFileMod.F90 +++ b/components/clm/src/main/histFileMod.F90 @@ -4629,7 +4629,7 @@ subroutine hist_addfld_decomp (fname, type2d, units, avgflag, long_name, ptr_col ! ! !USES: - use clm_varpar , only : nlevdecomp_full, crop_prog + use clm_varpar , only : nlevdecomp_full use clm_varctl , only : iulog use abortutils , only : endrun use shr_log_mod , only : errMsg => shr_log_errMsg diff --git a/components/clm/src/main/initGridCellsMod.F90 b/components/clm/src/main/initGridCellsMod.F90 index c670451530..8c7e58a0a6 100644 --- a/components/clm/src/main/initGridCellsMod.F90 +++ b/components/clm/src/main/initGridCellsMod.F90 @@ -449,13 +449,14 @@ subroutine set_landunit_crop_noncompete (ltype, gi, li, ci, pi) ! ! Note about the ltype input argument: This provides the value for this landunit index ! (i.e., the crop landunit index). This may differ from the landunit's 'itype' value, - ! since itype is istsoil if we are running with create_crop_landunit but crop_prog = false. + ! since itype is istsoil if we are running with create_crop_landunit but use_crop = false. ! ! !USES use clm_instur , only : wt_lunit, wt_cft use landunit_varcon , only : istcrop, istsoil use subgridMod , only : subgrid_get_info_crop, crop_patch_exists - use clm_varpar , only : maxpatch_pft, crop_prog, cft_lb, cft_ub + use clm_varpar , only : maxpatch_pft, cft_lb, cft_ub + use clm_varctl , only : use_crop ! ! !ARGUMENTS: integer , intent(in) :: ltype ! landunit type @@ -483,7 +484,7 @@ subroutine set_landunit_crop_noncompete (ltype, gi, li, ci, pi) ! Note that we cannot simply use the 'ltype' argument to set itype here, ! because ltype will always indicate istcrop - if ( crop_prog )then + if ( use_crop )then my_ltype = istcrop else my_ltype = istsoil diff --git a/components/clm/src/main/pftconMod.F90 b/components/clm/src/main/pftconMod.F90 index 93147ded57..19b8d52528 100644 --- a/components/clm/src/main/pftconMod.F90 +++ b/components/clm/src/main/pftconMod.F90 @@ -9,7 +9,7 @@ module pftconMod use shr_kind_mod, only : r8 => shr_kind_r8 use abortutils , only : endrun use clm_varpar , only : mxpft, numrad, ivis, inir, cft_lb, cft_ub - use clm_varctl , only : iulog, use_cndv, use_vertsoilc + use clm_varctl , only : iulog, use_cndv, use_vertsoilc, use_crop ! ! !PUBLIC TYPES: implicit none @@ -440,7 +440,7 @@ subroutine InitRead(this) use fileutils , only : getfil use ncdio_pio , only : ncd_io, ncd_pio_closefile, ncd_pio_openfile, file_desc_t use ncdio_pio , only : ncd_inqdid, ncd_inqdlen - use clm_varctl , only : paramfile, use_ed, use_flexibleCN, use_crop, use_dynroot + use clm_varctl , only : paramfile, use_ed, use_flexibleCN, use_dynroot use spmdMod , only : masterproc use EDPftvarcon , only : EDpftconrd ! diff --git a/components/clm/src/main/restFileMod.F90 b/components/clm/src/main/restFileMod.F90 index cb8595bac5..b79bdd19f6 100644 --- a/components/clm/src/main/restFileMod.F90 +++ b/components/clm/src/main/restFileMod.F90 @@ -50,7 +50,6 @@ module restFileMod private :: restFile_enddef private :: restFile_check_consistency ! Perform consistency checks on the restart file private :: restFile_read_consistency_nl ! Read namelist associated with consistency checks - private :: restFile_check_fsurdat ! Check consistency of fsurdat on the restart file private :: restFile_check_year ! Check consistency of year on the restart file ! ! !PRIVATE TYPES: None @@ -728,7 +727,6 @@ subroutine restFile_check_consistency(bounds, ncid) type(file_desc_t), intent(inout) :: ncid ! netcdf id ! ! !LOCAL VARIABLES: - logical :: check_finidat_fsurdat_consistency ! whether to check consistency between fsurdat on finidat file and current fsurdat logical :: check_finidat_year_consistency ! whether to check consistency between year on finidat file and current year logical :: check_finidat_pct_consistency ! whether to check consistency between pct_pft on finidat file and surface dataset @@ -736,14 +734,9 @@ subroutine restFile_check_consistency(bounds, ncid) !----------------------------------------------------------------------- call restFile_read_consistency_nl( & - check_finidat_fsurdat_consistency, & check_finidat_year_consistency, & check_finidat_pct_consistency) - if (check_finidat_fsurdat_consistency) then - call restFile_check_fsurdat(ncid) - end if - if (check_finidat_year_consistency) then call restFile_check_year(ncid) end if @@ -756,7 +749,6 @@ end subroutine restFile_check_consistency !----------------------------------------------------------------------- subroutine restFile_read_consistency_nl( & - check_finidat_fsurdat_consistency, & check_finidat_year_consistency, & check_finidat_pct_consistency) @@ -771,7 +763,6 @@ subroutine restFile_read_consistency_nl( & use shr_mpi_mod , only : shr_mpi_bcast ! ! !ARGUMENTS: - logical, intent(out) :: check_finidat_fsurdat_consistency logical, intent(out) :: check_finidat_year_consistency logical, intent(out) :: check_finidat_pct_consistency ! @@ -783,12 +774,10 @@ subroutine restFile_read_consistency_nl( & !----------------------------------------------------------------------- namelist /finidat_consistency_checks/ & - check_finidat_fsurdat_consistency, & check_finidat_year_consistency, & check_finidat_pct_consistency ! Set default namelist values - check_finidat_fsurdat_consistency = .true. check_finidat_year_consistency = .true. check_finidat_pct_consistency = .true. @@ -809,7 +798,6 @@ subroutine restFile_read_consistency_nl( & call relavu( nu_nml ) endif - call shr_mpi_bcast (check_finidat_fsurdat_consistency, mpicom) call shr_mpi_bcast (check_finidat_year_consistency, mpicom) call shr_mpi_bcast (check_finidat_pct_consistency, mpicom) @@ -822,64 +810,6 @@ subroutine restFile_read_consistency_nl( & end subroutine restFile_read_consistency_nl - !----------------------------------------------------------------------- - subroutine restFile_check_fsurdat(ncid) - ! - ! !DESCRIPTION: - ! Check consistency of the fsurdat value on the restart file and the current fsurdat - ! - ! !USES: - use fileutils , only : get_filename - use clm_varctl , only : fname_len, fsurdat - use dynSubgridControlMod , only : get_flanduse_timeseries - ! - ! !ARGUMENTS: - type(file_desc_t), intent(inout) :: ncid ! netcdf id - ! - ! !LOCAL VARIABLES: - character(len=fname_len) :: fsurdat_rest ! fsurdat from the restart file (includes full path) - character(len=fname_len) :: filename_cur ! current fsurdat file name - character(len=fname_len) :: filename_rest ! fsurdat file name from restart file (does NOT include full path) - - character(len=*), parameter :: subname = 'restFile_check_fsurdat' - !----------------------------------------------------------------------- - - ! Only do this check for a transient run. The problem with doing this check for a non- - ! transient run is the transition from transient to non-transient: It is legitimate to - ! run with an 1850 surface dataset and a pftdyn file, then use the restart file from - ! that run to start a present-day (non-transient) run, which would use a 2000 surface - ! dataset. - if (get_flanduse_timeseries() /= ' ') then - call ncd_getatt(ncid, NCD_GLOBAL, 'surface_dataset', fsurdat_rest) - - ! Compare file names, ignoring path - filename_cur = get_filename(fsurdat) - filename_rest = get_filename(fsurdat_rest) - - if (filename_rest /= filename_cur) then - if (masterproc) then - write(iulog,*) 'ERROR: Initial conditions file (finidat) was generated from a different surface dataset' - write(iulog,*) 'than the one being used for the current simulation (fsurdat).' - write(iulog,*) 'Current fsurdat: ', trim(filename_cur) - write(iulog,*) 'Surface dataset used to generate initial conditions file: ', trim(filename_rest) - write(iulog,*) - write(iulog,*) 'Possible solutions to this problem:' - write(iulog,*) '(1) Make sure you are using the correct surface dataset and initial conditions file' - write(iulog,*) '(2) If you generated the surface dataset and/or initial conditions file yourself,' - write(iulog,*) ' then you may need to manually change the surface_dataset global attribute on the' - write(iulog,*) ' initial conditions file (e.g., using ncatted)' - write(iulog,*) '(3) If you are confident that you are using the correct surface dataset and initial conditions file,' - write(iulog,*) ' yet are still experiencing this error, then you can bypass this check by setting:' - write(iulog,*) ' check_finidat_fsurdat_consistency = .false.' - write(iulog,*) ' in user_nl_clm' - write(iulog,*) ' ' - end if - call endrun(msg=errMsg(__FILE__, __LINE__)) - end if - end if - - end subroutine restFile_check_fsurdat - !----------------------------------------------------------------------- subroutine restFile_check_year(ncid) ! diff --git a/components/clm/src/main/surfrdMod.F90 b/components/clm/src/main/surfrdMod.F90 index 523b6b9438..27226ecc0c 100644 --- a/components/clm/src/main/surfrdMod.F90 +++ b/components/clm/src/main/surfrdMod.F90 @@ -13,7 +13,7 @@ module surfrdMod use landunit_varcon , only : numurbl use clm_varcon , only : grlnd use clm_varctl , only : iulog, scmlat, scmlon, single_column - use clm_varctl , only : create_glacier_mec_landunit, use_cndv + use clm_varctl , only : create_glacier_mec_landunit, use_cndv, use_crop use surfrdUtilsMod , only : check_sums_equal_1, collapse_crop_types use ncdio_pio , only : file_desc_t, var_desc_t, ncd_pio_openfile, ncd_pio_closefile use ncdio_pio , only : ncd_io, check_var, ncd_inqfdims, check_dim, ncd_inqdid @@ -605,7 +605,6 @@ subroutine surfrd_veg_all(begg, endg, ncid, ns) ! ! !USES: use clm_varpar , only : natpft_lb, natpft_ub, natpft_size, cft_size - use clm_varpar , only : crop_prog use clm_instur , only : wt_lunit, wt_nat_patch, wt_cft use landunit_varcon , only : istsoil, istcrop ! @@ -683,7 +682,7 @@ subroutine surfrd_veg_all(begg, endg, ncid, ns) end if - if (crop_prog) then + if (use_crop) then call collapse_crop_types(wt_cft(begg:endg, :), begg, endg, verbose=.true.) end if diff --git a/components/clm/src/soilbiogeochem/SoilBiogeochemCarbonStateType.F90 b/components/clm/src/soilbiogeochem/SoilBiogeochemCarbonStateType.F90 index 292f84dce9..0339c25269 100644 --- a/components/clm/src/soilbiogeochem/SoilBiogeochemCarbonStateType.F90 +++ b/components/clm/src/soilbiogeochem/SoilBiogeochemCarbonStateType.F90 @@ -5,7 +5,7 @@ module SoilBiogeochemCarbonStateType use shr_log_mod , only : errMsg => shr_log_errMsg use decompMod , only : bounds_type use clm_varpar , only : ndecomp_cascade_transitions, ndecomp_pools, nlevcan - use clm_varpar , only : nlevdecomp_full, crop_prog, nlevdecomp + use clm_varpar , only : nlevdecomp_full, nlevdecomp use clm_varcon , only : spval, ispval, dzsoi_decomp, zisoi, zsoi, c3_r2 use clm_varctl , only : iulog, use_vertsoilc, spinup_state use landunit_varcon , only : istcrop, istsoil diff --git a/components/clm/src/soilbiogeochem/SoilBiogeochemNStateUpdate1Mod.F90 b/components/clm/src/soilbiogeochem/SoilBiogeochemNStateUpdate1Mod.F90 index dbcf4b4bdf..5fde16787c 100644 --- a/components/clm/src/soilbiogeochem/SoilBiogeochemNStateUpdate1Mod.F90 +++ b/components/clm/src/soilbiogeochem/SoilBiogeochemNStateUpdate1Mod.F90 @@ -8,8 +8,8 @@ module SoilBiogeochemNStateUpdate1Mod use shr_kind_mod , only: r8 => shr_kind_r8 use clm_time_manager , only : get_step_size use clm_varpar , only : nlevdecomp, ndecomp_pools, ndecomp_cascade_transitions - use clm_varpar , only : crop_prog, i_met_lit, i_cel_lit, i_lig_lit, i_cwd - use clm_varctl , only : iulog, use_nitrif_denitrif + use clm_varpar , only : i_met_lit, i_cel_lit, i_lig_lit, i_cwd + use clm_varctl , only : iulog, use_nitrif_denitrif, use_crop use clm_varcon , only : nitrif_n2o_loss_frac, dzsoi_decomp use SoilBiogeochemStateType , only : soilbiogeochem_state_type use SoilBiogeochemNitrogenStateType , only : soilbiogeochem_nitrogenstate_type @@ -91,7 +91,7 @@ subroutine SoilBiogeochemNStateUpdate1(num_soilc, filter_soilc, & end do ! repeating N dep and fixation for crops - if ( crop_prog )then + if ( use_crop )then do j = 1, nlevdecomp ! column loop diff --git a/components/clm/src/soilbiogeochem/SoilBiogeochemNitrogenFluxType.F90 b/components/clm/src/soilbiogeochem/SoilBiogeochemNitrogenFluxType.F90 index f1fe0b92e0..3bae04a87e 100644 --- a/components/clm/src/soilbiogeochem/SoilBiogeochemNitrogenFluxType.F90 +++ b/components/clm/src/soilbiogeochem/SoilBiogeochemNitrogenFluxType.F90 @@ -4,10 +4,10 @@ module SoilBiogeochemNitrogenFluxType use shr_infnan_mod , only : nan => shr_infnan_nan, assignment(=) use shr_log_mod , only : errMsg => shr_log_errMsg use clm_varpar , only : ndecomp_cascade_transitions, ndecomp_pools - use clm_varpar , only : nlevdecomp_full, nlevdecomp, crop_prog + use clm_varpar , only : nlevdecomp_full, nlevdecomp use clm_varcon , only : spval, ispval, dzsoi_decomp use decompMod , only : bounds_type - use clm_varctl , only : use_nitrif_denitrif, use_vertsoilc + use clm_varctl , only : use_nitrif_denitrif, use_vertsoilc, use_crop use SoilBiogeochemDecompCascadeConType , only : decomp_cascade_con use abortutils , only : endrun use LandunitType , only : lun @@ -814,14 +814,14 @@ subroutine InitHistory(this, bounds) ptr_col=this%f_n2o_denit_col) end if - if (crop_prog) then + if (use_crop) then this%fert_to_sminn_col(begc:endc) = spval call hist_addfld1d (fname='FERT_TO_SMINN', units='gN/m^2/s', & avgflag='A', long_name='fertilizer to soil mineral N', & ptr_col=this%fert_to_sminn_col) end if - if (crop_prog) then + if (use_crop) then this%soyfixn_to_sminn_col(begc:endc) = spval call hist_addfld1d (fname='SOYFIXN_TO_SMINN', units='gN/m^2/s', & avgflag='A', long_name='Soybean fixation to soil mineral N', & @@ -837,7 +837,6 @@ subroutine InitCold(this, bounds) ! Initializes time varying variables used only in coupled carbon-nitrogen mode (CN): ! ! !USES: - use clm_varpar , only : crop_prog use landunit_varcon , only : istsoil, istcrop ! ! !ARGUMENTS: @@ -877,7 +876,6 @@ subroutine Restart (this, bounds, ncid, flag ) ! Read/write CN restart data for carbon state ! ! !USES: - use clm_varpar, only : crop_prog use restUtilMod use ncdio_pio ! diff --git a/components/clm/src/soilbiogeochem/SoilBiogeochemNitrogenStateType.F90 b/components/clm/src/soilbiogeochem/SoilBiogeochemNitrogenStateType.F90 index 9064267893..6452c00f75 100644 --- a/components/clm/src/soilbiogeochem/SoilBiogeochemNitrogenStateType.F90 +++ b/components/clm/src/soilbiogeochem/SoilBiogeochemNitrogenStateType.F90 @@ -9,7 +9,7 @@ module SoilBiogeochemNitrogenStateType use abortutils , only : endrun use spmdMod , only : masterproc use clm_varpar , only : ndecomp_cascade_transitions, ndecomp_pools, nlevcan - use clm_varpar , only : nlevdecomp_full, nlevdecomp, crop_prog + use clm_varpar , only : nlevdecomp_full, nlevdecomp use clm_varcon , only : spval, dzsoi_decomp, zisoi use clm_varctl , only : use_nitrif_denitrif, use_vertsoilc, use_century_decomp use clm_varctl , only : iulog, override_bgc_restart_mismatch_dump, spinup_state @@ -123,7 +123,7 @@ subroutine InitHistory(this, bounds) ! ! !USES: use clm_varpar , only : ndecomp_cascade_transitions, ndecomp_pools - use clm_varpar , only : nlevdecomp, nlevdecomp_full,crop_prog, nlevgrnd + use clm_varpar , only : nlevdecomp, nlevdecomp_full, nlevgrnd use histFileMod, only : hist_addfld1d, hist_addfld2d, hist_addfld_decomp use decompMod , only : bounds_type ! @@ -261,7 +261,6 @@ subroutine InitCold(this, bounds, & ! Initializes time varying variables used only in coupled carbon-nitrogen mode (CN): ! ! !USES: - use clm_varpar , only : crop_prog use decompMod , only : bounds_type ! ! !ARGUMENTS: diff --git a/components/clm/src/soilbiogeochem/SoilBiogeochemStateType.F90 b/components/clm/src/soilbiogeochem/SoilBiogeochemStateType.F90 index de0ecd1e88..684a064d59 100644 --- a/components/clm/src/soilbiogeochem/SoilBiogeochemStateType.F90 +++ b/components/clm/src/soilbiogeochem/SoilBiogeochemStateType.F90 @@ -6,11 +6,11 @@ module SoilBiogeochemStateType use decompMod , only : bounds_type use abortutils , only : endrun use spmdMod , only : masterproc - use clm_varpar , only : nlevsno, nlevgrnd, nlevlak, nlevsoifl, nlevsoi, crop_prog + use clm_varpar , only : nlevsno, nlevgrnd, nlevlak, nlevsoifl, nlevsoi use clm_varpar , only : ndecomp_cascade_transitions, nlevdecomp, nlevdecomp_full use clm_varcon , only : spval, ispval, c14ratio, grlnd use landunit_varcon, only : istsoil, istcrop - use clm_varpar , only : nlevsno, nlevgrnd, nlevlak, crop_prog + use clm_varpar , only : nlevsno, nlevgrnd, nlevlak use clm_varctl , only : use_vertsoilc, use_cn use clm_varctl , only : iulog use LandunitType , only : lun diff --git a/components/clm/src/unit_test_stubs/main/histFileMod_stub.F90 b/components/clm/src/unit_test_stubs/main/histFileMod_stub.F90 index 54ff7e7872..0b261dc55e 100644 --- a/components/clm/src/unit_test_stubs/main/histFileMod_stub.F90 +++ b/components/clm/src/unit_test_stubs/main/histFileMod_stub.F90 @@ -88,7 +88,7 @@ subroutine hist_addfld_decomp (fname, type2d, units, avgflag, long_name, ptr_col ! ! !USES: - use clm_varpar , only : nlevdecomp_full, crop_prog + use clm_varpar , only : nlevdecomp_full use clm_varctl , only : iulog use abortutils , only : endrun use shr_log_mod , only : errMsg => shr_log_errMsg diff --git a/components/clm/src_clm40/main/findHistFields.pl b/components/clm/src_clm40/main/findHistFields.pl index 90ff18ba4b..870bfef7ba 100755 --- a/components/clm/src_clm40/main/findHistFields.pl +++ b/components/clm/src_clm40/main/findHistFields.pl @@ -180,7 +180,7 @@ sub XML_Header { my $filename = shift; print STDERR " Write out header to history fields file to: $outfilename\n"; - my $svnurl = '$URL: https://svn-ccsm-models.cgd.ucar.edu/clm2/trunk_tags/clm4_5_8_r177/components/clm/src_clm40/main/findHistFields.pl $'; + my $svnurl = '$URL: https://svn-ccsm-models.cgd.ucar.edu/clm2/trunk_tags/clm4_5_8_r178/components/clm/src_clm40/main/findHistFields.pl $'; my $svnid = '$Id: findHistFields.pl 69899 2015-04-10 20:45:24Z erik $'; print $outfh <<"EOF"; diff --git a/components/clm/tools/clm4_0/interpinic/src/interpinic.F90 b/components/clm/tools/clm4_0/interpinic/src/interpinic.F90 index 9fffd60439..3081ca86ff 100644 --- a/components/clm/tools/clm4_0/interpinic/src/interpinic.F90 +++ b/components/clm/tools/clm4_0/interpinic/src/interpinic.F90 @@ -1389,7 +1389,7 @@ subroutine addglobal (ncid, cmdline) character(len= 5) :: zone character(len=18) :: datetime character(len=256):: version = & - "$HeadURL: https://svn-ccsm-models.cgd.ucar.edu/clm2/trunk_tags/clm4_5_8_r177/components/clm/tools/clm4_0/interpinic/src/interpinic.F90 $" + "$HeadURL: https://svn-ccsm-models.cgd.ucar.edu/clm2/trunk_tags/clm4_5_8_r178/components/clm/tools/clm4_0/interpinic/src/interpinic.F90 $" character(len=256) :: revision_id = "$Id: interpinic.F90 55582 2013-11-23 21:15:59Z erik $" character(len=16) :: logname character(len=16) :: hostname diff --git a/components/clm/tools/clm4_0/mksurfdata_map/src/mkfileMod.F90 b/components/clm/tools/clm4_0/mksurfdata_map/src/mkfileMod.F90 index bf72405433..b3fbafa944 100644 --- a/components/clm/tools/clm4_0/mksurfdata_map/src/mkfileMod.F90 +++ b/components/clm/tools/clm4_0/mksurfdata_map/src/mkfileMod.F90 @@ -93,7 +93,7 @@ subroutine mkfile(domain, fname, dynlanduse, urban_format) 'Source', len_trim(str), trim(str)), subname) str = & -'$HeadURL: https://svn-ccsm-models.cgd.ucar.edu/clm2/trunk_tags/clm4_5_8_r177/components/clm/tools/clm4_0/mksurfdata_map/src/mkfileMod.F90 $' +'$HeadURL: https://svn-ccsm-models.cgd.ucar.edu/clm2/trunk_tags/clm4_5_8_r178/components/clm/tools/clm4_0/mksurfdata_map/src/mkfileMod.F90 $' call check_ret(nf_put_att_text (ncid, NF_GLOBAL, & 'Version', len_trim(str), trim(str)), subname) diff --git a/components/clm/tools/clm4_5/mksurfdata_map/src/mkfileMod.F90 b/components/clm/tools/clm4_5/mksurfdata_map/src/mkfileMod.F90 index 4bf068123a..ee8427ef34 100644 --- a/components/clm/tools/clm4_5/mksurfdata_map/src/mkfileMod.F90 +++ b/components/clm/tools/clm4_5/mksurfdata_map/src/mkfileMod.F90 @@ -92,7 +92,7 @@ subroutine mkfile(domain, fname, dynlanduse) 'Source', len_trim(str), trim(str)), subname) str = & -'$HeadURL: https://svn-ccsm-models.cgd.ucar.edu/clm2/trunk_tags/clm4_5_8_r177/components/clm/tools/clm4_5/mksurfdata_map/src/mkfileMod.F90 $' +'$HeadURL: https://svn-ccsm-models.cgd.ucar.edu/clm2/trunk_tags/clm4_5_8_r178/components/clm/tools/clm4_5/mksurfdata_map/src/mkfileMod.F90 $' call check_ret(nf_put_att_text (ncid, NF_GLOBAL, & 'Version', len_trim(str), trim(str)), subname) diff --git a/components/clm/tools/shared/mkmapdata/rmdups.ncl b/components/clm/tools/shared/mkmapdata/rmdups.ncl index 23d5621c6e..3841d58dc7 100644 --- a/components/clm/tools/shared/mkmapdata/rmdups.ncl +++ b/components/clm/tools/shared/mkmapdata/rmdups.ncl @@ -118,7 +118,7 @@ begin nco@history = nco@history + " Removed duplicate weights from mapping file with: rmdups.ncl " nco@rmdups_Logname = logname; nco@rmdups_mod_date = ldate; - nco@rmdups_version = "$HeadURL: https://svn-ccsm-models.cgd.ucar.edu/clm2/trunk_tags/clm4_5_8_r177/components/clm/tools/shared/mkmapdata/rmdups.ncl $"; + nco@rmdups_version = "$HeadURL: https://svn-ccsm-models.cgd.ucar.edu/clm2/trunk_tags/clm4_5_8_r178/components/clm/tools/shared/mkmapdata/rmdups.ncl $"; nco@rmdups_revision_id = "$Id: rmdups.ncl 47629 2013-05-31 08:59:50Z erik $"; print("Successfully removed duplicate weights from mapping file" ); diff --git a/components/clm/tools/shared/mkmapgrids/mkscripgrid.ncl b/components/clm/tools/shared/mkmapgrids/mkscripgrid.ncl index 6d34342573..a27ce5a10b 100644 --- a/components/clm/tools/shared/mkmapgrids/mkscripgrid.ncl +++ b/components/clm/tools/shared/mkmapgrids/mkscripgrid.ncl @@ -158,7 +158,7 @@ end nc = addfile( outfilename, "w" ); nc@history = ldate+": create using mkscripgrid.ncl"; nc@comment = "Ocean is assumed to non-existant at this point"; - nc@Version = "$HeadURL: https://svn-ccsm-models.cgd.ucar.edu/clm2/trunk_tags/clm4_5_8_r177/components/clm/tools/shared/mkmapgrids/mkscripgrid.ncl $"; + nc@Version = "$HeadURL: https://svn-ccsm-models.cgd.ucar.edu/clm2/trunk_tags/clm4_5_8_r178/components/clm/tools/shared/mkmapgrids/mkscripgrid.ncl $"; nc@Revision = "$Id: mkscripgrid.ncl 72547 2015-08-25 16:28:29Z erik $"; if ( printn )then print( "================================================================================================" ); diff --git a/components/clm/tools/shared/ncl_scripts/getco2_historical.ncl b/components/clm/tools/shared/ncl_scripts/getco2_historical.ncl index 222bdce67d..56ab784e74 100644 --- a/components/clm/tools/shared/ncl_scripts/getco2_historical.ncl +++ b/components/clm/tools/shared/ncl_scripts/getco2_historical.ncl @@ -109,7 +109,7 @@ begin fileattdef ( nco, ncg ); nco@history = ldate+": Convert by getco2_historical.ncl"; nco@source = "Convert from:"+ghgfile; - nco@Version = "$HeadURL: https://svn-ccsm-models.cgd.ucar.edu/clm2/trunk_tags/clm4_5_8_r177/components/clm/tools/shared/ncl_scripts/getco2_historical.ncl $"; + nco@Version = "$HeadURL: https://svn-ccsm-models.cgd.ucar.edu/clm2/trunk_tags/clm4_5_8_r178/components/clm/tools/shared/ncl_scripts/getco2_historical.ncl $"; nco@Revision = "$Id: getco2_historical.ncl 69995 2015-04-14 20:26:21Z erik $"; ; ; Set static variables