Skip to content

Commit a54f139

Browse files
author
Yujin Zeng
committed
fixed bugs, now the correct version information can be read in mk_runofftbl.f90
1 parent 303b84f commit a54f139

File tree

3 files changed

+17
-19
lines changed

3 files changed

+17
-19
lines changed

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/make_bcs_cube.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,9 @@
5353
/bin/mv rst/Pfafstetter-M.rst rst/Pfafstetter.rst
5454
bin/CombineRasters.x -f 0 -t {NT} {OCEAN_VERSION}{DATENAME}{IMO}x{POLENAME}{JMO} Pfafstetter >/dev/null
5555
bin/CombineRasters.x -t {NT} CF{NC}x6C{SGNAME} {OCEAN_VERSION}{DATENAME}{IMO}x{POLENAME}{JMO}-Pfafstetter
56+
bin/mk_runofftbl.x -g CF{NC}x6C{SGNAME}_{OCEAN_VERSION}{DATENAME}{IMO}x{POLENAME}{JMO}-Pfafstetter -v {lbcsv}
5657
setenv OMP_NUM_THREADS 1
57-
if ({SKIPLAND} != True) then
58-
bin/mkCatchParam.x -x {NX} -y {NY} -g CF{NC}x6C{SGNAME}_{OCEAN_VERSION}{DATENAME}{IMO}x{POLENAME}{JMO}-Pfafstetter -v {lbcsv}
59-
bin/mk_runofftbl.x -g CF{NC}x6C{SGNAME}_{OCEAN_VERSION}{DATENAME}{IMO}x{POLENAME}{JMO}-Pfafstetter
60-
endif
58+
if ({SKIPLAND} != True) bin/mkCatchParam.x -x {NX} -y {NY} -g CF{NC}x6C{SGNAME}_{OCEAN_VERSION}{DATENAME}{IMO}x{POLENAME}{JMO}-Pfafstetter -v {lbcsv}
6159
endif
6260
6361
if ( {STEP2} == True ) then

GEOSagcm_GridComp/GEOSphysics_GridComp/GEOSsurface_GridComp/Utils/Raster/makebcs/make_bcs_latlon.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,9 @@
4141
/bin/mv rst/Pfafstetter-M.rst rst/Pfafstetter.rst
4242
bin/CombineRasters.x -f 0 -t {NT} {DATENAME}{IMO}x{POLENAME}{JMO} Pfafstetter >/dev/null
4343
bin/CombineRasters.x -t {NT} DC{IM}xPC{JM} {DATENAME}{IMO}x{POLENAME}{JMO}-Pfafstetter
44+
bin/mk_runofftbl.x -g DC{IM}xPC{JM}_{DATENAME}{IMO}x{POLENAME}{JMO}-Pfafstetter -v {lbcsv}
4445
setenv OMP_NUM_THREADS 1
45-
if ( {SKIPLAND} != True ) then
46-
bin/mkCatchParam.x -x {NX} -y {NY} -g DE{IMO}xPE{JMO}_DE{IMO}xPE{JMO}-Pfafstetter -v {lbcsv}
47-
bin/mk_runofftbl.x -g DC{IM}xPC{JM}_{DATENAME}{IMO}x{POLENAME}{JMO}-Pfafstetter
48-
endif
46+
if ( {SKIPLAND} != True ) bin/mkCatchParam.x -x {NX} -y {NY} -g DE{IMO}xPE{JMO}_DE{IMO}xPE{JMO}-Pfafstetter -v {lbcsv}
4947
setenv OMP_NUM_THREADS {NCPUS}
5048
if ( {SKIPLAND} != True ) bin/mkCatchParam.x -x {NX} -y {NY} -g DE{IMO}xPE{JMO}_DE{IMO}xPE{JMO}-Pfafstetter -v {lbcsv}
5149
chmod 755 bin/create_README.csh

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

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ program mk_runofftbl
44
!
55
! !ARGUMENTS:
66
!
7-
! Usage = "mk_runofftbl.x -g Gridname"
7+
! Usage = "mk_runofftbl.x -g Gridname -v LBCSV"
88
!
99
! -g: Gridname: a string that describes the grids associated with the atmosphere and ocean model configuration
1010
! eg, CF0180x6C_M6TP0072x0036-Pfafstetter
11+
! -v: LBCSV : Land bcs version (F25, GM4, ICA, NL3, NL4, NL5, v06, v07, v08, v09, v10, v11, v12, ...)
1112
!
1213
! This program generates the runoff table *.trn and *.TRN files that are used in the Catchment model for
1314
! directing runoff to its ocean sink. The inputs are (i) bcs geometry files associated with the Gridname
@@ -32,7 +33,7 @@ program mk_runofftbl
3233

3334
use mapl_hashmod
3435
use mapl_sortmod
35-
use rmTinyCatchParaMod, only :: OUTLETV
36+
use rmTinyCatchParaMod, only : init_bcs_config, OUTLETV
3637
use netcdf
3738

3839
implicit none
@@ -57,18 +58,12 @@ program mk_runofftbl
5758
integer :: nxt, command_argument_count
5859
character*(128) :: arg
5960
character*(128) :: Usage = "mk_runofftbl.x -g CF0180x6C_M6TP0072x0036-Pfafstetter -v v12"
61+
character*5 :: LBCSV = 'UNDEF'
6062
character*1 :: opt
6163

6264
! ------------------------------------------------------------------
6365

6466
call get_environment_variable ("MAKE_BCS_INPUT_DIR",MAKE_BCS_INPUT_DIR)
65-
66-
if(trim(OUTLETV)=="v1".or.trim(OUTLETV)=="v2")then
67-
fileLL=trim(MAKE_BCS_INPUT_DIR)//'/land/route/'//trim(OUTLETV)//'/Outlet_latlon.'
68-
else
69-
print *, "Routing files will not be produced with the selected land BCs version"
70-
stop
71-
endif
7267

7368
! Read inputs -----------------------------------------------------
7469

@@ -96,6 +91,9 @@ program mk_runofftbl
9691
select case (opt)
9792
case ('g')
9893
Gridname = trim(arg)
94+
case ('v')
95+
LBCSV = trim(arg)
96+
call init_bcs_config (trim(LBCSV)) ! get bcs details from version string
9997
case default
10098
print *, "Wrong flag -", opt
10199
print *, "Example usage with defaults: "
@@ -106,8 +104,12 @@ program mk_runofftbl
106104
call get_command_argument(nxt,arg)
107105
end do
108106

109-
print *, " "
110-
print*, "Working with input BCs grid: ", trim(Gridname)
107+
if(trim(OUTLETV)=="v1".or.trim(OUTLETV)=="v2")then
108+
fileLL=trim(MAKE_BCS_INPUT_DIR)//'/land/route/'//trim(OUTLETV)//'/Outlet_latlon.'
109+
else
110+
print *, "Routing files will not be produced with the selected land BCs version"
111+
stop
112+
endif
111113

112114
! ------------------------------------------------------------------
113115

0 commit comments

Comments
 (0)