Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

Commit 4de2c2b7 authored by Anthony's avatar Anthony
Browse files

Merge branch 'newdivbas' of gitlab.in2p3.fr:ipsl/lmd/intro/routingpp into newdivbas

parents 5bf1e631 f3fa808a
## Jean Zay compilation
# From environtment
# module purge
# source /gpfslocalsup/spack_soft/environment-modules/current/init/ksh
# module load python/3.7.3
# conda activate MPI
#
#
obj = defprec.o ioipsl.o constantes_var.o haversine.o grid.o routing_reg.o routing_tools.o
#
FC = /gpfslocalsup/pub/anaconda-py3/2019.03/bin/x86_64-conda_cos6-linux-gnu-gfortran
FFLAG = -fPIC
#FDBG = -g -fbounds-check
#
FPY = /linkhome/rech/genlmd01/rron974/.conda/envs/MPI/bin/f2py
#PDBG = --debug
#
EXT_SUFFIX := $(shell python3-config --extension-suffix)
#
all : routing_interface$(EXT_SUFFIX) diagst$(EXT_SUFFIX)
routing_interface : routing_interface$(EXT_SUFFIX)
diagst : diagst$(EXT_SUFFIX)
clean :
rm -f compilation.log *.o *.so *.mod routing_interface.so diagst.so *~
routing_interface$(EXT_SUFFIX) : $(obj) routing_interface.f90
rm -f compilation.log
$(FPY) -c routing_interface.f90 $(PDBG) --fcompiler=gfortran -m routing_interface $(obj) > compilation.log
diagst$(EXT_SUFFIX) : diagst.f90
$(FPY) -c diagst.f90 $(PDBG) --fcompiler=gfortran -m diagst > compilation.log
defprec.o : defprec.f90
$(FC) $(FFLAG) $(FDBG) -c defprec.f90
ioipsl.o : ioipsl.f90
$(FC) $(FFLAG) $(FDBG) -c ioipsl.f90
constantes_var.o : constantes_var.f90
$(FC) $(FFLAG) $(FDBG) -c constantes_var.f90
haversine.o : haversine.f90
$(FC) $(FFLAG) $(FDBG) -c haversine.f90
grid.o : defprec.f90 haversine.o constantes_var.o grid.f90
$(FC) $(FFLAG) $(FDBG) -c grid.f90
routing_tools.o : defprec.o grid.o constantes_var.o routing_tools.f90
$(FC) $(FFLAG) $(FDBG) -c routing_tools.f90
routing_reg.o : defprec.f90 grid.o constantes_var.o routing_tools.o routing_reg.f90
$(FC) $(FFLAG) $(FDBG) -c routing_reg.f90
## Jean Zay compilation
# From environtment
# module purge
#module purge
# module load intel-all/19.0.4
# eval "$(/gpfslocalsup/pub/anaconda-py3/2021.05/bin/conda shell.bash hook)"
# conda create -y -n fastmpi python=3.8
# conda activate fastmpi
#
# export MPICC=$(which mpicc)
# echo $MPICC
# pip install mpi4py --user --no-cache-dir
# conda install numba astropy netcdf4 matplotlib basemap ConfigParser cartopy
## conda install -c anaconda gfortran_linux-64
# git clone https://github.com/spacetelescope/spherical_geometry.git
# cd spherical_geometry
# python setup.py install --user
#
#
obj = defprec.o ioipsl.o constantes_var.o haversine.o grid.o routing_reg.o routing_tools.o
#
FC = /gpfslocalsys/intel/parallel_studio_xe_2019_update4_cluster_edition/compilers_and_libraries_2019.4.243/linux/mpi/intel64/bin/mpiifort
FFLAG = -fPIC
#FDBG = -g -fbounds-check
#
FPY = /linkhome/rech/genlmd01/rron974/.conda/envs/fastmpi/bin/f2py
#PDBG = --debug
#
EXT_SUFFIX := $(shell python3-config --extension-suffix)
#
all : routing_interface$(EXT_SUFFIX) diagst$(EXT_SUFFIX)
routing_interface : routing_interface$(EXT_SUFFIX)
diagst : diagst$(EXT_SUFFIX)
clean :
rm -f compilation.log *.o *.so *.mod routing_interface.so diagst.so *~
routing_interface$(EXT_SUFFIX) : $(obj) routing_interface.f90
rm -f compilation.log
$(FPY) -c routing_interface.f90 $(PDBG) --fcompiler=intelem -m routing_interface $(obj) > compilation.log
diagst$(EXT_SUFFIX) : diagst.f90
$(FPY) -c diagst.f90 $(PDBG) --fcompiler=intelem -m diagst > compilation.log
defprec.o : defprec.f90
$(FC) $(FFLAG) $(FDBG) -c defprec.f90
ioipsl.o : ioipsl.f90
$(FC) $(FFLAG) $(FDBG) -c ioipsl.f90
constantes_var.o : constantes_var.f90
$(FC) $(FFLAG) $(FDBG) -c constantes_var.f90
haversine.o : haversine.f90
$(FC) $(FFLAG) $(FDBG) -c haversine.f90
grid.o : defprec.f90 haversine.o constantes_var.o grid.f90
$(FC) $(FFLAG) $(FDBG) -c grid.f90
routing_tools.o : defprec.o grid.o constantes_var.o routing_tools.f90
$(FC) $(FFLAG) $(FDBG) -c routing_tools.f90
routing_reg.o : defprec.f90 grid.o constantes_var.o routing_tools.o routing_reg.f90
$(FC) $(FFLAG) $(FDBG) -c routing_reg.f90
#
#
obj = defprec.o ioipsl.o constantes_var.o haversine.o grid.o routing_reg.o routing_tools.o
#
FC = gfortran
FFLAG = -fPIC
#FDBG = -g -fbounds-check
#
FPY = f2py
#PDBG = --debug
#
EXT_SUFFIX := $(shell python3-config --extension-suffix)
#
all : routing_interface$(EXT_SUFFIX) diagst$(EXT_SUFFIX)
routing_interface : routing_interface$(EXT_SUFFIX)
diagst : diagst$(EXT_SUFFIX)
clean :
rm -f compilation.log *.o *.so *.mod routing_interface.so diagst.so *~
routing_interface$(EXT_SUFFIX) : $(obj) routing_interface.f90
rm -f compilation.log
$(FPY) -c routing_interface.f90 $(PDBG) --fcompiler=gfortran -m routing_interface $(obj) > compilation.log
diagst$(EXT_SUFFIX) : diagst.f90
$(FPY) -c diagst.f90 $(PDBG) --fcompiler=gfortran -m diagst > compilation.log
defprec.o : defprec.f90
$(FC) $(FFLAG) $(FDBG) -c defprec.f90
ioipsl.o : ioipsl.f90
$(FC) $(FFLAG) $(FDBG) -c ioipsl.f90
constantes_var.o : constantes_var.f90
$(FC) $(FFLAG) $(FDBG) -c constantes_var.f90
haversine.o : haversine.f90
$(FC) $(FFLAG) $(FDBG) -c haversine.f90
grid.o : defprec.f90 haversine.o constantes_var.o grid.f90
$(FC) $(FFLAG) $(FDBG) -c grid.f90
routing_tools.o : defprec.o grid.o constantes_var.o routing_tools.f90
$(FC) $(FFLAG) $(FDBG) -c routing_tools.f90
routing_reg.o : defprec.f90 grid.o constantes_var.o routing_tools.o routing_reg.f90
$(FC) $(FFLAG) $(FDBG) -c routing_reg.f90
......@@ -1987,7 +1987,8 @@ SUBROUTINE routing_reg_divbas_divide(nb_htu, nbv,nbi,nbj, ijdimmax, tbname, tsz,
REAL(r_std), INTENT(inout) :: touttp(nb_htu) !!
REAL(r_std), INTENT(inout) :: toutlshead(nb_htu) !!
INTEGER(i_std), DIMENSION(nbi,nbj), INTENT(inout) :: outtmp !!
INTEGER(i_std), INTENT(inout) :: nbb, ibas
INTEGER(i_std), INTENT(in) :: ibas
INTEGER(i_std), INTENT(inout) :: nbb
!
INTEGER(i_std), INTENT(in) :: trip(ijdimmax,ijdimmax) !! The trip field (unitless)
!
......
......@@ -84,10 +84,11 @@ def distances(lonvec, latvec, lon, lat) :
#
@jit(nopython = True)
def maxradius(cent, lon, lat) :
radius=[]
for lx, ly in zip(lon, lat) :
radius.append(np.sqrt((cent[0]-lx)**2+(cent[1]-ly)**2))
return np.max(np.array(radius))
length = lat.shape[0]
radius = np.zeros(length)
for i in range(length):
radius[i] = np.sqrt((cent[0]-lon[i])**2+(cent[1]-lat[i])**2)
return np.max(radius)
#
# Simple routine to dump a field into a file.
#
......
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