Page 1 of 1

How to compile WRF V3.3 in Double precision?

PostPosted: Thu Oct 06, 2011 8:32 pm
by anottrott
I wondered if would please clarify what is involved to compile WRF V3.3 in double precision. I am using the following architecture and compilers:
#ARCH x86_64 Linux, gfortran compiler with gcc #serial smpar
Is this as simple as editing the ‘RWORDSIZE’ and ‘PROMOTION’ configuration options in ‘arch/configure_new.defaults’? I have changed these to the following and compiled successfully:
RWORDSIZE = 8
PROMOTION = -fdefault-real-8
However 'wrf.exe' encounters a fatal error.

Previously these options were set to the follwing by default:
RWORDSIZE = CONFIGURE_RWORDSIZE
PROMOTION = #-fdefault-real-8 (i.e. the value was commented out)

I am unsure because I found in the gfortran maunal an option ‘-fdefault-double-8’, however I received a compilation error when I used that option for PROMOTION. I also tried option ‘-fdefault-real-16’ and a few other “sensible” variations of this option, but all returned an error during compile.

Regards,

Anders

Re: How to compile WRF V3.3 in Double precision?

PostPosted: Thu Oct 20, 2011 4:14 pm
by anottrott
I recently got an answer from WRFhelp on this one. Apparently double functionality is only possible using PGI compilers. To compile in double precision with PGI, modify the Architecture Specific Setting RWORDSIZE to 'RWORDSIZE=8' and leave the PROMOTION option unchanged. Then reconfigure and recompile.

Hope this is helpful.

Re: How to compile WRF V3.3 in Double precision?

PostPosted: Thu Jun 13, 2013 1:35 am
by wangyongqing2020
Dear:
I met the same question. I use ifort and I set as following:
RWORDSIZE = 8
PROMOTION = -r8
I run WRF successfully.

However,I met another question.
I set as following:
IWORDSIZE = 8
PROMOTION = -i8
I can not compile successfully.

May someone help?

Dr Wang.