Changeset 5109 for LMDZ6/trunk/libf


Ignore:
Timestamp:
Jul 24, 2024, 11:16:13 AM (4 months ago)
Author:
Sebastien Nguyen
Message:

added runoffland (bucket runoff) to outputs and automatic output for water isotopes defined in tracer.def

Location:
LMDZ6/trunk/libf/phylmd
Files:
3 edited

Legend:

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

    r5084 r5109  
    406406      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxfluxlat, zxtsol, snow_lsc, zxfqfonte
    407407!$OMP THREADPRIVATE(zxfluxlat, zxtsol, snow_lsc, zxfqfonte)
    408       REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxrunofflic
    409 !$OMP THREADPRIVATE(zxrunofflic)
     408!SN runoffdiag
     409      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxrunofflic, runoff_diag
     410!$OMP THREADPRIVATE(zxrunofflic, runoff_diag)
    410411      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: zxqsurf, rain_lsc, rain_num
    411412!$OMP THREADPRIVATE(zxqsurf, rain_lsc, rain_num)
     
    413414      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: xtevap,xtprw
    414415!$OMP THREADPRIVATE(xtevap,xtprw)
    415       REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: h1_diag,runoff_diag
     416      REAL,ALLOCATABLE,SAVE,DIMENSION(:) :: h1_diag
    416417      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: xtrunoff_diag
    417 !$OMP THREADPRIVATE(h1_diag,runoff_diag,xtrunoff_diag)
     418!$OMP THREADPRIVATE(h1_diagv,xtrunoff_diag)
    418419      REAL,ALLOCATABLE,SAVE,DIMENSION(:,:) :: zxfxtcalving
    419420!$OMP THREADPRIVATE(zxfxtcalving)
     
    10541055      ALLOCATE(zxfqcalving(klon), zxfluxlat(klon))
    10551056      ALLOCATE(zxtsol(klon), snow_lsc(klon), zxfqfonte(klon), zxqsurf(klon))
    1056       ALLOCATE(zxrunofflic(klon))
     1057! SN add runoff_diag
     1058      ALLOCATE(zxrunofflic(klon), runoff_diag(klon))
     1059      runoff_diag(:)=0.
    10571060      ALLOCATE(zxustartlic(klon), zxrhoslic(klon), zxqsaltlic(klon))
    10581061      zxustartlic(:)=0. ; zxrhoslic(:)=0. ; zxqsaltlic(:)=0.
     
    10691072      ALLOCATE(xtrain_lsc(ntraciso,klon))
    10701073      ALLOCATE(xtrunoff_diag(niso,klon))
    1071       ALLOCATE(h1_diag(klon),runoff_diag(klon))
     1074      ALLOCATE(h1_diag(klon))
    10721075!SN
    1073       runoff_diag(:)=0. ; xtrunoff_diag(:,:)=0. ! because variables are only given values on knon grid points
     1076      xtrunoff_diag(:,:)=0. ! because variables are only given values on knon grid points
    10741077#endif
    10751078!
     
    14741477      DEALLOCATE(uwat, vwat)
    14751478      DEALLOCATE(zxfqcalving, zxfluxlat)
    1476       DEALLOCATE(zxrunofflic)
     1479! SN runoff_diag
     1480      DEALLOCATE(zxrunofflic, runoff_diag)
    14771481      DEALLOCATE(zxustartlic, zxrhoslic, zxqsaltlic)
    14781482      DEALLOCATE(zxtsol, snow_lsc, zxfqfonte, zxqsurf)
     
    15031507      DEALLOCATE(dxtvdf_x, dxtvdf_w)
    15041508      DEALLOCATE(xt_therm)
    1505       DEALLOCATE(h1_diag,runoff_diag,xtrunoff_diag)
     1509      DEALLOCATE(h1_diag,xtrunoff_diag)
    15061510#endif
    15071511!
  • LMDZ6/trunk/libf/phylmd/phys_output_ctrlout_mod.F90

    r5056 r5109  
    21102110  TYPE(ctrl_out), SAVE :: o_runoff = ctrl_out((/ 1, 1, 10, 1, 10, 10, 11, 11, 11, 11/), &
    21112111    'runoff', 'Run-off rate land ice', 'kg/m2/s', (/ ('', i=1, 10) /))
    2112 #ifdef ISO
     2112! SN add runoff_diag
     2113!#ifdef ISO
    21132114  TYPE(ctrl_out), SAVE :: o_runoff_diag = ctrl_out((/ 1, 1, 10, 1, 10, 10, 11, 11, 11, 11/), &
    21142115    'runoffland', 'Run-off rate land for bucket', 'kg/m2/s', (/ ('', i=1, 10) /))
    2115 #endif
     2116!#endif
    21162117  TYPE(ctrl_out), SAVE :: o_albslw3 = ctrl_out((/ 1, 1, 1, 1, 10, 10, 11, 11, 11, 11/), &
    21172118    'albslw3', 'Surface albedo LW3', '-', (/ ('', i=1, 10) /))
  • LMDZ6/trunk/libf/phylmd/phys_output_write_mod.F90

    r5084 r5109  
    6464         o_fder, o_ffonte, o_fqcalving, o_fqfonte, o_mrroli, o_runofflic, &
    6565         o_taux, o_tauy, o_snowsrf, o_qsnow, &
    66          o_snowhgt, o_toice, o_sissnow, o_runoff, &
     66! SN runoff_diag
     67         o_snowhgt, o_toice, o_sissnow, o_runoff, o_runoff_diag, &
    6768         o_albslw3, o_pourc_srf, o_fract_srf, &
    6869         o_taux_srf, o_tauy_srf, o_tsol_srf, &
     
    207208! Isotopes
    208209         o_xtprecip,o_xtplul,o_xtpluc,o_xtovap,o_xtoliq,o_xtcond, &
    209          o_runoff_diag, o_xtrunoff_diag, &
     210         o_xtrunoff_diag, &
    210211         o_xtevap,o_dxtdyn,o_dxtldyn,o_dxtcon,o_dxtlsc,o_dxteva, &
    211212         o_dxtajs,o_dxtvdf,o_dxtthe, o_dxtch4, &
     
    319320         zxffonte, zxfqcalving, zxfqfonte, zxrunofflic, fluxu, &
    320321         fluxv, zxsnow, qsnow, snowhgt, to_ice, &
    321          sissnow, runoff, albsol3_lic, evap_pot, &
     322! SN runoff_diag
     323         sissnow, runoff, runoff_diag, albsol3_lic, evap_pot, &
    322324         t2m, fluxt, fluxlat, fsollw, fsolsw, &
    323325         wfbils, wfevap, &
     
    393395        d_xt_ajs, d_xt_ajsb, &
    394396        d_xt_prod_nucl,d_xt_cosmo,d_xt_decroiss, &
    395         runoff_diag, xtrunoff_diag, &
     397        xtrunoff_diag, &
    396398#endif
    397399         ep, epmax_diag, &  ! epmax_cape
     
    449451    USE indice_sol_mod, ONLY: nbsrf
    450452#ifdef ISO
    451     USE isotopes_mod, ONLY: iso_HTO
     453    USE isotopes_mod, ONLY: iso_HTO, isoName
    452454#endif
    453455    USE geometry_mod, ONLY: cell_area, latitude_deg, longitude_deg
     
    530532    CHARACTER(LEN=maxlen) :: unt
    531533#endif
     534
     535#ifdef ISO
     536    CHARACTER(LEN=maxlen) :: outiso
     537#endif
     538
    532539    REAL,DIMENSION(klon,klev) :: z, dz
    533540    REAL,DIMENSION(klon)      :: zrho, zt
     
    28372844       end if
    28382845
     2846    !! runoff land bucket - ajout S. Nguyen 23 07 2024
     2847    CALL histwrite_phy(o_runoff_diag, runoff_diag)
     2848
    28392849#ifdef ISO
    28402850    !write(*,*) 'tmp phys_output_write: ntiso=',ntiso
    2841     !! runoff land bucket - ajout S. Nguyen 25 avril 2024
    2842     CALL histwrite_phy(o_runoff_diag, runoff_diag)
    2843 
    2844     do ixt=1,ntiso
     2851
     2852    DO ixt = 1, ntiso
    28452853        !write(*,*) 'ixt,o_xtovap(ixt)=',ixt,o_xtovap(ixt)
    28462854        IF (vars_defined) zx_tmp_fi2d(:) = xtrain_fall(ixt,:) + xtsnow_fall(ixt,:)
     
    29192927          ENDDO !  iff
    29202928#endif
     2929
     2930!SN activate water isotopes present in tracer.def
     2931#ifdef ISO
     2932          DO ixt = 1, ntiso
     2933            outiso = TRIM(isoName(ixt))
     2934            i = INDEX(outiso, '_', .TRUE.)
     2935            outiso = outiso(1:i-1)//outiso(i+1:LEN_TRIM(outiso))
     2936            ! dayly
     2937            CALL xios_set_fieldgroup_attr("dd_2D_"//TRIM(outiso), enabled=.TRUE.)
     2938            CALL xios_set_fieldgroup_attr("dd_3D_"//TRIM(outiso), enabled=.TRUE.)
     2939            ! monthly
     2940            CALL xios_set_fieldgroup_attr("mm_2D_"//TRIM(outiso), enabled=.TRUE.)
     2941            CALL xios_set_fieldgroup_attr("mm_3D_"//TRIM(outiso), enabled=.TRUE.)
     2942
     2943          ENDDO
     2944#endif
    29212945          !On finalise l'initialisation:
    29222946          IF (using_xios) CALL wxios_closedef()
Note: See TracChangeset for help on using the changeset viewer.