source: CONFIG/trunk/SCRIPT/REGRID_forcage/DYN2PHY/main.f @ 1356

Last change on this file since 1356 was 1356, checked in by acosce, 13 years ago

scripts pour regriller les fichiers d'input

File size: 1.4 KB
Line 
1      PROGRAM main
2!-----------------------------------------------
3! developpe par Sophie Szopa lors du passage en 1x1°
4! lit d'ancienne entree LMDz-INCA sur la grille physique pour le modèle en 96x72! passe de grille phy a grille dyn
5! interpole en 1x1
6! passe de grille dyn a phy
7! sort un fichier netcdf
8!-----------------------------------------------
9      USE sflx
10      USE final_grid_lmdz
11      USE grid
12      IMPLICIT NONE
13
14      INTEGER :: error,i,j, k
15      REAL :: somme
16      INCLUDE 'netcdf.inc'
17
18
19      ! ... Read the final grid
20      print*," lit grille de LMDz ..."
21      CALL get_grid_lmdz ('lmdz_grid_144ZOOMhim.nc')
22
23      CALL get_field_npp_dyn('NPP_dyn_zoomhim.nc') !gives npp_dyn(nlon_len,nlat_len,nrecs)
24      PRINT *, "npp lu !"
25      CALL get_field_landuse_dyn('LANDUSE_dyn_zoomhim.nc') !gives landuse_dyn(nlon_len,nlat_len,types)
26      PRINT *, "landuse lu !"
27
28      ALLOCATE(npp_phy(klon,nrecs), STAT=error) 
29      PRINT *, "allocation of npp phys fields, done!"
30      CALL dyn2phy(npp_dyn,npp_phy)
31
32      ALLOCATE(landuse_phy(klon, types), STAT=error) 
33      PRINT *, "allocation of landuse phys fields, done!"
34      CALL dyn2phy_landuse(landuse_dyn,landuse_phy)
35
36
37!       ... Prepare the netCDF files
38 
39      PRINT *, 'Prepare netCDF output phy file ...'
40      CALL phygrid_ncfile_landuse("LANDUSE_phy_zoomhim.nc")
41      CALL phygrid_ncfile_npp("NPP_phy_zoomhim.nc")
42
43
44      STOP 'OK.'
45
46      END PROGRAM main
Note: See TracBrowser for help on using the repository browser.