Commit bbe45737 authored by Anthony's avatar Anthony
Browse files

Variable floodplains converted to fraction after truncate

parent 793af1f8
......@@ -2739,6 +2739,7 @@ SUBROUTINE routing_reg_end_truncate(nbpt, nbasmax, gridarea, contfrac, gridcente
route_count_glo(ib) = basin_count(ib)
route_nbintobas_glo(ib) = basin_count(ib)
origin_nbintobas_glo(ib) = basin_notrun(ib)
routing_floodp_glo(ib,:) = 0
! If the land point doesn't overlap with any hydrogrid point
! (cf 0.5° trip on coast or some particular grid points )
IF ( basin_count(ib) .EQ. 0) THEN
......@@ -2770,7 +2771,8 @@ SUBROUTINE routing_reg_end_truncate(nbpt, nbasmax, gridarea, contfrac, gridcente
!
routing_area_glo(ib,ij) = basin_area(ib,ij)
routing_orog_glo(ib,ij) = basin_orog(ib,ij)
routing_floodp_glo(ib,ij) = basin_floodp(ib,ij)
! Now the final floodplains is converted into fraction
routing_floodp_glo(ib,ij) = basin_floodp(ib,ij)/basin_area(ib,ij)
routing_cg_glo(ib,ij,:) = basin_cg(ib,ij,:)
topo_resid_glo(ib,ij) = basin_topoind(ib,ij)
global_basinid_glo(ib,ij) = basin_id(ib,ij)
......
......@@ -748,7 +748,7 @@ class HydroGraph :
self.add_variable(outnf, procgrid, NCFillValue, part, ('z', 'y','x'), "basin_orog", "Mean orography", "m", self.routing_orog[:,:], vtyp, "float")
self.add_variable(outnf, procgrid, NCFillValue, part, ('z', 'y','x'), "basin_floodp", "area of floodplains", "m^2", self.routing_floodp[:,:], vtyp, "float")
self.add_variable(outnf, procgrid, NCFillValue, part, ('z', 'y','x'), "basin_floodp", "Fraction of floodplains", "-", self.routing_floodp[:,:], vtyp, "float")
# route number into basin
self.add_variable(outnf, procgrid, NCFillValue, part, ('y','x'), "routenbintobas", "Number of basin into current one", "-", self.route_nbintobas[:], vtyp, "int")
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment