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_ifort

    r352 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:
    2526setenv LIBOGCM $LMDGCM/libo
     
    740741cd $localdir
    741742
     743## locate main program (could be in dyn3d or phy$physique
     744##                      and could be .F or .F90)
     745set source_code=${code}.F
     746if ( -f $LMDGCM/libf/dyn3d/${code}.F90 ) then
     747  set source_code=${code}.F90
     748endif
     749if ( -f $LMDGCM/libf/phy${physique}/${code}.F ) then
     750  set source_code=${code}.F
     751endif
     752if ( -f $LMDGCM/libf/phy${physique}/${code}.F90 ) then
     753  set source_code=${code}.F90
     754endif
     755
     756## locate directory where main program is located
     757if ( $dimension == 3 ) then
     758  if ( -f $LMDGCM/libf/dyn3d/${source_code} ) then
     759    set dyn="DIRMAIN=dyn3d "
     760  endif
     761  if ( -f $LMDGCM/libf/phy${physique}/${source_code} ) then
     762    set dyn="DIRMAIN=phy${physique} "
     763  endif
     764endif
     765
    742766echo $make -f $LMDGCM/makefile \
    743767OPTION_DEP="$opt_dep" OPTION_LINK="$opt_link" \
     
    762786MOD_SUFFIX=$mod_suffix \
    763787AR=$ar \
     788SOURCE=$source_code \
    764789PROG=$code
    765790
     
    787812MOD_SUFFIX=$mod_suffix \
    788813AR=$ar \
     814SOURCE=$source_code \
    789815PROG=$code
    790816
Note: See TracChangeset for help on using the changeset viewer.