Temperature 2m ​​above the ground too cold

All other topics about postprocessing model data (GrADS and other software), about other numerical weather prediction software (including WRF-NMM and WRF-ARW discussion unrelated to UEMS/WRF EMS), and general meteorology talk go in this forum.
meteoadriatic
Posts: 1603
Joined: Wed Aug 19, 2009 10:05 am

Re: Temperature 2m ​​above the ground too cold

Post by meteoadriatic » Mon Dec 30, 2013 9:59 pm

Forum does not support direct attachments. I usually upload images to my webserver and then link them here.

So, my run is not cold as yours? This is my namelist for this run:
http://blog.meteoadriatic.net/wp-conten ... list.input

Initial conditions are from GFS, and sea surface temp is ssthr.

See what is different from yours and then test if you can get better results with changes. I'll bet on modis vs usgs landuse, or longwave radiation scheme used, but it might be something else involved.

Gippox
Posts: 65
Joined: Sat Mar 02, 2013 1:16 am

Re: Temperature 2m ​​above the ground too cold

Post by Gippox » Mon Dec 30, 2013 10:19 pm

Ok thank you Meteo, i will try to change the land use with MODIS, the next run i'm trying ra_lw_physics 05 ra_sw_physics.
Hopefully i will try to edit the VEGPARM.TBL file like you said, raising the values ​​of emissivity EMISSIMIN, EMISSMAX.
I'll see if the temperatures predicted improve.

Code: Select all

Vegetation Parameters
USGS
27,1, 'SHDFAC NROOT   RS      RGL      HS      SNUP  MAXALB   LAIMIN  LAIMAX  EMISSMIN EMISSMAX ALBEDOMIN ALBEDOMAX  Z0MIN    Z0MAX    ZTOPV    ZBOTV'
1,      .10,   1,    200.,   999.,   999.0,   0.04,    46.,    1.00,   1.00,   .880,    .880,     .15,      .15,      .50,     .50,     0.00,    0.00,     'Urban and Built-Up Land'  
2,      .80,   3,     40.,   100.,   36.25,   0.04,    66.,    1.56,   5.68,   .920,    .985,     .17,      .23,      .05,     .15,     0.50,    0.01,     'Dryland Cropland and Pasture' 
3,      .80,   3,     40.,   100.,   36.25,   0.04,    66.,    1.56,   5.68,   .930,    .985,     .20,      .25,      .02,     .10,     0.50,    0.01,     'Irrigated Cropland and Pasture' 
4,      .80,   3,     40.,   100.,   36.25,   0.04,    66.,    1.00,   4.50,   .920,    .985,     .18,      .23,      .05,     .15,     0.50,    0.01,     'Mixed Dryland/Irrigated Cropland and Pasture' 
5,      .80,   3,     40.,   100.,   36.25,   0.04,    68.,    2.29,   4.29,   .920,    .980,     .18,      .23,      .05,     .14,     0.50,    0.01,     'Cropland/Grassland Mosaic'
6,      .80,   3,     70.,    65.,   44.14,   0.04,    60.,    2.00,   4.00,   .930,    .985,     .16,      .20,      .20,     .20,     0.50,    0.01,     'Cropland/Woodland Mosaic' 
7,      .80,   3,     40.,   100.,   36.35,   0.04,    70.,    0.52,   2.90,   .920,    .960,     .19,      .23,      .10,     .12,     0.50,    0.01,     'Grassland' 
8,      .70,   3,    300.,   100.,   42.00,   0.03,    60.,    0.50,   3.66,   .930,    .930,     .25,      .30,      .01,     .05,     0.50,    0.10,     'Shrubland' 
9,      .70,   3,    170.,   100.,   39.18,  0.035,    65.,    0.60,   2.60,   .930,    .950,     .22,      .30,      .01,     .06,     0.50,    0.10,     'Mixed Shrubland/Grassland' 
10,     .50,   3,     70.,    65.,   54.53,   0.04,    50.,    0.50,   3.66,   .920,    .920,     .20,      .20,      .15,     .15,     5.00,    0.10,     'Savanna' 
11,     .80,   4,    100.,    30.,   54.53,   0.08,    58.,    1.85,   3.31,   .930,    .930,     .16,      .17,      .50,     .50,     20.0,    11.5,     'Deciduous Broadleaf Forest' 
12,     .70,   4,    150.,    30.,   47.35,   0.08,    54.,    1.00,   5.16,   .930,    .940,     .14,      .15,      .50,     .50,     14.0,     7.0,     'Deciduous Needleleaf Forest' 
13,     .95,   4,    150.,    30.,   41.69,   0.08,    35.,    3.08,   6.48,   .950,    .950,     .12,      .12,      .50,     .50,     35.0,     1.0,     'Evergreen Broadleaf Forest'
14,     .70,   4,    125.,    30.,   47.35,   0.08,    52.,    5.00,   6.40,   .950,    .950,     .12,      .12,      .50,     .50,     17.0,     8.5,     'Evergreen Needleleaf Forest'  
15,     .80,   4,    125.,    30.,   51.93,   0.08,    53.,    2.80,   5.50,   .930,    .970,     .17,      .25,      .20,     .50,     18.0,    10.0,     'Mixed Forest' 
16,     .00,   0,    100.,    30.,   51.75,   0.01,    70.,    0.01,   0.01,   .980,    .980,     .08,      .08,   0.0001,  0.0001,     0.00,    0.00,     'Water Bodies' 
17,     .60,   2,     40.,   100.,   60.00,   0.01,    68.,    1.50,   5.65,   .950,    .950,     .14,      .14,      .20,     .20,     0.50,    0.01,     'Herbaceous Wetland' 
18,     .60,   2,    100.,    30.,   51.93,   0.02,    50.,    2.00,   5.80,   .950,    .950,     .14,      .14,      .40,     .40,     20.0,    11.5,     'Wooded Wetland' 
19,     .01,   1,    999.,   999.,   999.0,   0.02,    75.,    0.10,   0.75,   .900,    .900,     .38,      .38,      .01,     .01,     0.02,    0.01,     'Barren or Sparsely Vegetated' 
20,     .60,   3,    150.,   100.,   42.00,  0.025,    68.,    0.41,   3.35,   .920,    .920,     .15,      .20,      .10,     .10,     0.50,    0.01,     'Herbaceous Tundra' 
21,     .60,   3,    150.,   100.,   42.00,  0.025,    55.,    0.41,   3.35,   .930,    .930,     .15,      .20,      .30,     .30,     10.0,    0.10,     'Wooded Tundra' 
22,     .60,   3,    150.,   100.,   42.00,  0.025,    60.,    0.41,   3.35,   .920,    .920,     .15,      .20,      .15,     .15,     5.00,    0.10,     'Mixed Tundra' 
23,     .30,   2,    200.,   100.,   42.00,   0.02,    75.,    0.41,   3.35,   .900,    .900,     .25,      .25,      .05,     .10,     0.02,    0.01,     'Bare Ground Tundra' 
24,     .00,   1,    999.,   999.,   999.0,   0.02,    82.,    0.01,   0.01,   .950,    .950,     .55,      .70,    0.001,   0.001,     0.00,    0.00,     'Snow or Ice' 
25,     .50,   1,     40.,   100.,   36.25,   0.02,    75.,    0.01,   0.01,   .890,    .890,     .30,      .30,      .01,     .01,     0.00,    0.00,     'Playa' 
26,     .00,   0,    999.,   999.,   999.0,   0.02,    75.,    0.01,   0.01,   .880,    .880,     .16,      .16,      .15,     .15,     0.00,    0.00,     'Lava'   
27,     .00,   0,    999.,   999.,   999.0,   0.02,    75.,    0.01,   0.01,   .830,    .830,     .60,      .60,      .01,     .01,     0.00,    0.00,     'White Sand' 

