Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unstable to install obsgrid on ubuntu 22.04 #10

Open
ghost opened this issue May 30, 2022 · 2 comments
Open

Unstable to install obsgrid on ubuntu 22.04 #10

ghost opened this issue May 30, 2022 · 2 comments

Comments

@ghost
Copy link

ghost commented May 30, 2022

So I am getting the following error

Error: Rank mismatch between actual argument at (1) and actual argument at (2) (scalar and rank-1)

[code]cd $HOME/WRFCHEM/
git clone https://github.com/wrf-model/OBSGRID.git
cd $HOME/WRFCHEM/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/WRFCHEM/Libs
export NETCDF=$DIR/NETCDF

./configure FFLAGS=-fallow-argument-mismatch FCFLAGS=-fallow-argument-mismatch #Option 2

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

./compile FFLAGS=-fallow-argument-mismatch FCFLAGS=-fallow-argument-mismatch

conda deactivate
conda deactivate
[/code]

I have found that installing obsgrid using miniconda works best with these changes. The commands work on ubuntu 20.04.4 but not the newest one. I'm certain it has something to do with gcc/gfortran/g++ version 11 which is standard on the new ubuntu
obsgrid.compile.txt
.

@ghost
Copy link
Author

ghost commented May 30, 2022

Solution found, going to create a pull request if I can figure it out.

Also have other issues that I have fixed with sed commands that might be good to have a pull request.

source of changes:

https://webdocs.cs.ualberta.ca/~amaral/AlbertaWorkloadsForSPECCPU2017/scripts/521.wrf_r.README.html

https://forum.wrfforum.com/viewtopic.php?f=5&t=9267

https://gcc.gnu.org/onlinedocs/gfortran/Fortran-Dialect-Options.html

@ghost
Copy link
Author

ghost commented May 30, 2022

`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

sed -i '39s/-ffree-form -O -fconvert=big-endian -frecord-marker=4/-ffree-form -O -fconvert=big-endian -frecord-marker=4 -fallow-argument-mismatch /g' configure.oa

sed -i '44s/= /= -fallow-argument-mismatch /g' configure.oa`

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants