Changeset 4283 for LMDZ6


Ignore:
Timestamp:
Sep 26, 2022, 2:43:00 PM (2 years ago)
Author:
jghattas
Message:

Added landice_opt=2 : Treat continental land ice fractions in ORCHIDEE => pctsrf(:,is_lic) = 0.0 in LMDZ.

For this option, some more variables are needed from ORCHIDEE. Therfor change in the interface LMDZ-ORCHIDEE in surf_land_orchidee_mod is done. Previous interface is moved to surf_land_orchidee_nolic_mod.f90. To compile with previous interface, cpp key ORCHIDEE_NOLIC is added. Previous interface is compiled with argument orchidee2.1 in makelmdz and makelmdz_fcm.

At the same time, when the interface was changed, the variable yrmu0(coszang) was added in the call to intersurf_initialize_gathered. This is needed in ORCHIDEE to better initialize the model.

Modifications done by Etienne Vignon and Josefine Ghattas

Location:
LMDZ6/trunk
Files:
9 edited
1 copied

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/dynphy_lonlat/phylmd/init_ssrf_m.F90

    r2798 r4283  
    33!*******************************************************************************
    44
    5   USE indice_sol_mod, ONLY: is_ter, is_oce, is_oce, is_lic, epsfra
     5  USE indice_sol_mod,     ONLY: is_ter, is_oce, is_oce, is_lic, epsfra
    66  USE dimphy,             ONLY: klon, zmasq
    77  USE phys_state_var_mod, ONLY: pctsrf
    8   USE geometry_mod, ONLY : longitude_deg, latitude_deg
     8  USE geometry_mod,       ONLY : longitude_deg, latitude_deg
    99  USE grid_atob_m,        ONLY: grille_m
    1010  USE ioipsl,             ONLY: flininfo, flinopen, flinget, flinclo
    1111  USE ioipsl_getin_p_mod, ONLY: getin_p
    12   USE comconst_mod, ONLY: im, pi
     12  USE comconst_mod,       ONLY: im, pi
     13  USE surface_data,       ONLY: landice_opt
    1314
    1415  CHARACTER(LEN=256), PARAMETER :: icefname="landiceref.nc", icevar="landice"
     
    5859! Sub-surfaces initialization
    5960!*******************************************************************************
    60 !--- Read and interpolate on model T-grid soil fraction and soil ice fraction.
    61   CALL flininfo(icefname, iml_lic, jml_lic, llm_tmp, ttm_tmp, fid)
    62   ALLOCATE(lat_lic(iml_lic,jml_lic),lon_lic(iml_lic,jml_lic))
    63   ALLOCATE(fraclic(iml_lic,jml_lic))
    64   CALL flinopen(icefname, .FALSE., iml_lic, jml_lic, llm_tmp,  &
    65  &               lon_lic, lat_lic, lev, ttm_tmp, itaul, date, dt, fid)
    66   CALL flinget(fid, icevar, iml_lic, jml_lic, llm_tmp, ttm_tmp, 1,1, fraclic)
    67   CALL flinclo(fid)
    68   WRITE(lunout,*)'landice dimensions: iml_lic, jml_lic : ',iml_lic,jml_lic
     61  IF (landice_opt .LT. 2) THEN
     62     ! Continue with reading landice.nc file
     63     WRITE(lunout,*)"Read landice.nc file to attribute is_lic fraction"
    6964
    70   ALLOCATE(dlon_lic(iml_lic),dlat_lic(jml_lic))
    71   dlon_lic(:)=lon_lic(:,1); IF(MAXVAL(dlon_lic)>pi) dlon_lic=dlon_lic*pi/180.
    72   dlat_lic(:)=lat_lic(1,:); IF(MAXVAL(dlat_lic)>pi) dlat_lic=dlat_lic*pi/180.
    73   DEALLOCATE(lon_lic,lat_lic); ALLOCATE(flic_tmp(iip1,jjp1))
    74   CALL grille_m(dlon_lic,dlat_lic,fraclic,rlonv(1:iim),rlatu,flic_tmp(1:iim,:))
    75   flic_tmp(iip1,:)=flic_tmp(1,:)
    76 
    77 !--- To the physical grid
    78   pctsrf(:,:) = 0.
    79   CALL gr_dyn_fi(1, iip1, jjp1, klon, flic_tmp, pctsrf(:,is_lic))
    80   DEALLOCATE(flic_tmp)
    81 
    82 !--- Adequation with soil/sea mask
    83   WHERE(pctsrf(:,is_lic)<EPSFRA) pctsrf(:,is_lic)=0.
    84   WHERE(zmasq(:)<EPSFRA)         pctsrf(:,is_lic)=0.
    85   pctsrf(:,is_ter)=zmasq(:)
    86   DO ji=1,klon
    87     IF(zmasq(ji)>EPSFRA) THEN
    88       IF(pctsrf(ji,is_lic)>=zmasq(ji)) THEN
    89         pctsrf(ji,is_lic)=zmasq(ji)
    90         pctsrf(ji,is_ter)=0.
    91       ELSE
    92         pctsrf(ji,is_ter)=zmasq(ji)-pctsrf(ji,is_lic)
    93         IF(pctsrf(ji,is_ter)<EPSFRA) THEN
    94           pctsrf(ji,is_ter)=0.
    95           pctsrf(ji,is_lic)=zmasq(ji)
    96         END IF
    97       END IF
    98     END IF
    99   END DO
    100 
    101 
    102   !--- Option no_ter_antartique removes all land fractions souther than 60S.
    103   !--- Land ice is set instead of the land fractions on these latitudes.
    104   !--- The ocean and sea-ice fractions are not changed.
    105   no_ter_antartique=.FALSE.
    106   CALL getin_p('no_ter_antartique',no_ter_antartique)
    107   WRITE(lunout,*)"no_ter_antartique=",no_ter_antartique
    108   IF (no_ter_antartique) THEN
    109      ! Remove all land fractions souther than 60S and set land-ice instead
    110      WRITE(lunout,*) "Remove land fractions souther than 60deg south by increasing"
    111      WRITE(lunout,*) "the continental ice fractions. No land can now be found at Antartic."
    112      DO ji=1, klon
    113         IF (latitude_deg(ji)<-60.0) THEN
    114            pctsrf(ji,is_lic) = pctsrf(ji,is_lic) + pctsrf(ji,is_ter)
    115            pctsrf(ji,is_ter) = 0
     65     !--- Read and interpolate on model T-grid soil fraction and soil ice fraction.
     66     CALL flininfo(icefname, iml_lic, jml_lic, llm_tmp, ttm_tmp, fid)
     67     ALLOCATE(lat_lic(iml_lic,jml_lic),lon_lic(iml_lic,jml_lic))
     68     ALLOCATE(fraclic(iml_lic,jml_lic))
     69     CALL flinopen(icefname, .FALSE., iml_lic, jml_lic, llm_tmp,  &
     70          &               lon_lic, lat_lic, lev, ttm_tmp, itaul, date, dt, fid)
     71     CALL flinget(fid, icevar, iml_lic, jml_lic, llm_tmp, ttm_tmp, 1,1, fraclic)
     72     CALL flinclo(fid)
     73     WRITE(lunout,*)'landice dimensions: iml_lic, jml_lic : ',iml_lic,jml_lic
     74     
     75     ALLOCATE(dlon_lic(iml_lic),dlat_lic(jml_lic))
     76     dlon_lic(:)=lon_lic(:,1); IF(MAXVAL(dlon_lic)>pi) dlon_lic=dlon_lic*pi/180.
     77     dlat_lic(:)=lat_lic(1,:); IF(MAXVAL(dlat_lic)>pi) dlat_lic=dlat_lic*pi/180.
     78     DEALLOCATE(lon_lic,lat_lic); ALLOCATE(flic_tmp(iip1,jjp1))
     79     CALL grille_m(dlon_lic,dlat_lic,fraclic,rlonv(1:iim),rlatu,flic_tmp(1:iim,:))
     80     flic_tmp(iip1,:)=flic_tmp(1,:)
     81     
     82     !--- To the physical grid
     83     pctsrf(:,:) = 0.
     84     CALL gr_dyn_fi(1, iip1, jjp1, klon, flic_tmp, pctsrf(:,is_lic))
     85     DEALLOCATE(flic_tmp)
     86     
     87     !--- Adequation with soil/sea mask
     88     WHERE(pctsrf(:,is_lic)<EPSFRA) pctsrf(:,is_lic)=0.
     89     WHERE(zmasq(:)<EPSFRA)         pctsrf(:,is_lic)=0.
     90     pctsrf(:,is_ter)=zmasq(:)
     91     DO ji=1,klon
     92        IF(zmasq(ji)>EPSFRA) THEN
     93           IF(pctsrf(ji,is_lic)>=zmasq(ji)) THEN
     94              pctsrf(ji,is_lic)=zmasq(ji)
     95              pctsrf(ji,is_ter)=0.
     96           ELSE
     97              pctsrf(ji,is_ter)=zmasq(ji)-pctsrf(ji,is_lic)
     98              IF(pctsrf(ji,is_ter)<EPSFRA) THEN
     99                 pctsrf(ji,is_ter)=0.
     100                 pctsrf(ji,is_lic)=zmasq(ji)
     101              END IF
     102           END IF
    116103        END IF
    117104     END DO
     105     
     106     
     107     !--- Option no_ter_antartique removes all land fractions souther than 60S.
     108     !--- Land ice is set instead of the land fractions on these latitudes.
     109     !--- The ocean and sea-ice fractions are not changed.
     110     no_ter_antartique=.FALSE.
     111     CALL getin_p('no_ter_antartique',no_ter_antartique)
     112     WRITE(lunout,*)"no_ter_antartique=",no_ter_antartique
     113     IF (no_ter_antartique) THEN
     114        ! Remove all land fractions souther than 60S and set land-ice instead
     115        WRITE(lunout,*) "Remove land fractions souther than 60deg south by increasing"
     116        WRITE(lunout,*) "the continental ice fractions. No land can now be found at Antartic."
     117        DO ji=1, klon
     118           IF (latitude_deg(ji)<-60.0) THEN
     119              pctsrf(ji,is_lic) = pctsrf(ji,is_lic) + pctsrf(ji,is_ter)
     120              pctsrf(ji,is_ter) = 0
     121           END IF
     122        END DO
     123     END IF
     124     
     125  ELSE
     126     ! landice_opt=2 and higher
     127     WRITE(lunout,*) 'No landice is attributed is_lic sub-surface because landice_opt=2 or higher.'
     128     WRITE(lunout,*) 'This means that the land model will handel land ice as well as all other land areas.'
     129     pctsrf(:,is_ter) = zmasq(:)
     130     pctsrf(:,is_lic) = 0.0
    118131  END IF
    119 
    120132
    121133!--- Sub-surface ocean and sea ice (sea ice set to zero for start).
  • LMDZ6/trunk/libf/phylmd/cpl_mod.F90

    r3815 r4283  
    6464  REAL, ALLOCATABLE, DIMENSION(:,:), SAVE   :: cpl_rriv2D, cpl_rcoa2D, cpl_rlic2D
    6565  !$OMP THREADPRIVATE(cpl_rriv2D,cpl_rcoa2D,cpl_rlic2D)
     66  REAL, ALLOCATABLE, DIMENSION(:,:), SAVE   :: rlic_in_frac2D  ! fraction for continental ice
     67  !$OMP THREADPRIVATE(rlic_in_frac2D)
    6668
    6769! variables read from coupler :
     
    225227    sum_error = sum_error + error
    226228    ALLOCATE(cpl_rlic2D(nbp_lon,jj_nb), stat=error)
     229    sum_error = sum_error + error
     230    ALLOCATE(rlic_in_frac2D(nbp_lon,jj_nb), stat=error)
    227231    sum_error = sum_error + error
    228232    ALLOCATE(read_sst(nbp_lon, jj_nb), stat = error)
     
    11511155!
    11521156
    1153   SUBROUTINE cpl_send_landice_fields(itime, knon, knindex, rlic_in)
     1157  SUBROUTINE cpl_send_landice_fields(itime, knon, knindex, rlic_in, rlic_in_frac)
    11541158! This subroutine cumulates the field for melting ice for each time-step
    11551159! during a coupling period. This routine will not send to coupler. Sending
     
    11651169    INTEGER, DIMENSION(klon), INTENT(IN)      :: knindex
    11661170    REAL, DIMENSION(klon), INTENT(IN)         :: rlic_in
     1171    REAL, DIMENSION(klon), INTENT(IN)         :: rlic_in_frac  ! Fraction for continental ice, can be equal to
     1172                                                               ! pctsrf(:,is_lic) or not, depending on landice_opt
     1173   
    11671174
    11681175! Local varibales
     
    11791186!$OMP END MASTER
    11801187    CALL gath2cpl(rlic_in, rlic2D, knon, knindex)
    1181 
     1188    CALL gath2cpl(rlic_in_frac(:), rlic_in_frac2D(:,:), knon, knindex)
    11821189!*************************************************************************************
    11831190! Reset field to zero in the beginning of a new coupling period
     
    12981305    CALL gath2cpl(pctsrf(:,is_oce), pctsrf2D(:,:,is_oce), klon, unity)
    12991306    CALL gath2cpl(pctsrf(:,is_sic), pctsrf2D(:,:,is_sic), klon, unity)
    1300     CALL gath2cpl(pctsrf(:,is_lic), pctsrf2D(:,:,is_lic), klon, unity)
     1307
     1308
     1309
    13011310
    13021311!*************************************************************************************
     
    13111320        DO j = 1, jj_nb
    13121321           tmp_calv(:,j) = DOT_PRODUCT (cpl_rlic2D(1:nbp_lon,j), &
    1313                 pctsrf2D(1:nbp_lon,j,is_lic)) / REAL(nbp_lon)
     1322                rlic_in_frac2D(1:nbp_lon,j)) / REAL(nbp_lon)
    13141323        ENDDO
    13151324   
     
    13481357            calving(k)=0
    13491358            DO j = 1, jj_nb
    1350                calving(k)= calving(k)+DOT_PRODUCT(cpl_rlic2D(:,j)*area_calving(:,j,k),pctsrf2D(:,j,is_lic))
     1359               calving(k)= calving(k)+DOT_PRODUCT(cpl_rlic2D(:,j)*area_calving(:,j,k),rlic_in_frac2D(:,j))
    13511360            ENDDO
    13521361         ENDDO
  • LMDZ6/trunk/libf/phylmd/create_etat0_unstruct.F90

    r3900 r4283  
    5353  USE phys_state_var_mod
    5454  USE indice_sol_mod
     55  USE surface_data,      ONLY: landice_opt
    5556  USE mod_phys_lmdz_para
    5657  USE print_control_mod, ONLY: lunout
     
    8384      CALL xios_recv_field("qs",qsol_mpi)
    8485      CALL xios_recv_field("mask",zmasq_mpi)
    85       CALL xios_recv_field("landice",lic_mpi)
     86      IF (landice_opt .LT. 2) CALL xios_recv_field("landice",lic_mpi)
    8687      CALL xios_recv_field("zmea",zmea_mpi)
    8788      CALL xios_recv_field("zstd",zstd_mpi)
     
    9394    CALL scatter_omp(qsol_mpi,qsol)
    9495    CALL scatter_omp(zmasq_mpi,zmasq)
    95     CALL scatter_omp(lic_mpi,lic)
     96    IF (landice_opt .LT. 2) CALL scatter_omp(lic_mpi,lic)
    9697    CALL scatter_omp(zmea_mpi,zmea)
    9798    CALL scatter_omp(zstd_mpi,zstd)
     
    110111
    111112    pctsrf(:,:) = 0
    112     pctsrf(:,is_lic)=lic
    113     WHERE(pctsrf(:,is_lic)<EPSFRA) pctsrf(:,is_lic)=0.
    114     WHERE(zmasq(:)<EPSFRA)         pctsrf(:,is_lic)=0.
    115 
    116     pctsrf(:,is_ter)=zmasq(:)
    117 
    118 !--- Adequation with soil/sea mask
    119     DO ji=1,klon
    120       IF(zmasq(ji)>EPSFRA) THEN
    121         IF(pctsrf(ji,is_lic)>=zmasq(ji)) THEN
    122           pctsrf(ji,is_lic)=zmasq(ji)
    123           pctsrf(ji,is_ter)=0.
    124         ELSE
    125           pctsrf(ji,is_ter)=zmasq(ji)-pctsrf(ji,is_lic)
    126           IF(pctsrf(ji,is_ter)<EPSFRA) THEN
    127             pctsrf(ji,is_ter)=0.
    128             pctsrf(ji,is_lic)=zmasq(ji)
    129           END IF
    130         END IF
    131       END IF
    132     END DO
     113    IF (landice_opt .LT. 2) THEN
     114       pctsrf(:,is_lic)=lic
     115       WHERE(pctsrf(:,is_lic)<EPSFRA) pctsrf(:,is_lic)=0.
     116       WHERE(zmasq(:)<EPSFRA)         pctsrf(:,is_lic)=0.
     117
     118       pctsrf(:,is_ter)=zmasq(:)
     119       
     120       !--- Adequation with soil/sea mask
     121       DO ji=1,klon
     122          IF(zmasq(ji)>EPSFRA) THEN
     123             IF(pctsrf(ji,is_lic)>=zmasq(ji)) THEN
     124                pctsrf(ji,is_lic)=zmasq(ji)
     125                pctsrf(ji,is_ter)=0.
     126             ELSE
     127                pctsrf(ji,is_ter)=zmasq(ji)-pctsrf(ji,is_lic)
     128                IF(pctsrf(ji,is_ter)<EPSFRA) THEN
     129                   pctsrf(ji,is_ter)=0.
     130                   pctsrf(ji,is_lic)=zmasq(ji)
     131                END IF
     132             END IF
     133          END IF
     134       END DO
     135   
     136    ELSE
     137       ! landice_opt=>2 : no land ice
     138       pctsrf(:,is_lic)=0.0
     139       pctsrf(:,is_ter)=zmasq(:)
     140    END IF
     141
     142
     143
    133144
    134145
  • LMDZ6/trunk/libf/phylmd/pbl_surface_mod.F90

    r3956 r4283  
    1414  USE mod_grid_phy_lmdz,   ONLY : klon_glo
    1515  USE ioipsl
    16   USE surface_data,        ONLY : type_ocean, ok_veget
     16  USE surface_data,        ONLY : type_ocean, ok_veget, landice_opt
    1717  USE surf_land_mod,       ONLY : surf_land
    1818  USE surf_landice_mod,    ONLY : surf_landice
     
    20562056       CASE(is_lic)
    20572057          ! Martin
    2058           CALL surf_landice(itap, dtime, knon, ni, &
    2059                rlon, rlat, debut, lafin, &
    2060                yrmu0, ylwdown, yalb, zgeo1, &
    2061                ysolsw, ysollw, yts, ypplay(:,1), &
    2062 !!jyg               ycdragh, ycdragm, yrain_f, ysnow_f, yt(:,1), yq(:,1),&
    2063                ycdragh, ycdragm, yrain_f, ysnow_f, yt1, yq1,&
    2064                AcoefH, AcoefQ, BcoefH, BcoefQ, &
    2065                AcoefU, AcoefV, BcoefU, BcoefV, &
    2066                ypsref, yu1, yv1, ygustiness, yrugoro, pctsrf, &
    2067                ysnow, yqsurf, yqsol, yagesno, &
    2068                ytsoil, yz0m, yz0h, SFRWL, yalb_dir_new, yalb_dif_new, yevap,yfluxsens,yfluxlat, &
    2069                ytsurf_new, y_dflux_t, y_dflux_q, &
    2070                yzmea, yzsig, ycldt, &
    2071                ysnowhgt, yqsnow, ytoice, ysissnow, &
    2072                yalb3_new, yrunoff, &
    2073                y_flux_u1, y_flux_v1)
    2074 
    2075 !jyg<
    2076 !!          alb3_lic(:)=0.
    2077 !>jyg
    2078           DO j = 1, knon
    2079              i = ni(j)
    2080              alb3_lic(i) = yalb3_new(j)
    2081              snowhgt(i)   = ysnowhgt(j)
    2082              qsnow(i)     = yqsnow(j)
    2083              to_ice(i)    = ytoice(j)
    2084              sissnow(i)   = ysissnow(j)
    2085              runoff(i)    = yrunoff(j)
    2086           ENDDO
    2087           ! Martin
    2088 ! Special DICE MPL 05082013 puis BOMEX MPL 20150410
    2089        IF (ok_prescr_ust) THEN
    2090           DO j=1,knon
    2091           y_flux_u1(j)=ycdragm(j)*(1.+sqrt(yu(j,1)*yu(j,1)+yv(j,1)*yv(j,1)))*yu(j,1)*ypplay(j,1)/RD/yt(j,1)
    2092           y_flux_v1(j)=ycdragm(j)*(1.+sqrt(yu(j,1)*yu(j,1)+yv(j,1)*yv(j,1)))*yv(j,1)*ypplay(j,1)/RD/yt(j,1)
    2093           ENDDO
    2094       ENDIF
     2058
     2059          IF (landice_opt .LT. 2) THEN
     2060             ! Land ice is treated by LMDZ and not by ORCHIDEE
     2061             CALL surf_landice(itap, dtime, knon, ni, &
     2062                  rlon, rlat, debut, lafin, &
     2063                  yrmu0, ylwdown, yalb, zgeo1, &
     2064                  ysolsw, ysollw, yts, ypplay(:,1), &
     2065                  !!jyg               ycdragh, ycdragm, yrain_f, ysnow_f, yt(:,1), yq(:,1),&
     2066                  ycdragh, ycdragm, yrain_f, ysnow_f, yt1, yq1,&
     2067                  AcoefH, AcoefQ, BcoefH, BcoefQ, &
     2068                  AcoefU, AcoefV, BcoefU, BcoefV, &
     2069                  ypsref, yu1, yv1, ygustiness, yrugoro, pctsrf, &
     2070                  ysnow, yqsurf, yqsol, yagesno, &
     2071                  ytsoil, yz0m, yz0h, SFRWL, yalb_dir_new, yalb_dif_new, yevap,yfluxsens,yfluxlat, &
     2072                  ytsurf_new, y_dflux_t, y_dflux_q, &
     2073                  yzmea, yzsig, ycldt, &
     2074                  ysnowhgt, yqsnow, ytoice, ysissnow, &
     2075                  yalb3_new, yrunoff, &
     2076                  y_flux_u1, y_flux_v1)
     2077             
     2078             !jyg<
     2079             !!          alb3_lic(:)=0.
     2080             !>jyg
     2081             DO j = 1, knon
     2082                i = ni(j)
     2083                alb3_lic(i) = yalb3_new(j)
     2084                snowhgt(i)   = ysnowhgt(j)
     2085                qsnow(i)     = yqsnow(j)
     2086                to_ice(i)    = ytoice(j)
     2087                sissnow(i)   = ysissnow(j)
     2088                runoff(i)    = yrunoff(j)
     2089             ENDDO
     2090             ! Martin
     2091             ! Special DICE MPL 05082013 puis BOMEX MPL 20150410
     2092             IF (ok_prescr_ust) THEN
     2093                DO j=1,knon
     2094                   y_flux_u1(j)=ycdragm(j)*(1.+sqrt(yu(j,1)*yu(j,1)+yv(j,1)*yv(j,1)))*yu(j,1)*ypplay(j,1)/RD/yt(j,1)
     2095                   y_flux_v1(j)=ycdragm(j)*(1.+sqrt(yu(j,1)*yu(j,1)+yv(j,1)*yv(j,1)))*yv(j,1)*ypplay(j,1)/RD/yt(j,1)
     2096                ENDDO
     2097             ENDIF
     2098             
     2099          END IF
    20952100         
    20962101       CASE(is_oce)
  • LMDZ6/trunk/libf/phylmd/surf_land_mod.F90

    r3435 r4283  
    2424    USE dimphy
    2525    USE surface_data, ONLY    : ok_veget
    26 ! >> PC
    27     USE carbon_cycle_mod
    28 ! << PC
     26    USE carbon_cycle_mod
     27
    2928
    3029    ! See comments in each module surf_land_orchidee_xxx for compatiblity with ORCHIDEE
     
    4544    USE surf_land_orchidee_nounstruct_mod
    4645#else
     46#if ORCHIDEE_NOLIC
     47    ! Compilation with cpp key ORCHIDEE_NOLIC
     48    USE surf_land_orchidee_nolic_mod
     49#else
     50    ! Default version
    4751    USE surf_land_orchidee_mod
    4852#endif
     
    5054#endif
    5155#endif
    52 
     56#endif
     57   
    5358    USE surf_land_bucket_mod
    5459    USE calcul_fluxs_mod
    5560    USE indice_sol_mod
    56 
    57 ! >> PC
    5861    USE print_control_mod, ONLY: lunout
    59 ! << PC
    6062
    6163    INCLUDE "dimsoil.h"
  • LMDZ6/trunk/libf/phylmd/surf_land_orchidee_mod.F90

    r3551 r4283  
    55#ifndef ORCHIDEE_NOFREIN
    66#ifndef ORCHIDEE_NOUNSTRUCT
     7#ifndef ORCHIDEE_NOLIC
    78!
    89! This module controles the interface towards the model ORCHIDEE.
    910!
    1011! Compatibility with ORCHIDIEE :
    11 ! The current version can be used with ORCHIDEE/trunk from revision 4465.
     12! The current version can be used with ORCHIDEE/trunk from revision 7757.
    1213! This interface is used if none of the cpp keys ORCHIDEE_NOOPENMP,
    13 ! ORCHIDEE_NOZ0H or ORCHIDEE_NOFREIN is set.
     14! ORCHIDEE_NOZ0H, ORCHIDEE_NOFREIN or ORCHIDEE_NOLIC is set.
    1415!
    1516! Subroutines in this module : surf_land_orchidee
     
    2021  USE dimphy
    2122#ifdef CPP_VEGET
    22   USE intersurf     ! module d'ORCHIDEE
    23 #endif
    24   USE cpl_mod,      ONLY : cpl_send_land_fields
    25   USE surface_data, ONLY : type_ocean
     23  USE intersurf     ! module in ORCHIDEE
     24#endif
     25  USE cpl_mod,      ONLY : cpl_send_land_fields, cpl_send_landice_fields
     26  USE surface_data, ONLY : type_ocean, landice_opt
    2627  USE geometry_mod, ONLY : dx, dy, boundslon, boundslat,longitude, latitude, cell_area,  ind_cell_glo
    2728  USE mod_grid_phy_lmdz
     
    152153    INTEGER                                   :: error
    153154    REAL, DIMENSION(klon)                     :: swdown_vrai
     155    REAL, DIMENSION(klon)                     :: run_off_lic        !! run off from land ice defined in ORCHIDEE, contains calving, melting and liquid precipitation
     156    REAL, DIMENSION(klon)                     :: run_off_lic_frac   !! cell fraction corresponding to run_off_lic
     157    REAL, DIMENSION(klon)                     :: blowingsnow_flux   !! blowing snow flux
    154158    CHARACTER (len = 20)                      :: modname = 'surf_land_orchidee'
    155159    CHARACTER (len = 80)                      :: abort_message
     
    570574               lon_scat, lat_scat, q2m(1:knon), t2m(1:knon), z0h_new(1:knon), nvm_orch, &
    571575               grid=grid_type, bounds_latlon=bounds_lalo, cell_area=area, ind_cell_glo=ind_cell, &
    572                field_out_names=cfname_out, field_in_names=cfname_in(1:nbcf_in_orc))
     576               field_out_names=cfname_out, field_in_names=cfname_in(1:nbcf_in_orc), &
     577               coszang=yrmu0(1:knon))
    573578#endif         
    574579       ENDIF
     
    603608            fields_out=yfields_out(1:knon,1:nbcf_out),  &
    604609            fields_in=yfields_in(1:knon,1:nbcf_in_orc), &
    605             coszang=yrmu0(1:knon))
     610            coszang=yrmu0(1:knon), run_off_lic=run_off_lic(1:knon), run_off_lic_frac=run_off_lic_frac(1:knon), blowingsnow_flux=blowingsnow_flux(1:knon))
    606611#endif       
    607612    ENDIF
     
    616621       CALL cpl_send_land_fields(itime, knon, knindex, &
    617622            riverflow, coastalflow)
     623       IF (landice_opt .GE. 2) THEN
     624          CALL cpl_send_landice_fields(itime, knon, knindex, run_off_lic, run_off_lic_frac)
     625       END IF
    618626    ENDIF
    619627
     
    850858#endif
    851859#endif
     860#endif
    852861END MODULE surf_land_orchidee_mod
  • LMDZ6/trunk/libf/phylmd/surf_land_orchidee_nolic_mod.F90

    r4282 r4283  
    11!
    2 MODULE surf_land_orchidee_mod
    3 #ifndef ORCHIDEE_NOOPENMP
    4 #ifndef ORCHIDEE_NOZ0H
    5 #ifndef ORCHIDEE_NOFREIN
    6 #ifndef ORCHIDEE_NOUNSTRUCT
     2MODULE surf_land_orchidee_nolic_mod
     3#ifdef ORCHIDEE_NOLIC
    74!
    85! This module controles the interface towards the model ORCHIDEE.
    96!
    107! Compatibility with ORCHIDIEE :
    11 ! The current version can be used with ORCHIDEE/trunk from revision 4465.
    12 ! This interface is used if none of the cpp keys ORCHIDEE_NOOPENMP,
    13 ! ORCHIDEE_NOZ0H or ORCHIDEE_NOFREIN is set.
    14 !
     8! This module is compiled only if cpp key ORCHIDEE_NOLIC is defined.
     9! The current version can be used with ORCHIDEE/trunk from revision 4465-7757.
     10! (it can be used for later revisions also but it is not needed.)
     11! 
    1512! Subroutines in this module : surf_land_orchidee
    1613!                              Init_orchidee_index
     
    847844!
    848845#endif
    849 #endif
    850 #endif
    851 #endif
    852 END MODULE surf_land_orchidee_mod
     846END MODULE surf_land_orchidee_nolic_mod
  • LMDZ6/trunk/libf/phylmd/surf_landice_mod.F90

    r4245 r4283  
    115115    INTEGER                  :: i,j,nt
    116116    REAL, DIMENSION(klon)    :: fqfonte,ffonte
     117    REAL, DIMENSION(klon)    :: run_off_lic_frac
    117118    REAL, DIMENSION(klon)    :: emis_new                  !Emissivity
    118119    REAL, DIMENSION(klon)    :: swdown,lwdown
     
    361362! Send run-off on land-ice to coupler if coupled ocean.
    362363! run_off_lic has been calculated in fonte_neige or surf_inlandsis
    363 !
    364 !****************************************************************************************
    365     IF (type_ocean=='couple') THEN
    366        CALL cpl_send_landice_fields(itime, knon, knindex, run_off_lic)
     364! If landice_opt>=2, corresponding call is done from surf_land_orchidee
     365!****************************************************************************************
     366    IF (type_ocean=='couple' .AND. landice_opt .LT. 2) THEN
     367       ! Compress fraction where run_off_lic is active (here all pctsrf(is_lic))
     368       run_off_lic_frac(:)=0.0
     369       DO j = 1, knon
     370          i = knindex(j)
     371          run_off_lic_frac(j) = pctsrf(i,is_lic)
     372       ENDDO
     373
     374       CALL cpl_send_landice_fields(itime, knon, knindex, run_off_lic, run_off_lic_frac)
    367375    ENDIF
    368376
  • LMDZ6/trunk/makelmdz

    r4186 r4283  
    111111[-prod / -dev / -debug]    : compilation mode production (default) / developement / debug
    112112[-c false/MPI1/MPI2]       : coupling with ocean model : MPI1/MPI2/false (default: false)
    113 [-v false/orchidee2.0/orchidee1.9/true] : version of the vegetation model to include (default: false)
     113[-v false/orchideetrunk/orchidee2.1/orchidee2.0/orchidee1.9] : version of the vegetation model to include (default: false)
    114114          false       : no vegetation model
    115           orchidee2.1 : compile using ORCHIDEE 2.1 (or more recent version)
     115          orchideetrunk : compile using ORCHIDEE trunk from revision 7757 or higher
     116          orchidee2.1 : compile using ORCHIDEE 2.1 until 4.1 included or until revision 7757 on the trunk
    116117          orchidee2.0 : compile using ORCHIDEE 2.0 (or more recent version)
    117118          orchidee1.9 : compile using ORCHIDEE up to the version including OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6
     
    442443
    443444#==============================================================================
    444 if [ "$veget" = "true" -o "$veget" = "orchidee1.9" -o "$veget" = "orchidee2.0" -o "$veget" = "orchidee2.1" ]
     445if [ "$veget" = "true" -o "$veget" = "orchidee1.9" -o "$veget" = "orchidee2.0" -o "$veget" = "orchidee2.1" -o "$veget" = "orchideetrunk" ]
    445446then
    446447
     
    455456      CPP_KEY="$CPP_KEY ORCHIDEE_NOUNSTRUCT"
    456457   elif [[ "$veget" == "orchidee2.1" ]] ; then
     458      CPP_KEY="$CPP_KEY ORCHIDEE_NOLIC"
    457459      orch_libs="sechiba parameters stomate parallel orglob orchidee"
     460   elif [[ "$veget" == "orchideetrunk" ]] ; then
     461      orch_libs="orchidee"
    458462   else
    459463      orch_libs="sechiba parameters stomate parallel orglob"
  • LMDZ6/trunk/makelmdz_fcm

    r4276 r4283  
    9595[-prod / -dev / -debug]    : compilation mode production (default) / developement / debug
    9696[-c false/MPI1/OMCT]       : coupling with ocean model : MPI1/OMCT/false (default: false)
    97 [-v false/orchidee2.0/orchidee1.9/true] : version of the vegetation model to include (default: false)
     97[-v false/orchideetrunk/orchidee2.1/orchidee2.0/orchidee1.9] : version of the vegetation model to include (default: false)
    9898          false       : no vegetation model
    99           orchidee2.1 : compile using ORCHIDEE 2.1 (or more recent version)
     99          orchideetrunk : compile using ORCHIDEE trunk from revision 7757 or higher
     100          orchidee2.1 : compile using ORCHIDEE 2.1 until 4.1 included or until revision 7757 on the trunk
    100101          orchidee2.0 : compile using ORCHIDEE 2.0
    101102          orchidee1.9 : compile using ORCHIDEE up to the version including OpenMP in ORCHIDEE : tag 1.9-1.9.5(version AR5)-1.9.6
     
    433434fi
    434435
    435 if [ "$veget" = "true" -o "$veget" = "orchidee1.9" -o "$veget" = "orchidee2.0" -o "$veget" = "orchidee2.1" ]
     436if [ "$veget" = "true" -o "$veget" = "orchidee1.9" -o "$veget" = "orchidee2.0" -o "$veget" = "orchidee2.1" -o "$veget" = "orchideetrunk" ]
    436437then
    437438#NB: option 'true': for backward compatibility. To be used with ORCHIDEE tag 1.9-1.9.6
     
    448449      CPP_KEY="$CPP_KEY ORCHIDEE_NOUNSTRUCT"
    449450   elif [[ "$veget" == "orchidee2.1" ]] ; then
     451      CPP_KEY="$CPP_KEY ORCHIDEE_NOLIC"
    450452      orch_libs="sechiba parameters stomate parallel orglob orchidee"
     453   elif [[ "$veget" == "orchideetrunk" ]] ; then
     454      orch_libs="orchidee"
    451455   else
    452456      orch_libs="sechiba parameters stomate parallel orglob"
Note: See TracChangeset for help on using the changeset viewer.