Changeset 3174 for trunk/LMDZ.MARS


Ignore:
Timestamp:
Jan 11, 2024, 3:15:26 PM (11 months ago)
Author:
jbclement
Message:

Mars PCM:
Correction of a bug: 'perennial_co2ice' was not initialized if there was no "startfi.nc" file.
JBC

Location:
trunk/LMDZ.MARS
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/changelog.txt

    r3169 r3174  
    44304430Minor fix for XIOS output of a scalar in write_output_mod.F90.
    44314431Also added more helpful error messages in xios_output_mod.F90.
     4432
     4433== 11/01/2024 == JBC
     4434Correction of a bug: 'perennial_co2ice' was not initialized if there was no "startfi.nc" file.
  • trunk/LMDZ.MARS/libf/phymars/dyn1d/init_testphys1d_mod.F90

    r3152 r3174  
    1515use surfdat_h,                only: albedodat, z0_default, z0, emissiv, emisice, albedice, iceradius, dtemisice,      &
    1616                                    zmea, zstd, zsig, zgam, zthe, hmons, summit, base, phisfi, watercaptag, watercap, &
    17                                     tsurf, emis, qsurf
     17                                    tsurf, emis, qsurf, perennial_co2ice
    1818use infotrac,                 only: nqtot, tname, nqperes, nqfils
    1919use read_profile_mod,         only: read_profile
     
    4040use nonoro_gwd_ran_mod,       only: du_nonoro_gwd, dv_nonoro_gwd
    4141use conf_phys_mod,            only: conf_phys
     42use paleoclimate_mod,         only: paleoclimate
    4243! Mostly for XIOS outputs:
    4344use mod_const_mpi,            only: COMM_LMDZ
     
    652653write(*,*) " watercaptag = ",watercaptag
    653654
     655! Initialize perennial_co2ice
     656! ---------------------------
     657if (.not. therestartfi .and. paleoclimate) perennial_co2ice = 0.
     658
    654659! Check if the atmospheric water profile is specified
    655660! ---------------------------------------------------
  • trunk/LMDZ.MARS/libf/phymars/phyetat0_mod.F90

    r3144 r3174  
    853853
    854854! Perennial CO2 ice
    855     perennial_co2ice(:,:) = 0.
     855    perennial_co2ice = 0.
    856856    call get_field("perennial_co2ice",perennial_co2ice,found,indextime)
    857857    if (.not. found) then
     
    859859                   "<perennial_co2ice> is set as 10m at the South Pole"
    860860        if (abs(latitude(ngrid) - (-pi/2.)) < 1.e-5) then
    861             do islope = 1,nslope
    862                 perennial_co2ice(ngrid,islope) = 10*1.6e3 ! 10m which is convert to kg/m^2
    863                qsurf(ngrid,igcm_co2_tmp,islope) = qsurf(ngrid - 1,igcm_co2_tmp,islope) + perennial_co2ice(ngrid,islope) ! perennial ice + frost
    864             enddo
     861            perennial_co2ice(ngrid,:) = 10*1.6e3 ! 10m which is convert to kg/m^2
     862            qsurf(ngrid,igcm_co2_tmp,:) = qsurf(ngrid - 1,igcm_co2_tmp,:) + perennial_co2ice(ngrid,:) ! perennial ice + frost
    865863        endif
    866864    endif ! not found
    867865  else ! no startfiphyle
    868     h2o_ice_depth(:,:) = -1.
    869     lag_co2_ice(:,:) = -1.
    870     d_coef(:,:)= 4.e-4
    871     perennial_co2ice(:,:) = 0.
     866    h2o_ice_depth = -1.
     867    lag_co2_ice = -1.
     868    d_coef = 4.e-4
     869    perennial_co2ice = 0.
    872870    if (abs(latitude(ngrid) - (-pi/2.)) < 1.e-5) then
    873         do islope = 1,nslope
    874             perennial_co2ice(ngrid,islope) = 10*1.6e3 ! 10m which is convert to kg/m^2
    875             qsurf(ngrid,igcm_co2_tmp,islope) = qsurf(ngrid - 1,igcm_co2_tmp,islope) + perennial_co2ice(ngrid,islope) ! perennial ice + frost
    876         enddo
     871        perennial_co2ice(ngrid,:) = 10*1.6e3 ! 10m which is convert to kg/m^2
     872        qsurf(ngrid,igcm_co2_tmp,:) = qsurf(ngrid - 1,igcm_co2_tmp,:) + perennial_co2ice(ngrid,:) ! perennial ice + frost
    877873    endif
    878874  endif !startphy_file
    879875else
    880    h2o_ice_depth(:,:) = -1.
    881    lag_co2_ice(:,:) = -1.
    882    d_coef(:,:)= 4.e-4
    883    perennial_co2ice(:,:) = 0.
     876   h2o_ice_depth = -1.
     877   lag_co2_ice = -1.
     878   d_coef = 4.e-4
     879   perennial_co2ice = 0.
    884880endif !paleoclimate
    885881
Note: See TracChangeset for help on using the changeset viewer.