Ignore:
Timestamp:
Jan 15, 2025, 6:35:44 PM (2 weeks ago)
Author:
jbclement
Message:

Mars PCM:

  • Deletion of the variable 'albedo_co2_cap' which was redundant with 'albedo_perennialco2'.
  • 'albedo_perennialco2' is now a vector of dimension 2 to account for different albedos of CO2 ice between the northern and southern hemispheres (by default 0.6 and 0.85 respectively).

JBC

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/libf/phymars/albedocaps.F90

    r3418 r3581  
    1111USE mod_phys_lmdz_transfert_para, ONLY: bcast
    1212USE mod_phys_lmdz_para, ONLY: is_master
    13 USE paleoclimate_mod, ONLY: paleoclimate,albedo_perennialco2,albedo_co2_cap
     13USE paleoclimate_mod, ONLY: paleoclimate, albedo_perennialco2
    1414
    1515implicit none
     
    4242integer,parameter :: TESlonsize=72
    4343! longitudes, in TES files, in degrees, from TESlon(1)=-177.5 to TESlon(72)=177.5
    44 real,save :: TESlon(TESlonsize) 
     44real,save :: TESlon(TESlonsize)
    4545integer,parameter :: TESlatsize=30
    4646! latitudes (north hemisphere file), in degrees, from TESlatn(1)=31,
     
    6767if (firstcall) then
    6868  ! find out if user wants to use TES cap albedoes or not
    69   TESicealbedo=.false. ! default value 
     69  TESicealbedo=.false. ! default value
    7070  write(*,*)" albedocaps: Use TES Cap albedoes ?"
    7171  call getin_p("TESicealbedo",TESicealbedo)
    7272  write(*,*)" albedocaps: TESicealbedo = ",TESicealbedo
    73  
     73
    7474  ! if using TES albedoes, load coeffcients
    7575  if (TESicealbedo) then
     
    7878    call getin_p("TESice_Ncoef",TESice_Ncoef)
    7979    write(*,*)" albedocaps: TESice_Ncoef = ",TESice_Ncoef
    80    
     80
    8181    write(*,*)" albedocaps: Coefficient for Southern Cap ?"
    8282    TESice_Scoef=1.0 ! default value
     
    8484    write(*,*)" albedocaps: TESice_Scoef = ",TESice_Scoef
    8585  endif
    86  
     86
    8787  call read_TES_icecap_albedo(zls_old,pi,radeg,TESlon,TESlatn,TESlats,TESls,TESalbn,TESalbs)
    88  
     88
    8989  firstcall=.false.
    9090endif ! of if (firstcall)
    91    
    92 do ig=1,ngrid
    93   if (latitude(ig).lt.0.) then
    94     icap=2 ! Southern hemisphere
    95   else
    96     icap=1 ! Northern hemisphere
    97   endif
    98  
    99   if (piceco2(ig).gt.0) then
    100     ! set emissivity of surface to be the ice emissivity
    101     emisref(ig)=emisice(icap)
    102     ! set the surface albedo to be the ice albedo
    103     if (TESicealbedo) then
    104       call TES_icecap_albedo(zls,ig,psolaralb(ig,1),icap,zls_old,pi,radeg,TESlon,TESlatn,TESlats,TESls,TESalbn,TESalbs)
    105       psolaralb(ig,2)=psolaralb(ig,1)
     91
     92do ig = 1,ngrid
     93    if (latitude(ig) < 0.) then
     94        icap = 2 ! Southern hemisphere
    10695    else
    107       if(paleoclimate) then
    108             psolaralb(ig,1) = albedo_co2_cap
    109             psolaralb(ig,2) = albedo_co2_cap
    110       else
     96        icap = 1 ! Northern hemisphere
     97    endif
     98
     99    if (piceco2(ig) > 0) then ! CO2 frost
     100        ! set emissivity of surface to be the ice emissivity
     101        emisref(ig) = emisice(icap)
     102        ! set the surface albedo to be the ice albedo
     103        if (TESicealbedo) then
     104            call TES_icecap_albedo(zls,ig,psolaralb(ig,1),icap,zls_old,pi,radeg,TESlon,TESlatn,TESlats,TESls,TESalbn,TESalbs)
     105            psolaralb(ig,2) = psolaralb(ig,1)
     106        else
    111107            psolaralb(ig,1) = albedice(icap)
    112108            psolaralb(ig,2) = albedice(icap)
    113       endif
    114     endif
    115   else if(paleoclimate .and. piceco2_peren(ig) > 0.) then
    116      psolaralb(ig,1) = albedo_perennialco2
    117      psolaralb(ig,2) = albedo_perennialco2
    118      emisref(ig)=emisice(icap)
    119   else if (watercaptag(ig) .and. water) then
    120     ! there is a water ice cap: set the surface albedo to the water ice one
    121     ! to do : emissivity
    122     emisref(ig) = 1
    123     psolaralb(ig,1)=albedo_h2o_cap
    124     psolaralb(ig,2)=albedo_h2o_cap
    125   else
    126     ! set emissivity of surface to be bare ground emissivity
    127     emisref(ig)=emissiv
    128     ! set the surface albedo to bare ground albedo
    129     psolaralb(ig,1)=albedodat(ig)
    130     psolaralb(ig,2)=albedodat(ig)
    131   endif ! of if (piceco2(ig).gt.0)
     109        endif
     110    else if (paleoclimate .and. piceco2_peren(ig) > 0.) then ! CO2 perennial ice
     111        psolaralb(ig,1) = albedo_perennialco2(icap)
     112        psolaralb(ig,2) = albedo_perennialco2(icap)
     113        emisref(ig) = emisice(icap)
     114    else if (watercaptag(ig) .and. water) then ! H2O ice in polar caps
     115        ! there is a water ice cap: set the surface albedo to the water ice one
     116        ! to do : emissivity
     117        emisref(ig) = 1
     118        psolaralb(ig,:) = albedo_h2o_cap
     119    else ! Bare ground
     120        ! set emissivity of surface to be bare ground emissivity
     121        emisref(ig) = emissiv
     122        ! set the surface albedo to bare ground albedo
     123        psolaralb(ig,:) = albedodat(ig)
     124    endif ! of if (piceco2(ig).gt.0)
    132125enddo ! of ig=1,ngrid
    133126
     
    143136USE mod_phys_lmdz_para, ONLY: is_master
    144137USE mod_phys_lmdz_transfert_para, ONLY: bcast
    145                  
     138
    146139implicit none
    147140
     
    156149integer,parameter:: TESlonsize=72
    157150! longitudes, in TES files, in degrees, from TESlon(1)=-177.5 to TESlon(72)=177.5
    158 real:: TESlon(TESlonsize) 
     151real:: TESlon(TESlonsize)
    159152integer,parameter:: TESlatsize=30
    160153! latitudes (north hemisphere file), in degrees, from TESlatn(1)=31,
     
    195188    write(*,*) "albedocaps: using file ",trim(datadir)//"/npsc_albedo.nc"
    196189  ENDIF
    197  
     190
    198191  ierr=nf90_inq_varid(nid,"longitude",nvarid)
    199192  if (ierr.ne.NF90_NOERR) then
     
    209202    endif
    210203  endif
    211  
     204
    212205  ierr=nf90_inq_varid(nid,"latitude",nvarid)
    213206  if (ierr.ne.NF90_NOERR) then
     
    223216    endif
    224217  endif
    225  
     218
    226219  ierr=nf90_inq_varid(nid,"time",nvarid)
    227220  if (ierr.ne.NF90_NOERR) then
     
    237230    endif
    238231  endif
    239  
     232
    240233  ierr=nf90_inq_varid(nid,"albedo",nvarid)
    241234  if (ierr.ne.NF90_NOERR) then
     
    304297
    305298  zls_old=-999 ! dummy initialization
    306    
     299
    307300endif !is_master
    308    
     301
    309302    call bcast(TESlon)
    310303    call bcast(TESlatn)
     
    316309    call bcast(zls_old)
    317310    call bcast(radeg)
    318  
     311
    319312end subroutine read_TES_icecap_albedo
    320313
     
    327320                  nf90_strerror, nf90_inq_varid, nf90_get_var, nf90_close
    328321USE mod_phys_lmdz_transfert_para, ONLY: bcast
    329                  
     322
    330323implicit none
    331324
     
    364357integer,parameter:: TESlonsize=72
    365358! longitudes, in TES files, in degrees, from TESlon(1)=-177.5 to TESlon(72)=177.5
    366 real:: TESlon(TESlonsize) 
     359real:: TESlon(TESlonsize)
    367360integer,parameter:: TESlatsize=30
    368361! latitudes (north hemisphere file), in degrees, from TESlatn(1)=31,
     
    380373real:: TESalbs(TESlonsize,TESlatsize,TESlssize)
    381374! encompassing nodes arranged as follow : 4 3
    382 real :: val(4)                          ! 1 2 
     375real :: val(4)                          ! 1 2
    383376
    384377! 1. Identify encompassing latitudes
     
    439432if (zls.ne.zls_old) then
    440433  zlsd=zls*radeg ! solar longitude, in degrees
    441  
     434
    442435  if (zlsd.lt.TESls(1)) then
    443436    tinf=TESlssize
     
    461454    endif
    462455  endif ! of if (zlsd.lt.TESls(1))
    463  
     456
    464457  zls_old=zls ! store current zls
    465458endif ! of if (zls.ne.zls_old)
Note: See TracChangeset for help on using the changeset viewer.