Skip to content

Commit

Permalink
lots of changes. installed on grace. yet to be tested
Browse files Browse the repository at this point in the history
  • Loading branch information
Abishek Gopal committed Jul 24, 2021
1 parent 83f0f4a commit 2b27cdb
Show file tree
Hide file tree
Showing 6 changed files with 51 additions and 39 deletions.
2 changes: 1 addition & 1 deletion Externals.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ required = True
[ilamb]
tag = v2.3
protocol = git
repo_url = https://bitbucket.org/ncollier/ilamb
repo_url = https://github.com/rubisco-sfa/ILAMB
local_path = ilamb/ilamb
required = True

Expand Down
15 changes: 10 additions & 5 deletions Machines/grace_modules
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,21 @@ echo "Loading modules for CESM_postprocessing tool..."


ml purge
export MODULEPATH=/scratch/group/ihesp/software/easybuild/eb/x86_64/mods/all/Core
ml intel/2019b
ml NCO
ml NCL
export MODULEPATH=/ihesp/software/easybuild/eb/x86_64/mods/all/Core
ml intel/2020b
#ml NCO
#ml NCL
ml ANTLR
ml HDF5
ml netCDF
ml GSL
ml UDUNITS
ml GEOS
ml PROJ
#ml NCL/6.6.2
#ml NCO/4.7.9
#ml netCDF/4.6.1
ml Python/2.7.16
ml Python/2.7.18

