Skip to content
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

Noah-MP Miguez-Macho and Fan #1418

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
3d00edd
Adds Noah-MP precipitation timestep fix for cases where LIS dt is gre…
Apr 29, 2021
a1ae48b
Merge branch 'master' of https://github.com/NASA-LIS/LISF
Oct 22, 2021
a0051ec
Noah-MP MMF implementation, Shugong Wang
shugongwang Nov 5, 2021
45485bc
Merge branch 'master' of github:NASA-LIS/LISF
Nov 5, 2021
2e8a58a
Commit mmf_start
shugongwang Nov 8, 2021
de93094
SMCEQ maybe a state variable, rather than a parameter
shugongwang Nov 8, 2021
a8fe289
Merge branch 'master' of github:TimLahmers/LISF into noahmp_mmf
Dec 2, 2021
3eed614
Add PSI Fix lost in previous MMF development.
Dec 10, 2021
0f02ec8
Corrects indexing error in Noah-MP MMF Scheme.
Dec 14, 2021
81f7922
Fix restart modules for perfect MMF restarts; includes debug print st…
Feb 1, 2022
13a7607
Fix indexing error with no-data values; comment out debug statements.
Mar 23, 2022
4698bae
Add MMF variables Rech, Qrfs, Qsprings, Wtd to Noah-MP401 output.
Mar 23, 2022
9edba8e
Corrects MMF sub-surface flow errors by removing bug with WTD and ZWT…
Apr 12, 2022
948de67
Update comments in MMF branch.
May 23, 2022
18bd181
Merge branch 'master' of github:NASA-LIS/LISF into noahmp_mmf
May 23, 2022
b3a9708
Merge branch 'master' of github:NASA-LIS/LISF into noahmp_mmf
Jun 14, 2022
59c5c1f
Prevent unphysical SMC values at initialization for MMF
Aug 12, 2022
60c0f06
Fixes Bug with Flux Accumulation Variables in MMF GW Scheme
Nov 14, 2022
e31757c
Merge branch 'master' of github.com:NASA-LIS/LISF into noahmp_mmf
Jan 6, 2023
efad6c2
Merge branch 'master' of github.com:NASA-LIS/LISF into noahmp_mmf
Feb 6, 2023
0f423c1
Merge branch 'master' of github.com:NASA-LIS/LISF into noahmp_mmf
Feb 22, 2023
14c7d95
Update specification of Noah-MP index variables for MMF.
Mar 27, 2023
94d3580
Merge branch 'master' of github.com:NASA-LIS/LISF into noahmp_mmf
May 12, 2023
527e92c
Merge branch 'master' of github.com:NASA-LIS/LISF into noahmp_mmf
Jun 13, 2023
96b24b7
Merge branch 'master' of github.com:NASA-LIS/LISF into noahmp_mmf
Jul 14, 2023
d55d3fc
Merge branch 'master' of github.com:NASA-LIS/LISF into noahmp_mmf
Jul 17, 2023
6947538
Fix MMF Initialization bug for parallel processor configurations.
Aug 10, 2023
5424c4e
Fix bug w/MMF scheme; enable LIS to finish when run with other Noah-M…
Aug 12, 2023
a3a6114
Update indices for coldstart setup to support soil data other than ST…
Sep 22, 2023
a02a3e3
Merge branch 'master' of github.com:NASA-LIS/LISF into noahmp_mmf
Sep 22, 2023
7f9be93
Merge branch 'master' of https://github.com/NASA-LIS/LISF into noahmp…
Jul 31, 2024
074fdd2
Eliminate LIS Noah-MP v4.0.1 MMF Hard-Coded Soil and Veg layer-counts
Aug 2, 2024
9f8a20c
Fix RelSMC output bug; solves problem of RelSMC being moved out of ma…
Aug 6, 2024
529f5d0
Set MMF Urban Classification to be same as LIS_rc%urbanclass
Aug 23, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Commit mmf_start
  • Loading branch information
