Ignore:
Timestamp:
Jan 19, 2009, 2:40:26 PM (16 years ago)
Author:
Laurent Fairhead
Message:

Mise a jour de la branche par rapport au depot CVS
JG/LF

Location:
LMDZ4/branches/LMDZ4_V3_patches/libf/phylmd
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • LMDZ4/branches/LMDZ4_V3_patches/libf/phylmd/coefcdrag.F90

    r793 r1073  
    1 !
    2 ! $Header$
    3 !
    41!
    52!
     
    5451      include "indicesol.h"
    5552! Quelques constantes :
    56       REAL, parameter :: RKAR=0.40, CB=5.0, CC=5.0, CD=5.0
     53      REAL, parameter :: RKAR=0.40, CB=5.0, CC=5.0, CD=5.0, cepdu2=(0.1)**2
    5754!
    5855! Variables locales :
     
    7269!
    7370       zdphi(i) = zgeop(i)
    74        zdu2(i) = speed(i)**2
     71       zdu2(i) = max(cepdu2,speed(i)**2)
    7572       pref(i) = exp(log(psol(i)) - zdphi(i)/(RD*t(i)* &
    7673                 (1.+ RETV * max(q(i),0.0))))
  • LMDZ4/branches/LMDZ4_V3_patches/libf/phylmd/conf_phys.F90

    r954 r1073  
    1 !
    2 ! $Header$
    31!
    42!
     
    1412
    1513   use IOIPSL
     14   use surface_data, ONLY : version_ocean
    1615   implicit none
    1716
     
    3332!
    3433! ocean:      type d'ocean (force, slab, couple)
     34! version_ocean:   version d'ocean (opa8/nemo pour ocean=couple)
    3535! ok_veget:   type de modele de vegetation
    3636! ok_journe:  sorties journalieres
     
    5252  integer              :: iflag_cldcon
    5353
    54   character (len = 6),SAVE  :: ocean_omp
     54  character (len = 6),SAVE  :: ocean_omp, version_ocean_omp
    5555  logical,SAVE              :: ok_veget_omp, ok_newmicro_omp
    5656  logical,SAVE        :: ok_journe_omp, ok_mensuel_omp, ok_instan_omp, ok_hf_omp       
     
    105105  ocean_omp = 'force '
    106106  call getin('OCEAN', ocean_omp)
     107!
     108!Config Key  = version_ocean
     109!Config Desc = Version d'ocean
     110!Config Def  = xxxxxx
     111!Config Help = Version d'ocean utilise: opa8/nemo/xxxxxx
     112!
     113  version_ocean_omp = 'opa8'
     114  call getin('version_ocean', version_ocean_omp)
    107115!
    108116!Config Key  = VEGET
     
    849857
    850858    ocean = ocean_omp
     859    version_ocean = version_ocean_omp
    851860    ok_veget = ok_veget_omp
    852861    ok_newmicro = ok_newmicro_omp
     
    886895    ok_lic_melt = ok_lic_melt_omp
    887896
     897! Test of coherence between ocean and version_ocean
     898    IF (ocean=='couple' .AND. (version_ocean/='opa8' .AND. version_ocean/='nemo') ) THEN
     899       WRITE(numout,*)' ERROR version_ocean=',version_ocean,' not valid in coupled configuration'
     900       CALL abort_gcm('conf_phys','version_ocean not valid',1)
     901    END IF
     902
    888903!$OMP MASTER
    889904
     
    891906  write(numout,*)' Configuration des parametres de la physique: '
    892907  write(numout,*)' Config ocean = ', ocean
     908  write(numout,*)' Version ocean = ', version_ocean, ' (valable si config ocean=couple)'
    893909  write(numout,*)' Config veget = ', ok_veget
    894910  write(numout,*)' Sortie journaliere = ', ok_journe
  • LMDZ4/branches/LMDZ4_V3_patches/libf/phylmd/cpl_mod.F90

    r845 r1073  
    1 !
    2 ! $Header$
    31!
    42MODULE cpl_mod
     
    262260! 4 fields : read_sst, read_sic, read_sit and read_alb_sic.
    263261
     262    USE surface_data, ONLY : version_ocean
    264263    INCLUDE "indicesol.h"
    265264    INCLUDE "temps.h"
     
    306305
    307306! Save each field in a 2D array.
    308     read_sst(:,:)     = tab_read_flds(:,:,1)  ! Sea surface temperature
    309     read_sic(:,:)     = tab_read_flds(:,:,2)  ! Sea ice concentration
    310     read_alb_sic(:,:) = tab_read_flds(:,:,3)  ! Albedo at sea ice
    311     read_sit(:,:)     = tab_read_flds(:,:,4)  ! Sea ice temperature
     307    IF (version_ocean=='nemo') THEN
     308       read_sst(:,:)     = tab_read_flds(:,:,1)  ! Sea surface temperature
     309       read_sic(:,:)     = tab_read_flds(:,:,2)  ! Sea ice concentration
     310       read_sit(:,:)     = tab_read_flds(:,:,3)  ! Sea ice temperature
     311       read_alb_sic(:,:) = tab_read_flds(:,:,4)  ! Albedo at sea ice
     312    ELSE IF (version_ocean=='opa8') THEN
     313       read_sst(:,:)     = tab_read_flds(:,:,1)  ! Sea surface temperature
     314       read_sic(:,:)     = tab_read_flds(:,:,2)  ! Sea ice concentration
     315       read_alb_sic(:,:) = tab_read_flds(:,:,3)  ! Albedo at sea ice
     316       read_sit(:,:)     = tab_read_flds(:,:,4)  ! Sea ice temperature
     317    ENDIF
    312318
    313319!*************************************************************************************
     
    902908! all calculations at the different surfaces have to be done before.
    903909!   
     910    USE surface_data, ONLY : version_ocean
    904911! Some includes
    905912!*************************************************************************************
     
    950957!
    951958!*************************************************************************************
    952     tab_flds(:,:,7)  = cpl_windsp2D(:,:)
    953     tab_flds(:,:,8)  = cpl_sols2D(:,:,2)
    954     tab_flds(:,:,9)  = cpl_sols2D(:,:,1)
    955     tab_flds(:,:,10) = cpl_nsol2D(:,:,2)
    956     tab_flds(:,:,11) = cpl_nsol2D(:,:,1)
    957     tab_flds(:,:,12) = cpl_fder2D(:,:,2)
    958     tab_flds(:,:,13) = cpl_evap2D(:,:,2)
    959     tab_flds(:,:,14) = cpl_evap2D(:,:,1)
    960     tab_flds(:,:,17) = cpl_rcoa2D(:,:)
    961     tab_flds(:,:,18) = cpl_rriv2D(:,:)
    962    
     959    IF (version_ocean=='nemo') THEN
     960       tab_flds(:,:,7)  = cpl_windsp2D(:,:)
     961       tab_flds(:,:,14) = cpl_sols2D(:,:,2)
     962       tab_flds(:,:,12) = cpl_sols2D(:,:,1)
     963       tab_flds(:,:,15) = cpl_nsol2D(:,:,2)
     964       tab_flds(:,:,13) = cpl_nsol2D(:,:,1)
     965       tab_flds(:,:,16) = cpl_fder2D(:,:,2)
     966       tab_flds(:,:,11) = cpl_evap2D(:,:,2)
     967       tab_flds(:,:,18) = cpl_rriv2D(:,:)
     968       tab_flds(:,:,19) = cpl_rcoa2D(:,:)
     969    ELSE IF (version_ocean=='opa8') THEN
     970       tab_flds(:,:,7)  = cpl_windsp2D(:,:)
     971       tab_flds(:,:,8)  = cpl_sols2D(:,:,2)
     972       tab_flds(:,:,9)  = cpl_sols2D(:,:,1)
     973       tab_flds(:,:,10) = cpl_nsol2D(:,:,2)
     974       tab_flds(:,:,11) = cpl_nsol2D(:,:,1)
     975       tab_flds(:,:,12) = cpl_fder2D(:,:,2)
     976       tab_flds(:,:,13) = cpl_evap2D(:,:,2)
     977       tab_flds(:,:,14) = cpl_evap2D(:,:,1)
     978       tab_flds(:,:,17) = cpl_rcoa2D(:,:)
     979       tab_flds(:,:,18) = cpl_rriv2D(:,:)
     980    ENDIF
     981
    963982!*************************************************************************************
    964983! Transform the fraction of sub-surfaces from 1D to 2D array
     
    10081027     
    10091028
    1010     tab_flds(:,:,19) = tmp_calv(:,:)
     1029    IF (version_ocean=='nemo') THEN
     1030       tab_flds(:,:,17) = tmp_calv(:,:)
     1031    ELSE IF (version_ocean=='opa8') THEN
     1032       tab_flds(:,:,19) = tmp_calv(:,:)
     1033    ENDIF
    10111034
    10121035!*************************************************************************************
     
    10181041!
    10191042!*************************************************************************************   
    1020     tab_flds(:,:,15) = 0.0
    1021     tab_flds(:,:,16) = 0.0
    1022     tmp_taux(:,:)    = 0.0
    1023     tmp_tauy(:,:)    = 0.0
    1024    
    1025 
    10261043    ! fraction oce+seaice
    10271044    deno =  pctsrf2D(:,:,is_oce) + pctsrf2D(:,:,is_sic)
    1028     ! For all valid grid cells containing some fraction of ocean or sea-ice
    1029     WHERE ( deno(:,:) /= 0 )
    1030        tab_flds(:,:,15) = cpl_rain2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) +    &
    1031             cpl_rain2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:)
    1032        tab_flds(:,:,16) = cpl_snow2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) +    &
    1033             cpl_snow2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:)
     1045
     1046    IF (version_ocean=='nemo') THEN
     1047       tab_flds(:,:,10) = 0.0
     1048       tmp_taux(:,:)    = 0.0
     1049       tmp_tauy(:,:)    = 0.0
     1050       ! For all valid grid cells containing some fraction of ocean or sea-ice
     1051       WHERE ( deno(:,:) /= 0 )
     1052          tab_flds(:,:,10) = cpl_snow2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) +    &
     1053               cpl_snow2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:)
     1054         
     1055          tmp_taux = cpl_taux2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) +    &
     1056               cpl_taux2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:)
     1057          tmp_tauy = cpl_tauy2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) +    &
     1058               cpl_tauy2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:)
     1059       ENDWHERE
     1060       tab_flds(:,:,8) = (cpl_evap2D(:,:,1) - ( cpl_rain2D(:,:,1) + cpl_snow2D(:,:,1)))
     1061       tab_flds(:,:,9) = (cpl_evap2D(:,:,2) - ( cpl_rain2D(:,:,2) + cpl_snow2D(:,:,2)))
    10341062       
    1035        tmp_taux = cpl_taux2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) +    &
    1036             cpl_taux2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:)
    1037        tmp_tauy = cpl_tauy2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) +    &
    1038             cpl_tauy2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:)
    1039     ENDWHERE
    1040 
     1063    ELSE IF (version_ocean=='opa8') THEN
     1064       tab_flds(:,:,15) = 0.0
     1065       tab_flds(:,:,16) = 0.0
     1066       tmp_taux(:,:)    = 0.0
     1067       tmp_tauy(:,:)    = 0.0
     1068       
     1069       ! For all valid grid cells containing some fraction of ocean or sea-ice
     1070       WHERE ( deno(:,:) /= 0 )
     1071          tab_flds(:,:,15) = cpl_rain2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) +    &
     1072               cpl_rain2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:)
     1073          tab_flds(:,:,16) = cpl_snow2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) +    &
     1074               cpl_snow2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:)
     1075         
     1076          tmp_taux = cpl_taux2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) +    &
     1077               cpl_taux2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:)
     1078          tmp_tauy = cpl_tauy2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) +    &
     1079               cpl_tauy2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:)
     1080       ENDWHERE
     1081    ENDIF
     1082   
    10411083!*************************************************************************************
    10421084! Transform the wind components from local atmospheric 2D coordinates to geocentric
  • LMDZ4/branches/LMDZ4_V3_patches/libf/phylmd/oasis.F90

    r793 r1073  
    1 !
    2 ! $Header$
    31!
    42MODULE oasis
     
    5755!     LF 09/2003
    5856!
     57    USE surface_data, ONLY : version_ocean
    5958    INCLUDE "dimensions.h"
    6059
     
    136135    cl_writ(6)='COTAUZZV'
    137136    cl_writ(7)='COWINDSP'
    138     cl_writ(8)='COSHFICE'
    139     cl_writ(9)='COSHFOCE'
    140     cl_writ(10)='CONSFICE'
    141     cl_writ(11)='CONSFOCE'
    142     cl_writ(12)='CODFLXDT'
    143     cl_writ(13)='COTFSICE'
    144     cl_writ(14)='COTFSOCE'
    145     cl_writ(15)='COTOLPSU'
    146     cl_writ(16)='COTOSPSU'
    147     cl_writ(17)='CORUNCOA'
    148     cl_writ(18)='CORIVFLU'
    149     cl_writ(19)='COCALVIN'
     137
     138    IF (version_ocean=='nemo') THEN
     139      cl_writ(8) ='COPEFWAT'
     140      cl_writ(9) ='COPEFICE'
     141      cl_writ(10)='COTOSPSU'
     142      cl_writ(11)='COICEVAP'
     143      cl_writ(12)='COSWFLDO'
     144      cl_writ(13)='CONSFLDO'
     145      cl_writ(14)='COSHFLIC'
     146      cl_writ(15)='CONSFLIC'
     147      cl_writ(16)='CODFLXDT'
     148      cl_writ(17)='CRWOCEIS'
     149      cl_writ(18)='CRWOCERD'
     150      cl_writ(19)='CRWOCECD'
     151    ELSE IF (version_ocean=='opa8') THEN
     152       cl_writ(8)='COSHFICE'
     153       cl_writ(9)='COSHFOCE'
     154       cl_writ(10)='CONSFICE'
     155       cl_writ(11)='CONSFOCE'
     156       cl_writ(12)='CODFLXDT'
     157       cl_writ(13)='COTFSICE'
     158       cl_writ(14)='COTFSOCE'
     159       cl_writ(15)='COTOLPSU'
     160       cl_writ(16)='COTOSPSU'
     161       cl_writ(17)='CORUNCOA'
     162       cl_writ(18)='CORIVFLU'
     163       cl_writ(19)='COCALVIN'
     164    ENDIF
    150165!
    151166!     Define symbolic name for fields exchanged from coupler to atmosphere,
    152167!         must be the same as (2) of the field  definition in namcouple:
    153168!
    154     cl_read(1)='SISUTESW'
    155     cl_read(2)='SIICECOV'
    156     cl_read(3)='SIICEALW'
    157     cl_read(4)='SIICTEMW'
     169    IF (version_ocean=='nemo') THEN
     170       cl_read(1)='SISUTESW'
     171       cl_read(2)='SIICECOV'
     172       cl_read(4)='SIICEALW'
     173       cl_read(3)='SIICTEMW'
     174    ELSE IF (version_ocean=='opa8') THEN
     175       cl_read(1)='SISUTESW'
     176       cl_read(2)='SIICECOV'
     177       cl_read(3)='SIICEALW'
     178       cl_read(4)='SIICTEMW'
     179    ENDIF
    158180   
    159181    il_var_nodims(1) = 2
  • LMDZ4/branches/LMDZ4_V3_patches/libf/phylmd/surf_land_orchidee_mod.F90

    r853 r1073  
    1 !
    2 ! $Header$
    31!
    42MODULE surf_land_orchidee_mod
     
    269267       ENDIF
    270268   
     269       CALL bcast(lon_scat)
     270       CALL bcast(lat_scat)
    271271
    272272!
  • LMDZ4/branches/LMDZ4_V3_patches/libf/phylmd/surface_data.F90

    r803 r1073  
    1 !
    2 ! $Header$
    31!
    42MODULE surface_data
     
    1513  !$OMP THREADPRIVATE(ocean)
    1614
     15  ! if ocean=couple : version_ocean=opa8 ou nemo
     16  CHARACTER(len=6), SAVE :: version_ocean
     17  !$OMP THREADPRIVATE(version_ocean)
     18
    1719END MODULE surface_data
Note: See TracChangeset for help on using the changeset viewer.