Changeset 1810 for LMDZ5/trunk


Ignore:
Timestamp:
Jul 24, 2013, 10:06:39 AM (11 years ago)
Author:
Ehouarn Millour
Message:

Updating makelmdz and create_makelmdz for :

1 parallelism
2 compilation with various versions of orchidee
3 compilation in 1D mode
4 some cleaning

Also some updates in dyn3dmem:
1 allocate_field_mod.f90 renamed allocate_field_mod.F90
2 module dimensions renamed dimensions_mod
3 module allocate_field renamed allocate_field

FH

Location:
LMDZ5/trunk
Files:
23 edited
1 moved

Legend:

Unmodified
Added
Removed
  • LMDZ5/trunk/create_make_gcm

    r1714 r1810  
    4242echo 'LIBF    = $(GCM)/libf'
    4343if [ "$CRAY" = '0' ] ; then
    44 #   echo 'LIBO    = $(GCM)/libo/$(MACHINE)'
    4544   echo 'LIBO    = $(LIBOGCM)/$(MACHINE)'
    4645else
    4746   echo 'LIBO    = $(GCM)/libo'
    4847fi
    49 #echo 'LOCAL_DIR=$(GCM)'
    50 #echo $localdir
    5148echo "LOCAL_DIR=`echo $localdir`"
    5249echo 'BIBIO    = $(LIBF)/bibio'
     
    180177            strj=`echo $stri | tr [A-Z] [a-z]`
    181178            str2=""
    182             for dirinc in filtrez bibio grid dyn3d $diri $diri/*/ ; do
     179            for dirinc in filtrez bibio grid dyn3d phydev $diri $diri/*/ ; do
    183180# Recherche dans l'ordre hierarchique inverse car seule la derniere
    184181# ligne est conservee
     182               if [ $dirinc = phydev ] ; then
     183                   dirstr='$(PHYS)'
     184                   libstr='phy$(PHYS)'
     185               else
     186                   dirstr=$dirinc
     187                   libstr=$dirinc
     188               fi
    185189               if [ -f $dirinc/$stri ] ; then
    186                   str2='$(LIBF)/'$dirinc/$stri
     190                  str2='$(LIBF)/'$dirstr/$stri
    187191               elif [ -f $dirinc/$strj ] ; then
    188                   str2='$(LIBF)/'$dirinc/$stri
     192                  str2='$(LIBF)/'$dirstr/$stri
    189193               elif [ -f $dirinc/$strj.F90 ]  || [ -f $dirinc/$strj.F ]  ; then
    190                   strlib=`echo $dirinc | awk -F/ ' { print $1 } '`
     194                  strlib=`echo $libstr | awk -F/ ' { print $1 } '`
    191195                  str2='$(LIBO)/lib'$strlib'.a('$strj'.o)'
    192196               fi
  • LMDZ5/trunk/libf/dyn3dmem/advect_new_mod.F90

    r1632 r1810  
    1515  SUBROUTINE advect_new_allocate
    1616  USE bands
    17   USE allocate_field
     17  USE allocate_field_mod
    1818  USE parallel
    19   USE dimensions
     19  USE dimensions_mod
    2020  IMPLICIT NONE
    2121  TYPE(distrib),POINTER :: d
     
    3636 
    3737  SUBROUTINE advect_new_switch_caldyn(dist)
    38   USE allocate_field
     38  USE allocate_field_mod
    3939  USE bands
    4040  USE parallel
  • LMDZ5/trunk/libf/dyn3dmem/advtrac_mod.F90

    r1632 r1810  
    77  SUBROUTINE advtrac_allocate
    88  USE bands
    9   USE allocate_field
     9  USE allocate_field_mod
    1010  USE parallel
    1111  USE infotrac
     
    2222 
    2323  SUBROUTINE advtrac_switch_vanleer(dist)
    24   USE allocate_field
     24  USE allocate_field_mod
    2525  USE bands
    2626  USE parallel
  • LMDZ5/trunk/libf/dyn3dmem/allocate_field_mod.F90

    r1809 r1810  
    1 MODULE allocate_field
     1MODULE allocate_field_mod
    22
    33  INTERFACE allocate_u
     
    158158  SUBROUTINE allocate1d_u2d(field,d)
    159159  USE parallel
    160   USE dimensions
     160  USE dimensions_mod
    161161  IMPLICIT NONE
    162162  REAL,POINTER :: field(:,:)
     
    175175  SUBROUTINE allocate2d_u2d(field,dim1,d)
    176176  USE parallel
    177   USE dimensions
     177  USE dimensions_mod
    178178  IMPLICIT NONE
    179179  REAL,POINTER :: field(:,:,:)
     
    192192  SUBROUTINE allocate3d_u2d(field,dim1,dim2,d)
    193193  USE parallel
    194   USE dimensions
     194  USE dimensions_mod
    195195  IMPLICIT NONE
    196196  REAL,POINTER :: field(:,:,:,:)
     
    211211  SUBROUTINE allocate1d_v2d(field,d)
    212212  USE parallel
    213   USE dimensions
     213  USE dimensions_mod
    214214  IMPLICIT NONE
    215215  REAL,POINTER :: field(:,:)
     
    228228  SUBROUTINE allocate2d_v2d(field,dim1,d)
    229229  USE parallel
    230   USE dimensions
     230  USE dimensions_mod
    231231  IMPLICIT NONE
    232232  REAL,POINTER :: field(:,:,:)
     
    245245  SUBROUTINE allocate3d_v2d(field,dim1,dim2,d)
    246246  USE parallel
    247   USE dimensions
     247  USE dimensions_mod
    248248  IMPLICIT NONE
    249249  REAL,POINTER :: field(:,:,:,:)
     
    511511  USE parallel
    512512  USE mod_hallo
    513   USE dimensions
     513  USE dimensions_mod
    514514  IMPLICIT NONE
    515515  REAL,POINTER :: field(:,:)
     
    548548  USE parallel
    549549  USE mod_hallo
    550   USE dimensions
     550  USE dimensions_mod
    551551  IMPLICIT NONE
    552552  REAL,POINTER :: field(:,:,:)
     
    585585  USE parallel
    586586  USE mod_hallo
    587   USE dimensions
     587  USE dimensions_mod
    588588  IMPLICIT NONE
    589589  REAL,POINTER :: field(:,:,:,:)
     
    625625  USE parallel
    626626  USE mod_hallo
    627   USE dimensions
     627  USE dimensions_mod
    628628  IMPLICIT NONE
    629629  REAL,POINTER :: field(:,:)
     
    662662  USE parallel
    663663  USE mod_hallo
    664   USE dimensions
     664  USE dimensions_mod
    665665  IMPLICIT NONE
    666666  REAL,POINTER :: field(:,:,:)
     
    699699  USE parallel
    700700  USE mod_hallo
    701   USE dimensions
     701  USE dimensions_mod
    702702  IMPLICIT NONE
    703703  REAL,POINTER :: field(:,:,:,:)
     
    733733  END SUBROUTINE switch3d_v2d
    734734
    735 END MODULE allocate_field
    736  
    737  
    738  
    739  
     735END MODULE allocate_field_mod
     736 
     737 
     738 
     739 
  • LMDZ5/trunk/libf/dyn3dmem/caladvtrac_mod.F90

    r1632 r1810  
    2121  SUBROUTINE caladvtrac_allocate
    2222  USE bands
    23   USE allocate_field
     23  USE allocate_field_mod
    2424  USE parallel
    2525  USE infotrac
     
    5555 
    5656  SUBROUTINE caladvtrac_switch_caldyn(dist)
    57   USE allocate_field
     57  USE allocate_field_mod
    5858  USE bands
    5959  USE parallel
     
    7474 
    7575  SUBROUTINE caladvtrac_switch_vanleer(dist)
    76   USE allocate_field
     76  USE allocate_field_mod
    7777  USE bands
    7878  USE parallel
  • LMDZ5/trunk/libf/dyn3dmem/caldyn_mod.F90

    r1632 r1810  
    2020  SUBROUTINE caldyn_allocate
    2121  USE bands
    22   USE allocate_field
     22  USE allocate_field_mod
    2323  USE parallel
    24   USE dimensions
     24  USE dimensions_mod
    2525  USE advect_new_mod,ONLY : advect_new_allocate
    2626  IMPLICIT NONE
     
    4747 
    4848  SUBROUTINE caldyn_switch_caldyn(dist)
    49   USE allocate_field
     49  USE allocate_field_mod
    5050  USE bands
    5151  USE parallel
  • LMDZ5/trunk/libf/dyn3dmem/call_calfis_mod.F90

    r1793 r1810  
    3636  SUBROUTINE call_calfis_allocate
    3737  USE bands
    38   USE allocate_field
     38  USE allocate_field_mod
    3939  USE parallel
    40   USE dimensions
     40  USE dimensions_mod
    4141  USE infotrac
    4242  IMPLICIT NONE
     
    7474  SUBROUTINE call_calfis(itau,lafin,clesphy0,ucov_dyn,vcov_dyn,teta_dyn,masse_dyn,ps_dyn, &
    7575                         phis_dyn,q_dyn,flxw_dyn)
    76   USE dimensions
     76  USE dimensions_mod
    7777  USE parallel
    7878  USE times
  • LMDZ5/trunk/libf/dyn3dmem/call_dissip_mod.F90

    r1673 r1810  
    2222  SUBROUTINE call_dissip_allocate
    2323  USE bands
    24   USE allocate_field
     24  USE allocate_field_mod
    2525  USE parallel
    26   USE dimensions
     26  USE dimensions_mod
    2727  USE dissip_mod, ONLY : dissip_allocate
    2828  IMPLICIT NONE
     
    5050 
    5151  SUBROUTINE call_dissip_switch_dissip(dist)
    52   USE allocate_field
     52  USE allocate_field_mod
    5353  USE bands
    5454  USE parallel
     
    7878 
    7979  SUBROUTINE call_dissip(ucov_dyn,vcov_dyn,teta_dyn,p_dyn,pk_dyn,ps_dyn)
    80   USE dimensions
     80  USE dimensions_mod
    8181  USE parallel
    8282  USE times
  • LMDZ5/trunk/libf/dyn3dmem/dimensions_mod.F90

    r1632 r1810  
    1 MODULE dimensions
     1MODULE dimensions_mod
    22  INCLUDE 'dimensions.h'
    33  INCLUDE 'paramet.h'
    4 END MODULE dimensions
     4END MODULE dimensions_mod
  • LMDZ5/trunk/libf/dyn3dmem/dissip_mod.F90

    r1632 r1810  
    77  SUBROUTINE dissip_allocate
    88  USE bands
    9   USE allocate_field
     9  USE allocate_field_mod
    1010  USE parallel
    11   USE dimensions
     11  USE dimensions_mod
    1212  USE gradiv2_mod, ONLY : gradiv2_allocate
    1313  USE nxgraro2_mod, ONLY : nxgraro2_allocate
     
    2323 
    2424  SUBROUTINE dissip_switch_dissip(dist)
    25   USE allocate_field
     25  USE allocate_field_mod
    2626  USE bands
    2727  USE parallel
  • LMDZ5/trunk/libf/dyn3dmem/divgrad2_mod.F90

    r1632 r1810  
    77  SUBROUTINE divgrad2_allocate
    88  USE bands
    9   USE allocate_field
     9  USE allocate_field_mod
    1010  USE parallel
    11   USE dimensions
     11  USE dimensions_mod
    1212  IMPLICIT NONE
    1313    TYPE(distrib),POINTER :: d
     
    2020 
    2121  SUBROUTINE divgrad2_switch_dissip(dist)
    22   USE allocate_field
     22  USE allocate_field_mod
    2323  USE bands
    2424  USE parallel
  • LMDZ5/trunk/libf/dyn3dmem/dynredem_mod.F90

    r1684 r1810  
    77
    88  SUBROUTINE dynredem_write_u(ncid,id,var,ll)
    9   USE dimensions
     9  USE dimensions_mod
    1010  USE parallel
    1111  USE mod_hallo
     
    7272     
    7373  SUBROUTINE dynredem_write_v(ncid,id,var,ll)
    74   USE dimensions
     74  USE dimensions_mod
    7575  USE parallel
    7676  USE mod_hallo
     
    137137
    138138  SUBROUTINE dynredem_read_u(ncid,id,var,ll)
    139   USE dimensions
     139  USE dimensions_mod
    140140  USE parallel
    141141  USE mod_hallo
  • LMDZ5/trunk/libf/dyn3dmem/gradiv2_mod.F90

    r1632 r1810  
    99  SUBROUTINE gradiv2_allocate
    1010  USE bands
    11   USE allocate_field
     11  USE allocate_field_mod
    1212  USE parallel
    13   USE dimensions
     13  USE dimensions_mod
    1414  IMPLICIT NONE
    1515    TYPE(distrib),POINTER :: d
     
    2424 
    2525  SUBROUTINE gradiv2_switch_dissip(dist)
    26   USE allocate_field
     26  USE allocate_field_mod
    2727  USE bands
    2828  USE parallel
  • LMDZ5/trunk/libf/dyn3dmem/groupe_mod.F90

    r1632 r1810  
    88  SUBROUTINE groupe_allocate
    99  USE bands
    10   USE allocate_field
     10  USE allocate_field_mod
    1111  USE parallel
    1212  USE infotrac
     
    2525 
    2626  SUBROUTINE groupe_switch_caldyn(dist)
    27   USE allocate_field
     27  USE allocate_field_mod
    2828  USE bands
    2929  USE parallel
  • LMDZ5/trunk/libf/dyn3dmem/integrd_mod.F90

    r1632 r1810  
    1111  SUBROUTINE integrd_allocate
    1212  USE bands
    13   USE allocate_field
     13  USE allocate_field_mod
    1414  USE parallel
    15   USE dimensions
     15  USE dimensions_mod
    1616  USE advect_new_mod,ONLY : advect_new_allocate
    1717  IMPLICIT NONE
     
    2828 
    2929  SUBROUTINE integrd_switch_caldyn(dist)
    30   USE allocate_field
     30  USE allocate_field_mod
    3131  USE bands
    3232  USE parallel
  • LMDZ5/trunk/libf/dyn3dmem/leapfrog_loc.F

    r1806 r1810  
    2727       USE mod_filtreg_p
    2828       USE write_field_loc
    29        USE allocate_field
     29       USE allocate_field_mod
    3030       USE call_dissip_mod, ONLY : call_dissip
    3131       USE call_calfis_mod, ONLY : call_calfis
  • LMDZ5/trunk/libf/dyn3dmem/leapfrog_mod.F90

    r1632 r1810  
    3939  SUBROUTINE leapfrog_allocate
    4040  USE bands
    41   USE allocate_field
     41  USE allocate_field_mod
    4242  USE parallel
    43   USE dimensions
     43  USE dimensions_mod
    4444  USE infotrac
    4545  USE caldyn_mod,ONLY : caldyn_allocate
     
    9494 
    9595  SUBROUTINE leapfrog_switch_caldyn(dist)
    96   USE allocate_field
     96  USE allocate_field_mod
    9797  USE bands
    9898  USE parallel
     
    143143 
    144144  SUBROUTINE leapfrog_switch_dissip(dist)
    145   USE allocate_field
     145  USE allocate_field_mod
    146146  USE bands
    147147  USE parallel
  • LMDZ5/trunk/libf/dyn3dmem/mod_hallo.F90

    r1803 r1810  
    6363
    6464  subroutine Init_mod_hallo
    65   USE dimensions
     65  USE dimensions_mod
    6666    implicit none
    6767    integer :: jj_nb_gather(0:mpi_size-1)
     
    196196 
    197197  subroutine Register_SendField(Field,ij,ll,offset,size,target,a_request)
    198   USE dimensions
     198  USE dimensions_mod
    199199  implicit none
    200200
     
    216216     
    217217  subroutine Register_RecvField(Field,ij,ll,offset,size,target,a_request)
    218   USE dimensions
     218  USE dimensions_mod
    219219  implicit none
    220220
     
    239239 
    240240  subroutine Register_SwapField(FieldS,FieldR,ij,ll,jj_Nb_New,a_request)
    241   USE dimensions
     241  USE dimensions_mod
    242242      implicit none
    243243
     
    287287 
    288288  subroutine Register_SwapFieldHallo(FieldS,FieldR,ij,ll,jj_Nb_New,Up,Down,a_request)
    289   USE dimensions
     289  USE dimensions_mod
    290290 
    291291      implicit none
     
    341341  SUBROUTINE Register_SwapField1d_u(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
    342342  USE parallel
    343   USE dimensions
     343  USE dimensions_mod
    344344      IMPLICIT NONE
    345345   
     
    372372  SUBROUTINE Register_SwapField2d_u1d(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
    373373  USE parallel
    374   USE dimensions
     374  USE dimensions_mod
    375375    IMPLICIT NONE
    376376   
     
    406406  SUBROUTINE Register_SwapField3d_u(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
    407407  USE parallel
    408   USE dimensions
     408  USE dimensions_mod
    409409      IMPLICIT NONE
    410410   
     
    441441 SUBROUTINE Register_SwapField1d_u2d(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
    442442  USE parallel
    443   USE dimensions
     443  USE dimensions_mod
    444444
    445445      IMPLICIT NONE
     
    473473  SUBROUTINE Register_SwapField2d_u2d(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
    474474  USE parallel
    475   USE dimensions
     475  USE dimensions_mod
    476476
    477477      IMPLICIT NONE
     
    508508  SUBROUTINE Register_SwapField3d_u2d(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
    509509  USE parallel
    510   USE dimensions
     510  USE dimensions_mod
    511511      IMPLICIT NONE
    512512   
     
    547547  SUBROUTINE Register_SwapField1d_v(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
    548548  USE parallel
    549   USE dimensions
     549  USE dimensions_mod
    550550      IMPLICIT NONE
    551551   
     
    578578  SUBROUTINE Register_SwapField2d_v1d(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
    579579  USE parallel
    580   USE dimensions
     580  USE dimensions_mod
    581581      IMPLICIT NONE
    582582   
     
    612612  SUBROUTINE Register_SwapField3d_v(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
    613613  USE parallel
    614   USE dimensions
     614  USE dimensions_mod
    615615      IMPLICIT NONE
    616616   
     
    648648  SUBROUTINE Register_SwapField1d_v2d(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
    649649  USE parallel
    650   USE dimensions
     650  USE dimensions_mod
    651651      IMPLICIT NONE
    652652   
     
    679679  SUBROUTINE Register_SwapField2d_v2d(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
    680680  USE parallel
    681   USE dimensions
     681  USE dimensions_mod
    682682      IMPLICIT NONE
    683683   
     
    713713  SUBROUTINE Register_SwapField3d_v2d(FieldS,FieldR,new_dist,a_request,old_dist,up,down)
    714714  USE parallel
    715   USE dimensions
     715  USE dimensions_mod
    716716      IMPLICIT NONE
    717717   
     
    748748  SUBROUTINE Register_SwapField_gen_u(FieldS,FieldR,ll,old_dist,new_dist,Up,Down,a_request)
    749749  USE parallel
    750   USE dimensions
     750  USE dimensions_mod
    751751      IMPLICIT NONE
    752752   
     
    801801  SUBROUTINE Register_SwapField_gen_v(FieldS,FieldR,ll,old_dist,new_dist,Up,Down,a_request)
    802802  USE parallel
    803   USE dimensions
     803  USE dimensions_mod
    804804    IMPLICIT NONE
    805805   
     
    860860 
    861861  subroutine Register_Hallo(Field,ij,ll,RUp,Rdown,SUp,SDown,a_request)
    862   USE dimensions
     862  USE dimensions_mod
    863863      implicit none
    864864
     
    927927
    928928  subroutine Register_Hallo_u(Field,ll,RUp,Rdown,SUp,SDown,a_request)
    929   USE dimensions
     929  USE dimensions_mod
    930930      implicit none
    931931#ifdef CPP_MPI
     
    992992
    993993  subroutine Register_Hallo_v(Field,ll,RUp,Rdown,SUp,SDown,a_request)
    994   USE dimensions
     994  USE dimensions_mod
    995995      implicit none
    996996#ifdef CPP_MPI
     
    10571057   
    10581058    subroutine SendRequest(a_Request)
    1059     USE dimensions
     1059    USE dimensions_mod
    10601060      implicit none
    10611061
     
    11811181   
    11821182   subroutine WaitRequest(a_Request)
    1183    USE dimensions
     1183   USE dimensions_mod
    11841184   implicit none
    11851185   
     
    12751275     
    12761276   subroutine WaitSendRequest(a_Request)
    1277    USE dimensions
     1277   USE dimensions_mod
    12781278   implicit none
    12791279   
     
    13311331   
    13321332   subroutine WaitRecvRequest(a_Request)
    1333    USE dimensions
     1333   USE dimensions_mod
    13341334   implicit none
    13351335   
     
    14121412   
    14131413    subroutine CopyField(FieldS,FieldR,ij,ll,jj_Nb_New)
    1414     USE dimensions
     1414    USE dimensions_mod
    14151415 
    14161416      implicit none
     
    14501450
    14511451  subroutine CopyFieldHallo(FieldS,FieldR,ij,ll,jj_Nb_New,Up,Down)
    1452   USE dimensions
     1452  USE dimensions_mod
    14531453 
    14541454      implicit none
     
    14901490
    14911491   subroutine Gather_field_u(field_loc,field_glo,ll)
    1492    USE dimensions
     1492   USE dimensions_mod
    14931493   implicit none
    14941494     integer :: ll
     
    15131513       
    15141514   subroutine Gather_field_v(field_loc,field_glo,ll)
    1515    USE dimensions
     1515   USE dimensions_mod
    15161516   implicit none
    15171517     integer :: ll
     
    15411541     
    15421542   subroutine Scatter_field_u(field_glo,field_loc,ll)
    1543    USE dimensions
     1543   USE dimensions_mod
    15441544   implicit none
    15451545     integer :: ll
     
    15751575
    15761576   subroutine Scatter_field_v(field_glo,field_loc,ll)
    1577    USE dimensions
     1577   USE dimensions_mod
    15781578   implicit none
    15791579     integer :: ll
  • LMDZ5/trunk/libf/dyn3dmem/nxgraro2_mod.F90

    r1632 r1810  
    99  SUBROUTINE nxgraro2_allocate
    1010  USE bands
    11   USE allocate_field
     11  USE allocate_field_mod
    1212  USE parallel
    13   USE dimensions
     13  USE dimensions_mod
    1414  IMPLICIT NONE
    1515    TYPE(distrib),POINTER :: d
     
    2424 
    2525  SUBROUTINE nxgraro2_switch_dissip(dist)
    26   USE allocate_field
     26  USE allocate_field_mod
    2727  USE bands
    2828  USE parallel
  • LMDZ5/trunk/libf/dyn3dmem/parallel.F90

    r1678 r1810  
    369369#ifdef CPP_COUPLE
    370370    use mod_prism_proto
    371 #endif
    372 #ifdef CPP_EARTH
    373371! Ehouarn: surface_data module is in 'phylmd' ...
    374372      use surface_data, only : type_ocean
  • LMDZ5/trunk/libf/dyn3dmem/vlspltgen_mod.F90

    r1632 r1810  
    1212  SUBROUTINE vlspltgen_allocate
    1313  USE bands
    14   USE allocate_field
     14  USE allocate_field_mod
    1515  USE parallel
    1616  USE infotrac
     
    3434 
    3535  SUBROUTINE vlspltgen_switch_vanleer(dist)
    36   USE allocate_field
     36  USE allocate_field_mod
    3737  USE bands
    3838  USE parallel
  • LMDZ5/trunk/libf/dyn3dmem/vlz_mod.F90

    r1632 r1810  
    1010  SUBROUTINE vlz_allocate
    1111  USE bands
    12   USE allocate_field
     12  USE allocate_field_mod
    1313  USE parallel
    1414  USE infotrac
    15   USE dimensions
     15  USE dimensions_mod
    1616  IMPLICIT NONE
    1717  TYPE(distrib),POINTER :: d
     
    2626 
    2727  SUBROUTINE vlz_switch_vanleer(dist)
    28   USE allocate_field
     28  USE allocate_field_mod
    2929  USE bands
    3030  USE parallel
  • LMDZ5/trunk/libf/dyn3dpar/parallel.F90

    r1678 r1810  
    201201#ifdef CPP_COUPLE
    202202    use mod_prism_proto
    203 #endif
    204 #ifdef CPP_EARTH
    205203! Ehouarn: surface_data module is in 'phylmd' ...
    206204      use surface_data, only : type_ocean
  • LMDZ5/trunk/makelmdz

    r1789 r1810  
    306306  FLAG_PARA=''
    307307else
    308   FLAG_PARA="par"
     308  FLAG_PARA="$paramem"
    309309fi
    310310
     
    351351fi
    352352
    353 if [[ "$veget" == "orchidee2.0" ]]
    354 then
    355 # orchidee2.0 :
    356 # Compile with ORCHIDEE 2.0 (or more recent)
     353
     354#==============================================================================
     355if [ "$veget" = "true" -o "$veget" = "orchidee1.9" -o "$veget" = "orchidee2.0" ]
     356then
     357
     358   INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
    357359   CPP_KEY="$CPP_KEY CPP_VEGET"
    358    INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
    359    LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}orchidee "
    360 elif [[ "$veget" == "orchidee1.9" ]]
    361 then
    362 # orchidee1.9 :
    363 # Compile with ORCHIDEE version up to the inclusion of OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6
    364    CPP_KEY="$CPP_KEY CPP_VEGET ORCHIDEE_NOOPENMP"
    365    INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
    366    LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}sechiba -l${LIBPREFIX}parameters -l${LIBPREFIX}stomate -l${LIBPREFIX}parallel -l${LIBPREFIX}orglob"
    367 elif [[ "$veget" == "true" ]]
    368 then
    369 # true :
    370 # Obsolete, for backward compatibility. To be used with ORCHIDEE tag 1.9-1.9.6
    371 # For this case, cpp flag ORCHIDEE_NOOPENMP must be added to the makelmdz_fcm arguments
    372    CPP_KEY="$CPP_KEY CPP_VEGET"
    373    INCLUDE="${INCLUDE} -I${ORCH_INCDIR}"
    374    LIB="${LIB} -L${ORCH_LIBDIR} -l${LIBPREFIX}sechiba -l${LIBPREFIX}parameters -l${LIBPREFIX}stomate -l${LIBPREFIX}parallel -l${LIBPREFIX}orglob"
    375 elif [[ "$veget" != "false" ]]
    376 then
     360# temporary, for Orchidee versions 1.9.* (before openmp activation)
     361   if [[ "$veget" == "orchidee1.9" ]] ; then
     362      CPP_KEY="$CPP_KEY ORCHIDEE_NOOPENMP"
     363   fi
     364   if [[ "$veget" == "orchidee2.0" ]] ; then
     365      listlibs=orchidee
     366   else
     367      listlibs="sechiba parameters stomate parallel orglob"
     368   fi
     369   LIB="${LIB} -L${ORCH_LIBDIR}"
     370   for lib in sechiba parameters stomate parallel orglob ; do
     371      if [ -f ${ORCH_LIBDIR}/lib${LIBPREFIX}$lib.a ] ; then
     372         LIB="${LIB} -l${LIBPREFIX}$lib "
     373      fi
     374   done
     375elif [[ "$veget" != "false" ]] ; then
    377376   echo "Option -v $veget does not exist"
    378377   echo "Use ./makelmdz -h for more information"
     
    380379fi
    381380
     381#===============================================================================
    382382if [[ $io == ioipsl ]]
    383383then
     
    453453########################################################################
    454454
    455 dimension=`echo $dim | wc -w`
    456 echo dimension $dimension
    457 
    458 if (( $dimension == 3 ))
    459 then
    460   cd $LIBFGCM/grid
    461   \rm fxyprim.h
    462   cp -p fxy_${grille}.h fxyprim.h
     455if (( $dimc == 3 )) ; then
     456   cd $LIBFGCM/grid
     457   \rm fxyprim.h
     458   cp -p fxy_${grille}.h fxyprim.h
     459   filtre="FILTRE=$filtre"
     460   INCLUDE="$INCLUDE "'-I$(LIBF)/dyn3d${FLAG_PARA} '
     461elif (( $dimc == 2 )) ; then
     462   filtre="FILTRE= L_FILTRE= "
     463   INCLUDE="$INCLUDE "'-I$(LIBF)/dyn2d'
     464elif (( $dimc == 1 )) ; then
     465   filtre="L_DYN= DYN= FILTRE= L_FILTRE= DIRMAIN=phy$physique "
     466   INCLUDE="$INCLUDE "'-I$(LIBF)/dyn3d' # Pas tres propre
    463467else
    464   echo "Probleme dans les dimensions de la dynamique !!"
    465   echo "Non reactive pour l'instant !!!"
    466 fi
    467 
    468 ######################################################################
    469 # Gestion du filtre qui n'existe qu'en 3d.
    470 ######################################################################
    471 
    472 if (( `expr $dimc \> 2` == 1 ))
    473 then
    474    filtre="FILTRE=$filtre"
    475 else
    476    filtre="FILTRE= L_FILTRE= "
    477 fi
    478 echo MACRO FILTRE $filtre
    479 
    480 echo $dimc
     468   echo Dimension dimc=$dimc pas prevu ; exit
     469fi
    481470
    482471######################################################################
    483472# Creation du suffixe de la configuration
    484473######################################################################
    485 
    486474
    487475SUFF_NAME=_${dim_full}
     
    531519########################################################################
    532520cd $LMDGCM
     521
    533522find libf -name '*.[Fh]' -print > tmp77
    534523find libf -name '*.[Fh]' -exec egrep -i " *use *ioipsl" {} \; -print > tmp90
     
    560549
    561550# library directory name:
    562 if [[ "$parallel" == "none" ]]
    563 then
    564   nomlib=${arch}_${physique}_${dim_full}_${grille}_${compil_mod}
    565 else
    566   nomlib=${arch}_${physique}_${dim_full}_${grille}_${compil_mod}_${FLAG_PARA}
    567 fi
     551nomlib=`echo ${arch}_${physique}_${dim_full}_${grille}_${compil_mod}_parall${parallel}_${CPP_KEY}_${FLAG_PARA} | sed -e 's/ //g' -e 's/-//g ' | sed -e 's/CPP_//g'`
     552echo $nomlib
    568553
    569554if [[ ! -d "${LIBOGCM}/${nomlib}" ]]
     
    585570  INCLUDE="$INCLUDE"' -I$(LIBF)/phy'"$physique"
    586571fi
    587 INCLUDE="$INCLUDE"' -I$(LIBF)/dyn'${dimc}'d'$FLAG_PARA' -I'${LIBOGCM}/${nomlib}
     572INCLUDE="$INCLUDE"' -I'${LIBOGCM}/${nomlib}
    588573
    589574# ranlib utility (check it exists or else default to ls)
     
    645630DIM=$dimc \
    646631FLAG_PARA=$FLAG_PARA \
    647 L_ADJNT="$adjnt" \
     632L_ADJNT=$adjnt \
    648633L_COSP="$lcosp" \
    649634L_CHIMIE="$libchimie" \
     
    660645PROG=$code
    661646
     647
    662648if [[ -r $LIBFGCM/grid/dimensions.h ]]
    663649then
Note: See TracChangeset for help on using the changeset viewer.