Scheduled Downtime
On Friday 21 April 2023 @ 5pm MT, this website will be down for maintenance and expected to return online the morning of 24 April 2023 at the latest

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: 6
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
 
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