shugongwang committed Nov 8, 2021
commit 2e8a58a26bb9d2bc90365e11ee121d49abdb4836
141 changes: 141 additions & 0 deletions lis/surfacemodels/land/noahmp.4.0.1/mmf_start.F90
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
subroutine mmf_start(n)
use LIS_coreMod
use NoahMP401_lsmMod
use module_sf_noahmpdrv_401
implicit none
integer :: n, row, col, t, ridx, cidx
real :: wtddt
! SW, MMF
integer, allocatable,dimension(:,:) :: isltyp, ivgtyp
!real, allocatable :: fdepth(:,:)
real, allocatable,dimension(:,:) :: fdepth, topo , area, rechclim, rivercond, &
wtd, riverbed, eqwtd, pexp, smcwtdxy, &
deeprechxy, rechxy, qslatxy, qrfsxy, qspringsxy
real, allocatable,dimension(:,:,:) :: smois, sh2o, smoiseq
wtddt = int(LIS_rc%ts/60) ! in minutes?

allocate(isltyp(NOAHMP401_struc(n)%col_min:NOAHMP401_struc(n)%col_max, NOAHMP401_struc(n)%row_min:NOAHMP401_struc(n)%row_max))
allocate(ivgtyp(NOAHMP401_struc(n)%col_min:NOAHMP401_struc(n)%col_max, NOAHMP401_struc(n)%row_min:NOAHMP401_struc(n)%row_max))
allocate(fdepth(NOAHMP401_struc(n)%col_min:NOAHMP401_struc(n)%col_max, NOAHMP401_struc(n)%row_min:NOAHMP401_struc(n)%row_max))
allocate(topo(NOAHMP401_struc(n)%col_min:NOAHMP401_struc(n)%col_max, NOAHMP401_struc(n)%row_min:NOAHMP401_struc(n)%row_max))
allocate(area(NOAHMP401_struc(n)%col_min:NOAHMP401_struc(n)%col_max, NOAHMP401_struc(n)%row_min:NOAHMP401_struc(n)%row_max))
allocate(rechclim(NOAHMP401_struc(n)%col_min:NOAHMP401_struc(n)%col_max, NOAHMP401_struc(n)%row_min:NOAHMP401_struc(n)%row_max))
allocate(rivercond(NOAHMP401_struc(n)%col_min:NOAHMP401_struc(n)%col_max, NOAHMP401_struc(n)%row_min:NOAHMP401_struc(n)%row_max))
allocate(wtd(NOAHMP401_struc(n)%col_min:NOAHMP401_struc(n)%col_max, NOAHMP401_struc(n)%row_min:NOAHMP401_struc(n)%row_max))
allocate(riverbed(NOAHMP401_struc(n)%col_min:NOAHMP401_struc(n)%col_max, NOAHMP401_struc(n)%row_min:NOAHMP401_struc(n)%row_max))
allocate(eqwtd(NOAHMP401_struc(n)%col_min:NOAHMP401_struc(n)%col_max, NOAHMP401_struc(n)%row_min:NOAHMP401_struc(n)%row_max))
allocate(pexp(NOAHMP401_struc(n)%col_min:NOAHMP401_struc(n)%col_max, NOAHMP401_struc(n)%row_min:NOAHMP401_struc(n)%row_max))
allocate(smcwtdxy(NOAHMP401_struc(n)%col_min:NOAHMP401_struc(n)%col_max, NOAHMP401_struc(n)%row_min:NOAHMP401_struc(n)%row_max))
allocate(deeprechxy(NOAHMP401_struc(n)%col_min:NOAHMP401_struc(n)%col_max, NOAHMP401_struc(n)%row_min:NOAHMP401_struc(n)%row_max))
allocate(rechxy(NOAHMP401_struc(n)%col_min:NOAHMP401_struc(n)%col_max, NOAHMP401_struc(n)%row_min:NOAHMP401_struc(n)%row_max))
allocate(qslatxy(NOAHMP401_struc(n)%col_min:NOAHMP401_struc(n)%col_max, NOAHMP401_struc(n)%row_min:NOAHMP401_struc(n)%row_max))
allocate(qrfsxy(NOAHMP401_struc(n)%col_min:NOAHMP401_struc(n)%col_max, NOAHMP401_struc(n)%row_min:NOAHMP401_struc(n)%row_max))
allocate(qspringsxy(NOAHMP401_struc(n)%col_min:NOAHMP401_struc(n)%col_max, NOAHMP401_struc(n)%row_min:NOAHMP401_struc(n)%row_max))
allocate(smois(NOAHMP401_struc(n)%col_min:NOAHMP401_struc(n)%col_max, 1:NOAHMP401_struc(n)%nsoil, NOAHMP401_struc(n)%row_min:NOAHMP401_struc(n)%row_max))
allocate(sh2o(NOAHMP401_struc(n)%col_min:NOAHMP401_struc(n)%col_max, 1:NOAHMP401_struc(n)%nsoil, NOAHMP401_struc(n)%row_min:NOAHMP401_struc(n)%row_max))
allocate(smoiseq(NOAHMP401_struc(n)%col_min:NOAHMP401_struc(n)%col_max, 1:NOAHMP401_struc(n)%nsoil, NOAHMP401_struc(n)%row_min:NOAHMP401_struc(n)%row_max))

