7 |
c the fields related to the earth's surface that are needed |
c the fields related to the earth's surface that are needed |
8 |
c by fizhi. |
c by fizhi. |
9 |
c |
c |
10 |
c Call: getalb (Set the 4 albedos based on veg type and time) |
c Call: getlgr (Set the leaf area index and surface greenness, |
11 |
|
c based on veg type and month) |
12 |
|
c getalb (Set the 4 albedos based on veg type, snow and time) |
13 |
c getemiss (Set the surface emissivity based on the veg type |
c getemiss (Set the surface emissivity based on the veg type |
14 |
c and the snow depth) |
c and the snow depth) |
|
c getlgr (Set the leaf area index and surface greenness, |
|
|
c based on veg type and month) |
|
15 |
c----------------------------------------------------------------------- |
c----------------------------------------------------------------------- |
16 |
implicit none |
implicit none |
17 |
#include "CPP_OPTIONS.h" |
#include "CPP_OPTIONS.h" |
18 |
#include "SIZE.h" |
#include "SIZE.h" |
|
#include "GRID.h" |
|
19 |
#include "fizhi_land_SIZE.h" |
#include "fizhi_land_SIZE.h" |
20 |
#include "fizhi_SIZE.h" |
#include "fizhi_SIZE.h" |
21 |
#include "fizhi_coms.h" |
#include "fizhi_coms.h" |
22 |
#include "gridalt_mapping.h" |
#include "gridalt_mapping.h" |
23 |
#include "fizhi_land_coms.h" |
#include "fizhi_land_coms.h" |
24 |
|
#include "fizhi_earth_coms.h" |
25 |
|
#include "fizhi_ocean_coms.h" |
26 |
#include "EEPARAMS.h" |
#include "EEPARAMS.h" |
27 |
|
|
28 |
integer myTime, myIter, myThid |
integer myTime, myIter, myThid |
29 |
|
|
30 |
|
_RL lats(sNx,sNy), lons(sNx,sNy), cosz(sNx,sNy) |
31 |
|
_RL fraci(sNx,sNy), fracl(sNx,sNy) |
32 |
|
_RL ficetile(nchp) |
33 |
|
_RL ra |
34 |
integer i, j, L, bi, bj |
integer i, j, L, bi, bj |
35 |
integer im1, im2, jm1, jm2, idim1, idim2, jdim1, jdim2 |
integer im1, im2, jm1, jm2, idim1, idim2, jdim1, jdim2 |
36 |
|
integer sec, day, month |
37 |
|
integer nmonf,ndayf |
38 |
|
nmonf(n) = mod(n,10000)/100 |
39 |
|
ndayf(n) = mod(n,100) |
40 |
|
|
41 |
idim1 = 1-OLx |
idim1 = 1-OLx |
42 |
idim2 = sNx+OLx |
idim2 = sNx+OLx |
46 |
im2 = sNx |
im2 = sNx |
47 |
jm1 = 1 |
jm1 = 1 |
48 |
jm2 = sNy |
jm2 = sNy |
49 |
|
month = nmonf(nymd) |
50 |
|
day = ndayf(nymd) |
51 |
|
sec = nsecf(nhms) |
52 |
|
|
53 |
do bj = myByLo(myThid), myByHi(myThid) |
do bj = myByLo(myThid), myByHi(myThid) |
54 |
do bi = myBxLo(myThid), myBxHi(myThid) |
do bi = myBxLo(myThid), myBxHi(myThid) |
55 |
|
do j = jm1,jm2 |
56 |
|
do i = im1,im2 |
57 |
|
lons(i,j,bi,bj) = xC(i,j,bi,bj) |
58 |
|
lats(i,j,bi,bj) = yC(i,j,bi,bj) |
59 |
|
enddo |
60 |
|
enddo |
61 |
|
|
62 |
|
call get_landfrac(im2,jm2,nSx,nSy,bi,bj,maxtyp,surftype,tilefrac, |
63 |
|
. fracl) |
64 |
|
do j = jm1,jm2 |
65 |
|
do i = im1,im2 |
66 |
|
if(sea_ice(i,j,bi,bj).gt.0.) then |
67 |
|
fraci(i,j) = 1. |
68 |
|
else |
69 |
|
fraci(i,j) = 0. |
70 |
|
endif |
71 |
|
enddo |
72 |
|
enddo |
73 |
|
|
74 |
C*********************************************************************** |
C*********************************************************************** |
75 |
C* Get Leaf-Area-Index and Greenness Index * |
C* Get Leaf-Area-Index and Greenness Index * |
76 |
C*********************************************************************** |
C*********************************************************************** |
77 |
|
|
78 |
if( alarm('turb') .or. alarm('radsw') ) then |
if( alarm('turb') .or. alarm('radsw') ) then |
79 |
call getlgr ( sec,month,day, |
call getlgr (sec,month,day,chlt,ityp,nchpland,nSx,nSy,bi,bj, |
80 |
. land%grid%chlt,coupling%earth%ityp,coupling%earth%nchpland, |
. alai,agrn ) |
|
. coupling%earth%alai,coupling%earth%agrn ) |
|
81 |
endif |
endif |
82 |
|
|
|
|
|
83 |
C ********************************************************************** |
C ********************************************************************** |
84 |
C Compute Surface Albedo |
C Compute Surface Albedo |
85 |
C ********************************************************************** |
C ********************************************************************** |
86 |
|
|
87 |
if( alarm('radsw') ) then |
if( alarm('radsw') ) then |
88 |
call astro ( nymd,nhms, alat,alon, im*jm, cosz,ra ) |
call astro(nymd,nhms,lats,lons,im2*jm2,cosz,ra) |
89 |
call getalb ( sec,month,day,cosz,land%vars%snodep,fraci,fracl, |
call getalb(sec,month,day,cosz,snodep,fraci,fracl,im2,jm2,nchp, |
90 |
. im,jm,land%grid%nchp, |
. nchpland,nSx,nSy,bi,bj,igrd,ityp,chfr,chlt,alai,agrn, |
91 |
. coupling%earth%nchpland, |
. albvisdr,albvisdf,albnirdr,albnirdf ) |
|
. land%grid%igrd,coupling%earth%ityp, |
|
|
. coupling%earth%chfr,land%grid%chlt, |
|
|
. coupling%earth%alai,coupling%earth%agrn, |
|
|
. coupling%earth%albvisdr,coupling%earth%albvisdf, |
|
|
. coupling%earth%albnirdr,coupling%earth%albnirdf ) |
|
92 |
endif |
endif |
93 |
|
|
94 |
|
|
97 |
C ********************************************************************** |
C ********************************************************************** |
98 |
|
|
99 |
if( alarm('radlw') ) then |
if( alarm('radlw') ) then |
100 |
allocate ( ficetile(im*jm*maxtyp) ) |
call grd2msc(fraci,im2,jm2,igrd,ficetile,nchp,nchp) |
101 |
call grd2msc ( fraci,im,jm,land%grid%igrd,ficetile,land%grid%nchp,land%grid%nchp ) |
call getemiss(fracl,im2,jm2,nchp,nSx,nSy,bi,bj,igrd,ityp,chfr, |
102 |
call getemiss ( fracl,im,jm,land%grid%nchp,land%grid%igrd, |
. snodep,ficetile,emiss) |
|
. coupling%earth%ityp,coupling%earth%chfr,land%vars%snodep, |
|
|
. ficetile,coupling%earth%emiss ) |
|
|
deallocate ( ficetile ) |
|
103 |
endif |
endif |
104 |
|
|
105 |
|
|
109 |
|
|
110 |
do j = 1,jm |
do j = 1,jm |
111 |
do i = 1,im |
do i = 1,im |
112 |
if( fracl(i,j).lt.0.3 .and. ocean%vars%sea_ice(i,j).eq.0.0 ) then |
if(fracl(i,j).lt.0.3.and.sea_ice(i,j).eq.0.0)tgz(i,j) = sst(i,j) |
|
coupling%land%tgz(i,j) = ocean%vars%sst(i,j) |
|
113 |
endif |
endif |
114 |
enddo |
enddo |
115 |
enddo |
enddo |
141 |
C******************************************************************* |
C******************************************************************* |
142 |
|
|
143 |
IMPLICIT NONE |
IMPLICIT NONE |
144 |
|
#include "CPP_EEOPTIONS.h" |
145 |
|
|
146 |
INTEGER IRUN |
INTEGER IRUN |
147 |
REAL AVISDR (IRUN), ANIRDR (IRUN), AVISDF (IRUN), ANIRDF (IRUN), |
_RL AVISDR (IRUN), ANIRDR (IRUN), AVISDF (IRUN), ANIRDF (IRUN), |
148 |
` VLAI (IRUN), VGRN (IRUN), ZTH (IRUN), SNW (IRUN) |
` VLAI (IRUN), VGRN (IRUN), ZTH (IRUN), SNW (IRUN) |
149 |
INTEGER ITYP (IRUN) |
INTEGER ITYP (IRUN) |
150 |
|
|
151 |
REAL ALVDRS, ALIDRS |
_RL ALVDRS, ALIDRS |
152 |
REAL ALVDRDL, ALIDRDL |
_RL ALVDRDL, ALIDRDL |
153 |
REAL ALVDRDD, ALIDRDD |
_RL ALVDRDD, ALIDRDD |
154 |
REAL ALVDRI, ALIDRI |
_RL ALVDRI, ALIDRI |
155 |
REAL minval |
_RL minval |
156 |
external minval |
external minval |
157 |
|
|
158 |
PARAMETER ( ALVDRS = 0.100 ) ! Albedo of soil for visible direct solar radiation. |
PARAMETER ( ALVDRS = 0.100 ) ! Albedo of soil for visible direct solar radiation. |
168 |
|
|
169 |
INTEGER NTYPS |
INTEGER NTYPS |
170 |
INTEGER NLAI |
INTEGER NLAI |
171 |
REAL ZERO, ONE |
_RL ZERO, ONE |
172 |
REAL EPSLN, BLAI, DLAI |
_RL EPSLN, BLAI, DLAI |
173 |
REAL ALATRM |
_RL ALATRM |
174 |
PARAMETER (NLAI = 14 ) |
PARAMETER (NLAI = 14 ) |
175 |
PARAMETER (EPSLN = 1.E-6) |
PARAMETER (EPSLN = 1.E-6) |
176 |
PARAMETER (BLAI = 0.5) |
PARAMETER (BLAI = 0.5) |
198 |
* |
* |
199 |
INTEGER I, LAI |
INTEGER I, LAI |
200 |
|
|
201 |
REAL FAC, GAMMA, BETA, ALPHA, |
_RL FAC, GAMMA, BETA, ALPHA, |
202 |
` DX, DY, ALA, GRN (2), |
` DX, DY, ALA, GRN (2), |
203 |
` SNWALB (4, NTYPS), SNWMID (NTYPS) |
` SNWALB (4, NTYPS), SNWMID (NTYPS) |
204 |
|
|
205 |
* [ Definition of Functions: ] |
* [ Definition of Functions: ] |
206 |
* |
* |
207 |
REAL COEFF |
_RL COEFF |
208 |
|
|
209 |
C Constants used in albedo calculations: |
C Constants used in albedo calculations: |
210 |
|
|
211 |
REAL ALVDR (NLAI, 2, NTYPS) |
_RL ALVDR (NLAI, 2, NTYPS) |
212 |
REAL BTVDR (NLAI, 2, NTYPS) |
_RL BTVDR (NLAI, 2, NTYPS) |
213 |
REAL GMVDR (NLAI, 2, NTYPS) |
_RL GMVDR (NLAI, 2, NTYPS) |
214 |
REAL ALIDR (NLAI, 2, NTYPS) |
_RL ALIDR (NLAI, 2, NTYPS) |
215 |
REAL BTIDR (NLAI, 2, NTYPS) |
_RL BTIDR (NLAI, 2, NTYPS) |
216 |
REAL GMIDR (NLAI, 2, NTYPS) |
_RL GMIDR (NLAI, 2, NTYPS) |
217 |
|
|
218 |
C (Data statements for ALVDR described in full; data statements for |
C (Data statements for ALVDR described in full; data statements for |
219 |
C other constants follow same framework.) |
C other constants follow same framework.) |
662 |
RETURN |
RETURN |
663 |
END |
END |
664 |
FUNCTION COEFF(TABLE, NTABL, LAI ,DX, DY) |
FUNCTION COEFF(TABLE, NTABL, LAI ,DX, DY) |
665 |
|
#include "CPP_EEOPTIONS.h" |
666 |
|
|
667 |
INTEGER NTABL, LAI |
INTEGER NTABL, LAI |
668 |
|
|
669 |
REAL TABLE (NTABL, 2), DX, DY |
_RL TABLE (NTABL, 2), DX, DY |
670 |
|
|
671 |
COEFF = (TABLE(LAI, 1) |
COEFF = (TABLE(LAI, 1) |
672 |
* + (TABLE(LAI ,2) - TABLE(LAI ,1)) * DY ) * (1.0-DX) |
* + (TABLE(LAI ,2) - TABLE(LAI ,1)) * DY ) * (1.0-DX) |
675 |
|
|
676 |
RETURN |
RETURN |
677 |
END |
END |
|
SUBROUTINE GETLGR(sec,IMON,IDAY,ALAT,ITYP,NCHPS,ALAI,AGRN) |
|
678 |
|
|
679 |
C********************************************************************* |
SUBROUTINE GETLGR(sec,IMON,IDAY,ALAT,ITYP,NCHPS,nSx,nSy,bi,bj, |
680 |
C*********************** ARIES MODEL ******************************* |
. ALAI,AGRN) |
|
C********************* SUBROUTINE GETLGR **************************** |
|
|
C********************** 14 JUNE 1991 ****************************** |
|
681 |
C********************************************************************* |
C********************************************************************* |
682 |
implicit none |
implicit none |
683 |
|
#include "CPP_EEOPTIONS.h" |
684 |
|
|
685 |
integer ntyps |
integer ntyps |
686 |
real one,daylen |
_RL one,daylen |
687 |
PARAMETER (NTYPS=10) |
PARAMETER (NTYPS=10) |
688 |
parameter (one = 1.) |
parameter (one = 1.) |
689 |
parameter (daylen = 86400.) |
parameter (daylen = 86400.) |
690 |
|
|
691 |
integer sec, imon, iday, nchps |
integer sec, imon, iday, nchps, nSx, nSy, bi, bj |
692 |
real ALAI(NCHPS), AGRN(NCHPS), ALAT(NCHPS) |
_RL ALAI(NCHPS,nSx,nSy), AGRN(NCHPS,nSx,nSy) |
693 |
integer ITYP(NCHPS) |
_RL ALAT(NCHPS) |
694 |
|
integer ITYP(NCHPS,nSx,nSy) |
695 |
|
|
696 |
integer i,midmon,midm,midp,id,k1,k2,kk1,kk2 |
integer i,midmon,midm,midp,id,k1,k2,kk1,kk2 |
697 |
real fac |
_RL fac |
698 |
|
|
699 |
INTEGER DAYS(12) |
INTEGER DAYS(12) |
700 |
DATA DAYS/31,28,31,30,31,30,31,31,30,31,30,31/ |
DATA DAYS/31,28,31,30,31,30,31,31,30,31,30,31/ |
701 |
|
|
702 |
|
_RL VGLA(12,NTYPS), VGGR(12,NTYPS) |
|
REAL VGLA(12,NTYPS), VGGR(12,NTYPS) |
|
703 |
|
|
704 |
DATA VGLA / |
DATA VGLA / |
705 |
1 5.117, 5.117, 5.117, 5.117, 5.117, 5.117, 5.117, 5.117, |
1 5.117, 5.117, 5.117, 5.117, 5.117, 5.117, 5.117, 5.117, |
770 |
ID = IDAY |
ID = IDAY |
771 |
ENDIF |
ENDIF |
772 |
|
|
773 |
FAC = (REAL(ID -MIDM)*DAYLEN + SEC) / |
FAC = (float(ID -MIDM)*DAYLEN + SEC) / |
774 |
* (REAL(MIDP-MIDM)*DAYLEN ) |
* (float(MIDP-MIDM)*DAYLEN ) |
775 |
|
|
776 |
DO 220 I=1,NCHPS |
DO 220 I=1,NCHPS |
777 |
|
|
783 |
KK2 = MOD(K2+5,12) + 1 |
KK2 = MOD(K2+5,12) + 1 |
784 |
ENDIF |
ENDIF |
785 |
|
|
786 |
ALAI(I) = VGLA(KK2,ITYP(I))*FAC + VGLA(KK1,ITYP(I))*(ONE-FAC) |
ALAI(I,bi,bj) = VGLA(KK2,ITYP(I,bi,bj))*FAC+ |
787 |
AGRN(I) = VGGR(KK2,ITYP(I))*FAC + VGGR(KK1,ITYP(I))*(ONE-FAC) |
. VGLA(KK1,ITYP(I,bi,bj))*(ONE-FAC) |
788 |
|
AGRN(I,bi,bj) = VGGR(KK2,ITYP(I,bi,bj))*FAC+ |
789 |
|
. VGGR(KK1,ITYP(I,bi,bj))*(ONE-FAC) |
790 |
|
|
791 |
220 CONTINUE |
220 CONTINUE |
792 |
|
|
793 |
RETURN |
RETURN |
794 |
END |
END |
795 |
|
|
796 |
subroutine getalb(sec,month,day,cosz,snodep,fraci,fracg, |
subroutine getalb(sec,month,day,cosz,snodep,fraci,fracg,im,jm, |
797 |
1 im,jm,nchp,nchpland,igrd,ityp,chfr,chlt, |
. nchp,nchpland,nSx,nSy,bi,bj,igrd,ityp,chfr,chlt, |
798 |
2 alai,agrn,albvr,albvf,albnr,albnf) |
. alai,agrn,albvr,albvf,albnr,albnf) |
799 |
C*********************************************************************** |
C*********************************************************************** |
800 |
C PURPOSE |
C PURPOSE |
801 |
C To act as an interface to routine sibalb, which calculates |
C To act as an interface to routine sibalb, which calculates |
806 |
C month - month of the year of current time |
C month - month of the year of current time |
807 |
C day - day of the month of current time |
C day - day of the month of current time |
808 |
C cosz - local cosine of the zenith angle [im,jm] |
C cosz - local cosine of the zenith angle [im,jm] |
809 |
C snodep - snow cover in meters [nchp] |
C snodep - snow cover in meters [nchp,nSx,nSy] |
810 |
C fraci - real array in grid space of total sea ice fraction [im,jm] |
C fraci - real array in grid space of total sea ice fraction [im,jm] |
811 |
C fracg - real array in grid space of total land fraction [im,jm] |
C fracg - real array in grid space of total land fraction [im,jm] |
812 |
C im - model grid longitude dimension |
C im - model grid longitude dimension |
813 |
C jm - model grid latitude dimension (number of lat. points) |
C jm - model grid latitude dimension (number of lat. points) |
814 |
C nchp - integer actual number of tiles in tile space |
C nchp - integer actual number of tiles in tile space |
815 |
C nchpland - integer number of land tiles |
C nchpland - integer number of land tiles |
816 |
|
C nSx - number of processors in x-direction |
817 |
|
C nSy - number of processors in y-direction |
818 |
|
C bi - processors index in x-direction |
819 |
|
C bj - processors index in y-direction |
820 |
C igrd - integer array in tile space of grid point number for each |
C igrd - integer array in tile space of grid point number for each |
821 |
C tile [nchp] |
C tile [nchp,nSx,nSy] |
822 |
C ityp - integer array in tile space of land surface type for each |
C ityp - integer array in tile space of land surface type for each |
823 |
C tile [nchp] |
C tile [nchp,nSx,nSy] |
824 |
C chfr - real array in tile space of land surface type fraction for |
C chfr - real array in tile space of land surface type fraction for |
825 |
C each tile [nchp] |
C each tile [nchp,nSx,nSy] |
826 |
C chlt - real array in tile space of latitude value for each tile |
C chlt - real array in tile space of latitude value for each tile |
827 |
C [nchp] |
C [nchp,nSx,nSy] |
828 |
C |
C |
829 |
C OUTPUT: |
C OUTPUT: |
830 |
C albvr - real array [im,jm] of visible direct beam albedo |
C albvr - real array [im,jm] of visible direct beam albedo |
834 |
C |
C |
835 |
C*********************************************************************** |
C*********************************************************************** |
836 |
implicit none |
implicit none |
837 |
real one,a0,a1,a2,a3,ocnalb,albsi |
#include "CPP_EEOPTIONS.h" |
838 |
|
|
839 |
|
integer sec,month,day,im,jm,nchp,nchpland,nSx,nSy,bi,bj |
840 |
|
_RL cosz(im,jm),fraci(im,jm),fracg(im,jm) |
841 |
|
_RL snodep(nchp,nSx,nSy),chfr(nchp,nSx,nSy),chlt(nchp,nSx,nSy) |
842 |
|
integer igrd(nchp,nSx,nSy),ityp(nchp,nSx,nSy) |
843 |
|
_RL alai(nchp,nSx,nSy),agrn(nchp,nSx,nSy) |
844 |
|
_RL albvr(im,jm,nSx,nSy),albvf(im,jm,nSx,nSy) |
845 |
|
_RL albnr(im,jm,nSx,nSy),albnf(im,jm,nSx,nSy) |
846 |
|
|
847 |
|
_RL one,a0,a1,a2,a3,ocnalb,albsi |
848 |
PARAMETER (one = 1.) |
PARAMETER (one = 1.) |
849 |
PARAMETER (A0= 0.40670980) |
PARAMETER (A0= 0.40670980) |
850 |
PARAMETER (A1=-1.2523634 ) |
PARAMETER (A1=-1.2523634 ) |
851 |
PARAMETER (A2= 1.4224051 ) |
PARAMETER (A2= 1.4224051 ) |
852 |
PARAMETER (A3=-0.55573341) |
PARAMETER (A3=-0.55573341) |
853 |
PARAMETER (OCNALB=0.08) |
PARAMETER (OCNALB=0.08) |
854 |
ccc PARAMETER (ALBSI=0.6) |
PARAMETER (ALBSI=0.7) |
|
PARAMETER (ALBSI=0.7) ! Increased to GEOS-1 Value (0.7) L.Takacs 4/2/96 |
|
855 |
|
|
856 |
integer sec,month,day,im,jm,nchp,nchpland |
_RL alboc(im,jm) |
857 |
real cosz(im,jm),fraci(im,jm),fracg(im,jm) |
_RL AVISDR(nchp),ANIRDR(nchp),AVISDF(nchp) |
858 |
real snodep(nchp),chfr(nchp),chlt(nchp) |
_RL ANIRDF(nchp),zenith(nchp) |
|
integer igrd(nchp),ityp(nchp) |
|
|
real albvr(im,jm),albvf(im,jm),albnr(im,jm) |
|
|
real albnf(im,jm) |
|
|
|
|
|
real alboc(im,jm) |
|
|
real AVISDR(nchp),ANIRDR(nchp),AVISDF(nchp) |
|
|
real ANIRDF(nchp),zenith(nchp) |
|
|
real alai(nchp),agrn(nchp) |
|
859 |
integer i,j |
integer i,j |
860 |
|
|
861 |
DO I=1,IM |
DO I=1,IM |
875 |
|
|
876 |
C and now call sibalb |
C and now call sibalb |
877 |
|
|
878 |
call sibalb(avisdr,anirdr,avisdf,anirdf,alai,agrn,zenith, |
call sibalb(avisdr,anirdr,avisdf,anirdf,alai(1,bi,bj), |
879 |
1 snodep,ityp,nchpland) |
. agrn(1,bi,bj),zenith,snodep(1,bi,bj),ityp(1,bi,bj),nchpland) |
880 |
|
|
881 |
C finally some transformations back to grid space for albedos |
C finally some transformations back to grid space for albedos |
882 |
|
|
883 |
call msc2grd(igrd,chfr,avisdr,nchp,nchpland,fracg,albvr,im,jm) |
call msc2grd(igrd(1,bi,bj),chfr(1,bi,bj),avisdr,nchp,nchpland, |
884 |
call msc2grd(igrd,chfr,avisdf,nchp,nchpland,fracg,albvf,im,jm) |
. fracg,albvr(1,bi,bj),im,jm) |
885 |
call msc2grd(igrd,chfr,anirdr,nchp,nchpland,fracg,albnr,im,jm) |
call msc2grd(igrd(1,bi,bj),chfr(1,bi,bj),avisdf,nchp,nchpland, |
886 |
call msc2grd(igrd,chfr,anirdf,nchp,nchpland,fracg,albnf,im,jm) |
. fracg,albvf(1,bi,bj),im,jm) |
887 |
|
call msc2grd(igrd(1,bi,bj),chfr(1,bi,bj),anirdr,nchp,nchpland, |
888 |
|
. fracg,albnr(1,bi,bj),im,jm) |
889 |
|
call msc2grd(igrd(1,bi,bj),chfr(1,bi,bj),anirdf,nchp,nchpland, |
890 |
|
. fracg,albnf(1,bi,bj),im,jm) |
891 |
|
|
892 |
return |
return |
893 |
end |
end |
894 |
|
|
895 |
subroutine getemiss (fracg,im,jm,nchp,igrd,ityp,chfr,snowdep,fraci,emiss) |
subroutine getemiss(fracg,im,jm,nchp,nSx,nSy,bi,bj,igrd,ityp, |
896 |
|
. chfr,snowdep,fraci,emiss) |
897 |
C*********************************************************************** |
C*********************************************************************** |
898 |
C PURPOSE |
C PURPOSE |
899 |
C To act as an interface to routine to emissivity, which calculates |
C To act as an interface to routine to emissivity, which calculates |
904 |
C im - model grid longitude dimension |
C im - model grid longitude dimension |
905 |
C jm - model grid latitude dimension (number of lat. points) |
C jm - model grid latitude dimension (number of lat. points) |
906 |
C nchp - integer actual number of tiles in tile space |
C nchp - integer actual number of tiles in tile space |
907 |
|
C nSx - number of processors in x-direction |
908 |
|
C nSy - number of processors in y-direction |
909 |
|
C bi - processors index in x-direction |
910 |
|
C bj - processors index in y-direction |
911 |
C igrd - integer array in tile space of grid point number for each |
C igrd - integer array in tile space of grid point number for each |
912 |
C tile [nchp] |
C tile [nchp] |
913 |
C ityp - integer array in tile space of land surface type for each |
C ityp - integer array in tile space of land surface type for each |
919 |
C fraci - real array in tile space of sea ice fraction [nchp] |
C fraci - real array in tile space of sea ice fraction [nchp] |
920 |
C |
C |
921 |
C OUTPUT: |
C OUTPUT: |
922 |
C emiss - real array [im,jm,10] of surface emissivities (fraction) |
C emiss - real array [im,jm,10,nSx,nSy] - surface emissivity (frac) |
923 |
C |
C |
924 |
C*********************************************************************** |
C*********************************************************************** |
925 |
implicit none |
implicit none |
926 |
integer im,jm,nchp |
#include "CPP_EEOPTIONS.h" |
927 |
real fracg(im,jm) |
integer im,jm,nchp,nSx,nSy,bi,bj |
928 |
real chfr(nchp) |
_RL fracg(im,jm) |
929 |
integer igrd(nchp), ityp(nchp) |
_RL chfr(nchp,nSx,nSy) |
930 |
real snowdep(nchp),fraci(nchp) |
integer igrd(nchp,nSx,nSy), ityp(nchp,nSx,nSy) |
931 |
real emiss(im,jm,10) |
_RL snowdep(nchp,nSx,nSy),fraci(nchp) |
932 |
|
_RL emiss(im,jm,10,nSx,nSy) |
933 |
|
|
934 |
real emisstile(nchp,10) |
_RL emisstile(nchp,10) |
935 |
integer i,n |
integer i,j,k,n |
936 |
|
|
937 |
do i = 1,10 |
do i = 1,10 |
938 |
do n = 1,nchp |
do n = 1,nchp |
942 |
|
|
943 |
c call emissivity to get values in tile space |
c call emissivity to get values in tile space |
944 |
c ------------------------------------------- |
c ------------------------------------------- |
945 |
call emissivity (snowdep,fraci,nchp,ityp,emisstile) |
call emissivity(snowdep(1,bi,bj),fraci,nchp,ityp(1,bi,bj), |
946 |
|
. emisstile) |
947 |
|
|
948 |
c transform back to grid space for emissivities |
c transform back to grid space for emissivities |
949 |
c --------------------------------------------- |
c --------------------------------------------- |
950 |
do i = 1,10 |
do k = 1,10 |
951 |
emiss(:,:,i) = 0.0 |
do j = 1,jm |
952 |
call msc2grd (igrd,chfr,emisstile(1,i),nchp,nchp,fracg,emiss(1,1,i),im,jm) |
do i = 1,im |
953 |
|
emiss(i,j,k) = 0.0 |
954 |
|
enddo |
955 |
|
enddo |
956 |
|
call msc2grd(igrd(1,bi,bj),chfr(1,bi,bj),emisstile(1,k),nchp,nchp, |
957 |
|
. fracg,emiss(1,1,k,bi,bj),im,jm) |
958 |
enddo |
enddo |
959 |
|
|
960 |
return |
return |
962 |
|
|
963 |
subroutine emissivity (snowdepth,fraci,numpts,ityp,newemis) |
subroutine emissivity (snowdepth,fraci,numpts,ityp,newemis) |
964 |
implicit none |
implicit none |
965 |
|
#include "CPP_EEOPTIONS.h" |
966 |
integer numpts |
integer numpts |
967 |
integer ityp(numpts) |
integer ityp(numpts) |
968 |
real snowdepth(numpts),fraci(numpts) |
_RL snowdepth(numpts),fraci(numpts) |
969 |
real newemis(numpts,10) |
_RL newemis(numpts,10) |
970 |
|
|
971 |
real emis(12,11) |
_RL emis(12,11) |
972 |
real snwmid(10) |
_RL snwmid(10) |
973 |
real fac |
_RL fac |
974 |
integer i,j |
integer i,j |
975 |
|
|
976 |
c----------------------------------------------------------------------- |
c----------------------------------------------------------------------- |
1118 |
enddo |
enddo |
1119 |
|
|
1120 |
return |
return |
1121 |
|
end |
1122 |
|
subroutine get_landfrac(im,jm,nSx,nSy,bi,bj,maxtyp,surftype, |
1123 |
|
. tilefrac,frac) |
1124 |
|
C*********************************************************************** |
1125 |
|
C Purpose |
1126 |
|
C To compute the total fraction of land within a model grid-box |
1127 |
|
C |
1128 |
|
C*********************************************************************** |
1129 |
|
implicit none |
1130 |
|
#include "CPP_EEOPTIONS.h" |
1131 |
|
|
1132 |
|
integer i,j,nSx,nSy,bi,bj,maxtyp |
1133 |
|
integer surftype(im,jm,nSx,nSy) |
1134 |
|
_RL surftype(im,jm,nSx,nSy) |
1135 |
|
_RL frac(im,jm) |
1136 |
|
|
1137 |
|
integer i,j,k |
1138 |
|
|
1139 |
|
do j=1,jm |
1140 |
|
do i=1,im |
1141 |
|
frac(i,j) = 0.0 |
1142 |
|
enddo |
1143 |
|
enddo |
1144 |
|
|
1145 |
|
do k=1,maxtyp |
1146 |
|
do j=1,jm |
1147 |
|
do i=1,im |
1148 |
|
if(surftype(i,j,k,bi,bj).lt.100.and. |
1149 |
|
tilefrac(i,j,k,bi,bj).gt.0.0)then |
1150 |
|
frac(i,j) = frac(i,j) + tilefrac(i,j,k,bi,bj) |
1151 |
|
endif |
1152 |
|
enddo |
1153 |
|
enddo |
1154 |
|
enddo |
1155 |
|
|
1156 |
|
return |
1157 |
end |
end |