Ignore:
Timestamp:
Jun 8, 2011, 3:26:57 PM (14 years ago)
Author:
emillour
Message:

Mars GCM:

Significant update on how the number of scatterers is managed:

Instead of having to manualy change 'nearkind' in dimradmars.h, the
number of scatterers must now be set when compiling, using makegcm
"makegcm -s 1" for one scatterer (dust) or "makegcm -s 2" (e.g. dust
and water ice), default behaviour (ie not specifying -s #) is -s 1
Modified phymars/dimradmars.h , added directory phymars/scatterers
with script make_scatterers , and adapted makegcm* scripts.

also removed some superfluous files (tmp, tmp77, ...).

EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/makegcm

    r38 r148  
    1313set grille=reg
    1414set dyntype="dyn"
     15set scatterers="1"
    1516########################################################################
    1617# path a changer contenant les sources et les objets du modele
     
    290291             $LMDGCM/libf/grid/dimension/makdim
    291292
     293-s nscat   Number of radiatively active scatterers
     294
    292295-p PHYS    Selects the set of physical parameterizations
    293296           you want to compile the model with.
     
    346349     case -p
    347350        set physique="$2" ; set phys="PHYS=$physique" ; shift ; shift ; goto top
     351
     352     case -s
     353        set scatterers="$2" ; shift ; goto top
    348354
    349355     case -g
     
    459465# build final name of libraries directory:
    460466if ( "$dyntype" == "olddyn" ) then
    461   set nomlib=${nomlib}_${dim_}_t${ntrac}_${grille}_olddyn
     467  set nomlib=${nomlib}_${dim_}_t${ntrac}_s${scatterers}_${grille}_olddyn
    462468else
    463   set nomlib=${nomlib}_${dim_}_t${ntrac}_${grille}
     469  set nomlib=${nomlib}_${dim_}_t${ntrac}_s${scatterers}_${grille}
    464470endif
    465471
     
    507513cd $libf/grid
    508514if ( -f dimensions.h ) then
    509   echo "ATTENTION: vous etes sans doute en train de compiler le modele par ailleurs"
    510   echo "Attendez que la premiere compilation soit terminee pour relancer la suivante."
    511   echo "Si vous etes sur que vous ne compilez pas le modele par ailleurs,"
    512   echo "vous pouvez continuer en repondant oui."
    513   echo "Voulez-vous vraiment continuer?"
    514   if ( $< == "oui" ) then
     515  echo "WARNING: you are probably already compiling the model (perhaps"
     516  echo " elsewhere). Wait until the first compilation ends before "
     517  echo " compiling a different configuration."
     518  echo "If you are sure that you are not already compiling, then you"
     519  echo " may continue this compilation by answering yes."
     520  echo "Do you want to continue?"
     521  if ( $< == "yes" ) then
    515522    #remove old dimensions.h file
    516523    \rm -f $libf/grid/dimensions.h
     524    #remove old scatterers.h file
     525    \rm -f $libf/phymars/scatterers.h
    517526  else
    518527    exit
     
    525534# echo contents of dimensions.h to standard output
    526535cat $libf/grid/dimensions.h
     536
     537cd $libf/phymars/scatterers
     538# Build the appropriate 'scatterers.h' file
     539./make_scatterers $scatterers
     540# echo contents of scatterers.h to standard output
     541cat $libf/phymars/scatterers.h
    527542
    528543cd $LMDGCM
     
    681696endif
    682697
    683 
    684 
    685 #
    686 # les deux test suivants sont "temporaires" pour pallier des "faiblesses" du
    687 # compilateur fortran Sun: f90: SC4.0 11 Sep 1995 FORTRAN 90 1.1
    688 #
    689 #if ($code == 'create_limit' && $SUN) then
    690 #   set link=f77
    691 #   set opt_link="-L$NCDFLIB -lnetcdf"
    692 #endif
    693 
    694 #if ($code == 'create_etat0' && $SUN) then
    695 #   if ( ! -f $libo/libdyn3d.a ) then
    696 #     echo "Priere de compiler gcm en premier pour des raisons d'optimisation"
    697 #     \rm $libf/grid/dimensions.h
    698 #     exit
    699 #   endif
    700 #   set optim90=" -dalign -fixed "
    701 #   set opt_link="-L$IOIPSLDIR -lioipsl  -L$NCDFLIB -lnetcdf"
    702 #   set link="$f90 $optim90"
    703 #   touch $LMDGCM/libf/dyn3d/startvar.F
    704 #   touch $LMDGCM/libf/dyn3d/etat0_netcdf.F
    705 #endif
    706 
    707 #
    708 # Encore un test temporaire: probleme de compilation sur VPP
    709 # l'optimisation de startvar se passe mal
    710 #
    711 #if ($code == 'create_etat0' && $VPP) then
    712 #   if ( ! -f $libo/libdyn3d.a ) then
    713 #     echo "Priere de compiler gcm en premier pour des raisons d'optimisation"
    714 #     \rm $libf/grid/dimensions.h                                             
    715 #     exit                       
    716 #   endif
    717 #   set optim90="$optim90"" -X9 -w"
    718 #   set opt_link="-L$NCDFLIB -lnetcdf"
    719 #   touch $LMDGCM/libf/dyn3d/startvar.F
    720 #   touch $LMDGCM/libf/dyn3d/etat0_netcdf.F
    721 #endif
    722 
    723 #
    724 # etat0_netcdf a besoin d'info de la physique
    725 # A revoir
    726698set include="$include"" -I$libf/phy$physique"
    727699
     
    812784PROG=$code
    813785
    814 \rm $libf/grid/dimensions.h
     786# cleanup, remove dimensions.h and scatterers.h
     787\rm -f $libf/grid/dimensions.h
     788\rm -f $libf/phymars/scatterers.h
Note: See TracChangeset for help on using the changeset viewer.