| 1 | SUBROUTINE surfini(ngrid,nq,qsurf,psolaralb) |
|---|
| 2 | |
|---|
| 3 | USE surfdat_h |
|---|
| 4 | USE tracer_h |
|---|
| 5 | |
|---|
| 6 | IMPLICIT NONE |
|---|
| 7 | c======================================================================= |
|---|
| 8 | c |
|---|
| 9 | c creation des calottes pour l'etat initial |
|---|
| 10 | c |
|---|
| 11 | c======================================================================= |
|---|
| 12 | c----------------------------------------------------------------------- |
|---|
| 13 | c Declarations: |
|---|
| 14 | c ------------- |
|---|
| 15 | #include "dimensions.h" |
|---|
| 16 | #include "dimphys.h" |
|---|
| 17 | #include "callkeys.h" |
|---|
| 18 | c |
|---|
| 19 | INTEGER ngrid,ig,icap |
|---|
| 20 | INTEGER nq |
|---|
| 21 | REAL piceco2(ngrid),psolaralb(ngrid) |
|---|
| 22 | REAL qsurf(ngrid,nq) !tracer on surface (kg/m2) |
|---|
| 23 | |
|---|
| 24 | EXTERNAL ISMIN,ISMAX |
|---|
| 25 | INTEGER ISMIN,ISMAX |
|---|
| 26 | c |
|---|
| 27 | c======================================================================= |
|---|
| 28 | |
|---|
| 29 | c |
|---|
| 30 | c calcul de piceco2 (kg/m2) a l'etat initial |
|---|
| 31 | c ------------------------------------------ |
|---|
| 32 | |
|---|
| 33 | DO ig=1,ngrid |
|---|
| 34 | psolaralb(ig)=albedodat(ig) |
|---|
| 35 | ! psolaralb(ig,2)=albedodat(ig) |
|---|
| 36 | ENDDO |
|---|
| 37 | |
|---|
| 38 | PRINT*,'surfini: minimum des donnees albedo', |
|---|
| 39 | s albedodat(ISMIN(ngrid,albedodat,1)) |
|---|
| 40 | PRINT*,'surfini: maximum des donnees albedo', |
|---|
| 41 | s albedodat(ISMAX(ngrid,albedodat,1)) |
|---|
| 42 | |
|---|
| 43 | c calcul de psolaralb |
|---|
| 44 | c ------------------- |
|---|
| 45 | ! DO ig=1,ngrid |
|---|
| 46 | c IF (water) THEN |
|---|
| 47 | c if (qsurf(ig,nq).gt.0.005) then |
|---|
| 48 | c psolaralb(ig,1) = 0.4 |
|---|
| 49 | c psolaralb(ig,2) = 0.4 |
|---|
| 50 | c endif |
|---|
| 51 | c ENDIF |
|---|
| 52 | ! ENDDO ! of DO ig=1,ngrid |
|---|
| 53 | c IF there is more than 5 pr. um of h2o ice but no C02 ice, surface albedo is set to 0.4. |
|---|
| 54 | |
|---|
| 55 | if (igcm_co2_ice.ne.0) then |
|---|
| 56 | ! Change Albedo if there is CO2 ice on the surface |
|---|
| 57 | DO ig=1,ngrid |
|---|
| 58 | IF (qsurf(ig,igcm_co2_ice) .GT. 0.) THEN |
|---|
| 59 | !!!! no good in parallel |
|---|
| 60 | IF(ig.GT.ngrid/2+1) THEN |
|---|
| 61 | icap=2 |
|---|
| 62 | ELSE |
|---|
| 63 | icap=1 |
|---|
| 64 | ENDIF |
|---|
| 65 | psolaralb(ig) = albedice(icap) |
|---|
| 66 | ! psolaralb(ig,2) = albedice(icap) |
|---|
| 67 | END IF |
|---|
| 68 | ENDDO ! of DO ig=1,ngrid |
|---|
| 69 | else |
|---|
| 70 | write(*,*) "surfini: No CO2 ice tracer on surface ..." |
|---|
| 71 | write(*,*) " and therefore no albedo change." |
|---|
| 72 | endif |
|---|
| 73 | |
|---|
| 74 | PRINT*,'surfini: minimum des donnees albedo', |
|---|
| 75 | s psolaralb(ISMIN(ngrid,psolaralb,1)) |
|---|
| 76 | PRINT*,'surfini: maximum des donnees albedo', |
|---|
| 77 | s psolaralb(ISMAX(ngrid,psolaralb,1)) |
|---|
| 78 | |
|---|
| 79 | RETURN |
|---|
| 80 | END |
|---|