meteoadriatic
Posts: 1603
Joined: Wed Aug 19, 2009 10:05 am

Re: Temperature 2m ​​above the ground too cold

Post by meteoadriatic » Mon Dec 30, 2013 10:41 pm

Gippox wrote:Hopefully i will try to edit the VEGPARM.TBL file like you said, raising the values ​​of emissivity EMISSIMIN, EMISSMAX.
You should lower them. Emissivity tells you how much heat surface is able to lose due to long wave radiation. For example, forest will have lower emissivity than barren land, because trees and leaves will absorb some upgoing heat and radiate it back to the ground. Thus, total emissivity from surface will be lower than for land without vegetation. And consenquently, ground temperature will remain higher under forest than same type of ground but without vegetation.

meteoadriatic
Posts: 1603
Joined: Wed Aug 19, 2009 10:05 am

Re: Temperature 2m ​​above the ground too cold

Post by meteoadriatic » Mon Dec 30, 2013 10:49 pm

At least, that was my logical conclusion, but I now see that forest has in fact largest emissivity after water in VEGPARM.TBL. So don't trust me yet. Try to change and see how it affects your temperatures...

Antonix
Posts: 260
Joined: Fri Oct 16, 2009 8:53 am

Re: Temperature 2m ​​above the ground too cold

Post by Antonix » Tue Dec 31, 2013 12:56 pm

Gippox paste your namelist.wrfm (the part of physics).
I think it's a problem of physics, pbl, soil scheme or radiation.

meteoadriatic
Posts: 1603
Joined: Wed Aug 19, 2009 10:05 am

Re: Temperature 2m ​​above the ground too cold

Post by meteoadriatic » Tue Dec 31, 2013 5:04 pm

Antonix wrote:Gippox paste your namelist.wrfm (the part of physics).
I think it's a problem of physics, pbl, soil scheme or radiation.
It is there in the first post of topic.

Gippox
Posts: 65
Joined: Sat Mar 02, 2013 1:16 am

Re: Temperature 2m ​​above the ground too cold

Post by Gippox » Thu Jan 02, 2014 6:42 pm

Ok i changed to Modis land use.
The result is improved in conditions of low humidity, but now for example that it is raining slightly and the humidity is 100% the average temperature is lower than 2-3° C.
In fact, even looking at the site of Meteoadriatic the same run 06Z to 18Z02JAN2014 the temperature is higher by 2-3 ° C.

Image

Image


The problem is therefore only when the humidity reaches 100%, strange.
The dewpoint expected to 2m are also strange, in some areas seem higher than the temperature at 2m :shock:

Image

meteoadriatic
Posts: 1603
Joined: Wed Aug 19, 2009 10:05 am

Re: Temperature 2m ​​above the ground too cold

Post by meteoadriatic » Thu Jan 02, 2014 7:03 pm

Yes your run is much colder on some places, for example over peninsula Istria.

I don't see anything in your namelist that could make such difference. However, do you use WRF 3.5 or older?

I would first try to make a run without wrfda, just to see if this makes important difference. If run without wrfda isn't colder than my anymore then you know where to look for issues.

About dewpoint being higher than temperature, it is teoretically possible if there is low amount of condensation nuclei so vapour can't catch up with cooling in condensation speed, but I doubt this is answer why you locally have higher dew than temperature. It has to be something with model itself I guess.

meteoadriatic
Posts: 1603
Joined: Wed Aug 19, 2009 10:05 am

Re: Temperature 2m ​​above the ground too cold

Post by meteoadriatic » Thu Jan 02, 2014 7:15 pm

Another thing, I don't find snow cover maps on your site. Can you post an example of snow cover over your domain? It could be the reason if you have snow on the ground where is shouldn't be, but in that case I think that maximum temperatures will be more bised than minimum.

Gippox
Posts: 65
Joined: Sat Mar 02, 2013 1:16 am

Re: Temperature 2m ​​above the ground too cold