#export NCARG_ROOT=/scratch/group/ihesp/software/share/ncl-6.6.2
#export NCO_PATH=/scratch/group/ihesp/software/share/nco-4.9.4/nco-4.9.7
Expand Down
37 changes: 18 additions & 19 deletions Machines/machine_postprocess.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,29 +8,28 @@
<ocn_remap_pes queue="long" nodes="1" pes_per_node="3" wallclock="6:00" memory="18000">3</ocn_remap_pes>
<mpi_command>mpirun</mpi_command>
<pythonpath></pythonpath>
<f2py fcompiler="gfortran" f77exec="/sw/eb/sw/GCCcore/8.3.0/bin/gfortran">f2py</f2py>
<f2py fcompiler="mpiifort" f77exec="mpiifort">f2py</f2py>
<za>
<compiler>gfortran</compiler>
<compiler>mpiifort</compiler>
<flags>-c -g -O2</flags>
<include>-I/scratch/group/ihesp/software/share/netcdf-c-4.7.4/install2019b_2/include -I/scratch/group/ihesp/software/share/netcdf-fortran-4.5.3/install2019b_2/include</include>
<libs>-L/scratch/group/ihesp/software/share/netcdf-c-4.7.4/install2019b_2/lib -L/scratch/group/ihesp/software/share/netcdf-fortran-4.5.3/install2019b_2/lib -lnetcdff -L/sw/eb/sw/GCCcore/8.3.0/lib64 -L/sw/eb/sw/GCCcore/8.3.0/lib -L/sw/eb/sw/OpenBLAS/0.3.7-GCC-8.3.0/lib -L/sw/eb/sw/ScaLAPACK/2.0.2-gompi-2019b/lib64 -L/sw/eb/sw/FFTW/3.3.8-intel-2019b/lib -lnetcdf -lm -lpthread</libs>
<include>-I/sw/eb/sw/netCDF/4.7.4-iimpi-2020b/include -I/sw/eb/sw/netCDF-Fortran/4.5.3-iimpi-2020b/include</include>
<libs>-L/sw/eb/sw/netCDF/4.7.4-iimpi-2020b/lib -L/sw/eb/sw/netCDF-Fortran/4.5.3-iimpi-2020b/lib -lnetcdff -L/sw/eb/sw/GCCcore/10.2.0/lib64 -L/sw/eb/sw/iccifort/2020.4.304/compilers_and_libraries_2020.4.304/linux/lib -L/sw/eb/sw/iccifort/2020.4.304/compilers_and_libraries_2020.4.304/linux/compiler/lib/intel64 -L/sw/eb/sw/FFTW/3.3.8-intel-2020b/lib -lnetcdf -lm -lpthread</libs>
</za>
<reset_modules>
<module>module purge</module>
</reset_modules>
<modules>
<module>module load intel/2019b</module>
<module>module load ANTLR</module>
<module>module load HDF5</module>
<module>module load GSL/2.6</module>
<module>module load Python/2.7.16</module>
<module>export NCARG_ROOT=/scratch/group/ihesp/software/share/ncl-6.6.2</module>
<module>export NCO_PATH=/scratch/group/ihesp/software/share/nco-4.9.4/nco-4.9.7/install</module>
<module>export NETCDF4_PATH=/scratch/group/ihesp/software/share/netcdf-c-4.7.4/install2019b_2</module>
<module>export NETCDFF_PATH=/scratch/group/ihesp/software/share/netcdf-fortran-4.5.3/install2019b_2</module>
<module>module load intel/2020b</module>
<module>module load NCL</module>
<module>module load NCO</module>
<module>module load Python/2.7.18</module>
<!-- <module>export NCARG_ROOT=$EBROOTNCL</module>
<module>export NCO_PATH=$EBROOTNCO</module>
<module>export NETCDF4_PATH=$EBROOTNETCDF</module>
<module>export NETCDFF_PATH=$EBROOTNETCDFMINFORTRAN</module>
<module>export LD_LIBRARY_PATH=$NCARG_ROOT/lib:$NCO_PATH/lib:$NETCDF4_PATH/lib:$NETCDFF_PATH/lib:$LD_LIBRARY_PATH</module>
<module>export PATH=$NCARG_ROOT/bin:$NCO_PATH/bin:$NETCDF4_PATH/bin:$NETCDFF_PATH/bin:$PATH</module>
<module>export PYTHONPATH=/scratch/group/iheso/software/CESM_postprocessing/cesm-env2/lib/python2.7/site-packages/PyNIO:$PYTHONPATH</module>
<module>export PATH=$NCARG_ROOT/bin:$NCO_PATH/bin:$NETCDF4_PATH/bin:$NETCDFF_PATH/bin:$PATH</module>-->
<module>export PYTHONPATH=/ihesp/software/CESM_postprocessing/cesm-env2/lib/python2.7/site-packages/PyNIO:$PYTHONPATH</module>
<!-- <module>ml NCL/6.6.2-foss-2018b</module>
<module>ml NCO/4.7.9-foss-2018b</module>
<module>ml netCDF/4.6.1-foss-2018b-cdf5</module>
Expand All @@ -43,23 +42,23 @@
<averages_pes queue="long" nodes="1" pes_per_node="12" wallclock="20:00:00" memory="360000">12</averages_pes>
<diagnostics_pes queue="long" nodes="1" pes_per_node="12" wallclock="20:00:00" memory="360000">12</diagnostics_pes>
<regrid_pes queue="long" nodes="1" pes_per_node="12" wallclock="20:00:00" memory="360000">12</regrid_pes>
<obs_root>/scratch/group/ihesp/obs_root/amwg/amwg_data</obs_root>
<obs_root>/ihesp/obs_root/amwg/amwg_data</obs_root>
</component>
<component name="ice">
<averages_pes queue="long" nodes="1" pes_per_node="12" wallclock="20:00:00" memory="360000">12</averages_pes>
<diagnostics_pes queue="long" nodes="1" pes_per_node="12" wallclock="20:00:00" memory="360000">12</diagnostics_pes>
<obs_root>/scratch/group/ihesp/obs_root/pcwg/ice/data</obs_root>
<obs_root>/ihesp/obs_root/pcwg/ice/data</obs_root>
</component>
<component name="lnd">
<averages_pes queue="long" nodes="1" pes_per_node="12" wallclock="20:00:00" memory="18000">12</averages_pes>
<diagnostics_pes queue="long" nodes="1" pes_per_node="12" wallclock="20:00:00" memory="18000">12</diagnostics_pes>
<regrid_pes queue="long" nodes="1" pes_per_node="12" wallclock="20:00:00" memory="18000">12</regrid_pes>
<obs_root>/scratch/group/ihesp/obs_root/lnd_diag_data</obs_root>
<obs_root>/ihesp/obs_root/lnd_diag_data</obs_root>
</component>
<component name="ocn">
<averages_pes queue="long" nodes="1" pes_per_node="12" wallclock="20:00:00" memory="360000">12</averages_pes>
<diagnostics_pes queue="long" nodes="1" pes_per_node="10" wallclock="25:00:00" memory="360000">10</diagnostics_pes>
<obs_root>/scratch/group/ihesp/obs_root</obs_root>
<obs_root>/ihesp/obs_root</obs_root>
</component>
<component name="ilamb">
<diagnostics_pes queue="mn_small" nodes="1" pes_per_node="3" wallclock="6:00" memory="18000">3</diagnostics_pes>
Expand Down
27 changes: 17 additions & 10 deletions create_python_env
Original file line number Diff line number Diff line change
Expand Up @@ -160,8 +160,9 @@ echo $curdir
echo "$progname - activating virtual environment in ${pp_dir}/cesm-env2."
. cesm-env2/bin/activate
export PATH=${pp_dir}/cesm-env2/bin:$PATH

