Ignore:
Timestamp:
Feb 9, 2012, 3:48:30 PM (13 years ago)
Author:
emillour
Message:

Mars GCM:

  • Updated the makegcm(s) so that default behaviour is to set LMDGCM env variable to be the directory in which the makegcm script is. Updated the makegcm_* to use "SOURCE" to identify main program to compile.
  • Adapted "create_make_gcm" script so that it can compile a main program that is either something.F or something.F90. Also added that object files are removed from archive before compiling a new version.

EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/makegcm_gfortran

    r148 r519  
    2121####  relying on the C-shell environment variables)
    2222# default LMDGCM to where makegcm script is located:
    23 #setenv LMDGCM "`dirname $0`"
     23set scriptdir=`dirname $0`
     24setenv LMDGCM `readlink -f $scriptdir`
    2425# You may set LIBOGCM to something else; otherwise we default to:
    25 #setenv LIBOGCM $LMDGCM/libo
     26setenv LIBOGCM $LMDGCM/libo
    2627## NetCDF Libraries: what follows is OK for LMD 32 and 64bit Linux Machines
    2728#if ( `uname -m` == "x86_64" ) then
    2829# 64 bit machines
    29 #  setenv NCDFLIB /donnees/emlmd/netcdf64-4.0.1_gfortran/lib
    30 #  setenv NCDFINC /donnees/emlmd/netcdf64-4.0.1_gfortran/include
     30  setenv NCDFLIB /donnees/emlmd/netcdf64-4.0.1_gfortran/lib
     31  setenv NCDFINC /donnees/emlmd/netcdf64-4.0.1_gfortran/include
    3132#else
    3233#  setenv NCDFLIB /donnees/emlmd/netcdf-4.0.1_gfortran/lib
     
    734735cd $localdir
    735736
     737## locate main program (could be in dyn3d or phy$physique
     738##                      and could be .F or .F90)
     739set source_code=${code}.F
     740if ( -f $LMDGCM/libf/dyn3d/${code}.F90 ) then
     741  set source_code=${code}.F90
     742endif
     743if ( -f $LMDGCM/libf/phy${physique}/${code}.F ) then
     744  set source_code=${code}.F
     745endif
     746if ( -f $LMDGCM/libf/phy${physique}/${code}.F90 ) then
     747  set source_code=${code}.F90
     748endif
     749
     750## locate directory where main program is located
     751if ( $dimension == 3 ) then
     752  if ( -f $LMDGCM/libf/dyn3d/${source_code} ) then
     753    set dyn="DIRMAIN=dyn3d "
     754  endif
     755  if ( -f $LMDGCM/libf/phy${physique}/${source_code} ) then
     756    set dyn="DIRMAIN=phy${physique} "
     757  endif
     758endif
     759
    736760echo $make -f $LMDGCM/makefile \
    737761OPTION_DEP="$opt_dep" OPTION_LINK="$opt_link" \
     
    756780MOD_SUFFIX=$mod_suffix \
    757781AR=$ar \
     782SOURCE=$source_code \
    758783PROG=$code
    759784
     
    781806MOD_SUFFIX=$mod_suffix \
    782807AR=$ar \
     808SOURCE=$source_code \
    783809PROG=$code
    784810
Note: See TracChangeset for help on using the changeset viewer.