Post by Gippox » Thu Jan 02, 2014 7:32 pm

meteoadriatic wrote:Yes your run is much colder on some places, for example over peninsula Istria.

I don't see anything in your namelist that could make such difference. However, do you use WRF 3.5 or older?

I would first try to make a run without wrfda, just to see if this makes important difference. If run without wrfda isn't colder than my anymore then you know where to look for issues.

About dewpoint being higher than temperature, it is teoretically possible if there is low amount of condensation nuclei so vapour can't catch up with cooling in condensation speed, but I doubt this is answer why you locally have higher dew than temperature. It has to be something with model itself I guess.
Hi Meteo, i use EMS 3.4 with WPS and WRF 3.5.1, UPP 2.1 compiled with parallel_studio_xe_2013
This its my configure.wrf file

Code: Select all

# configure.wrf
#
# This file was automatically generated by the configure script in the
# top level directory. You may make changes to the settings in this
# file but be aware they will be overwritten each time you run configure.
# Ordinarily, it is necessary to run configure once, when the code is
# first installed.
#
# To permanently change options, change the settings for your platform
# in the file arch/configure.defaults then rerun configure.
#
SHELL           =       /bin/sh
DEVTOP          =       `pwd`
LIBINCLUDE      =       .
.SUFFIXES: .F .i .o .f90 .c

#### Get core settings from environment (set in compile script)
#### Note to add a core, this has to be added to.

COREDEFS = -DEM_CORE=$(WRF_EM_CORE) \
           -DNMM_CORE=$(WRF_NMM_CORE) -DNMM_MAX_DIM=2600 \
	   -DCOAMPS_CORE=$(WRF_COAMPS_CORE) \
	   -DDA_CORE=$(WRF_DA_CORE) \
           -DEXP_CORE=$(WRF_EXP_CORE)

#### Single location for defining total number of domains.  You need
#### at least 1 + 2*(number of total nests).  For example, 1 coarse
#### grid + three fine grids = 1 + 2(3) = 7, so MAX_DOMAINS=7.

MAX_DOMAINS	=	21

#### DM buffer length for the configuration flags.

CONFIG_BUF_LEN	=	65536

#### Size of bitmasks (in 4byte integers) of stream masks for WRF I/O

MAX_HISTORY = 25

IWORDSIZE = 4
DWORDSIZE = 8
LWORDSIZE = 4

##############################################################################
#### The settings in this section are defaults that may be overridden by the 
#### architecture-specific settings in the next section.  
##############################################################################

##############################################################################
#### NOTE:  Do not modify these default values here.  To override these 
####        values, make changes after "Architecture specific settings".  
##############################################################################

#### Native size (in bytes) of Fortran REAL data type on this architecture ####
#### Note:  to change real wordsize (for example, to promote REALs from 
####        4-byte to 8-byte), modify the definition of RWORDSIZE in the 
####        section following "Architecture specific settings".  Do not 
####        change NATIVE_RWORDSIZE as is it architecture-specific.  
NATIVE_RWORDSIZE = 4

#### Default sed command and script for Fortran source files ####
#SED_FTN = sed -f $(WRF_SRC_ROOT_DIR)/arch/standard.sed
SED_FTN = $(WRF_SRC_ROOT_DIR)/tools/standard.exe

# Hack to work around $(PWD) not changing during OSF1 build.  
# $(IO_GRIB_SHARE_DIR) is reset during the OSF1 build only.  
IO_GRIB_SHARE_DIR = 

#### ESMF switches                 ####
#### These are set up by Config.pl ####
# switch to use separately installed ESMF library for coupling:  1==true
ESMF_COUPLING       = 0
# select dependences on module_utility.o
ESMF_MOD_DEPENDENCE = $(WRF_SRC_ROOT_DIR)/external/esmf_time_f90/module_utility.o
# select -I options for external/io_esmf vs. external/esmf_time_f90
ESMF_IO_INC         = -I$(WRF_SRC_ROOT_DIR)/external/esmf_time_f90
# select -I options for separately installed ESMF library, if present
ESMF_MOD_INC        =  $(ESMF_IO_INC)
# select cpp token for external/io_esmf vs. external/esmf_time_f90
ESMF_IO_DEFS        = 
# select build target for external/io_esmf vs. external/esmf_time_f90
ESMF_TARGET         = esmf_time

# ESMFINCLUDEGOESHERE


#### NETCDF4 pieces

NETCDF4_IO_OPTS = -DUSE_NETCDF4_FEATURES -DWRFIO_NCD_LARGE_FILE_SUPPORT
GPFS            =
CURL            =
HDF5            =
ZLIB            =
DEP_LIB_PATH    = 
NETCDF4_DEP_LIB = $(DEP_LIB_PATH) $(HDF5) $(ZLIB) $(GPFS) $(CURL)

# NETCDF4INCLUDEGOESHERE


##############################################################################

LIBWRFLIB = libwrflib.a


#### Architecture specific settings ####

# Settings for Linux x86_64 i486 i586 i686, Xeon (SNB with AVX mods) ifort compiler with icc  (dmpar)
#

