Changeset 4527


Ignore:
Timestamp:
May 9, 2023, 11:20:58 AM (13 months ago)
Author:
idelkadi
Message:

Initialization of the climatic fields for the 1st call to the COSP simulator. This, to solve the crash of LMDZ in debug mode when we activate COSP. This 1st call is only used to define the vertical axes for the COSP output files.
2 files added:

  • ini_COSP.h for variable declarations
  • ini_COSP.F90: for field initialization
Location:
LMDZ6/trunk/libf/phylmd
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/physiq_mod.F90

    r4523 r4527  
    11551155    ! Declarations pour Simulateur COSP
    11561156    !============================================================
     1157    ! AI 10-22
     1158#ifdef CPP_COSP
     1159    include "ini_COSP.h"
     1160#endif
    11571161    real :: mr_ozone(klon,klev), phicosp(klon,klev)
    11581162
     
    16941698      IF (.NOT. create_etat0_limit) CALL init_readaerosolstrato(flag_aerosol_strat)  !! initialise aero strato from file for XIOS interpolation (unstructured_grid)
    16951699
     1700      if (ok_cosp) then
    16961701#ifdef CPP_COSP
    1697       IF (ok_cosp) THEN
    1698 !           DO k = 1, klev
    1699 !             DO i = 1, klon
    1700 !               phicosp(i,k) = pphi(i,k) + pphis(i)
    1701 !             ENDDO
    1702 !           ENDDO
     1702        ! A.I : Initialisations pour le 1er passage a Cosp
     1703        CALL ini_COSP(ref_liq_cosp0,ref_ice_cosp0,pctsrf_cosp0,zu10m_cosp0,zv10m_cosp0, &
     1704               zxtsol_cosp0,zx_rh_cosp0,cldfra_cosp0,rnebcon_cosp0,flwc_cosp0, &
     1705               fiwc_cosp0,prfl_cosp0,psfl_cosp0,pmflxr_cosp0,pmflxs_cosp0, &
     1706               mr_ozone_cosp0,cldtau_cosp0,cldemi_cosp0,JrNt_cosp0)
     1707
    17031708        CALL phys_cosp(itap,phys_tstep,freq_cosp, &
    17041709               ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP, &
     
    17131718               pmflxr(:,1:klev),pmflxs(:,1:klev), &
    17141719               mr_ozone,cldtau, cldemi)
    1715       ENDIF
    17161720#endif
    17171721
    17181722#ifdef CPP_COSP2
    1719         IF (ok_cosp) THEN
    1720 !           DO k = 1, klev
    1721 !             DO i = 1, klon
    1722 !               phicosp(i,k) = pphi(i,k) + pphis(i)
    1723 !             ENDDO
    1724 !           ENDDO
    17251723          CALL phys_cosp2(itap,phys_tstep,freq_cosp, &
    17261724               ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP, &
     
    17351733               pmflxr(:,1:klev),pmflxs(:,1:klev), &
    17361734               mr_ozone,cldtau, cldemi)
    1737        ENDIF
    17381735#endif
    17391736
    17401737#ifdef CPP_COSPV2
    1741         IF (ok_cosp) THEN
    1742            DO k = 1, klev
    1743              DO i = 1, klon
    1744                phicosp(i,k) = pphi(i,k) + pphis(i)
    1745              ENDDO
    1746            ENDDO
    17471738          CALL lmdz_cosp_interface(itap,phys_tstep,freq_cosp, &
    17481739               ok_mensuelCOSP,ok_journeCOSP,ok_hfCOSP, &
     
    17571748               pmflxr(:,1:klev),pmflxs(:,1:klev), &
    17581749               mr_ozone,cldtau, cldemi)
    1759        ENDIF
    17601750#endif
     1751      ENDIF
    17611752
    17621753       !
Note: See TracChangeset for help on using the changeset viewer.