Changeset 1403 for trunk/LMDZ.MARS/makegcm_gfortran
- Timestamp:
- Mar 31, 2015, 3:49:07 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/makegcm_gfortran
r1246 r1403 8 8 set physique=mars 9 9 set phys="PHYS=$physique" 10 set include='-I$(LIBF)/grid -I$(LIBF)/ bibio -I. -I$(LIBF)/aeronomars'10 set include='-I$(LIBF)/grid -I$(LIBF)/misc -I. -I$(LIBF)/dynlonlat_phylonlat' 11 11 set ntrac = 1 12 12 set filtre=filtrez … … 14 14 set dyntype="dyn" 15 15 set full="" 16 #src_dirs: directories containing source files 17 set src_dirs="grid misc" 18 16 19 ######################################################################## 17 20 # path a changer contenant les sources et les objets du modele … … 403 406 if ( "$physique" == 'nophys' ) then 404 407 set phys="L_PHY= LIBPHY=" 405 endif 406 408 else 409 set src_dirs="$src_dirs aerono$physique phy$physique" 410 set include="$include "'-I$(LIBF)/aerono'"$physique"' -I$(LIBF)/phy'"$physique" 411 endif 412 set libdyn_phy="" 413 set LIBDYN_PHYS="" 407 414 ######################################################################## 408 415 # choix du nombre de traceur par defaut si il n'a pas ete choisi, … … 486 493 set include="$include "'-I$(LIBF)/dyn2d ' 487 494 set dimh=$dim 488 else 495 endif 496 if ( "$dimc" == "3" ) then 489 497 if ( "$dyntype" == "olddyn" ) then 490 498 set include="$include "'-I$(LIBF)/olddyn3d ' 499 set src_dirs="$src_dirs olddyn3d dynlonlat_phylonlat dynlonlat_phylonlat/phy$physique" 491 500 else 492 501 set include="$include "'-I$(LIBF)/dyn3d ' 502 set src_dirs="$src_dirs dyn3d dynlonlat_phylonlat dynlonlat_phylonlat/phy$physique" 493 503 endif 504 set libdyn_phy="-ldynlonlat_phylonlat" 505 set LIBDYN_PHYS='$(LIBO)/libdynlonlat_phylonlat.a' 494 506 set dimh=`echo $dim | awk ' { print $1 "." $2 } '` 495 507 endif … … 550 562 ## NB: we still need to have L_DYN=libdyn3d to reach routines and module 551 563 ## objects which are located in dyn3d 552 set dyn="L_DYN=-ldyn3d DYN= L_FILTRE= DIRMAIN=phy$physique " 564 set dyntype="" 565 set filtre="L_DYN= DYN= FILTRE= L_FILTRE= " 566 set dyn="L_DYN= DYN= L_FILTRE= " 567 set dirmain="phy$physique/dyn1d" 568 set src_dirs="$src_dirs phy$physique/dyn1d " 569 set include="$include "' -I$(LIBF)/phy'"$physique"'/dyn1d' 553 570 endif 554 571 endif … … 590 607 if ( `expr $dimc \> 2` == 1 ) then 591 608 set filtre="FILTRE=$filtre" 609 if ( "$dyntype" == "olddyn" ) then 610 set src_dirs="$src_dirs oldfiltrez" 611 else 612 set src_dirs="$src_dirs filtrez" 613 endif 592 614 else 593 set filtre="FILTRE= L_FILTRE= "615 set filtre="FILTRE= L_FILTRE= L_DYN= " 594 616 endif 595 617 echo "MACRO FILTRE $filtre" … … 633 655 \cp tmp90 liste_des_sources_f90 634 656 echo "On recree le makefile" 635 if ("$dyntype" == "olddyn") then 636 ./create_make_gcm olddyn3d grid bibio aeronomars phy$physique >! tmp 637 else 638 ./create_make_gcm dyn3d grid bibio aeronomars phy$physique >! tmp 639 endif 657 echo "src_dirs: $src_dirs" 658 create_make_gcm $src_dirs >! tmp 640 659 \mv tmp makefile 641 660 echo "Nouveau makefile cree." … … 738 757 cd $localdir 739 758 740 ## locate main program (could be in dyn3d or phy$physique741 ## 759 ## locate main program (could be in dyn3d or dynlonlat_phylonlat/phy$physique 760 ## or phy$physique/dyn1d and could be .F or .F90) 742 761 set source_code=${code}.F 762 set dirmain=dyn${dimc}d 743 763 if ( -f $LMDGCM/libf/dyn3d/${code}.F90 ) then 744 764 set source_code=${code}.F90 745 765 endif 746 if ( -f $LMDGCM/libf/phy${physique}/${code}.F ) then 766 if ( -f $LMDGCM/libf/phy${physique}/dyn1d/${code}.F ) then 767 set dirmain=phy${physique}/dyn1d 747 768 set source_code=${code}.F 748 769 endif 749 if ( -f $LMDGCM/libf/phy${physique}/${code}.F90 ) then 770 if ( -f $LMDGCM/libf/phy${physique}/dyn1d/${code}.F90 ) then 771 set dirmain=phy${physique}/dyn1d 750 772 set source_code=${code}.F90 751 773 endif 752 753 ## locate directory where main program is located 754 if ( $dimension == 3 ) then 755 if ( -f $LMDGCM/libf/dyn3d/${source_code} ) then 756 set dyn="DIRMAIN=dyn3d " 757 endif 758 if ( -f $LMDGCM/libf/phy${physique}/${source_code} ) then 759 set dyn="DIRMAIN=phy${physique} " 760 endif 774 if ( -f $LMDGCM/libf/dynlonlat_phylonlat/phy${physique}/${code}.F ) then 775 set dirmain=dynlonlat_phylonlat/phy${physique} 776 set source_code=${code}.F 777 endif 778 if ( -f $LMDGCM/libf/dynlonlat_phylonlat/phy${physique}/${code}.F90 ) then 779 set dirmain=dynlonlat_phylonlat/phy${physique} 780 set source_code=${code}.F90 761 781 endif 762 782 … … 769 789 $filtre \ 770 790 LIBO=$libo \ 771 $dyn \772 791 $phys \ 792 LIBDYN_PHYS=${LIBDYN_PHYS} \ 773 793 DIM=$dimc \ 774 794 DYNTYPE="$dyntype" \ 795 L_DYN_PHY="$libdyn_phy" \ 775 796 L_ADJNT="$adjnt" \ 776 797 LOCAL_DIR="$localdir" \ … … 783 804 MOD_SUFFIX=$mod_suffix \ 784 805 AR=$ar \ 806 DIRMAIN=$dirmain \ 785 807 SOURCE=$source_code \ 786 808 PROG=$code … … 795 817 $filtre \ 796 818 LIBO=$libo \ 797 $dyn \798 819 $phys \ 820 LIBDYN_PHYS=${LIBDYN_PHYS} \ 799 821 DIM=$dimc \ 800 822 DYNTYPE="$dyntype" \ 823 L_DYN_PHY="$libdyn_phy" \ 801 824 L_ADJNT="$adjnt" \ 802 825 LOCAL_DIR="$localdir" \ … … 809 832 MOD_SUFFIX=$mod_suffix \ 810 833 AR=$ar \ 834 DIRMAIN=$dirmain \ 811 835 SOURCE=$source_code \ 812 836 PROG=$code
Note: See TracChangeset
for help on using the changeset viewer.