DMPARALLEL      =        1
OMPCPP          =       # -D_OPENMP
OMP             =       # -openmp -fpp -auto
OMPCC           =       # -openmp -fpp -auto
SFC             =       ifort 
SCC             =       icc 
CCOMP           =       icc 
DM_FC           =       mpif90 -f90=$(SFC)
DM_CC           =       mpicc -cc=$(SCC) -DMPI2_SUPPORT
FC              =       $(DM_FC)
CC              =       $(DM_CC) -DFSEEKO64_OK 
LD              =       $(FC)
RWORDSIZE       =       $(NATIVE_RWORDSIZE)
PROMOTION       =       -i4
ARCH_LOCAL      =       -DNONSTANDARD_SYSTEM_FUNC -DCHUNK=64 -DXEON_OPTIMIZED_WSM5 -DOPTIMIZE_CFL_TEST -DWRF_USE_CLM
OPTNOSIMD       =
OPTAVX          =       -xCORE-AVX2
CFLAGS_LOCAL    =       -w -O3 $(OPTAVX)
LDFLAGS_LOCAL   =       $(OPTAVX)
CPLUSPLUSLIB    =       
ESMF_LDFLAG     =       $(CPLUSPLUSLIB)
FCOPTIM         =       -O3 $(OPTAVX)
FCREDUCEDOPT	=       $(FCOPTIM)
FCNOOPT		=       -O0 -fno-inline -fno-ip
FCDEBUG         =       # -g $(FCNOOPT) -traceback # -fpe0 -check all -ftrapuv -unroll0 -u
FORMAT_FIXED    =       -FI -cpp
FORMAT_FREE     =       -FR -cpp
FCSUFFIX        =
BYTESWAPIO      =       -convert big_endian
FCBASEOPTS_NO_G =       -w $(OMP) -auto -ftz -fno-alias -fp-model fast=1 -no-prec-div -no-prec-sqrt $(FORMAT_FREE) $(BYTESWAPIO) -auto -align array64byte #-vec-report6
FCBASEOPTS      =       $(FCBASEOPTS_NO_G) $(FCDEBUG)
MODULE_SRCH_FLAG =     
TRADFLAG        =      -traditional
CPP             =      /lib/cpp -C -P
AR              =      ar
ARFLAGS         =      ru
M4              =      m4
RANLIB          =      ranlib
CC_TOOLS        =      gcc

###########################################################
######################
# POSTAMBLE

FGREP = fgrep -iq

ARCHFLAGS       =    $(COREDEFS) -DIWORDSIZE=$(IWORDSIZE) -DDWORDSIZE=$(DWORDSIZE) -DRWORDSIZE=$(RWORDSIZE) -DLWORDSIZE=$(LWORDSIZE) \
                     $(ARCH_LOCAL) \
                     $(DA_ARCHFLAGS) \
                      -DDM_PARALLEL \
                       \
                      -DNETCDF \
                       \
                       \
                       \
                       \
                       \
                       \
                       \
                       \
                      -DUSE_ALLOCATABLES \
                      -DGRIB1 \
                      -DINTIO \
                      -DLIMIT_ARGS \
                      -DCONFIG_BUF_LEN=$(CONFIG_BUF_LEN) \
                      -DMAX_DOMAINS_F=$(MAX_DOMAINS) \
                      -DMAX_HISTORY=$(MAX_HISTORY) \
		      -DNMM_NEST=$(WRF_NMM_NEST)
CFLAGS          =    $(CFLAGS_LOCAL) -DDM_PARALLEL  \
                      -DMAX_HISTORY=$(MAX_HISTORY) -DNMM_CORE=$(WRF_NMM_CORE)
FCFLAGS         =    $(FCOPTIM) $(FCBASEOPTS)
ESMF_LIB_FLAGS  =    
# ESMF 5 -- these are defined in esmf.mk, included above
 ESMF_IO_LIB     =    -L$(WRF_SRC_ROOT_DIR)/external/esmf_time_f90 -lesmf_time
ESMF_IO_LIB_EXT =    -L$(WRF_SRC_ROOT_DIR)/external/esmf_time_f90 -lesmf_time
INCLUDE_MODULES =    $(MODULE_SRCH_FLAG) \
                     $(ESMF_MOD_INC) $(ESMF_LIB_FLAGS) \
                      -I$(WRF_SRC_ROOT_DIR)/main \
                      -I$(WRF_SRC_ROOT_DIR)/external/io_netcdf \
                      -I$(WRF_SRC_ROOT_DIR)/external/io_int \
                      -I$(WRF_SRC_ROOT_DIR)/frame \
                      -I$(WRF_SRC_ROOT_DIR)/share \
                      -I$(WRF_SRC_ROOT_DIR)/phys \
                      -I$(WRF_SRC_ROOT_DIR)/chem -I$(WRF_SRC_ROOT_DIR)/inc \
                      -I$(NETCDFPATH)/include \
                      
REGISTRY        =    Registry
CC_TOOLS_CFLAGS = -DNMM_CORE=$(WRF_NMM_CORE)

 LIB_BUNDLED     = \
                      $(WRF_SRC_ROOT_DIR)/external/fftpack/fftpack5/libfftpack.a \
                      $(WRF_SRC_ROOT_DIR)/external/io_grib1/libio_grib1.a \
                      $(WRF_SRC_ROOT_DIR)/external/io_grib_share/libio_grib_share.a \
                      $(WRF_SRC_ROOT_DIR)/external/io_int/libwrfio_int.a \
                      $(ESMF_IO_LIB) \
                      $(WRF_SRC_ROOT_DIR)/external/RSL_LITE/librsl_lite.a \
                      $(WRF_SRC_ROOT_DIR)/frame/module_internal_header_util.o \
                      $(WRF_SRC_ROOT_DIR)/frame/pack_utils.o 

 LIB_EXTERNAL    = \
                      -L$(WRF_SRC_ROOT_DIR)/external/io_netcdf -lwrfio_nf -L/home/andrea/wrfems/util/NETCDF/lib -lnetcdff -lnetcdf    

LIB             =    $(LIB_BUNDLED) $(LIB_EXTERNAL) $(LIB_LOCAL) $(LIB_WRF_HYDRO)
LDFLAGS         =    $(OMP) $(FCFLAGS) $(LDFLAGS_LOCAL) 
ENVCOMPDEFS     =    
WRF_CHEM	=	0 
CPPFLAGS        =    $(ARCHFLAGS) $(ENVCOMPDEFS) -I$(LIBINCLUDE) $(TRADFLAG) 
NETCDFPATH      =    /home/andrea/wrfems/util/NETCDF
PNETCDFPATH     =    

