Ignore:
Timestamp:
Jan 22, 2009, 11:09:44 AM (16 years ago)
Author:
jghattas
Message:

Modification pour le couplage de NEMO.
/Arnaud Caubel

Location:
LMDZ4/branches/LMDZ4-dev/libf/phylmd
Files:
2 edited

Legend:

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

    r1067 r1079  
    338338! Save each field in a 2D array.
    339339!$OMP MASTER
    340        IF (version_ocean=='nemo') THEN
    341           read_sst(:,:)     = tab_read_flds(:,:,1)  ! Sea surface temperature
    342           read_sic(:,:)     = tab_read_flds(:,:,2)  ! Sea ice concentration
    343           read_sit(:,:)     = tab_read_flds(:,:,3)  ! Sea ice temperature
    344           read_alb_sic(:,:) = tab_read_flds(:,:,4)  ! Albedo at sea ice
    345        ELSE IF (version_ocean=='opa8') THEN
    346           read_sst(:,:)     = tab_read_flds(:,:,1)  ! Sea surface temperature (multiplicated by fraction)
    347           read_sic(:,:)     = tab_read_flds(:,:,2)  ! Sea ice concentration
    348           read_alb_sic(:,:) = tab_read_flds(:,:,3)  ! Albedo at sea ice (multiplicated by fraction)
    349           read_sit(:,:)     = tab_read_flds(:,:,4)  ! Sea ice temperature (multiplicated by fraction)
    350        END IF
     340       read_sst(:,:)     = tab_read_flds(:,:,1)  ! Sea surface temperature
     341       read_sic(:,:)     = tab_read_flds(:,:,2)  ! Sea ice concentration
     342       read_alb_sic(:,:) = tab_read_flds(:,:,3)  ! Albedo at sea ice
     343       read_sit(:,:)     = tab_read_flds(:,:,4)  ! Sea ice temperature
    351344!$OMP END MASTER
    352345
     
    995988!*************************************************************************************
    996989! All fields are stored in a table tab_flds(:,:,:)
    997 ! First store the fields 7 to 18 which are already on the right format
     990! First store the fields which are already on the right format
    998991!
    999992!*************************************************************************************
    1000993!$OMP MASTER
     994    tab_flds(:,:,7)  = cpl_windsp2D(:,:)
     995    tab_flds(:,:,8)  = cpl_sols2D(:,:,2)
     996    tab_flds(:,:,9)  = cpl_sols2D(:,:,1)
     997    tab_flds(:,:,10) = cpl_nsol2D(:,:,2)
     998    tab_flds(:,:,11) = cpl_nsol2D(:,:,1)
     999    tab_flds(:,:,12) = cpl_fder2D(:,:,2)
     1000   
    10011001    IF (version_ocean=='nemo') THEN
    1002        tab_flds(:,:,7)  = cpl_windsp2D(:,:)
    1003        tab_flds(:,:,14) = cpl_sols2D(:,:,2)
    1004        tab_flds(:,:,12) = cpl_sols2D(:,:,1)
    1005        tab_flds(:,:,15) = cpl_nsol2D(:,:,2)
    1006        tab_flds(:,:,13) = cpl_nsol2D(:,:,1)
    1007        tab_flds(:,:,16) = cpl_fder2D(:,:,2)
    1008        tab_flds(:,:,11) = cpl_evap2D(:,:,2)
    1009        tab_flds(:,:,18) = cpl_rriv2D(:,:)
    1010        tab_flds(:,:,19) = cpl_rcoa2D(:,:)
     1002       tab_flds(:,:,18) = cpl_rriv2D(:,:) + cpl_rcoa2D(:,:)
    10111003    ELSE IF (version_ocean=='opa8') THEN
    1012        tab_flds(:,:,7)  = cpl_windsp2D(:,:)
    1013        tab_flds(:,:,8)  = cpl_sols2D(:,:,2)
    1014        tab_flds(:,:,9)  = cpl_sols2D(:,:,1)
    1015        tab_flds(:,:,10) = cpl_nsol2D(:,:,2)
    1016        tab_flds(:,:,11) = cpl_nsol2D(:,:,1)
    1017        tab_flds(:,:,12) = cpl_fder2D(:,:,2)
    10181004       tab_flds(:,:,13) = cpl_evap2D(:,:,2)
    10191005       tab_flds(:,:,14) = cpl_evap2D(:,:,1)
     
    10211007       tab_flds(:,:,18) = cpl_rriv2D(:,:)
    10221008    END IF
    1023    
     1009
    10241010!*************************************************************************************
    10251011! Transform the fraction of sub-surfaces from 1D to 2D array
     
    10811067! fractions of ocean and seaice.
    10821068!
    1083 ! Store the fields for rain and snow directly in tab_flds(:,:,15) and
    1084 ! tab_flds(:,:,16) respectively.
    1085 !
    10861069!*************************************************************************************   
    10871070       ! fraction oce+seaice
     
    10891072
    10901073       IF (version_ocean=='nemo') THEN
    1091           tab_flds(:,:,10) = 0.0
     1074          tab_flds(:,:,13) = cpl_evap2D(:,:,2) - (cpl_rain2D(:,:,2) + cpl_snow2D(:,:,2))
     1075
     1076          tab_flds(:,:,14) = 0.0
    10921077          tmp_taux(:,:)    = 0.0
    10931078          tmp_tauy(:,:)    = 0.0
    10941079          ! For all valid grid cells containing some fraction of ocean or sea-ice
    10951080          WHERE ( deno(:,:) /= 0 )
    1096              tab_flds(:,:,10) = cpl_snow2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) +    &
    1097                   cpl_snow2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:)
    1098              
    10991081             tmp_taux = cpl_taux2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) +    &
    11001082                  cpl_taux2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:)
    11011083             tmp_tauy = cpl_tauy2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) +    &
    11021084                  cpl_tauy2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:)
     1085             tab_flds(:,:,14) = cpl_snow2D(:,:,1) * pctsrf2D(:,:,is_oce) / deno(:,:) +    &
     1086                  cpl_snow2D(:,:,2) * pctsrf2D(:,:,is_sic) / deno(:,:)
     1087             
    11031088          ENDWHERE
    1104           tab_flds(:,:,8) = (cpl_evap2D(:,:,1) - ( cpl_rain2D(:,:,1) + cpl_snow2D(:,:,1)))
    1105           tab_flds(:,:,9) = (cpl_evap2D(:,:,2) - ( cpl_rain2D(:,:,2) + cpl_snow2D(:,:,2)))
     1089
     1090!          WHERE (pctsrf2D(:,:,is_sic) == 0)
     1091!             cpl_evap2D(:,:,2) = 0.0
     1092!          END WHERE
     1093         
     1094          tab_flds(:,:,14) = cpl_evap2D(:,:,2) - tab_flds(:,:,14)
     1095          tab_flds(:,:,15) = cpl_evap2D(:,:,1) - (cpl_rain2D(:,:,1) + cpl_snow2D(:,:,1))
     1096          tab_flds(:,:,16) = cpl_evap2D(:,:,2)
    11061097         
    11071098       ELSE IF (version_ocean=='opa8') THEN
     1099          ! Store fields for rain and snow in tab_flds(:,:,15) and tab_flds(:,:,16)
    11081100          tab_flds(:,:,15) = 0.0
    11091101          tab_flds(:,:,16) = 0.0
  • LMDZ4/branches/LMDZ4-dev/libf/phylmd/oasis.F90

    r1067 r1079  
    146146!************************************************************************************
    147147!     Define symbolic name for fields exchanged from atmos to coupler,
    148 !         must be the same as (1) of the field  definition in namcouple:
     148!         must be the same as (1) of the field definition in namcouple:
     149!
     150!   Initialization
     151    cl_writ(:)='NOFLDATM'
    149152
    150153    cl_writ(1)='COTAUXXU'
     
    155158    cl_writ(6)='COTAUZZV'
    156159    cl_writ(7)='COWINDSP'
    157    
     160    cl_writ(8)='COSHFICE'
     161    cl_writ(9)='COSHFOCE'
     162    cl_writ(10)='CONSFICE'
     163    cl_writ(11)='CONSFOCE'
     164    cl_writ(12)='CODFLXDT'
     165
    158166    IF (version_ocean=='nemo') THEN
    159       cl_writ(8) ='COPEFWAT'
    160       cl_writ(9) ='COPEFICE'
    161       cl_writ(10)='COTOSPSU'
    162       cl_writ(11)='COICEVAP'
    163       cl_writ(12)='COSWFLDO'
    164       cl_writ(13)='CONSFLDO'
    165       cl_writ(14)='COSHFLIC'
    166       cl_writ(15)='CONSFLIC'
    167       cl_writ(16)='CODFLXDT'
    168       cl_writ(17)='CRWOCEIS'
    169       cl_writ(18)='CRWOCERD'
    170       cl_writ(19)='CRWOCECD'
     167      cl_writ(13)='COEMPSIC'
     168      cl_writ(14)='CONESOPR'
     169      cl_writ(15)='COEMPOCE'
     170      cl_writ(16)='COICEVAP'
     171      cl_writ(17)='COCALVIN'
     172      cl_writ(18)='COLIQRUN'
    171173    ELSE IF (version_ocean=='opa8') THEN
    172       cl_writ(8) ='COSHFICE'
    173       cl_writ(9) ='COSHFOCE'
    174       cl_writ(10)='CONSFICE'
    175       cl_writ(11)='CONSFOCE'
    176       cl_writ(12)='CODFLXDT'
    177       cl_writ(13)='COTFSICE'
    178       cl_writ(14)='COTFSOCE'
    179       cl_writ(15)='COTOLPSU'
    180       cl_writ(16)='COTOSPSU'
    181       cl_writ(17)='CORUNCOA'
    182       cl_writ(18)='CORIVFLU'
    183       cl_writ(19)='COCALVIN'
     174       cl_writ(13)='COTFSICE'
     175       cl_writ(14)='COTFSOCE'
     176       cl_writ(15)='COTOLPSU'
     177       cl_writ(16)='COTOSPSU'
     178       cl_writ(17)='CORUNCOA'
     179       cl_writ(18)='CORIVFLU'
     180       cl_writ(19)='COCALVIN'
    184181    ENDIF
    185182
    186183!
    187184!     Define symbolic name for fields exchanged from coupler to atmosphere,
    188 !         must be the same as (2) of the field  definition in namcouple:
    189 !
    190     IF (version_ocean=='nemo') THEN
    191        cl_read(1)='SISUTESW'
    192        cl_read(2)='SIICECOV'
    193        cl_read(4)='SIICEALW'
    194        cl_read(3)='SIICTEMW'
    195     ELSE IF (version_ocean=='opa8') THEN
    196        cl_read(1)='SISUTESW'
    197        cl_read(2)='SIICECOV'
    198        cl_read(3)='SIICEALW'
    199        cl_read(4)='SIICTEMW'
     185!         must be the same as (2) of the field definition in namcouple:
     186!
     187!   Initialization
     188    cl_read(:)='NOFLDATM'
     189
     190    cl_read(1)='SISUTESW'
     191    cl_read(2)='SIICECOV'
     192    cl_read(3)='SIICEALW'
     193    cl_read(4)='SIICTEMW'
     194
     195    IF (cpl_current) THEN
     196       cl_read(5)='CURRENTX'
     197       cl_read(6)='CURRENTY'
     198       cl_read(7)='CURRENTZ'
    200199    END IF
    201     cl_read(5)='CURRENTX'
    202     cl_read(6)='CURRENTY'
    203     cl_read(7)='CURRENTZ'
    204200
    205201    il_var_nodims(1) = 2
Note: See TracChangeset for help on using the changeset viewer.