Ignore:
Timestamp:
Jan 20, 2009, 10:58:25 AM (15 years ago)
Author:
jghattas
Message:

Modification des champs de couplage pour NEMO.

Arnaud Caubel

File:
1 edited

Legend:

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

    r1073 r1075  
    305305
    306306! Save each field in a 2D array.
    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
     307
     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
    318312
    319313!*************************************************************************************
     
    954948!*************************************************************************************
    955949! All fields are stored in a table tab_flds(:,:,:)
    956 ! First store the fields 7 to 18 which are already on the right format
    957 !
    958 !*************************************************************************************
     950! First store the fields which are already on the right format
     951!
     952!*************************************************************************************
     953
     954    tab_flds(:,:,7)  = cpl_windsp2D(:,:)
     955    tab_flds(:,:,8)  = cpl_sols2D(:,:,2)
     956    tab_flds(:,:,9)  = cpl_sols2D(:,:,1)
     957    tab_flds(:,:,10) = cpl_nsol2D(:,:,2)
     958    tab_flds(:,:,11) = cpl_nsol2D(:,:,1)
     959    tab_flds(:,:,12) = cpl_fder2D(:,:,2)
     960   
    959961    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(:,:)
     962       tab_flds(:,:,18) = cpl_rriv2D(:,:) + cpl_rcoa2D(:,:)
    969963    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)
    976964       tab_flds(:,:,13) = cpl_evap2D(:,:,2)
    977965       tab_flds(:,:,14) = cpl_evap2D(:,:,1)
     
    10371025! fractions of ocean and seaice.
    10381026!
    1039 ! Store the fields for rain and snow directly in tab_flds(:,:,15) and
    1040 ! tab_flds(:,:,16) respectively.
    1041 !
    10421027!*************************************************************************************   
    10431028    ! fraction oce+seaice
     
    10451030
    10461031    IF (version_ocean=='nemo') THEN
    1047        tab_flds(:,:,10) = 0.0
     1032       tab_flds(:,:,13) = cpl_evap2D(:,:,2) - (cpl_rain2D(:,:,2) + cpl_snow2D(:,:,2))
     1033
     1034       tab_flds(:,:,14) = 0.0
    10481035       tmp_taux(:,:)    = 0.0
    10491036       tmp_tauy(:,:)    = 0.0
    10501037       ! For all valid grid cells containing some fraction of ocean or sea-ice
    10511038       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(:,:)
     1039           tmp_taux = cpl_taux2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) +    &
     1040              cpl_taux2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:)
     1041           tmp_tauy = cpl_tauy2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) +    &
     1042              cpl_tauy2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:)
     1043           tab_flds(:,:,14) = cpl_snow2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) +    &
     1044              cpl_snow2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:)
    10591045       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)))
    1062        
     1046
     1047       WHERE (pctsrf2D(:,:,is_sic) == 0)
     1048          cpl_evap2D(:,:,2) = 0.0
     1049       END WHERE
     1050
     1051       tab_flds(:,:,14) = cpl_evap2D(:,:,2) - tab_flds(:,:,14)
     1052       tab_flds(:,:,15) = cpl_evap2D(:,:,1) - (cpl_rain2D(:,:,1) + cpl_snow2D(:,:,1))
     1053       tab_flds(:,:,16) = cpl_evap2D(:,:,2)
     1054
    10631055    ELSE IF (version_ocean=='opa8') THEN
     1056       ! Store fields for rain and snow in tab_flds(:,:,15) and tab_flds(:,:,16)
    10641057       tab_flds(:,:,15) = 0.0
    10651058       tab_flds(:,:,16) = 0.0
Note: See TracChangeset for help on using the changeset viewer.