do row=NOAHMP401_struc(n)%row_min, NOAHMP401_struc(n)%row_max
do col=NOAHMP401_struc(n)%col_min, NOAHMP401_struc(n)%col_max
t = NOAHMP401_struc(n)%rct_idx(row,col) ! rct_idx is row by col, i.e. row major, Shugong Wang
if(t .ne. LIS_rc%udef) then
isltyp(col,row) = NOAHMP401_struc(n)%noahmp401(t)%soiltype
ivgtyp(col,row) = NOAHMP401_struc(n)%noahmp401(t)%vegetype
else
isltyp(col,row) = NOAHMP401_struc(n)%soil2d(row,col) ! soil2d is row major, row by col, Shugong Wang
ivgtyp(col,row) = NOAHMP401_struc(n)%vege2d(row,col) ! vege2d is row major, row by col, Shugong Wang
endif
smois(row,:,col) = NOAHMP401_struc(n)%init_smc(:)
sh2o(row,:,col) = NOAHMP401_struc(n)%init_smc(:)
smoiseq(row,:,col) = 0.0
enddo
enddo
!!! 2-D, MMF, SW
do row=NOAHMP401_struc(n)%row_min, NOAHMP401_struc(n)%row_max
do col=NOAHMP401_struc(n)%col_min, NOAHMP401_struc(n)%col_max
ridx = row - NOAHMP401_struc(n)%row_min + 1
cidx = col - NOAHMP401_struc(n)%col_min + 1
fdepth(col,row) = NOAHMP401_struc(n)%fdepth(ridx, cidx)
topo(col,row) = NOAHMP401_struc(n)%topo(ridx, cidx)
area(col,row) = NOAHMP401_struc(n)%area(ridx, cidx)
riverbed(col,row) = NOAHMP401_struc(n)%riverbed(ridx, cidx)
eqwtd(col,row) = NOAHMP401_struc(n)%eqwtd(ridx, cidx)
rivercond(col,row) = NOAHMP401_struc(n)%rivercond(ridx, cidx)
rechclim(col,row) = NOAHMP401_struc(n)%rechclim(ridx, cidx)
pexp(col,row) = 1.0
enddo
enddo

