source: trunk/LMDZ.GENERIC/libf/phystd/surfini.F @ 1255

Last change on this file since 1255 was 1216, checked in by emillour, 11 years ago

Generic model:
Major cleanup, in order to ease the use of LMDZ.GENERIC with (parallel) dynamics
in LMDZ.COMMON: (NB: this will break LMDZ.UNIVERSAL, which should be thrashed
in the near future)

  • Updated makegcm_* scripts (and makdim) and added the "-full" (to enforce full recomputation of the model) option
  • In dyn3d: converted control.h to module control_mod.F90 and converted iniadvtrac.F to module infotrac.F90
  • Added module mod_const_mpi.F90 in dyn3d (not used in serial mode)
  • Rearanged input/outputs routines everywhere to handle serial/MPI cases. physdem.F => phyredem.F90 , phyetat0.F => phyetat0.F90 ; all read/write routines for startfi files are gathered in module iostart.F90
  • added parallelism related routines init_phys_lmdz.F90, comgeomphy.F90, dimphy.F90, iniphysiq.F90, mod_grid_phy_lmdz.F90, mod_phys_lmdz_mpi_data.F90, mod_phys_lmdz_mpi_transfert.F90, mod_phys_lmdz_omp_data.F90, mod_phys_lmdz_omp_transfert.F90, mod_phys_lmdz_para.F90, mod_phys_lmdz_transfert_para.F90 in phymars and mod_const_mpi.F90 in dyn3d (for compliance with parallelism)
  • added created generic routines 'planetwide_maxval' and 'planetwide_minval', in module "planetwide_mod", that enable obtaining the max and min of a field over the whole planet. This should be further imroved with computation of means (possibly area weighed), etc.

EM

File size: 2.0 KB
Line 
1      SUBROUTINE surfini(ngrid,nq,qsurf,psolaralb)
2
3      USE surfdat_h, only: albedodat, albedice
4      USE tracer_h, only: igcm_co2_ice
5      use comgeomfi_h, only: lati
6      use planetwide_mod, only: planetwide_maxval, planetwide_minval
7
8      IMPLICIT NONE
9c=======================================================================
10c
11c   creation des calottes pour l'etat initial
12c
13c=======================================================================
14c-----------------------------------------------------------------------
15c   Declarations:
16c   -------------
17#include "dimensions.h"
18#include "dimphys.h"
19#include "callkeys.h"
20c
21      INTEGER,INTENT(IN) :: ngrid
22      INTEGER,INTENT(IN) :: nq
23      REAL,INTENT(OUT) :: psolaralb(ngrid)
24      REAL,INTENT(IN) :: qsurf(ngrid,nq) !tracer on surface (kg/m2)
25
26      INTEGER :: ig,icap
27      REAL :: min_albedo,max_albedo
28c
29c=======================================================================
30
31
32      DO ig=1,ngrid
33         psolaralb(ig)=albedodat(ig)
34      ENDDO
35
36      call planetwide_minval(albedodat,min_albedo)
37      call planetwide_maxval(albedodat,max_albedo)
38      write(*,*) 'surfini: minimum corrected albedo',min_albedo
39      write(*,*) 'surfini: maximum corrected albedo',max_albedo
40
41      if (igcm_co2_ice.ne.0) then
42! Change Albedo if there is CO2 ice on the surface
43        DO ig=1,ngrid
44          IF (qsurf(ig,igcm_co2_ice) .GT. 0.) THEN
45             IF(lati(ig).LT.0.) THEN
46                icap=2 ! Southern hemisphere
47             ELSE
48                icap=1 ! Northern hemisphere
49             ENDIF
50             psolaralb(ig) = albedice(icap)
51          END IF
52        ENDDO ! of DO ig=1,ngrid     
53      else
54        write(*,*) "surfini: No CO2 ice tracer on surface  ..."
55        write(*,*) "         and therefore no albedo change."
56      endif
57
58      call planetwide_minval(psolaralb,min_albedo)
59      call planetwide_maxval(psolaralb,max_albedo)
60      write(*,*) 'surfini: minimum corrected albedo',min_albedo
61      write(*,*) 'surfini: maximum corrected albedo',max_albedo
62
63      END
Note: See TracBrowser for help on using the repository browser.