bundled:  io_only fftpack 
external: io_only $(WRF_SRC_ROOT_DIR)/external/RSL_LITE/librsl_lite.a gen_comms_rsllite module_dm_rsllite $(ESMF_TARGET)
io_only:  esmf_time wrfio_nf   wrf_ioapi_includes wrfio_grib_share wrfio_grib1 wrfio_int


######################
externals: io_only bundled external

gen_comms_serial :
	( /bin/rm -f $(WRF_SRC_ROOT_DIR)/tools/gen_comms.c )

module_dm_serial :
	( if [ ! -e module_dm.F ] ; then /bin/cp module_dm_warning module_dm.F ; cat module_dm_stubs.F >> module_dm.F ; fi )

gen_comms_rsllite :
	( if [ ! -e $(WRF_SRC_ROOT_DIR)/tools/gen_comms.c ] ; then \
          /bin/cp $(WRF_SRC_ROOT_DIR)/tools/gen_comms_warning $(WRF_SRC_ROOT_DIR)/tools/gen_comms.c ; \
          cat $(WRF_SRC_ROOT_DIR)/external/RSL_LITE/gen_comms.c >> $(WRF_SRC_ROOT_DIR)/tools/gen_comms.c ; fi )

module_dm_rsllite :
	( if [ ! -e module_dm.F ] ; then /bin/cp module_dm_warning module_dm.F ; \
          cat $(WRF_SRC_ROOT_DIR)/external/RSL_LITE/module_dm.F >> module_dm.F ; fi )

wrfio_nf : 
	( cd $(WRF_SRC_ROOT_DIR)/external/io_netcdf ; \
          make $(J) NETCDFPATH="$(NETCDFPATH)" RANLIB="$(RANLIB)" CPP="$(CPP)" \
          CC="$(SCC)" CFLAGS="$(CFLAGS)" \
          FC="$(SFC) $(PROMOTION) $(OMP) $(FCFLAGS)" TRADFLAG="$(TRADFLAG)" AR="$(AR)" ARFLAGS="$(ARFLAGS)" )

wrfio_pnf : 
	( cd $(WRF_SRC_ROOT_DIR)/external/io_pnetcdf ; \
          make $(J) NETCDFPATH="$(PNETCDFPATH)" RANLIB="$(RANLIB)" CPP="$(CPP) $(ARCHFLAGS)" \
          FC="$(FC) $(PROMOTION) $(OMP) $(FCFLAGS)" TRADFLAG="$(TRADFLAG)" AR="$(AR)" ARFLAGS="$(ARFLAGS)" )

wrfio_grib_share :
	( cd $(WRF_SRC_ROOT_DIR)/external/io_grib_share ; \
          make $(J) CC="$(SCC)" CFLAGS="$(CFLAGS)" RM="$(RM)" RANLIB="$(RANLIB)" CPP="$(CPP)" \
          FC="$(SFC) $(PROMOTION) -I. $(FCDEBUG) $(FCBASEOPTS) $(FCSUFFIX)" TRADFLAG="$(TRADFLAG)" AR="$(AR)" ARFLAGS="$(ARFLAGS)" archive) 

wrfio_grib1 :
	( cd $(WRF_SRC_ROOT_DIR)/external/io_grib1 ; \
          make $(J) CC="$(SCC)" CFLAGS="$(CFLAGS)" RM="$(RM)" RANLIB="$(RANLIB)" CPP="$(CPP)" \
          FC="$(SFC) $(PROMOTION) -I. $(FCDEBUG) $(FCBASEOPTS) $(FCSUFFIX)" TRADFLAG="$(TRADFLAG)" AR="$(AR)" ARFLAGS="$(ARFLAGS)" archive)

wrfio_grib2 :
	( cd $(WRF_SRC_ROOT_DIR)/external/io_grib2 ; \
          make $(J) CC="$(SCC)" CFLAGS="$(CFLAGS) " RM="$(RM)" RANLIB="$(RANLIB)" \
          CPP="$(CPP)" \
          FC="$(SFC) $(PROMOTION) -I. $(FCDEBUG) $(FCBASEOPTS) $(FCSUFFIX)" TRADFLAG="-traditional" AR="$(AR)" ARFLAGS="$(ARFLAGS)" \
          FIXED="$(FORMAT_FIXED)" archive)

wrfio_int : 
	( cd $(WRF_SRC_ROOT_DIR)/external/io_int ; \
          make $(J) CC="$(CC)" RM="$(RM)" RANLIB="$(RANLIB)" CPP="$(CPP)" \
          FC="$(FC) $(PROMOTION) $(FCDEBUG) $(FCBASEOPTS) $(OMP)" FGREP="$(FGREP)" \
          TRADFLAG="$(TRADFLAG)" AR="$(AR)" ARFLAGS="$(ARFLAGS)" ARCHFLAGS="$(ARCHFLAGS)" all )

esmf_time : 
	( cd $(WRF_SRC_ROOT_DIR)/external/esmf_time_f90 ; \
          make $(J) FC="$(SFC) $(PROMOTION) $(FCDEBUG) $(FCBASEOPTS)" RANLIB="$(RANLIB)" \
          CPP="$(CPP) -I$(WRF_SRC_ROOT_DIR)/inc -I. $(ARCHFLAGS) $(TRADFLAG)" AR="$(AR)" ARFLAGS="$(ARFLAGS)" )

fftpack :
	( cd $(WRF_SRC_ROOT_DIR)/external/fftpack/fftpack5 ; \
          make $(J) FC="$(SFC)" FFLAGS="$(PROMOTION) $(FCDEBUG) $(FCBASEOPTS)" RANLIB="$(RANLIB)" AR="$(AR)" ARFLAGS="$(ARFLAGS)" )

