Skip to content

Commit

Permalink
Merge pull request #1428 from jvgeiger/feature/rtm-gnu-compilers
Browse files Browse the repository at this point in the history
Enable compiling RTM support with GNU compilers
  • Loading branch information
emkemp authored Oct 23, 2023
2 parents 8bf32ce + df420fd commit a22f23b
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 7 deletions.
20 changes: 14 additions & 6 deletions docs/LISF_installation_guide/dependencies.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ NOTE: LDT-only dependency

NOTE: LIS-only dependency

If you wish to enable LIS' RTM support, then you must install the CRTM library from the Joint Centers for Satellite Data Assimilation (JCSDA). First go to http://ftp.emc.ncep.noaa.gov/jcsda/CRTM/Repository/ and fill out the CRTM.Subversion_Account_Request.pdf form. Once you have access to their Subversion repository, checkout revision 9604 of the trunk.
If you wish to enable LIS`' RTM support, then you must install the CRTM library from the Joint Centers for Satellite Data Assimilation (JCSDA). First go to http://ftp.emc.ncep.noaa.gov/jcsda/CRTM/Repository/ and fill out the CRTM.Subversion_Account_Request.pdf form. Once you have access to their Subversion repository, checkout revision 9604 of the trunk.

Please create a directory outside of the LIS source code to checkout the CRTM library into. Then, within that new directory, run:

Expand All @@ -159,25 +159,33 @@ Next compile and install the CRTM library:

NOTE: LIS-only dependency

If you wish to enable LIS' RTM support, then you must manually compile an included library.
If you wish to enable LIS`' RTM support, then you must manually compile an included library.

....
% cd $WORKING/lib/lis-cmem3
% gmake
% LIS_ARCH=linux_ifc make
....

NOTE: If using the GNU compilers, set `LIS_ARCH` to linux_gfortran.

IMPORTANT: linux_ifc and linux_gfortran are the only supported architectures.

==== LIS-CRTM-PROFILE-UTILITY library

NOTE: LIS-only dependency

If you wish to enable LIS' RTM support, then you must manually compile an included library.
If you wish to enable LIS`' RTM support, then you must manually compile an included library.

....
% cd $WORKING/lib/lis-crtm-profile-utility
% gmake
% gmake install
% LIS_ARCH=linux_ifc make
% LIS_ARCH=linux_ifc make install
....

NOTE: If using the GNU compilers, set `LIS_ARCH` to linux_gfortran.

IMPORTANT: linux_ifc and linux_gfortran are the only supported architectures.

=== Second order dependencies

==== OpenJPEG version 2.4.0 (or higher)
Expand Down
11 changes: 11 additions & 0 deletions lis/lib/lis-cmem3/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,24 @@

# Compiler/Linker
ifeq ($(LIS_ARCH),linux_ifc)
FC = ifort
LD = ifort
else ifeq ($(LIS_ARCH),linux_gfortran)
FC = gfortran
LD = gfortran
else
$(error "Please specify the compiler via the LIS_ARCH env variable. Only linux_ifc and linux_gfortran are supported. See the LISF Installation Guide for more information.")
endif

# compiler/linker flags
# Compile with DEBUG messages
#FCFLAGS = -DDEBUG -fpp -g -u -traceback -fpe0 -nomixed_str_len_arg -names lowercase -convert big_endian -assume byterecl -I/home/ytian/proj-disk/libs/CRTM_Profile_Utility_intel_11_1_038/include
# Compile without DEBUG messages
ifeq ($(LIS_ARCH),linux_ifc)
FCFLAGS = -fpp -g -u -traceback -fpe0 -nomixed_str_len_arg -names lowercase -convert big_endian -assume byterecl
else ifeq ($(LIS_ARCH),linux_gfortran)
FCFLAGS = -cpp -g -u -fbacktrace -ffpe-trap=invalid,zero,overflow -fconvert=big-endian
endif
#-I/home/ytian/proj-disk/libs/CRTM_Profile_Utility_intel_11_1_038/include

#LIBS = /home/ytian/proj-disk/libs/CRTM_Profile_Utility_intel_11_1_038/lib/libProfile_Utility.a
Expand Down
9 changes: 8 additions & 1 deletion lis/lib/lis-crtm-profile-utility/make.macros
Original file line number Diff line number Diff line change
Expand Up @@ -509,8 +509,15 @@ LINUX_FLAGS_ABSOFT_PROD = $(LINUX_FLAGS_ABSOFT)

#LINUX_FLAGS = $(LINUX_FLAGS_LAHEY)
#LINUX_FLAGS = $(LINUX_FLAGS_PGI)
LINUX_FLAGS = $(LINUX_FLAGS_INTEL)
#LINUX_FLAGS = $(LINUX_FLAGS_INTEL)
#LINUX_FLAGS = $(LINUX_FLAGS_G95)
#LINUX_FLAGS = $(LINUX_FLAGS_GFORTRAN)
#LINUX_FLAGS = $(LINUX_FLAGS_ABSOFT)

ifeq ($(LIS_ARCH),linux_ifc)
LINUX_FLAGS = $(LINUX_FLAGS_INTEL)
else ifeq ($(LIS_ARCH),linux_gfortran)
LINUX_FLAGS = $(LINUX_FLAGS_GFORTRAN)
else
$(error "Please specify the compiler via the LIS_ARCH env variable. Only linux_ifc and linux_gfortran are supported. See the LISF Installation Guide for more information.")
endif

0 comments on commit a22f23b

Please sign in to comment.