-
Notifications
You must be signed in to change notification settings - Fork 322
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fan 2019 ctsm #767
Draft
juliusvira
wants to merge
209
commits into
ESCOMP:master
Choose a base branch
from
juliusvira:fan-2019-ctsm
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Fan 2019 ctsm #767
Changes from 2 commits
Commits
Show all changes
209 commits
Select commit
Hold shift + click to select a range
01c1153
FAN_n05_clm4_5_18_r272
2b6b2a8
Merge remote-tracking branch 'remotes/escomp/release-clm5.0' into fan…
5127039
point externals to fancpl branch
e23d599
first attempt, not quite working
f52f159
add handling of -fan option to CLMBuildNamelist
36c6d1a
Merge branch 'master' into fan-clm5-cpl (fix LND_TUNING_MODE)
f94ac48
FAN NH3 to coupler
63df80b
finally correct units for manure nitrogen
6c5185e
output name NH3_total -> NH3_TOTAL
0227fd3
non-negativity checks tweaked
cc8c864
manure unit conversion again
f4b7cbb
nh->nf
def5ee8
remove uninitilized fert_to_soil + increase bogus n_stored limit acco…
f591e8d
Handle size 1 tan pools correctly
c65ecf6
debugging: disarray between crop pheno and ndep, lower wtgcell thresh…
6b256ba
fix zeroing the fluxes
e20a808
other-fert output
138e09a
change to fancpl2 cime
b71f54b
fanstream attempt 1
59478df
variable fert fractions (2)
44333c9
mods from the summer 2018 experiments (1)
0910db2
drydep mods, clm side
2b4ba5b
Merge branch 'drydep-mods' of https://github.com/juliusvira/ctsm into…
bb2dc1e
cleanup
761bb11
fix tan_fract + mass check
9292097
fix typo
d744560
increased housing/storage emissions
5b9473a
version without drydep mods
feba86d
output field for manure in barns
772a6ba
Merge branch 'fan-clm5-cpl-poolmods' into fan-clm5-cpl-poolmods-nodd
2a408af
changed the flux formulations to what compost.py gives
615c290
fix indent
5d51bd1
soilwater tendency for fan
1514aed
initialize fan-watertend in coldstart
a9fd431
using watertend in cnndep (commented out0
3861750
tsl tendency unit
00442aa
fan physics updates + 3-way manure split
69036c0
3-way manure final
2de3aab
fert incorp reduction
5d02b4b
remove old FAN flux and state variables
e9fb310
fertilizer incorporation
691f61c
Merge branch 'remove-old-fan' into fan-2019
1cc8868
fanmod cleanup
940eb89
bug fix
6216a13
bug fix 2
53b8a83
comments
a3a0e5f
kads for slurry
03eff3a
tan fraction, slurry infiltration, inc. reduction
c37dd7f
fix conflicts v1
dc05bc0
trying to merge but probably need to do it differently
50db0da
removed old FANv1 fluxes and states
e82648d
cleanup
269816f
Merge branch 'master' of https://github.com/ESCOMP/ctsm into fan-2019…
290989c
animal housing (open/closed) modifications
6ed438b
Merge branch 'housingmods' of /glade/u/home/juliusv/fanruns2018/cesm/…
bb9e526
change cime to point at the fan-enabled version
ec44287
Avoid referring unallocate array in land-only runs
ca71111
Better checking for landunit indices
bdcff24
ndep2dyn_nml renamed to fan_nml and removed ndep3dyn_nml
d11bf70
refractoring with fan2ctsm interface module + preparation for includi…
6c41b79
Introducing fan pools & fluxes to the soil N balance check
de079be
namelist parameters for fan-bgc coupling
a95a6e1
add call to fan_eval
2e36926
debug the debug checks
da4a8c2
Merge branch 'fan-bgc-v2' of https://github.com/juliusvira/ctsm into …
6c11623
more bgc coupling + initialization
2f70072
Merge branch 'n-balance-check' of https://github.com/juliusvira/ctsm …
c040263
FanMod array interfaces, comments, etc
c0c311d
n-balance check debugged
27719f6
FAN namelist setup
561d9c8
merge array arg mods
5e51050
debug fan_to_bgc_crop namelist defaults
9540019
10**-ph -> 10**(-ph), etc
8687c20
more cleanup
b730f66
housing mods
807c639
slurry infiltration without precip + slurry diffusivity
108a0a7
van der molen liq diffusion + kads = 1
00d92f4
kelvin to c
5c359a3
more careful checking for column gridcell weight
fc1250f
more consistent treatment of slurry resistances
c5077c1
Merge fan-2019-gmdd-rc2
7c56648
remove printf and other cleanup
e7dda27
debug previous merge + use more debug_fan for checkings
b06931e
Add help for the -fan options
35bbe00
code cleanup
cfde300
merge from github
090ec9c
debug declaration order + make water_relax_t an argument for the wate…
5ca3cc4
remove commented out water_relax_t
be597f8
remove unnecessary changes to accumulated temperatures
802e8e6
debug fan-bgc coupling
57292f8
remove unnecessary variable
013ff57
guard agains negative windspeed (!)
bc183b1
make nh4 adsorption a namelist parameter
46ff6f7
add comments to the tsl tend evaluation
9a4b1fc
change the runoff variable to qflx_surf
34f3af1
Changed array assignments to filter loops
638f58f
Moved FAN soil moisture tendency to waterstatebulktype
0865091
separate variables for moisture tendency and moisture before SoilWate…
b110e2d
add check for arctic grass in addition to others
f8813d4
Remove !JV and !KO comments
7bea1d6
make array dimensions named constants
60fa182
manure_nh3 -> manure_nh4
4acfd5a
handle_storage_v2 -> handle_storage
4b086ec
fix subName
a755fb2
remove commented out lines
c723a9b
renamed fertilizer tan pools to match the convetion in the FANv2 desc…
bb1b661
renamed fert_runoff and manure_runoff to fert_nh4_runoff and manure_n…
ccffea1
comments
17df3a2
fix description of fract_spread_gass
8187f7f
ndep2 -> fan
4bcacf4
initialize fan state variables also for special columns
b68f23f
option for landless/mixed manure per crop/land area
9a80707
correct size for fluxes array
33bc7c8
remove moldrup parameterizations; make dz_layer arguement everywhere;…
629b78a
Merge branch 'fan-2019-ctsm' of github.com:juliusvira/ctsm into fan-2…
91c0dbf
Merge branch 'manure-pre-crop' into fan-2019-ctsm
2898dea
Merge branch 'fan-2019-ctsm' of https://github.com/juliusvira/ctsm in…
a13a64b
Merge branch 'fan-2019-ctsm' of https://github.com/juliusvira/ctsm in…
fd5ffab
make manure balance check include stores/barns
6f0e78c
Remove defunct storage balance check + make pH filling more obvious
b9d97f0
remove legacy state and flux variables
52de87d
remove legacy state and flux variables (2)
0d94113
Crash if fan nh3 requested to coupler but fan is off
8f1180e
Merge branch 'fan-2019-ctsm' of https://github.com/juliusvira/ctsm in…
6841dcb
Merge tag 'ctsm1.0.dev065' into fan-2019-ctsm
ekluzek ec1ff0d
If fan is off, let namelist be identical to without it, remove some e…
ekluzek ff5f125
Add a full fan driver fields namelist test to the other drv_flds name…
ekluzek 6fc9a0d
Add in fan test mods and add fan tests to the test list, point to Eri…
ekluzek 56f5798
Increase wallclock for longer FAN test
ekluzek 42b434e
Remove some extra log output for FAN, add some extra timing for FAN, …
ekluzek a6b124a
Some changes to get it to compile with nag compile on izumi, argument…
ekluzek 3c8bea8
Restore comment to CNNDeposition
2043e3a
added commits
f840649
added calculation of NFERTILIZATION depending on fan-bgc mode + new o…
84ddc73
zero nmanure if fan_to_bgc_crop
5692075
Use correct intent()
a1f9485
Fix wrong output variable pointer
4d26005
Rename MAN_ -> MANURE_; revise warning messages
bde3383
remove unused n_stored vars
c9d4304
fix initialization of nsynthfert
38638ad
variable naming, units, comments, etc
c2f9448
supposedly not answer changing changes after Bill Sacks' comments
21628ed
resolve conflicts
8b51ed4
fix argument intent
e75844b
Merge branch 'bill-sacks' of https://github.com/juliusvira/ctsm into …
facec5c
Use -abstol instead of +abstol to check for negativity
f21e04d
Fix array bounds, etc
e0e2fc5
Change the code to remove dependency of column/patch ordering
12a9857
remove unnecessary if block
1646e04
Merge tag 'ctsm1.0.dev097' into fan-2019-ctsm
ekluzek 4b40337
Variable name changed
ekluzek e66a347
Change fan tests to f19_f19_mg17 since f19_f19_mg16 was having troubl…
ekluzek b529fb7
Make these cold starts so they will run, as otherwise it has a confli…
ekluzek 32acf32
Put the cime hash that goes with this
ekluzek f638983
Add smallville single point tests for FAN
ekluzek d5b1e4c
Add a hack to allow three problematic points in the f19 grid to be se…
ekluzek b436dbb
Add the check for the three bad points to more places
ekluzek 2b13f9e
More setting of the three points in FAN to zero, so that they will ru…
ekluzek 51374ec
Also don't abort due to a Nbalance error when fan is on for the three…
ekluzek 4334813
Add a cycle if landunit is tiny, protect another divide by tiny landu…
ekluzek c635d5a
If sgrz or ngrz are infinity from the manure stream file set them to …
ekluzek 22de9df
Use shr_infnan_isinf rather than a comparison as the comparison fails
ekluzek 459952b
Fix error in N balance check, turn off some of the changes for small …
ekluzek 6ff603c
Add fan input/output to the balance check error
ekluzek 7473335
Adjust FAN tests for what we expect to work
ekluzek 1001dce
Add a FAN test month for longer simulations that has monthly output
ekluzek ce03b35
Set Inifinity from manure file to a large arbitrary value rather than…
ekluzek b7cb2f1
Add back changes for handling small land fraction, they do seem to be…
ekluzek a3fd227
Add a finidat file that's explicit for FAN so that we aren't doing co…
ekluzek 19879da
Remove the cold start setting so that the finidat file can be used
ekluzek dce44b9
Add threaded FAN test fail to expected fails
ekluzek 99de107
Merge tag 'ctsm5.1.dev021' into fan-2019-ctsm
ekluzek 285b526
Update FAN tests for existing compset and make it a CLM51 compset
ekluzek 80ed25b
Fix xml error, and add Vmct to all FAN tests
ekluzek 368a5fa
Document problems with the nuopc cases
ekluzek b7ce4e3
Merge tag 'ctsm5.1.dev042' into fan-2019-ctsm
ekluzek c203f2e
Add a couple tests to the expected fail, due to downloading data
ekluzek f68cfc9
Merge tag 'ctsm5.1.dev062' into fan-2019-ctsm
ekluzek 07a641f
Move location of fanStreams to MCT version of streams
ekluzek c9169e7
Make the same changes that went into ndepStreams in fanStreams
ekluzek 67cf886
Smallville tests of FAN need to use a compset that has ROF off, so us…
ekluzek 169f2f6
Change FAN single point compset tests to GSWP3 since Qian data only g…
ekluzek ede22be
Add initial version of FAN streams, that just adds the interfaces and…
ekluzek 07653f4
Fixes so will compile
ekluzek a24fb20
add missing use statement for shr_mpi_mod bcast method
ekluzek 62f4d18
gnu compiler requires string lengths to be identical
ekluzek 1596900
Add more files to the unit test build since they are now needed with …
ekluzek 3427431
Update repository to point to my fork to get the branch for cpl7 and …
ekluzek cdee600
Merge tag 'ctsm5.1.dev108' into fan-2019-ctsm
ekluzek 86bb9a4
Use new get_curr_days_per_year in FAN streams which is required in th…
ekluzek 43cc324
Move shr_fan from share to cmeps, so change so share is standard, and…
ekluzek aa4d65b
Add path for lilac to shr_fan_mod.F90 under cmeps so that LILAC can b…
ekluzek 521686c
Add an update to cmeps
ekluzek 9b6a56d
Add passing of FAN fields to atm Fall_FANflxnh3 for NUOPC case
ekluzek ee8ef31
Add code to handle reading in the FAN streams for nuopc
ekluzek 7ea2c77
Add a default NUOPC version of each of the FAN MCT tests
ekluzek 757baa0
Add a test for a NEON AG site with FAN on
ekluzek 63be0ed
Get to compile on nag compiler on izumi
ekluzek 0fe26fc
Make KONA test case a BGC-CROP compset and add a I1PT BGC-CROP compset
ekluzek 136d23f
Mark FAN NUOPC threaded test as an expected fail
ekluzek d08dbd9
Update cmeps externals with changes needed for FAN
ekluzek 90f5e39
Set FAN meshfile and make name consistent with new CMEPS
ekluzek 613c8bf
Merge branch 'fan-2019-ctsm' of github.com:juliusvira/ctsm into fan-2…
ekluzek 22e0add
Update cpl7 so shr_fan_mod is included
ekluzek 02526e5
Merge branch 'fan-2019-ctsm' of github.com:juliusvira/ctsm into fan-2…
ekluzek 020704c
Add dummy_mesh argument, because it's required for the NUOPC interfac…
ekluzek 625c225
Add shr_assert to check array size, and switch to loops over array co…
ekluzek 84f9ca3
Change izumi_nag non debug tests to izumi_intel for FAN since DEBUG t…
ekluzek 326bd8c
Add a stub ROF Hist Clm51 Bgc-Crop compset
ekluzek File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,6 +112,10 @@ module Fan2CTSMMod | |
! Fan coupling to soil BGC. Can be set on separately for crop and other columns. | ||
logical :: fan_to_bgc_crop = .false. | ||
logical :: fan_to_bgc_veg = .false. | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes...so far the idea was that fan_to_bgc_veg stays off unless explicitly requested, but fan_to_bgc_crop would be true for soil or full. |
||
! Whether manure N in mixed/landless systems (manure_sgrz and manure_ngrz streams) is | ||
! defined per crop or land area: | ||
logical :: crop_man_is4crop_area = .true. | ||
|
||
contains | ||
|
||
|
@@ -158,9 +162,9 @@ subroutine fan_readnml(NLFilename) | |
end if | ||
call relavu(unitn) | ||
end if | ||
|
||
call set_bcast_fanstream_pars(stream_year_first_fan, stream_year_last_fan, & | ||
model_year_align_fan, fan_mapalgo, stream_fldFileName_fan) | ||
call set_bcast_fanstream_pars(stream_year_first_fan, stream_year_last_fan, & | ||
model_year_align_fan, fan_mapalgo, stream_fldFileName_fan, crop_man_is4crop_area) | ||
|
||
call shr_mpi_bcast(fan_to_bgc_crop, mpicom) | ||
call shr_mpi_bcast(fan_to_bgc_veg, mpicom) | ||
|
@@ -796,7 +800,7 @@ subroutine handle_storage(bounds, temperature_inst, frictionvel_inst, dt, & | |
integer , intent(in) :: filter_soilc(:) ! filter for soil columns | ||
|
||
integer :: begg, endg, g, l, c, il, counter, col_grass, status, p | ||
real(r8) :: flux_avail_rum, flux_avail_mg, flux_grazing | ||
real(r8) :: flux_avail_rum, flux_avail_mg, flux_grazing, invscale | ||
billsacks marked this conversation as resolved.
Show resolved
Hide resolved
|
||
real(r8) :: tempr_ave, windspeed_ave ! windspeed and temperature averaged over agricultural patches | ||
real(r8) :: tempr_barns, tempr_stores, vent_barns, flux_grass_crop, tempr_min_10day, & | ||
flux_grass_graze, flux_grass_spread, flux_grass_spread_tan, flux_grass_crop_tan | ||
|
@@ -858,20 +862,26 @@ subroutine handle_storage(bounds, temperature_inst, frictionvel_inst, dt, & | |
call endrun('column not in soilfilter') | ||
end if | ||
|
||
n_manure_mixed_col(c) = (ndep_ngrz_grc(g) + ndep_sgrz_grc(g)) * kg_to_g / lun%wtgcell(l) | ||
|
||
if (crop_man_is4crop_area) then | ||
invscale = 1.0_r8 | ||
else | ||
invscale = 1.0_r8 / lun%wtgcell(l) | ||
end if | ||
|
||
n_manure_mixed_col(c) = (ndep_ngrz_grc(g) + ndep_sgrz_grc(g)) * kg_to_g * invscale | ||
|
||
tempr_min_10day = temperature_inst%t_a10min_patch(col%patchi(c)) | ||
if (tempr_min_10day > tempr_min_grazing) then | ||
! fraction of animals grazing -> allocate some manure to grasslands before barns | ||
flux_grazing = max_grazing_fract * ndep_sgrz_grc(g) * kg_to_g / lun%wtgcell(l) | ||
flux_avail_rum = (ndep_sgrz_grc(g)*(1.0_r8 - max_grazing_fract)) * kg_to_g / lun%wtgcell(l) | ||
flux_grazing = max_grazing_fract * ndep_sgrz_grc(g) * kg_to_g * invscale | ||
flux_avail_rum = (ndep_sgrz_grc(g)*(1.0_r8 - max_grazing_fract)) * kg_to_g * invscale | ||
grz_fract(c) = max_grazing_fract | ||
else | ||
flux_grazing = 0.0_r8 | ||
flux_avail_rum = ndep_sgrz_grc(g) * kg_to_g / lun%wtgcell(l) | ||
flux_avail_rum = ndep_sgrz_grc(g) * kg_to_g * invscale | ||
grz_fract(c) = 0.0_r8 | ||
end if | ||
flux_avail_mg = ndep_ngrz_grc(g) * kg_to_g / lun%wtgcell(l) | ||
flux_avail_mg = ndep_ngrz_grc(g) * kg_to_g * invscale | ||
flux_grass_graze = flux_grass_graze + flux_grazing*col%wtgcell(c) | ||
|
||
if (flux_avail_rum > 1e12 .or. flux_avail_mg > 1e12 .or. isnan(flux_avail_mg) .or. isnan(flux_avail_rum)) then | ||
billsacks marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this how name list changes get made? what changes fan_to_bgc_crop to true?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably these defaults should be same as in the namelist defaults xml...Or would it be better to make them spval here?