atm_ocn :
	( cd $(WRF_SRC_ROOT_DIR)/external/atm_ocn ; \
          make $(J) CC="$(SCC)" CFLAGS="$(CFLAGS) " RM="$(RM)" RANLIB="$(RANLIB)" \
          CPP="$(CPP)" \
          FC="$(DM_FC) $(PROMOTION) -I. $(FCDEBUG) $(FCBASEOPTS) $(FCSUFFIX)" TRADFLAG="-traditional" AR="$(AR)" ARFLAGS="$(ARFLAGS)" \
          FIXED="$(FORMAT_FIXED)" )

$(WRF_SRC_ROOT_DIR)/external/RSL_LITE/librsl_lite.a :
	( cd $(WRF_SRC_ROOT_DIR)/external/RSL_LITE ; make $(J) CC="$(CC) $(CFLAGS)" \
          FC="$(FC) $(FCFLAGS) $(OMP) $(PROMOTION) $(BYTESWAPIO)" \
          CPP="$(CPP) -I. $(ARCHFLAGS) $(OMPCPP) $(TRADFLAG)" AR="$(AR)" ARFLAGS="$(ARFLAGS)" ;\
          $(RANLIB) $(WRF_SRC_ROOT_DIR)/external/RSL_LITE/librsl_lite.a )

######################
#	Macros, these should be generic for all machines

LN	=	ln -sf
MAKE	=	make -i -r
RM	= 	rm -f


# These sub-directory builds are identical across all architectures

wrf_ioapi_includes :
	( cd $(WRF_SRC_ROOT_DIR)/external/ioapi_share ; \
          $(MAKE) NATIVE_RWORDSIZE="$(NATIVE_RWORDSIZE)" RWORDSIZE="$(RWORDSIZE)" AR="$(AR)" ARFLAGS="$(ARFLAGS)" )

wrfio_esmf :
	( cd $(WRF_SRC_ROOT_DIR)/external/io_esmf ; \
          make FC="$(FC) $(PROMOTION) $(FCDEBUG) $(FCBASEOPTS) $(ESMF_MOD_INC)" \
          RANLIB="$(RANLIB)" CPP="$(CPP) $(POUND_DEF) " AR="$(AR)" ARFLAGS="$(ARFLAGS)" )

#	There is probably no reason to modify these rules

.F.i:
	$(RM) $@
	$(CPP) -I$(WRF_SRC_ROOT_DIR)/inc $(CPPFLAGS) $*.F > $@
	mv $*.i $(DEVTOP)/pick/$*.f90
	cp $*.F $(DEVTOP)/pick

.F.o:
	$(RM) $@
	$(CPP) -I$(WRF_SRC_ROOT_DIR)/inc $(CPPFLAGS) $(OMPCPP) $*.F  > $*.bb
	$(SED_FTN) $*.bb | $(CPP) > $*.f90
	$(RM) $*.b $*.bb
	@ if echo $(ARCHFLAGS) | $(FGREP) 'DVAR4D'; then \
          echo COMPILING $*.F for 4DVAR ; \
          $(WRF_SRC_ROOT_DIR)/var/build/da_name_space.pl $*.f90 > $*.f90.tmp ; \
          mv $*.f90.tmp $*.f90 ; \
        fi
	$(FC) -o $@ -c $(FCFLAGS) $(OMP) $(MODULE_DIRS) $(PROMOTION) $(FCSUFFIX) $*.f90
        

.F.f90:
	$(RM) $@
	$(SED_FTN) $*.F > $*.b 
	$(CPP) -I$(WRF_SRC_ROOT_DIR)/inc $(CPPFLAGS) $*.b  > $@
	$(RM) $*.b

.f90.o:
	$(RM) $@
	$(FC) -o $@ -c $(FCFLAGS) $(PROMOTION) $(FCSUFFIX) $*.f90

setfeenv.o : setfeenv.c
	$(RM) $@
	$(CCOMP) -o $@ -c $(CFLAGS) $(OMPCC) $*.c

.c.o:
	$(RM) $@
	$(CC) -o $@ -c $(CFLAGS) $*.c

# A little more adventurous.  Allow full opt on 
mediation_integrate.o : mediation_integrate.F
shift_domain_em.o : shift_domain_em.F
# solve_em.o  <-- gets a little kick from SOLVE_EM_SPECIAL too, if defined
mediation_feedback_domain.o : mediation_feedback_domain.F
mediation_force_domain.o : mediation_force_domain.F
mediation_interp_domain.o : mediation_interp_domain.F