cesm-env2/bin/pip install -r env_reqs.txt
cesm-env2/bin/pip install numpy==1.16.6 --no-cache-dir --ignore-installed
cesm-env2/bin/pip install configparser --no-cache-dir --ignore-installed
cesm-env2/bin/pip install -r env_reqs.txt --no-cache-dir --ignore-installed

#----------------------------------------------------------------------
# install post processing packages
Expand Down Expand Up @@ -208,6 +209,7 @@ echo "---------------------------------------------------------"
echo "$progname - Compiling ocn diagnostics zonal average tool - za."
create_ocn_za --machine $machine

export FC=mpiifort F77=mpiifort CC=mpiicc
cd $pp_dir/ocn_diag/tool_lib/zon_avg

# run the make clean command
Expand All @@ -222,32 +224,37 @@ fi
# link the za compiled code to one level up for the NCL
ln -sf $pp_dir/ocn_diag/tool_lib/zon_avg/za $pp_dir/ocn_diag/tool_lib/za


mkdir -p $pp_dir/src
cd $pp_dir/src
export FC=gfortran F77=gfortran CC=gcc
#export FC=gfortran F77=gfortran CC=gcc
export FC=mpiifort F77=mpiifort CC=mpiicc
export PYTHONPATH=$pp_dir/cesm-env2/lib/python2.7/site-packages
export PYNIOPATH=$pp_dir/cesm-env2/lib/python2.7/site-packages/PyNIO
export HAS_NETCDF4=1
export NETCDF4_PREFIX="/scratch/group/ihesp/software/share/netcdf-c-4.7.4/install2019b_2/"
export NETCDF4_PREFIX=$EBROOTNETCDF # "/scratch/group/ihesp/software/share/netcdf-c-4.7.4/install2019b_2/"
export HAS_HDF5=1
export HDF5_PREFIX="/sw/eb/sw/HDF5/1.10.5-iimpi-2019b"
export F2CLIBS=gfortran
export F2CLIBS_PREFIX="/sw/eb/sw/GCCcore/8.3.0/bin/gfortran"
export HDF5_PREFIX=$EBROOTHDF5 #"/sw/eb/sw/HDF5/1.10.5-iimpi-2019b"
export F2CLIBS=ifcore
export F2CLIBS_PREFIX=/sw/eb/sw/iccifort/2020.4.304/compilers_and_libraries_2020.4.304/linux/compiler/lib/intel64 #"/sw/eb/sw/GCCcore/8.3.0/bin/gfortran"

export NETCDF_PREFIX=/scratch/group/ihesp/software/share/netcdf-c-4.7.4/install2019b_2
export NETCDF_PREFIX=$EBROOTNETCDF #/scratch/group/ihesp/software/share/netcdf-c-4.7.4/install2019b_2
rm -rf pynio ASAPPyTools
git clone https://github.com/NCAR/pynio.git
cd pynio
git checkout 1.5.3
sed -i '/extra_objects = EXTRA_OBJECTS,/d' setup.py
FC=gfortran F77=gfortran CC=gcc $pp_dir/cesm-env2/bin/python setup.py install
#FC=gfortran F77=gfortran CC=gcc $pp_dir/cesm-env2/bin/python setup.py install
FC=ifort F77=ifort CC=icc $pp_dir/cesm-env2/bin/python setup.py install


cd $pp_dir/src
git clone https://github.com/NCAR/ASAPPyTools.git
cd ASAPPyTools
$pp_dir/cesm-env2/bin/python setup.py install




#----------------------------------------------------------------------
# cleanup and deactivate the virtualenv.
#----------------------------------------------------------------------
Expand Down
6 changes: 3 additions & 3 deletions diagnostics/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#jinja2>=2.10
jinja2==2.7.3
numpy>=1.8.1
ilamb>=2.1
#jinja2==2.7.3
#numpy>=1.8.1
ilamb==2.3
3 changes: 2 additions & 1 deletion env_reqs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@ Cython==0.29.21
scipy==1.2.3
numpy==1.16.6
pandas==0.24.2
netCDF4==1.5.4
netCDF4==1.5.5.1
mpi4py==3.0.3
cf_units==2.1.4
cftime==1.2.1
matplotlib==2.2.5
Jinja2==2.11.2
sympy==1.5.1
Cartopy

0 comments on commit 2b27cdb

Please sign in to comment.