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_g95

    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_g95/lib
    30 #  setenv NCDFINC /donnees/emlmd/netcdf64-4.0.1_g95/include
     30  setenv NCDFLIB /donnees/emlmd/netcdf64-4.0.1_g95/lib
     31  setenv NCDFINC /donnees/emlmd/netcdf64-4.0.1_g95/include
    3132#else
    3233#  setenv NCDFLIB /donnees/emlmd/netcdf-4.0.1_g95/lib
     
    736737cd $localdir
    737738
     739## locate main program (could be in dyn3d or phy$physique
     740##                      and could be .F or .F90)
     741set source_code=${code}.F
     742if ( -f $LMDGCM/libf/dyn3d/${code}.F90 ) then
     743  set source_code=${code}.F90
     744endif
     745if ( -f $LMDGCM/libf/phy${physique}/${code}.F ) then
     746  set source_code=${code}.F
     747endif
     748if ( -f $LMDGCM/libf/phy${physique}/${code}.F90 ) then
     749  set source_code=${code}.F90
     750endif
     751
     752## locate directory where main program is located
     753if ( $dimension == 3 ) then
     754  if ( -f $LMDGCM/libf/dyn3d/${source_code} ) then
     755    set dyn="DIRMAIN=dyn3d "
     756  endif
     757  if ( -f $LMDGCM/libf/phy${physique}/${source_code} ) then
     758    set dyn="DIRMAIN=phy${physique} "
     759  endif
     760endif
     761
    738762echo $make -f $LMDGCM/makefile \
    739763OPTION_DEP="$opt_dep" OPTION_LINK="$opt_link" \
     
    758782MOD_SUFFIX=$mod_suffix \
    759783AR=$ar \
     784SOURCE=$source_code \
    760785PROG=$code
    761786
     
    783808MOD_SUFFIX=$mod_suffix \
    784809AR=$ar \
     810SOURCE=$source_code \
    785811PROG=$code
    786812
Note: See TracChangeset for help on using the changeset viewer.