# compile these without high optimization to speed compile
# mediation_integrate.o : mediation_integrate.F
track_driver.o : track_driver.F
convert_nmm.o : convert_nmm.F
init_modules_em.o : init_modules_em.F
input_wrf.o : input_wrf.F
module_io.o : module_io.F
module_comm_dm.o : module_comm_dm.F
module_comm_dm_0.o : module_comm_dm_0.F
module_comm_dm_1.o : module_comm_dm_1.F
module_comm_dm_2.o : module_comm_dm_2.F
module_comm_dm_3.o : module_comm_dm_3.F
module_comm_nesting_dm.o : module_comm_nesting_dm.F
module_configure.o : module_configure.F
module_dm.o : module_dm.F
module_domain.o : module_domain.F
module_domain_type.o : module_domain_type.F
module_alloc_space_0.o : module_alloc_space_0.F
module_alloc_space_1.o : module_alloc_space_1.F
module_alloc_space_2.o : module_alloc_space_2.F
module_alloc_space_3.o : module_alloc_space_3.F
module_alloc_space_4.o : module_alloc_space_4.F
module_alloc_space_5.o : module_alloc_space_5.F
module_alloc_space_6.o : module_alloc_space_6.F
module_alloc_space_7.o : module_alloc_space_7.F
module_alloc_space_8.o : module_alloc_space_8.F
module_alloc_space_9.o : module_alloc_space_9.F
module_tiles.o : module_tiles.F
module_fddaobs_rtfdda.o : module_fddaobs_rtfdda.F
module_initialize.o : module_initialize.F
module_physics_init.o : module_physics_init.F 
module_initialize_b_wave.o : module_initialize_b_wave.F
module_initialize_hill2d_x.o : module_initialize_hill2d_x.F
module_initialize_quarter_ss.o : module_initialize_quarter_ss.F
module_initialize_real.o : module_initialize_real.F
module_initialize_real.o: module_initialize_real.F
module_initialize_squall2d_x.o : module_initialize_squall2d_x.F
module_initialize_squall2d_y.o : module_initialize_squall2d_y.F
module_initialize_scm_xy.o : module_initialize_scm_xy.F
module_integrate.o : module_integrate.F
module_io_mm5.o : module_io_mm5.F
module_io_wrf.o : module_io_wrf.F
module_si_io.o : module_si_io.F
module_wps_io_arw.o : module_wps_io_arw.F
module_state_description.o : module_state_description.F 
output_wrf.o : output_wrf.F
solve_interface.o : solve_interface.F
start_domain.o : start_domain.F
start_em.o : start_em.F
wrf_bdyin.o : wrf_bdyin.F
wrf_bdyout.o : wrf_bdyout.F
wrf_ext_read_field.o : wrf_ext_read_field.F
wrf_ext_write_field.o : wrf_ext_write_field.F
wrf_fddaobs_in.o : wrf_fddaobs_in.F
wrf_histin.o : wrf_histin.F
wrf_histout.o : wrf_histout.F
wrf_inputin.o : wrf_inputin.F
wrf_inputout.o : wrf_inputout.F
wrf_restartin.o : wrf_restartin.F
wrf_restartout.o : wrf_restartout.F
wrf_tsin.o : wrf_tsin.F
nl_get_0_routines.o : nl_get_0_routines.F
nl_get_1_routines.o : nl_get_1_routines.F
nl_set_0_routines.o : nl_set_0_routines.F
nl_set_1_routines.o : nl_set_1_routines.F

mediation_integrate.o :
	$(RM) $@
	$(CPP) -I$(WRF_SRC_ROOT_DIR)/inc $(CPPFLAGS) $(OMPCPP) $*.F  > $*.bb
	$(SED_FTN) $*.bb | $(CPP) > $*.f90
	$(RM) $*.b $*.bb
	@ if echo $(ARCHFLAGS) | $(FGREP) 'DVAR4D'; then \
          echo COMPILING $*.F for 4DVAR ; \
          $(WRF_SRC_ROOT_DIR)/var/build/da_name_space.pl $*.f90 > $*.f90.tmp ; \
          mv $*.f90.tmp $*.f90 ; \
        fi
	$(FC) -o $@ -c $(FCFLAGS) $(OMP) $(MODULE_DIRS) $(PROMOTION) $(FCSUFFIX) $*.f90
        
shift_domain_em.o :
	$(RM) $@
	$(CPP) -I$(WRF_SRC_ROOT_DIR)/inc $(CPPFLAGS) $(OMPCPP) $*.F  > $*.bb
	$(SED_FTN) $*.bb | $(CPP) > $*.f90
	$(RM) $*.b $*.bb
	@ if echo $(ARCHFLAGS) | $(FGREP) 'DVAR4D'; then \
          echo COMPILING $*.F for 4DVAR ; \
          $(WRF_SRC_ROOT_DIR)/var/build/da_name_space.pl $*.f90 > $*.f90.tmp ; \
          mv $*.f90.tmp $*.f90 ; \
        fi
	$(FC) -o $@ -c $(FCFLAGS) $(OMP) $(MODULE_DIRS) $(PROMOTION) $(FCSUFFIX) $*.f90
        

mediation_feedback_domain.o : 
	$(RM) $@
	$(CPP) -I$(WRF_SRC_ROOT_DIR)/inc $(CPPFLAGS) $(OMPCPP) $*.F  > $*.bb
	$(SED_FTN) $*.bb | $(CPP) > $*.f90
	$(RM) $*.b $*.bb
	@ if echo $(ARCHFLAGS) | $(FGREP) 'DVAR4D'; then \
          echo COMPILING $*.F for 4DVAR ; \
          $(WRF_SRC_ROOT_DIR)/var/build/da_name_space.pl $*.f90 > $*.f90.tmp ; \
          mv $*.f90.tmp $*.f90 ; \
        fi
	$(FC) -o $@ -c $(FCFLAGS) $(OMP) $(MODULE_DIRS) $(PROMOTION) $(FCSUFFIX) $*.f90
        

mediation_force_domain.o : 
	$(RM) $@
	$(CPP) -I$(WRF_SRC_ROOT_DIR)/inc $(CPPFLAGS) $(OMPCPP) $*.F  > $*.bb
	$(SED_FTN) $*.bb | $(CPP) > $*.f90
	$(RM) $*.b $*.bb
	@ if echo $(ARCHFLAGS) | $(FGREP) 'DVAR4D'; then \
          echo COMPILING $*.F for 4DVAR ; \
          $(WRF_SRC_ROOT_DIR)/var/build/da_name_space.pl $*.f90 > $*.f90.tmp ; \
          mv $*.f90.tmp $*.f90 ; \
        fi
	$(FC) -o $@ -c $(FCFLAGS) $(OMP) $(MODULE_DIRS) $(PROMOTION) $(FCSUFFIX) $*.f90
        
mediation_interp_domain.o : 
	$(RM) $@
	$(CPP) -I$(WRF_SRC_ROOT_DIR)/inc $(CPPFLAGS) $(OMPCPP) $*.F  > $*.bb
	$(SED_FTN) $*.bb | $(CPP) > $*.f90
	$(RM) $*.b $*.bb
	@ if echo $(ARCHFLAGS) | $(FGREP) 'DVAR4D'; then \
          echo COMPILING $*.F for 4DVAR ; \
          $(WRF_SRC_ROOT_DIR)/var/build/da_name_space.pl $*.f90 > $*.f90.tmp ; \
          mv $*.f90.tmp $*.f90 ; \
        fi
	$(FC) -o $@ -c $(FCFLAGS) $(OMP) $(MODULE_DIRS) $(PROMOTION) $(FCSUFFIX) $*.f90
        

