Ignore:
Timestamp:
Jan 17, 2025, 5:14:18 PM (6 days ago)
Author:
jbclement
Message:

PEM:

  • Albedo is now updated only at the end of the PEM (and not at every iteration) + Correct way to set it taking into account CO2/H2O ice and frost.
  • Cosmetic cleanings.

JBC

Location:
trunk/LMDZ.COMMON/libf/evolution
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.COMMON/libf/evolution/changelog.txt

    r3579 r3584  
    540540== 15/01/2025 == JBC
    541541Improvement of the Bash script tools in the deftank with an automatic error detection which ends the script with a message.
     542
     543== 17/01/2025 == JBC
     544- Albedo is now updated only at the end of the PEM (and not at every iteration) + Correct way to set it taking into account CO2/H2O ice and frost.
     545- Cosmetic cleanings.
  • trunk/LMDZ.COMMON/libf/evolution/deftank/PEMrun.job

    r3579 r3584  
    1616# Modify here the parameters depending on your setup
    1717####################################################
    18 # A few parameters that might need to be changed depending on your setup
    1918# Path to the arch.env to source:
    2019source ../trunk/LMDZ.COMMON/arch.env
  • trunk/LMDZ.COMMON/libf/evolution/deftank/modify_startfi_orbit.sh

    r3579 r3584  
    1010###########################################
    1111# Name of the file
    12 name_file = "startfi.nc"
     12name_file="startfi.nc"
    1313
    1414# New values for the orbital parameters
  • trunk/LMDZ.COMMON/libf/evolution/pem.F90

    r3578 r3584  
    7575#ifndef CPP_STD
    7676    use comsoil_h,          only: tsoil, nsoilmx, ini_comsoil_h, inertiedat, mlayer, inertiesoil, flux_geo, nqsoil, qsoil
    77     use surfdat_h,          only: tsurf, emis, qsurf, watercap, ini_surfdat_h, &
    78                                   albedodat, zmea, zstd, zsig, zgam, zthe,    &
    79                                   albedo_h2o_frost,frost_albedo_threshold,     &
    80                                   emissiv, watercaptag, perennial_co2ice
     77    use surfdat_h,          only: tsurf, qsurf, emis, emissiv, emisice, ini_surfdat_h,  &
     78                                  albedodat, albedice, albedo_h2o_frost, albedo_h2o_cap, &
     79                                  zmea, zstd, zsig, zgam, zthe, frost_albedo_threshold,  &
     80                                  watercap, watercaptag, perennial_co2ice, albedo_perennialco2
    8181    use dimradmars_mod,     only: totcloudfrac, albedo
    8282    use dust_param_mod,     only: tauscaling
     
    287287
    288288! Loop variables
    289 integer :: i, l, ig, nnq, t, islope, ig_loop, islope_loop, isoil
     289integer :: i, l, ig, nnq, t, islope, ig_loop, islope_loop, isoil, icap
    290290
    291291! Elapsed time with system clock
     
    384384    endif
    385385
    386     call init_testphys1d('start1D.txt','startfi.nc',therestart1D,therestartfi,ngrid,nlayer,610.,nq,q,            &
    387                          time_0,ps_start_dyn(1),ucov,vcov,teta,ndt,ptif,pks,dtphys,zqsat,dq,dqdyn,day0,day,gru,grv,w,  &
     386    call init_testphys1d('start1D.txt','startfi.nc',therestart1D,therestartfi,ngrid,nlayer,610.,nq,q,                 &
     387                         time_0,ps_start_dyn(1),ucov,vcov,teta,ndt,ptif,pks,dtphys,zqsat,dq,dqdyn,day0,day,gru,grv,w, &
    388388                         play,plev,latitude,longitude,cell_area,atm_wat_profile,atm_wat_tau)
    389389    ps_start_dyn(2) = ps_start_dyn(1)
     
    844844                        enddo
    845845                    enddo outer2
    846                 endif
    847                 if (h2o_ice(ig,islope) > frost_albedo_threshold) then
    848                     albedo(ig,1,islope) = albedo_h2o_frost
    849                     albedo(ig,2,islope) = albedo_h2o_frost
    850                 else
    851                     albedo(ig,1,islope) = albedodat(ig)
    852                     albedo(ig,2,islope) = albedodat(ig)
    853                     emis(ig,islope) = emissiv
    854846                endif
    855847            else if (co2_ice(ig,islope) > 1.e-10 .and. d_co2ice(ig,islope) > 1.e-10) then ! Put tsurf as tcond CO2
     
    11151107deallocate(zplev_start0,zplev_new)
    11161108
     1109! III_a.6 Albedo update for start file
     1110do ig = 1,ngrid
     1111    if (latitude(ig) < 0.) then
     1112        icap = 2 ! Southern hemisphere
     1113    else
     1114        icap = 1 ! Northern hemisphere
     1115    endif
     1116    do islope = 1,ngrid
     1117        ! Bare ground
     1118        albedo(ig,:,islope) = albedodat(ig)
     1119        emis(ig,islope) = emissiv
     1120
     1121        ! CO2 ice/frost is treated after H20 ice/frost because it is considered dominant
     1122        ! H2O ice
     1123        if (h2o_ice(ig,islope) > 0.) then
     1124            albedo(ig,:,islope) = albedo_h2o_cap
     1125            emis(ig,islope) = 1.
     1126        endif
     1127        ! CO2 ice
     1128        if (co2_ice(ig,islope) > 0.) then
     1129            albedo(ig,:,islope) = albedo_perennialco2(icap)
     1130            emis(ig,islope) = emisice(icap)
     1131        endif
     1132        ! H2O frost
     1133        if (qsurf(ig,igcm_h2o_ice,islope) > 0.) then
     1134            albedo(ig,:,islope) = albedo_h2o_frost
     1135            emis(ig,islope) = 1.
     1136        endif
     1137        ! CO2 frost
     1138        if (qsurf(ig,igcm_co2,islope) > 0.) then
     1139            albedo(ig,:,islope) = albedice(icap)
     1140            emis(ig,islope) = emisice(icap)
     1141        endif
     1142    enddo
     1143enddo
     1144
     1145! III_a.7 Orbital parameters update for start file
    11171146if (evol_orbit_pem) call recomp_orb_param(i_myear,i_myear_leg)
    11181147
  • trunk/LMDZ.COMMON/libf/evolution/recomp_tend_co2_mod.F90

    r3571 r3584  
    1616!=======================================================================
    1717!
    18 Routine that compute the evolution of the tendencie for co2 ice
     18To compute the evolution of the tendencie for co2 ice
    1919!
    2020!=======================================================================
     
    6767!=======================================================================
    6868!
    69 Routine that compute the evolution of the tendencie for h2o ice
     69To compute the evolution of the tendencie for h2o ice
    7070!
    7171!=======================================================================
  • trunk/LMDZ.COMMON/libf/evolution/reshape_XIOS_output.F90

    r3579 r3584  
    4242
    4343do numyear = 1,2
    44     write(*,*) 'numyear',numyear
    45     write(str(1:1),'(i1.1)') numyear
    46 
    47     state = nf90_open(path = "data2reshape_Y"//str//".nc", mode = nf90_nowrite, ncid = ncid1)
     44    write(str,'(i1.1)') numyear
     45    write(*,*) 'Reshaping of variables from "data2reshape_Y'//str//'.nc"...'
     46
     47    state = nf90_open(path = "data2reshape_Y"//str//".nc",mode = nf90_nowrite,ncid = ncid1)
    4848    if (state /= nf90_noerr) call handle_err(state)
    4949
     
    5757        endif
    5858    endif
    59     state = nf90_create(path = "data_PCM_Y"//str//".nc", cmode=or(nf90_noclobber,nf90_64bit_offset), ncid = ncid2)
     59    state = nf90_create(path = "data_PCM_Y"//str//".nc",cmode = or(nf90_noclobber,nf90_64bit_offset),ncid = ncid2)
    6060    if (state /= nf90_noerr) call handle_err(state)
    6161
     
    6969    allocate(varids_2(nvars))
    7070
    71     state = nf90_inq_dimids(ncid1, ndims, dimids, include_parents)
    72     if (state /= nf90_noerr) call handle_err(state)
    73     state = nf90_inq_varids(ncid1, nvars, varids)
     71    state = nf90_inq_dimids(ncid1,ndims,dimids,include_parents)
     72    if (state /= nf90_noerr) call handle_err(state)
     73    state = nf90_inq_varids(ncid1,nvars,varids)
    7474    if (state /= nf90_noerr) call handle_err(state)
    7575
    7676    do i = 1,ndims
    77         state = nf90_inquire_dimension(ncid1, dimids(i), name_, len_)
     77        state = nf90_inquire_dimension(ncid1,dimids(i),name_,len_)
    7878        if (state /= nf90_noerr) call handle_err(state)
    7979        if (name_ == "lon" .or. name_ == "longitude") then
     
    8282            len_ = len_ + 1
    8383        else if (name_ == "lat".or. name_ == "latitude") then
    84             dimid_lat=dimids(i)
    85             len_lat=len_
     84            dimid_lat = dimids(i)
     85            len_lat = len_
    8686        else if (name_ == "time_counter".or. name_ ==  "Time") then
    87             dimid_time=dimids(i)
    88             len_time=len_
     87            dimid_time = dimids(i)
     88            len_time = len_
    8989        else if (name_ == "soil_layers".or. name_ ==  "subsurface_layers") then
    90             dimid_soil=dimids(i)
     90            dimid_soil = dimids(i)
    9191            len_soil = len_
    9292        endif
    93         state = nf90_def_dim(ncid2, name_,len_,dimid_2)
     93        state = nf90_def_dim(ncid2,name_,len_,dimid_2)
    9494        if (state /= nf90_noerr) call handle_err(state)
    9595        dimids_2(i) = dimid_2
     
    9797
    9898    do i = 1,nvars
    99         state = nf90_inquire_variable(ncid1, varids(i),name = namevar,xtype = xtype_var,ndims = numdims,natts = numatts)
    100         write(*,*) "namevar00= ", namevar
     99        state = nf90_inquire_variable(ncid1,varids(i),name = namevar,xtype = xtype_var,ndims = numdims,natts = numatts)
     100        write(*,*) '> Treatment of '//namevar
    101101        if (state /= nf90_noerr) call handle_err(state)
    102102        allocate(dimid_var(numdims))
     
    109109                state = nf90_get_var(ncid1,varids(i),tempvalues_1d)
    110110                if (state /= nf90_noerr) call handle_err(state)
    111                 state = nf90_def_var(ncid2,namevar,xtype_var, dimid_var, varids_2(i))
     111                state = nf90_def_var(ncid2,namevar,xtype_var,dimid_var,varids_2(i))
    112112                if (state /= nf90_noerr) call handle_err(state)
    113113                values_1d(1:len_lon) = tempvalues_1d(:)
     
    219219
    220220    deallocate(dimids,varids,dimids_2,varids_2)
     221    write(*,*) 'Done!'
    221222enddo
    222223
  • trunk/LMDZ.COMMON/libf/evolution/soil_settings_PEM_mod.F90

    r3532 r3584  
    2020!
    2121! Modifications: Aug.2010 EM: use NetCDF90 to load variables (enables using
    22 !                              r4 or r8 restarts independently of having compiled
    23 !                              the GCM in r4 or r8)
     22!                             r4 or r8 restarts independently of having compiled
     23!                             the GCM in r4 or r8)
    2424!                June 2013 TN: Possibility to read files with a time axis
    2525!
Note: See TracChangeset for help on using the changeset viewer.