Skip to content

Commit 4be7ffe

Browse files
committed
cleaned up and improved documentation of outlet locations version (mk_runofftbl.F90, rmTinyCatchParaMod.F90)
1 parent a54f139 commit 4be7ffe

File tree

2 files changed

+16
-16
lines changed

2 files changed

+16
-16
lines changed

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/mk_runofftbl.F90

Lines changed: 9 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,12 @@ program mk_runofftbl
1414
! directing runoff to its ocean sink. The inputs are (i) bcs geometry files associated with the Gridname
1515
! and (ii) a binary file ("Outlet_latlon.43200x21600") that provides the land raster grid cells where the
1616
! outlets are located. The latter file is either created by [..]/Raster/preproc/routing/run_routing_raster.py
17-
! or from Randy's ([email protected]) old file under {MAKE_BCS_INPUT_DIR}/land/route/v1.
17+
! or from Randy's ([email protected]) old file under {MAKE_BCS_INPUT_DIR}/land/route/v1. The version
18+
! of the outlet file used by mk_runofftbl.x is determined via the LBCSV argument.
1819
! The program first moves the outlet locations from the land raster grid cells to the nearest ocean pixels
1920
! by calling outlets_to_ocean() and then generates the runoff table files.
2021
! The subroutine outlets_to_ocean() currently works only for the MOM5 and MOM6 tripolar ocean grids.
2122
!
22-
!Basically based on bcs version we would use have these 3 options:
23-
!=======================================================
24-
!bcs version --> Outlet lat/lon file version
25-
!---------------------------------------------------
26-
!v12 --> (new) v2 (produced with Yujin's pre-processing routines)
27-
!v11 --> (old) v1 (produced with Randy's old file)
28-
!otherwise --> N/A (do not run routing module of make_bcs)
2923
!=========================================================
3024
!
3125
! Yujin Zeng - June 17, 2024
@@ -104,11 +98,11 @@ program mk_runofftbl
10498
call get_command_argument(nxt,arg)
10599
end do
106100

107-
if(trim(OUTLETV)=="v1".or.trim(OUTLETV)=="v2")then
108-
fileLL=trim(MAKE_BCS_INPUT_DIR)//'/land/route/'//trim(OUTLETV)//'/Outlet_latlon.'
101+
if (trim(OUTLETV)=="v1" .or. trim(OUTLETV)=="v2") then
102+
fileLL=trim(MAKE_BCS_INPUT_DIR)//'/land/route/'//trim(OUTLETV)//'/Outlet_latlon.'
109103
else
110-
print *, "Routing files will not be produced with the selected land BCs version"
111-
stop
104+
print *, "Routing files will not be produced with the selected land BCs version (too old)"
105+
stop
112106
endif
113107

114108
! ------------------------------------------------------------------
@@ -730,9 +724,9 @@ subroutine read_oceanModel_mapl(res_MAPL,wetMask,nx,ny)
730724

731725
! read "mask" from netcdf file into "wetMask"
732726

733-
call check_ret(nf90_inq_varid(ncid,"mask",varid),subname)
734-
call check_ret(nf90_get_var(ncid,varid,wetMask),subname)
735-
call check_ret(nf90_close(ncid),subname)
727+
call check_ret( nf90_inq_varid(ncid,"mask",varid), subname)
728+
call check_ret( nf90_get_var( ncid,varid,wetMask), subname)
729+
call check_ret( nf90_close( ncid), subname)
736730

737731
end subroutine read_oceanModel_mapl
738732

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/rmTinyCatchParaMod.F90

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,13 @@ SUBROUTINE init_bcs_config (LBCSV)
9292
! NGDC : Soil parameters from Reynolds et al. 2000, doi:10.1029/2000WR900130 (MERRA-2, Fortuna, Ganymed, Icarus)
9393
! HWSD : Merged HWSDv1.21-STATSGO2 soil properties on 43200x21600 with Woesten et al. (1999) parameters
9494
! HWSD_b : As in HWSD but with surgical fix of Argentina peatland issue (38S,60W)
95-
95+
!
96+
! OUTLETV: Definition of outlet locations. DEFAULT : N/A
97+
! N/A : No information (do not create routing "TRN" files).
98+
! v1 : Outlet locations file produced manually by Randy Koster.
99+
! v2 : Outlet locations file produced by run_routing_raster.py using routing information encoded
100+
! in SRTM-based Pfafstetter catchments and Greenland outlets info provided by Lauren Andrews.
101+
96102
implicit none
97103

98104
character(*), intent (in) :: LBCSV ! land BCs version

0 commit comments

Comments
 (0)