call groundwater_init (noahmp401_struc(n)%nsoil, & !nsoil ,
noahmp401_struc(n)%sldpth, & !dzs,
isltyp, ivgtyp, wtddt , &
fdepth, topo, riverbed, eqwtd, rivercond, pexp , area ,wtd , &
smois,sh2o, smoiseq, smcwtdxy, deeprechxy, rechxy , &
qslatxy, qrfsxy, qspringsxy, &
rechclim , &
NOAHMP401_struc(n)%row_min, & !ids,
NOAHMP401_struc(n)%row_max, & !ide, +1 for test
NOAHMP401_struc(n)%col_min, & !jds,
NOAHMP401_struc(n)%col_max, & !jde,
1, 1, & !kds,kde,
NOAHMP401_struc(n)%row_min, & !ims,
NOAHMP401_struc(n)%row_max, & !ime,
NOAHMP401_struc(n)%col_min, & !jms,
NOAHMP401_struc(n)%col_max, & !jme,
1, 1, & !kms,kme,
NOAHMP401_struc(n)%row_min, & !ips,
NOAHMP401_struc(n)%row_max, & !ipe,
NOAHMP401_struc(n)%col_min, & !jps,
NOAHMP401_struc(n)%col_max, & !jpe,
1,1, & !kps,kpe,
NOAHMP401_struc(n)%row_min, & !its,
NOAHMP401_struc(n)%row_max, & !ite,
NOAHMP401_struc(n)%col_min, & !jts,
NOAHMP401_struc(n)%col_max, & !jte,
1,1) !kts,kte

do row=NOAHMP401_struc(n)%row_min, NOAHMP401_struc(n)%row_max
do col=NOAHMP401_struc(n)%col_min, NOAHMP401_struc(n)%col_max
t = NOAHMP401_struc(n)%rct_idx(row,col)
NOAHMP401_struc(n)%noahmp401(t)%wtd = wtd(col,row)
NOAHMP401_struc(n)%noahmp401(t)%zwt = wtd(col,row) !!!! zwt should be the same as wtd
NOAHMP401_struc(n)%noahmp401(t)%rivercond = rivercond(col,row)
NOAHMP401_struc(n)%noahmp401(t)%smc(:) = smois(col,:,row) ! smois
NOAHMP401_struc(n)%noahmp401(t)%sh2o(:) = sh2o(col,:,row)
NOAHMP401_struc(n)%noahmp401(t)%smoiseq(:)= smoiseq(col,:,row)
if(isltyp(col,row) .eq. 14) then
NOAHMP401_struc(n)%noahmp401(t)%smcwtd = 1.0
else
NOAHMP401_struc(n)%noahmp401(t)%smcwtd = smcwtdxy(col,row)
endif
NOAHMP401_struc(n)%noahmp401(t)%deeprech = deeprechxy(col,row)
NOAHMP401_struc(n)%noahmp401(t)%rech = rechxy(col,row)
NOAHMP401_struc(n)%noahmp401(t)%qslat = qslatxy(col,row)
NOAHMP401_struc(n)%noahmp401(t)%qrfs = qrfsxy(col,row)
NOAHMP401_struc(n)%noahmp401(t)%qsprings = qspringsxy(col,row)
NOAHMP401_struc(n)%rivercond(row, col) = rivercond(col,row) !!! make a copy to the 2D paramter data structure
NOAHMP401_struc(n)%riverbed(row, col) = riverbed(col,row) !!! make a copy to the 2D paramter data structure
NOAHMP401_struc(n)%eqwtd(row, col) = eqwtd(col,row) !!! make a copy
enddo
enddo
deallocate(isltyp)
deallocate(ivgtyp)
deallocate(fdepth)
deallocate(topo)
deallocate(area)
deallocate(rechclim)
deallocate(rivercond)
deallocate(wtd)
deallocate(riverbed)
deallocate(eqwtd)
deallocate(pexp)
deallocate(smcwtdxy)
deallocate(deeprechxy)
deallocate(rechxy)
deallocate(qslatxy)
deallocate(qrfsxy)
deallocate(qspringsxy)
deallocate(smois)
deallocate(sh2o)
deallocate(smoiseq)
end subroutine mmf_start