Skip to content

Commit

Permalink
Fix bug in forcing LAI read dims. Minor updates to VEGFRA for consist…
Browse files Browse the repository at this point in the history
…ency, but these have not been tested.
  • Loading branch information
aubreyd authored and rcabell committed Apr 7, 2022
1 parent ddf7c1a commit 0c61d32
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions trunk/NDHMS/Routing/module_lsm_forcing.F
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ subroutine READFORC_WRF(flnm,ix,jx,target_date,t,q,u,v,p,lw,sw,pcp,lai,fpar)
call get_2d_netcdf_ruc("RAINNC", ncid, pcp, ix, jx,tlevel, .true., ierr)
call get_2d_netcdf_ruc("VEGFRA", ncid, fpar, ix, jx,tlevel, .true., ierr)
if(ierr == 0) then
if(maxval(fpar) .gt. 10 .and. (maxval(fpar) .lt. 10000) ) fpar = fpar/100.
if(maxval(fpar) .gt. 10 .and. (maxval(fpar) .lt. 10000) ) fpar = fpar*0.01
endif
call get_2d_netcdf_ruc("LAI", ncid, lai, ix, jx,tlevel, .true., ierr)

Expand Down Expand Up @@ -2793,7 +2793,7 @@ subroutine READFORC_HRLDAS_mpp(flnm,ix,jx,target_date, t,q,u,v,p,lw,sw,pcp,lai,f
endif
call mpp_land_bcast_int1(ierr)
if(ierr == 0) call decompose_data_real (buf2,fpar)
if(my_id .eq. io_id ) call get_2d_netcdf("LAI", ncid, buf2, units, ix, jx, .FALSE., ierr)
if(my_id .eq. io_id ) call get_2d_netcdf("LAI", ncid, buf2, units, global_nx, global_ny, .FALSE., ierr)
call mpp_land_bcast_int1(ierr)
if(ierr == 0) call decompose_data_real (buf2,lai)
Expand Down Expand Up @@ -2882,8 +2882,10 @@ subroutine READFORC_WRF_mpp(flnm,ix,jx,target_date,t,q,u,v,p,lw,sw,pcp,lai,fpar)
call mpp_land_bcast_int1(ierr)
if(ierr == 0) call decompose_data_real (buf2,lai)
if(my_id .eq. io_id) then
call get_2d_netcdf_ruc("VEGFRA", ncid, fpar, ix, jx,tlevel, .true., ierr)
if(maxval(fpar) .gt. 10 .and. (maxval(fpar) .lt. 10000) ) fpar = fpar/100.
call get_2d_netcdf_ruc("VEGFRA", ncid, buf2, global_nx, global_ny, tlevel, .true., ierr)
if(ierr == 0) then
if(maxval(buf2) .gt. 10 .and. maxval(buf2) .lt. 10000) buf2 = buf2 * 1.E-2
endif
endif
call mpp_land_bcast_int1(ierr)
if(ierr == 0) call decompose_data_real (buf2,fpar)
Expand All @@ -2907,7 +2909,7 @@ subroutine READFORC_WRF_mpp(flnm,ix,jx,target_date,t,q,u,v,p,lw,sw,pcp,lai,fpar)
call get_2d_netcdf_ruc("RAINNC", ncid, pcp, ix, jx,tlevel, .true., ierr)
call get_2d_netcdf_ruc("VEGFRA", ncid, fpar, ix, jx,tlevel, .false., ierr)
if(ierr == 0) then
if(maxval(fpar) .gt. 10 .and. (maxval(fpar) .lt. 10000) ) fpar = fpar/100.
if(maxval(fpar) .gt. 10 .and. (maxval(fpar) .lt. 10000) ) fpar = fpar * 0.01
endif
call get_2d_netcdf_ruc("LAI", ncid, lai, ix, jx,tlevel, .false., ierr)
Expand Down

0 comments on commit 0c61d32

Please sign in to comment.