Changeset 3581 for trunk/LMDZ.MARS/libf/phymars/albedocaps.F90
- Timestamp:
- Jan 15, 2025, 6:35:44 PM (2 weeks ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/phymars/albedocaps.F90
r3418 r3581 11 11 USE mod_phys_lmdz_transfert_para, ONLY: bcast 12 12 USE mod_phys_lmdz_para, ONLY: is_master 13 USE paleoclimate_mod, ONLY: paleoclimate, albedo_perennialco2,albedo_co2_cap13 USE paleoclimate_mod, ONLY: paleoclimate, albedo_perennialco2 14 14 15 15 implicit none … … 42 42 integer,parameter :: TESlonsize=72 43 43 ! longitudes, in TES files, in degrees, from TESlon(1)=-177.5 to TESlon(72)=177.5 44 real,save :: TESlon(TESlonsize) 44 real,save :: TESlon(TESlonsize) 45 45 integer,parameter :: TESlatsize=30 46 46 ! latitudes (north hemisphere file), in degrees, from TESlatn(1)=31, … … 67 67 if (firstcall) then 68 68 ! find out if user wants to use TES cap albedoes or not 69 TESicealbedo=.false. ! default value 69 TESicealbedo=.false. ! default value 70 70 write(*,*)" albedocaps: Use TES Cap albedoes ?" 71 71 call getin_p("TESicealbedo",TESicealbedo) 72 72 write(*,*)" albedocaps: TESicealbedo = ",TESicealbedo 73 73 74 74 ! if using TES albedoes, load coeffcients 75 75 if (TESicealbedo) then … … 78 78 call getin_p("TESice_Ncoef",TESice_Ncoef) 79 79 write(*,*)" albedocaps: TESice_Ncoef = ",TESice_Ncoef 80 80 81 81 write(*,*)" albedocaps: Coefficient for Southern Cap ?" 82 82 TESice_Scoef=1.0 ! default value … … 84 84 write(*,*)" albedocaps: TESice_Scoef = ",TESice_Scoef 85 85 endif 86 86 87 87 call read_TES_icecap_albedo(zls_old,pi,radeg,TESlon,TESlatn,TESlats,TESls,TESalbn,TESalbs) 88 88 89 89 firstcall=.false. 90 90 endif ! 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 92 do ig = 1,ngrid 93 if (latitude(ig) < 0.) then 94 icap = 2 ! Southern hemisphere 106 95 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 111 107 psolaralb(ig,1) = albedice(icap) 112 108 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) 132 125 enddo ! of ig=1,ngrid 133 126 … … 143 136 USE mod_phys_lmdz_para, ONLY: is_master 144 137 USE mod_phys_lmdz_transfert_para, ONLY: bcast 145 138 146 139 implicit none 147 140 … … 156 149 integer,parameter:: TESlonsize=72 157 150 ! longitudes, in TES files, in degrees, from TESlon(1)=-177.5 to TESlon(72)=177.5 158 real:: TESlon(TESlonsize) 151 real:: TESlon(TESlonsize) 159 152 integer,parameter:: TESlatsize=30 160 153 ! latitudes (north hemisphere file), in degrees, from TESlatn(1)=31, … … 195 188 write(*,*) "albedocaps: using file ",trim(datadir)//"/npsc_albedo.nc" 196 189 ENDIF 197 190 198 191 ierr=nf90_inq_varid(nid,"longitude",nvarid) 199 192 if (ierr.ne.NF90_NOERR) then … … 209 202 endif 210 203 endif 211 204 212 205 ierr=nf90_inq_varid(nid,"latitude",nvarid) 213 206 if (ierr.ne.NF90_NOERR) then … … 223 216 endif 224 217 endif 225 218 226 219 ierr=nf90_inq_varid(nid,"time",nvarid) 227 220 if (ierr.ne.NF90_NOERR) then … … 237 230 endif 238 231 endif 239 232 240 233 ierr=nf90_inq_varid(nid,"albedo",nvarid) 241 234 if (ierr.ne.NF90_NOERR) then … … 304 297 305 298 zls_old=-999 ! dummy initialization 306 299 307 300 endif !is_master 308 301 309 302 call bcast(TESlon) 310 303 call bcast(TESlatn) … … 316 309 call bcast(zls_old) 317 310 call bcast(radeg) 318 311 319 312 end subroutine read_TES_icecap_albedo 320 313 … … 327 320 nf90_strerror, nf90_inq_varid, nf90_get_var, nf90_close 328 321 USE mod_phys_lmdz_transfert_para, ONLY: bcast 329 322 330 323 implicit none 331 324 … … 364 357 integer,parameter:: TESlonsize=72 365 358 ! longitudes, in TES files, in degrees, from TESlon(1)=-177.5 to TESlon(72)=177.5 366 real:: TESlon(TESlonsize) 359 real:: TESlon(TESlonsize) 367 360 integer,parameter:: TESlatsize=30 368 361 ! latitudes (north hemisphere file), in degrees, from TESlatn(1)=31, … … 380 373 real:: TESalbs(TESlonsize,TESlatsize,TESlssize) 381 374 ! encompassing nodes arranged as follow : 4 3 382 real :: val(4) ! 1 2 375 real :: val(4) ! 1 2 383 376 384 377 ! 1. Identify encompassing latitudes … … 439 432 if (zls.ne.zls_old) then 440 433 zlsd=zls*radeg ! solar longitude, in degrees 441 434 442 435 if (zlsd.lt.TESls(1)) then 443 436 tinf=TESlssize … … 461 454 endif 462 455 endif ! of if (zlsd.lt.TESls(1)) 463 456 464 457 zls_old=zls ! store current zls 465 458 endif ! of if (zls.ne.zls_old)
Note: See TracChangeset
for help on using the changeset viewer.