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_ifort

    r141 r148  
    1313set grille=reg
    1414set dyntype="dyn"
     15set scatterers="1"
    1516########################################################################
    1617# path a changer contenant les sources et les objets du modele
     
    279280             $LMDGCM/libf/grid/dimension/makdim
    280281
     282-s nscat   Number of radiatively active scatterers
     283
    281284-p PHYS    Selects the set of physical parameterizations
    282285           you want to compile the model with.
     
    335338     case -p
    336339        set physique="$2" ; set phys="PHYS=$physique" ; shift ; shift ; goto top
     340
     341     case -s
     342        set scatterers="$2" ; shift ; goto top
    337343
    338344     case -g
     
    449455# build final name of libraries directory:
    450456if ( "$dyntype" == "olddyn" ) then
    451   set nomlib=${nomlib}_${dim_}_t${ntrac}_${grille}_olddyn
     457  set nomlib=${nomlib}_${dim_}_t${ntrac}_s${scatterers}_${grille}_olddyn
    452458else
    453   set nomlib=${nomlib}_${dim_}_t${ntrac}_${grille}
     459  set nomlib=${nomlib}_${dim_}_t${ntrac}_s${scatterers}_${grille}
    454460endif
    455461
     
    497503cd $libf/grid
    498504if ( -f dimensions.h ) then
    499   echo "ATTENTION: vous etes sans doute en train de compiler le modele par ailleurs"
    500   echo "Attendez que la premiere compilation soit terminee pour relancer la suivante."
    501   echo "Si vous etes sur que vous ne compilez pas le modele par ailleurs,"
    502   echo "vous pouvez continuer en repondant oui."
    503   echo "Voulez-vous vraiment continuer?"
    504   if ( $< == "oui" ) then
     505  echo "WARNING: you are probably already compiling the model (perhaps"
     506  echo " elsewhere). Wait until the first compilation ends before "
     507  echo " compiling a different configuration."
     508  echo "If you are sure that you are not already compiling, then you"
     509  echo " may continue this compilation by answering yes."
     510  echo "Do you want to continue?"
     511  if ( $< == "yes" ) then
    505512    #remove old dimensions.h file
    506513    \rm -f $libf/grid/dimensions.h
     514    #remove old scatterers.h file
     515    \rm -f $libf/phymars/scatterers.h
    507516  else
    508517    exit
     
    515524# echo contents of dimensions.h to standard output
    516525cat $libf/grid/dimensions.h
     526
     527cd $libf/phymars/scatterers
     528# Build the appropriate 'scatterers.h' file
     529./make_scatterers $scatterers
     530# echo contents of scatterers.h to standard output
     531cat $libf/phymars/scatterers.h
    517532
    518533cd $LMDGCM
     
    672687endif
    673688
    674 
    675 
    676 #
    677 # les deux test suivants sont "temporaires" pour pallier des "faiblesses" du
    678 # compilateur fortran Sun: f90: SC4.0 11 Sep 1995 FORTRAN 90 1.1
    679 #
    680 #if ($code == 'create_limit' && $SUN) then
    681 #   set link=f77
    682 #   set opt_link="-L$NCDFLIB -lnetcdf"
    683 #endif
    684 
    685 #if ($code == 'create_etat0' && $SUN) then
    686 #   if ( ! -f $libo/libdyn3d.a ) then
    687 #     echo "Priere de compiler gcm en premier pour des raisons d'optimisation"
    688 #     \rm $libf/grid/dimensions.h
    689 #     exit
    690 #   endif
    691 #   set optim90=" -dalign -fixed "
    692 #   set opt_link="-L$IOIPSLDIR -lioipsl  -L$NCDFLIB -lnetcdf"
    693 #   set link="$f90 $optim90"
    694 #   touch $LMDGCM/libf/dyn3d/startvar.F
    695 #   touch $LMDGCM/libf/dyn3d/etat0_netcdf.F
    696 #endif
    697 
    698 #
    699 # Encore un test temporaire: probleme de compilation sur VPP
    700 # l'optimisation de startvar se passe mal
    701 #
    702 #if ($code == 'create_etat0' && $VPP) then
    703 #   if ( ! -f $libo/libdyn3d.a ) then
    704 #     echo "Priere de compiler gcm en premier pour des raisons d'optimisation"
    705 #     \rm $libf/grid/dimensions.h                                             
    706 #     exit                       
    707 #   endif
    708 #   set optim90="$optim90"" -X9 -w"
    709 #   set opt_link="-L$NCDFLIB -lnetcdf"
    710 #   touch $LMDGCM/libf/dyn3d/startvar.F
    711 #   touch $LMDGCM/libf/dyn3d/etat0_netcdf.F
    712 #endif
    713 
    714 #
    715 # etat0_netcdf a besoin d'info de la physique
    716 # A revoir
    717689set include="$include"" -I$libf/phy$physique"
    718690
     
    804776PROG=$code
    805777
    806 \rm $libf/grid/dimensions.h
     778# cleanup, remove dimensions.h and scatterers.h
     779\rm -f $libf/grid/dimensions.h
     780\rm -f $libf/phymars/scatterers.h
Note: See TracChangeset for help on using the changeset viewer.