Skip to content
Snippets Groups Projects
Commit 1908158c authored by POLCHER Jan's avatar POLCHER Jan :bicyclist_tone4:
Browse files

Added a script to test the code on a laptop.

Also some small corrections on the parallel processing.
parent 80bc69d7
No related branches found
No related tags found
No related merge requests found
...@@ -37,8 +37,9 @@ xcuserdata/ ...@@ -37,8 +37,9 @@ xcuserdata/
*.nc *.nc
Weights/ Weights/
__pycache__/ __pycache__/
run.def
# #
# Test configurations and directories # Test configurations and directories
# #
DomainDecompTests/Output/ DomainDecompTests/Output/
DomainDecompTests/run.def DomainDecompTests/run.def
\ No newline at end of file
...@@ -37,12 +37,6 @@ log_master, log_world = getargs.getLogger() ...@@ -37,12 +37,6 @@ log_master, log_world = getargs.getLogger()
INFO, DEBUG, ERROR = log_master.info, log_master.debug, log_world.error INFO, DEBUG, ERROR = log_master.info, log_master.debug, log_world.error
INFO_ALL, DEBUG_ALL = log_world.info, log_world.debug 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. # Read full grid and partition the domain.
# #
gg = MG.GlobalGrid() gg = MG.GlobalGrid()
...@@ -52,6 +46,14 @@ szhalo=1 ...@@ -52,6 +46,14 @@ szhalo=1
nbc=comm.Get_size() nbc=comm.Get_size()
rank=comm.Get_rank() 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 # Region of grid to be treated
# #
part = PA.partition(gg.ni, gg.nj, gg.land, comm, nbc, szhalo, rank) 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 ...@@ -24,5 +24,5 @@ GraphFile = test_graph.nc
# Diagnostics # Diagnostics
# You need to provide an interval in longitude and Latitude. # You need to provide an interval in longitude and Latitude.
# #
DiagLon = 2.9, 3.9 DiagLon = 3.9, 3.9
DiagLat = 38.8, 40.0 DiagLat = 40.0, 40.0
...@@ -3,10 +3,11 @@ ...@@ -3,10 +3,11 @@
# #
EarthRadius = 6370000. EarthRadius = 6370000.
# #
ModelGridFile = /bdd/MEDI/workspaces/polcher/NewRouting/EM_WFDEI_CRU_2000.nc ModelGridFile = /home/polcher/WORK/Data/NewRouting/geo_em.d01.nc
##WEST_EAST = -9.75, 5.25 # Mallorca
##SOUTH_NORTH = 36.1, 44.2 WEST_EAST = 2.3, 3.5
HydroFile = /bdd/MEDI/workspaces/polcher/NewRouting/routing_MED.nc SOUTH_NORTH = 39.00, 40.1
HydroFile = /home/polcher/WORK/Data/NewRouting/routing_MED.nc
# #
# FORTRAN interface parameters # FORTRAN interface parameters
# #
...@@ -18,10 +19,10 @@ nbasmax = 35 ...@@ -18,10 +19,10 @@ nbasmax = 35
# #
# Output # Output
# #
GraphFile = EM_WFDEI_test_graph.nc GraphFile = test_graph.nc
# #
# Diagnostics # Diagnostics
# You need to provide an interval in longitude and Latitude. # 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 DiagLat = 40.0, 40.0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment