Fail obsgrid compilation

hernaldo_81

New member
Hello, I am trying to compile obsgrid.exe, on macOS with gfortran however my compilation is not successful. If you could help me I would greatly appreciate it.Attached log.compile.

I already tried adding the following commands before running ./compile, but it does not work.

sed -i 's/-C -P -traditional/-P -traditional/g' configure.oa
sed -i 's/-lnetcdf -lnetcdff/ -lnetcdff -lnetcdf/g' configure.oa
sed -i 's/-lncarg -lncarg_gks -lncarg_c -lX11 -lm -lcairo/-lncarg -lncarg_gks -lncarg_c -lX11 -lm -lcairo -lfontconfig -lpixman-1 -lfreetype -lhdf5 -lhdf5_hl /g' configure.oa

Best regards
 

Attachments

  • log.compile
    16.3 KB · Views: 1

Whatheway

Member
I haven't tested this on MacOS but it works in Ubuntu. Note I am using conda environment

Code:
cd $HOME/WRF/
git clone https://github.com/wrf-model/OBSGRID.git
cd $HOME/WRF/OBSGRID

./clean -a
source $Miniconda_Install_DIR/etc/profile.d/conda.sh
conda init bash
conda activate ncl_stable


export HOME=`cd;pwd`
export DIR=$HOME/WRF/Libs
export NETCDF=$DIR/NETCDF

./configure   #Option 2

sed -i '45s/-C -P -traditional/-P -traditional/g' configure.oa
sed -i '27s|=	-L${NETCDF}/lib -lnetcdf -lnetcdff|=	-L</usr/lib/x86_64-linux-gnu/> -lm -L${NETCDF}/lib -lnetcdf -lnetcdff -lhdf5 -lhdf5_hl -lgfortran -lgcc -lz |g' configure.oa
sed -i '31s|-lncarg -lncarg_gks -lncarg_c -lX11 -lm -lcairo|-lncarg -lncarg_gks -lncarg_c -lX11 -lXext -lpng -lcairo -lfontconfig -lpixman-1 -lfreetype -lgfortran -lgcc -L</usr/lib/x86_64-linux-gnu/> -lm -lhdf5 -lhdf5_hl |g' configure.oa
sed -i '42s|=|=	-L$HOME/WRF/LIBS/grib2/lib -lhdf5 -lhdf5_hl -lm |g' configure.oa

sed -i '44s/=	/=	-fallow-argument-mismatch /g' configure.oa
sed -i '39s/-frecord-marker=4/-frecord-marker=4 -fallow-argument-mismatch /g' configure.oa
 

Whatheway

Member
hernaldo_81 said:
Hello, yes I am also trying to install it in conda environment

Then my steps that I am taking in the code above should work for you. Take a close look at the sed commands because I may have different paths than you do.
 
Top