# mediation_integrate.o \
track_driver.o \
convert_nmm.o \
init_modules_em.o \
module_dm.o \
module_fddaobs_rtfdda.o \
module_initialize.o \
module_initialize_b_wave.o \
module_initialize_hill2d_x.o \
module_initialize_quarter_ss.o \
module_initialize_real.o \
module_initialize_squall2d_x.o \
module_initialize_squall2d_y.o \
module_initialize_scm_xy.o \
module_integrate.o \
module_io_mm5.o \
module_io_wrf.o \
module_si_io.o \
module_wps_io_arw.o \
module_tiles.o \
output_wrf.o \
solve_interface.o \
start_domain.o \
start_em.o \
wrf_fddaobs_in.o \
wrf_tsin.o :
	$(RM) $@
	$(SED_FTN) $*.F > $*.b 
	$(CPP) -I$(WRF_SRC_ROOT_DIR)/inc $(CPPFLAGS) $(OMPCPP) $*.b  > $*.f90
	$(RM) $*.b
	@ if echo $(ARCHFLAGS) | $(FGREP) 'DVAR4D'; then \
          echo COMPILING $*.F for 4DVAR ; \
          $(WRF_SRC_ROOT_DIR)/var/build/da_name_space.pl $*.f90 > $*.f90.tmp ; \
          mv $*.f90.tmp $*.f90 ; \
        fi
	if $(FGREP) '!$$OMP' $*.f90 ; then \
          if [ -n "$(OMP)" ] ; then echo COMPILING $*.F WITH OMP ; fi ; \
	  $(FC) -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS) $(MODULE_DIRS) $(FCSUFFIX) $(OMP) $*.f90 ; \
        else \
          if [ -n "$(OMP)" ] ; then echo COMPILING $*.F WITHOUT OMP ; fi ; \
	  $(FC) -c $(PROMOTION) $(FCNOOPT) $(FCBASEOPTS) $(MODULE_DIRS) $(FCSUFFIX) $*.f90 ; \
        fi

#solve_em.o :
	$(RM) $@
	$(SED_FTN) $*.F > $*.b 
	$(CPP) -I$(WRF_SRC_ROOT_DIR)/inc $(CPPFLAGS) $*.b  > $*.f90
	$(RM) $*.b
	$(FC) -o $@ -c $(FCFLAGS) $(MODULE_DIRS) $(PROMOTION) $(FCSUFFIX) $(SOLVE_EM_SPECIAL) $(OMP) $*.f90

module_sf_ruclsm.o : module_sf_ruclsm.F

module_sf_ruclsm.o :
	$(RM) $@
	$(SED_FTN) $*.F > $*.b 
	$(CPP) -I$(WRF_SRC_ROOT_DIR)/inc $(CPPFLAGS) $(OMPCPP) $*.b  > $*.f90
	$(RM) $*.b
	if $(FGREP) '!$$OMP' $*.f90 ; then \
          echo COMPILING $*.F WITH OMP ; \
          if [ -n "$(OMP)" ] ; then echo COMPILING $*.F WITH OMP ; fi ; \
	  $(FC) -c $(PROMOTION) $(FCREDUCEDOPT) $(FCBASEOPTS) $(MODULE_DIRS) $(FCSUFFIX) $(OMP) $*.f90 ; \
        else \
          if [ -n "$(OMP)" ] ; then echo COMPILING $*.F WITHOUT OMP ; fi ; \
	  $(FC) -c $(PROMOTION) $(FCREDUCEDOPT) $(FCBASEOPTS) $(MODULE_DIRS) $(FCSUFFIX) $*.f90 ; \
        fi

# compile without OMP
input_wrf.o \
module_domain.o \
module_domain_type.o \
module_physics_init.o \
module_io.o \
wrf_bdyin.o \
wrf_bdyout.o \
wrf_ext_read_field.o \
wrf_ext_write_field.o \
wrf_histin.o \
wrf_histout.o \
wrf_inputin.o \
wrf_inputout.o \
wrf_restartin.o \
wrf_restartout.o \
module_state_description.o \
module_alloc_space.o \
module_alloc_space_0.o \
module_alloc_space_1.o \
module_alloc_space_2.o \
module_alloc_space_3.o \
module_alloc_space_4.o \
module_alloc_space_5.o \
module_alloc_space_6.o \
module_alloc_space_7.o \
module_alloc_space_8.o \
module_alloc_space_9.o \
module_comm_dm.o \
module_comm_dm_0.o \
module_comm_dm_1.o \
module_comm_dm_2.o \
module_comm_dm_3.o \
module_comm_nesting_dm.o \
module_configure.o :
	$(RM) $@
	$(CPP) -I$(WRF_SRC_ROOT_DIR)/inc $(CPPFLAGS) $(OMPCPP) $*.F  > $*.bb
	$(SED_FTN) $*.bb | $(CPP) > $*.f90
	@ if echo $(ARCHFLAGS) | $(FGREP) 'DVAR4D'; then \
          echo COMPILING $*.F for 4DVAR ; \
          $(WRF_SRC_ROOT_DIR)/var/build/da_name_space.pl $*.f90 > $*.f90.tmp ; \
          mv $*.f90.tmp $*.f90 ; \
        fi
	$(RM) $*.b $*.bb
	$(FC) -c $(PROMOTION) $(FCSUFFIX) $(FCNOOPT) $(FCBASEOPTS) $(MODULE_DIRS) $*.f90
They are very optimized for the processor with AVX2 istructions :mrgreen:
Ok I'll try to make some tests with and without wrfda, and with or without binaries auto-compiled, let's see what changes !

Post Reply