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

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