Commit 1908158c authored by POLCHER Jan's avatar POLCHER Jan 🚴🏾
Browse files

Added a script to test the code on a laptop.

Also some small corrections on the parallel processing.
parent 80bc69d7
......@@ -37,8 +37,9 @@ xcuserdata/
*.nc
Weights/
__pycache__/
run.def
#
# Test configurations and directories
#
DomainDecompTests/Output/
DomainDecompTests/run.def
\ No newline at end of file
DomainDecompTests/run.def
......@@ -37,12 +37,6 @@ log_master, log_world = getargs.getLogger()
INFO, DEBUG, ERROR = log_master.info, log_master.debug, log_world.error
INFO_ALL, DEBUG_ALL = log_world.info, log_world.debug
#
# Verify directories
#
wdir="Weights"
if not os.path.exists(wdir) :
os.mkdir(wdir)
#
# Read full grid and partition the domain.
#
gg = MG.GlobalGrid()
......@@ -52,6 +46,14 @@ szhalo=1
nbc=comm.Get_size()
rank=comm.Get_rank()
#
# Verify directories
#
wdir="Weights"
if rank == 0 :
if not os.path.exists(wdir) :
os.mkdir(wdir)
comm.Barrier()
#
# Region of grid to be treated
#
part = PA.partition(gg.ni, gg.nj, gg.land, comm, nbc, szhalo, rank)
......
#/bin/bash
#
# A small test case which can run on a laptop.
# The MEDCORDEX grid is used over the Mallorca island.
#
cd ./..
cp TestConfigs/run.def.WRF_local ./run.def
#
mpirun -n 4 python RoutingPreProc.py
......@@ -24,5 +24,5 @@ GraphFile = test_graph.nc
# Diagnostics
# You need to provide an interval in longitude and Latitude.
#
DiagLon = 2.9, 3.9
DiagLat = 38.8, 40.0
DiagLon = 3.9, 3.9
DiagLat = 40.0, 40.0
......@@ -3,10 +3,11 @@
#
EarthRadius = 6370000.
#
ModelGridFile = /bdd/MEDI/workspaces/polcher/NewRouting/EM_WFDEI_CRU_2000.nc
##WEST_EAST = -9.75, 5.25
##SOUTH_NORTH = 36.1, 44.2
HydroFile = /bdd/MEDI/workspaces/polcher/NewRouting/routing_MED.nc
ModelGridFile = /home/polcher/WORK/Data/NewRouting/geo_em.d01.nc
# Mallorca
WEST_EAST = 2.3, 3.5
SOUTH_NORTH = 39.00, 40.1
HydroFile = /home/polcher/WORK/Data/NewRouting/routing_MED.nc
#
# FORTRAN interface parameters
#
......@@ -18,10 +19,10 @@ nbasmax = 35
#
# Output
#
GraphFile = EM_WFDEI_test_graph.nc
GraphFile = test_graph.nc
#
# Diagnostics
# You need to provide an interval in longitude and Latitude.
#
DiagLon = 39.9, 39.9
DiagLon = 3.9, 3.9
DiagLat = 40.0, 40.0
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