[1047] | 1 | module surfdat_h |
---|
| 2 | |
---|
[1224] | 3 | ! arrays are allocated in conf_phys |
---|
[1047] | 4 | real,save,allocatable :: albedodat(:) ! albedo of bare ground |
---|
| 5 | real,save,allocatable :: phisfi(:) ! geopotential at ground level |
---|
| 6 | real,save :: albedice(2) ! default albedo for ice (1: North H. 2: South H.) |
---|
| 7 | real,save :: emisice(2) ! ice emissivity; 1:Northern hemisphere 2:Southern hemisphere |
---|
| 8 | real,save :: emissiv ! emissivity of bare ground |
---|
| 9 | logical,save :: TESicealbedo ! use TES ice cap albedoes (if set to .true.) |
---|
| 10 | logical,save,allocatable :: watercaptag(:) ! flag for water ice surface |
---|
[1224] | 11 | real, save, allocatable :: dryness(:) |
---|
[1047] | 12 | |
---|
| 13 | logical,save :: temptag !temp tag for water caps |
---|
| 14 | |
---|
[2508] | 15 | real,save :: albedo_h2o_cap ! water cap albedo |
---|
| 16 | real,save :: albedo_h2o_frost ! water frost albedo |
---|
[1047] | 17 | real,save :: inert_h2o_ice ! water ice thermal inertia |
---|
| 18 | real,save :: frost_albedo_threshold ! water frost thickness on the ground (kg.m^-2, ie mm) |
---|
| 19 | real,save :: TESice_Ncoef ! coefficient for TES ice albedo in Northern hemisphere |
---|
| 20 | real,save :: TESice_Scoef ! coefficient for TES ice albedo in Southern hemisphere |
---|
| 21 | real,save :: iceradius(2) , dtemisice(2) |
---|
| 22 | real,save,allocatable :: zmea(:),zstd(:),zsig(:),zgam(:),zthe(:) |
---|
[2079] | 23 | real,save,allocatable :: hmons(:),summit(:),base(:) |
---|
[1047] | 24 | real,save,allocatable :: z0(:) ! surface roughness length (m) |
---|
| 25 | real,save :: z0_default ! default (constant over planet) surface roughness (m) |
---|
| 26 | |
---|
[1224] | 27 | !! variables |
---|
| 28 | REAL,SAVE,ALLOCATABLE :: tsurf(:) ! Surface temperature (K) |
---|
| 29 | REAL,SAVE,ALLOCATABLE :: co2ice(:) ! co2 ice surface layer (kg.m-2) |
---|
| 30 | REAL,SAVE,ALLOCATABLE :: emis(:) ! Thermal IR surface emissivity |
---|
| 31 | REAL,SAVE,ALLOCATABLE :: capcal(:) ! surface heat capacity (J m-2 K-1) |
---|
| 32 | REAL,SAVE,ALLOCATABLE :: fluxgrd(:) ! surface conduction flux (W.m-2) |
---|
| 33 | REAL,ALLOCATABLE,SAVE :: qsurf(:,:) ! tracer on surface (e.g. kg.m-2) |
---|
[2260] | 34 | REAL,SAVE,ALLOCATABLE :: watercap(:) ! Surface water ice (kg.m-2) |
---|
[1224] | 35 | |
---|
[1047] | 36 | contains |
---|
| 37 | |
---|
[1224] | 38 | subroutine ini_surfdat_h(ngrid,nq) |
---|
[1047] | 39 | |
---|
| 40 | implicit none |
---|
| 41 | integer,intent(in) :: ngrid ! number of atmospheric columns |
---|
[1224] | 42 | integer,intent(in) :: nq ! number of tracers |
---|
| 43 | |
---|
[1047] | 44 | allocate(albedodat(ngrid)) |
---|
| 45 | allocate(phisfi(ngrid)) |
---|
| 46 | allocate(watercaptag(ngrid)) |
---|
[1224] | 47 | allocate(dryness(ngrid)) |
---|
[1047] | 48 | allocate(zmea(ngrid)) |
---|
| 49 | allocate(zstd(ngrid)) |
---|
| 50 | allocate(zsig(ngrid)) |
---|
| 51 | allocate(zgam(ngrid)) |
---|
| 52 | allocate(zthe(ngrid)) |
---|
| 53 | allocate(z0(ngrid)) |
---|
[1224] | 54 | allocate(qsurf(ngrid,nq)) |
---|
| 55 | allocate(tsurf(ngrid)) |
---|
| 56 | allocate(co2ice(ngrid)) |
---|
[2260] | 57 | allocate(watercap(ngrid)) |
---|
[1224] | 58 | allocate(emis(ngrid)) |
---|
| 59 | allocate(capcal(ngrid)) |
---|
| 60 | allocate(fluxgrd(ngrid)) |
---|
[1974] | 61 | allocate(hmons(ngrid)) |
---|
[2079] | 62 | allocate(summit(ngrid)) |
---|
| 63 | allocate(base(ngrid)) |
---|
[1974] | 64 | |
---|
[1047] | 65 | end subroutine ini_surfdat_h |
---|
| 66 | |
---|
[1770] | 67 | |
---|
| 68 | subroutine end_surfdat_h |
---|
| 69 | |
---|
| 70 | implicit none |
---|
| 71 | |
---|
| 72 | if (allocated(albedodat)) deallocate(albedodat) |
---|
| 73 | if (allocated(phisfi)) deallocate(phisfi) |
---|
| 74 | if (allocated(watercaptag)) deallocate(watercaptag) |
---|
| 75 | if (allocated(dryness)) deallocate(dryness) |
---|
| 76 | if (allocated(zmea)) deallocate(zmea) |
---|
| 77 | if (allocated(zstd)) deallocate(zstd) |
---|
| 78 | if (allocated(zsig)) deallocate(zsig) |
---|
| 79 | if (allocated(zgam)) deallocate(zgam) |
---|
| 80 | if (allocated(zthe)) deallocate(zthe) |
---|
| 81 | if (allocated(z0)) deallocate(z0) |
---|
| 82 | if (allocated(qsurf)) deallocate(qsurf) |
---|
| 83 | if (allocated(tsurf)) deallocate(tsurf) |
---|
| 84 | if (allocated(co2ice)) deallocate(co2ice) |
---|
[2260] | 85 | if (allocated(watercap)) deallocate(watercap) |
---|
[1770] | 86 | if (allocated(emis)) deallocate(emis) |
---|
| 87 | if (allocated(capcal)) deallocate(capcal) |
---|
| 88 | if (allocated(fluxgrd)) deallocate(fluxgrd) |
---|
[1974] | 89 | if (allocated(hmons)) deallocate(hmons) |
---|
[2079] | 90 | if (allocated(summit)) deallocate(summit) |
---|
| 91 | if (allocated(base)) deallocate(base) |
---|
| 92 | |
---|
[1770] | 93 | end subroutine end_surfdat_h |
---|
| 94 | |
---|
[1047] | 95 | end module surfdat_h |
---|