[1047] | 1 | module surfdat_h |
---|
| 2 | |
---|
[1224] | 3 | ! arrays are allocated in conf_phys |
---|
[3582] | 4 | real, allocatable :: albedodat(:) ! albedo of bare ground |
---|
| 5 | real, allocatable :: phisfi(:) ! geopotential at ground level |
---|
| 6 | real, dimension(2) :: albedice ! default albedo for ice (1:Northern hemisphere 2:Southern hemisphere) |
---|
| 7 | real, dimension(2) :: emisice ! ice emissivity (1:Northern hemisphere 2:Southern hemisphere) |
---|
| 8 | real :: emissiv ! emissivity of bare ground |
---|
| 9 | logical :: TESicealbedo ! use TES ice cap albedoes (if set to .true.) |
---|
| 10 | logical, allocatable :: watercaptag(:) ! flag for water ice surface |
---|
| 11 | real, allocatable :: dryness(:) |
---|
[2578] | 12 | |
---|
| 13 | !$OMP THREADPRIVATE(albedodat, phisfi,albedice,emisice,emissiv,TESicealbedo, & |
---|
| 14 | !$OMP watercaptag,dryness) |
---|
| 15 | |
---|
[3582] | 16 | logical :: temptag !temp tag for water caps |
---|
| 17 | |
---|
[2578] | 18 | !$OMP THREADPRIVATE(temptag) |
---|
[1047] | 19 | |
---|
[3582] | 20 | real :: albedo_h2o_cap ! water cap albedo |
---|
| 21 | real :: albedo_h2o_frost ! water frost albedo |
---|
| 22 | real :: inert_h2o_ice ! water ice thermal inertia |
---|
| 23 | real :: frost_albedo_threshold ! water frost thickness on the ground (kg.m^-2, ie mm) |
---|
| 24 | real :: frost_metam_threshold ! water frost threshold before conversion to ice (kg.m^-2, ie mm) |
---|
| 25 | real :: TESice_Ncoef ! coefficient for TES ice albedo in Northern hemisphere |
---|
| 26 | real :: TESice_Scoef ! coefficient for TES ice albedo in Southern hemisphere |
---|
| 27 | real :: iceradius(2) , dtemisice(2) |
---|
| 28 | real, allocatable :: zmea(:),zstd(:),zsig(:),zgam(:),zthe(:) |
---|
| 29 | real, allocatable :: hmons(:),summit(:),base(:) |
---|
| 30 | real, allocatable :: z0(:) ! surface roughness length (m) |
---|
| 31 | real :: z0_default ! default (constant over planet) surface roughness (m) |
---|
[3111] | 32 | |
---|
[3582] | 33 | logical :: old_wsublimation_scheme ! TEMPORARY : TO USE THE OLD WATER SUBLIMATION SCHEME (i.e., using Cd instead of Ch), true by default |
---|
| 34 | |
---|
[2578] | 35 | !$OMP THREADPRIVATE(albedo_h2o_cap,albedo_h2o_frost,inert_h2o_ice, & |
---|
| 36 | !$OMP frost_albedo_threshold,frost_metam_threshold,TESice_Ncoef, & |
---|
| 37 | !$OMP TESice_Scoef,iceradius,dtemisice, & |
---|
[3111] | 38 | !$OMP zmea,zstd,zsig,zgam,zthe,hmons,summit,base,z0,z0_default, & |
---|
| 39 | !$OMP old_wsublimation_scheme) |
---|
[2578] | 40 | |
---|
[2628] | 41 | !! mountain top dust flows |
---|
[3582] | 42 | real, allocatable :: alpha_hmons(:) ! sub-grid scale mountain mesh fraction |
---|
| 43 | real, allocatable :: hsummit(:) ! mountain height above the GCM surface |
---|
| 44 | logical, allocatable :: contains_mons(:) ! is there a mountain in the grid mesh ? |
---|
| 45 | |
---|
[2628] | 46 | !$OMP THREADPRIVATE(alpha_hmons,hsummit,contains_mons) |
---|
| 47 | |
---|
[1224] | 48 | !! variables |
---|
[3582] | 49 | real, allocatable :: tsurf(:,:) ! Surface temperature (K) |
---|
| 50 | real, allocatable :: emis(:,:) ! Thermal IR surface emissivity |
---|
| 51 | real, allocatable :: capcal(:,:) ! surface heat capacity (J m-2 K-1) |
---|
| 52 | real, allocatable :: fluxgrd(:,:) ! surface conduction flux (W.m-2) |
---|
| 53 | real, allocatable :: qsurf(:,:,:) ! tracer on surface (e.g. kg.m-2) |
---|
| 54 | real, allocatable :: watercap(:,:) ! Surface water ice (kg.m-2) |
---|
| 55 | real, allocatable :: perennial_co2ice(:,:) ! Perennial CO2 ice (kg.m-2) |
---|
| 56 | real, dimension(2) :: albedo_perennialco2 ! Albedo for perennial co2 ice (-) |
---|
[3130] | 57 | !$OMP THREADPRIVATE(tsurf,emis,capcal,fluxgrd,qsurf,watercap,perennial_co2ice) |
---|
[1224] | 58 | |
---|
[1047] | 59 | contains |
---|
| 60 | |
---|
[2900] | 61 | subroutine ini_surfdat_h(ngrid,nq,nslope) |
---|
[3582] | 62 | |
---|
[1047] | 63 | implicit none |
---|
| 64 | integer,intent(in) :: ngrid ! number of atmospheric columns |
---|
[3582] | 65 | integer,intent(in) :: nq ! number of tracers |
---|
| 66 | integer,intent(in) :: nslope ! number of sub-grid scale slope |
---|
| 67 | |
---|
[1047] | 68 | allocate(albedodat(ngrid)) |
---|
| 69 | allocate(phisfi(ngrid)) |
---|
| 70 | allocate(watercaptag(ngrid)) |
---|
[1224] | 71 | allocate(dryness(ngrid)) |
---|
[1047] | 72 | allocate(zmea(ngrid)) |
---|
| 73 | allocate(zstd(ngrid)) |
---|
| 74 | allocate(zsig(ngrid)) |
---|
| 75 | allocate(zgam(ngrid)) |
---|
| 76 | allocate(zthe(ngrid)) |
---|
| 77 | allocate(z0(ngrid)) |
---|
[2900] | 78 | allocate(qsurf(ngrid,nq,nslope)) |
---|
| 79 | allocate(tsurf(ngrid,nslope)) |
---|
| 80 | allocate(watercap(ngrid,nslope)) |
---|
[3130] | 81 | allocate(perennial_co2ice(ngrid,nslope)) |
---|
[2900] | 82 | allocate(emis(ngrid,nslope)) |
---|
| 83 | allocate(capcal(ngrid,nslope)) |
---|
| 84 | allocate(fluxgrd(ngrid,nslope)) |
---|
[1974] | 85 | allocate(hmons(ngrid)) |
---|
[2079] | 86 | allocate(summit(ngrid)) |
---|
| 87 | allocate(base(ngrid)) |
---|
[2628] | 88 | allocate(alpha_hmons(ngrid)) |
---|
| 89 | allocate(hsummit(ngrid)) |
---|
| 90 | allocate(contains_mons(ngrid)) |
---|
[3582] | 91 | |
---|
[1047] | 92 | end subroutine ini_surfdat_h |
---|
| 93 | |
---|
[1770] | 94 | |
---|
| 95 | subroutine end_surfdat_h |
---|
| 96 | |
---|
| 97 | implicit none |
---|
| 98 | |
---|
[2999] | 99 | if (allocated(albedodat)) deallocate(albedodat) |
---|
| 100 | if (allocated(phisfi)) deallocate(phisfi) |
---|
| 101 | if (allocated(watercaptag)) deallocate(watercaptag) |
---|
| 102 | if (allocated(dryness)) deallocate(dryness) |
---|
| 103 | if (allocated(zmea)) deallocate(zmea) |
---|
| 104 | if (allocated(zstd)) deallocate(zstd) |
---|
| 105 | if (allocated(zsig)) deallocate(zsig) |
---|
| 106 | if (allocated(zgam)) deallocate(zgam) |
---|
| 107 | if (allocated(zthe)) deallocate(zthe) |
---|
| 108 | if (allocated(z0)) deallocate(z0) |
---|
| 109 | if (allocated(qsurf)) deallocate(qsurf) |
---|
| 110 | if (allocated(tsurf)) deallocate(tsurf) |
---|
| 111 | if (allocated(watercap)) deallocate(watercap) |
---|
[3130] | 112 | if (allocated(perennial_co2ice)) deallocate(perennial_co2ice) |
---|
[2999] | 113 | if (allocated(emis)) deallocate(emis) |
---|
| 114 | if (allocated(capcal)) deallocate(capcal) |
---|
| 115 | if (allocated(fluxgrd)) deallocate(fluxgrd) |
---|
| 116 | if (allocated(hmons)) deallocate(hmons) |
---|
| 117 | if (allocated(summit)) deallocate(summit) |
---|
| 118 | if (allocated(base)) deallocate(base) |
---|
| 119 | if (allocated(alpha_hmons)) deallocate(alpha_hmons) |
---|
| 120 | if (allocated(hsummit)) deallocate(hsummit) |
---|
| 121 | if (allocated(contains_mons)) deallocate(contains_mons) |
---|
[3582] | 122 | |
---|
[1770] | 123 | end subroutine end_surfdat_h |
---|
| 124 | |
---|
[2909] | 125 | subroutine ini_surfdat_h_slope_var(ngrid,nq,nslope) |
---|
[3582] | 126 | |
---|
[2909] | 127 | implicit none |
---|
| 128 | integer,intent(in) :: ngrid ! number of atmospheric columns |
---|
[3582] | 129 | integer,intent(in) :: nq ! number of tracers |
---|
| 130 | integer,intent(in) :: nslope ! number of sub-grid scale slope |
---|
[2909] | 131 | allocate(qsurf(ngrid,nq,nslope)) |
---|
| 132 | allocate(tsurf(ngrid,nslope)) |
---|
| 133 | allocate(watercap(ngrid,nslope)) |
---|
[3130] | 134 | allocate(perennial_co2ice(ngrid,nslope)) |
---|
[2909] | 135 | allocate(emis(ngrid,nslope)) |
---|
| 136 | allocate(capcal(ngrid,nslope)) |
---|
| 137 | allocate(fluxgrd(ngrid,nslope)) |
---|
[3582] | 138 | |
---|
[2909] | 139 | end subroutine ini_surfdat_h_slope_var |
---|
| 140 | |
---|
| 141 | subroutine end_surfdat_h_slope_var |
---|
| 142 | |
---|
| 143 | implicit none |
---|
| 144 | |
---|
[2999] | 145 | if (allocated(qsurf)) deallocate(qsurf) |
---|
| 146 | if (allocated(tsurf)) deallocate(tsurf) |
---|
| 147 | if (allocated(watercap)) deallocate(watercap) |
---|
[3130] | 148 | if (allocated(perennial_co2ice)) deallocate(perennial_co2ice) |
---|
[2999] | 149 | if (allocated(emis)) deallocate(emis) |
---|
| 150 | if (allocated(capcal)) deallocate(capcal) |
---|
| 151 | if (allocated(fluxgrd)) deallocate(fluxgrd) |
---|
[3582] | 152 | |
---|
[2909] | 153 | end subroutine end_surfdat_h_slope_var |
---|
| 154 | |
---|
[1047] | 155 | end module surfdat_h |
---|