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_gfortran

    r38 r148  
    1313set grille=reg
    1414set dyntype="dyn"
     15set scatterers="1"
    1516########################################################################
    1617# path a changer contenant les sources et les objets du modele
     
    285286             $LMDGCM/libf/grid/dimension/makdim
    286287
     288-s nscat   Number of radiatively active scatterers
     289
    287290-p PHYS    Selects the set of physical parameterizations
    288291           you want to compile the model with.
     
    341344     case -p
    342345        set physique="$2" ; set phys="PHYS=$physique" ; shift ; shift ; goto top
     346
     347     case -s
     348        set scatterers="$2" ; shift ; goto top
    343349
    344350     case -g
     
    455461# build final name of libraries directory:
    456462if ( "$dyntype" == "olddyn" ) then
    457   set nomlib=${nomlib}_${dim_}_t${ntrac}_${grille}_olddyn
     463  set nomlib=${nomlib}_${dim_}_t${ntrac}_s${scatterers}_${grille}_olddyn
    458464else
    459   set nomlib=${nomlib}_${dim_}_t${ntrac}_${grille}
     465  set nomlib=${nomlib}_${dim_}_t${ntrac}_s${scatterers}_${grille}
    460466endif
    461467
     
    503509cd $libf/grid
    504510if ( -f dimensions.h ) then
    505   echo "ATTENTION: vous etes sans doute en train de compiler le modele par ailleurs"
    506   echo "Attendez que la premiere compilation soit terminee pour relancer la suivante."
    507   echo "Si vous etes sur que vous ne compilez pas le modele par ailleurs,"
    508   echo "vous pouvez continuer en repondant oui."
    509   echo "Voulez-vous vraiment continuer?"
    510   if ( $< == "oui" ) then
     511  echo "WARNING: you are probably already compiling the model (perhaps"
     512  echo " elsewhere). Wait until the first compilation ends before "
     513  echo " compiling a different configuration."
     514  echo "If you are sure that you are not already compiling, then you"
     515  echo " may continue this compilation by answering yes."
     516  echo "Do you want to continue?"
     517  if ( $< == "yes" ) then
    511518    #remove old dimensions.h file
    512519    \rm -f $libf/grid/dimensions.h
     520    #remove old scatterers.h file
     521    \rm -f $libf/phymars/scatterers.h
    513522  else
    514523    exit
     
    521530# echo contents of dimensions.h to standard output
    522531cat $libf/grid/dimensions.h
     532
     533cd $libf/phymars/scatterers
     534# Build the appropriate 'scatterers.h' file
     535./make_scatterers $scatterers
     536# echo contents of scatterers.h to standard output
     537cat $libf/phymars/scatterers.h
    523538
    524539cd $LMDGCM
     
    679694endif
    680695
    681 
    682 
    683 #
    684 # les deux test suivants sont "temporaires" pour pallier des "faiblesses" du
    685 # compilateur fortran Sun: f90: SC4.0 11 Sep 1995 FORTRAN 90 1.1
    686 #
    687 #if ($code == 'create_limit' && $SUN) then
    688 #   set link=f77
    689 #   set opt_link="-L$NCDFLIB -lnetcdf"
    690 #endif
    691 
    692 #if ($code == 'create_etat0' && $SUN) then
    693 #   if ( ! -f $libo/libdyn3d.a ) then
    694 #     echo "Priere de compiler gcm en premier pour des raisons d'optimisation"
    695 #     \rm $libf/grid/dimensions.h
    696 #     exit
    697 #   endif
    698 #   set optim90=" -dalign -fixed "
    699 #   set opt_link="-L$IOIPSLDIR -lioipsl  -L$NCDFLIB -lnetcdf"
    700 #   set link="$f90 $optim90"
    701 #   touch $LMDGCM/libf/dyn3d/startvar.F
    702 #   touch $LMDGCM/libf/dyn3d/etat0_netcdf.F
    703 #endif
    704 
    705 #
    706 # Encore un test temporaire: probleme de compilation sur VPP
    707 # l'optimisation de startvar se passe mal
    708 #
    709 #if ($code == 'create_etat0' && $VPP) then
    710 #   if ( ! -f $libo/libdyn3d.a ) then
    711 #     echo "Priere de compiler gcm en premier pour des raisons d'optimisation"
    712 #     \rm $libf/grid/dimensions.h                                             
    713 #     exit                       
    714 #   endif
    715 #   set optim90="$optim90"" -X9 -w"
    716 #   set opt_link="-L$NCDFLIB -lnetcdf"
    717 #   touch $LMDGCM/libf/dyn3d/startvar.F
    718 #   touch $LMDGCM/libf/dyn3d/etat0_netcdf.F
    719 #endif
    720 
    721 #
    722 # etat0_netcdf a besoin d'info de la physique
    723 # A revoir
    724696set include="$include"" -I$libf/phy$physique"
    725697
     
    811783PROG=$code
    812784
    813 \rm $libf/grid/dimensions.h
     785# cleanup, remove dimensions.h and scatterers.h
     786\rm -f $libf/grid/dimensions.h
     787\rm -f $libf/phymars/scatterers.h
Note: See TracChangeset for help on using the changeset viewer.