Changeset 1511
- Timestamp:
- Apr 28, 2011, 5:21:47 PM (14 years ago)
- Location:
- LMDZ5/trunk/libf
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ5/trunk/libf/dyn3d/ce0l.F90
r1492 r1511 43 43 REAL, DIMENSION(iip1,jjp1) :: masque 44 44 CHARACTER(LEN=15) :: calnd 45 REAL, DIMENSION(iip1,jjp1) :: phis ! geopotentiel au sol 45 46 !------------------------------------------------------------------------------- 46 47 CALL conf_gcm( 99, .TRUE. , clesphy0 ) … … 80 81 WRITE(lunout,'(//)') 81 82 WRITE(lunout,*) ' interbar = ',interbar 82 CALL etat0_netcdf(interbar,masque, ok_etat0)83 CALL etat0_netcdf(interbar,masque,phis,ok_etat0) 83 84 84 85 IF(ok_limit) THEN … … 97 98 WRITE(lunout,*) ' *************************** ' 98 99 WRITE(lunout,'(//)') 99 CALL grilles_gcm_netcdf_sub( )100 CALL grilles_gcm_netcdf_sub(masque,phis) 100 101 END IF 101 102 #endif -
LMDZ5/trunk/libf/dyn3d/etat0_netcdf.F90
r1496 r1511 4 4 !------------------------------------------------------------------------------- 5 5 ! 6 SUBROUTINE etat0_netcdf(ib, masque, letat0)6 SUBROUTINE etat0_netcdf(ib, masque, phis, letat0) 7 7 ! 8 8 !------------------------------------------------------------------------------- … … 37 37 LOGICAL, INTENT(IN) :: ib ! barycentric interpolat. 38 38 REAL, DIMENSION(iip1,jjp1), INTENT(INOUT) :: masque ! land mask 39 REAL, DIMENSION(iip1,jjp1), INTENT(OUT) :: phis ! geopotentiel au sol 39 40 LOGICAL, INTENT(IN) :: letat0 ! F: masque only required 40 41 #ifndef CPP_EARTH … … 51 52 REAL, DIMENSION(klon) :: tsol, qsol 52 53 REAL, DIMENSION(klon) :: sn, rugmer, run_off_lic_0 53 REAL, DIMENSION(iip1,jjp1) :: orog, rugo, psol , phis54 REAL, DIMENSION(iip1,jjp1) :: orog, rugo, psol 54 55 REAL, DIMENSION(iip1,jjp1,llm+1) :: p3d 55 56 REAL, DIMENSION(iip1,jjp1,llm) :: uvent, t3d, tpot, qsat, qd -
LMDZ5/trunk/libf/dyn3d/grilles_gcm_netcdf_sub.F90
r1492 r1511 7 7 ! part in the program create_fausse_var. 8 8 ! 9 SUBROUTINE grilles_gcm_netcdf_sub 9 SUBROUTINE grilles_gcm_netcdf_sub(masque,phis) 10 10 11 11 IMPLICIT NONE … … 19 19 INCLUDE "serre.h" 20 20 21 22 REAL,DIMENSION(iip1,jjp1),INTENT(IN) :: masque ! masque terre/mer 23 REAL,DIMENSION(iip1,jjp1),INTENT(IN) :: phis ! geopotentiel au sol 24 21 25 REAL temp(iim+1,jjm+1) 22 26 ! Attributs netcdf sortie 23 27 INTEGER ncid_out,rcode_out 24 INTEGER out_lonuid,out_lonvid,out_latuid,out_latvid 28 INTEGER out_lonuid,out_lonvid,out_latuid,out_latvid,out_levid 25 29 INTEGER out_varid 26 30 INTEGER out_lonudim,out_lonvdim 27 31 INTEGER out_latudim,out_latvdim,out_dim(3) 32 INTEGER out_levdim 28 33 29 34 INTEGER, PARAMETER :: longcles = 20 … … 33 38 34 39 INTEGER status,i,j 35 REAL rlatudeg(jjp1),rlatvdeg(jjm) 40 REAL rlatudeg(jjp1),rlatvdeg(jjm),rlevdeg(llm) 36 41 REAL rlonudeg(iip1),rlonvdeg(iip1) 37 42 38 43 REAL dlon1(iip1),dlon2(iip1),dlat1(jjp1),dlat2(jjp1) 39 44 REAL acoslat,dxkm,dykm,resol(iip1,jjp1) 40 45 REAL,DIMENSION(iip1,jjp1) :: phis_loc 46 INTEGER masque_int(iip1,jjp1) 47 INTEGER :: phis_id 48 INTEGER :: area_id 49 INTEGER :: mask_id 50 41 51 rad = 6400000 42 52 omeg = 7.272205e-05 … … 165 175 #endif 166 176 167 177 ! On re-ouvre le fichier pour rajouter 4 nouvelles variables necessaire pour INCA 178 ! lev - phis - aire - mask 179 rlevdeg(:) = presnivs 180 phis_loc(:,:) = phis(:,:)/g 181 182 ! niveaux de pression verticaux 183 status = NF_REDEF (ncid_out) 184 status=NF_DEF_DIM(ncid_out,'lev',llm,out_levdim) 185 186 ! fields 187 out_dim(1)=out_lonvdim 188 out_dim(2)=out_latudim 189 190 status = nf_def_var(ncid_out,'phis',NF_FLOAT,2,out_dim,phis_id) 191 CALL handle_err(status) 192 status = nf_def_var(ncid_out,'aire',NF_FLOAT,2,out_dim,area_id) 193 CALL handle_err(status) 194 status = nf_def_var(ncid_out,'mask',NF_INT ,2,out_dim,mask_id) 195 CALL handle_err(status) 196 197 status=NF_ENDDEF(ncid_out) 198 199 ! ecriture des variables 200 #ifdef NC_DOUBLE 201 status=NF_PUT_VARA_DOUBLE(ncid_out,out_levid,1,llm,rlevdeg) 202 #else 203 status=NF_PUT_VARA_REAL(ncid_out,out_levid,1,llm,rlevdeg) 204 #endif 205 206 start(1)=1 207 start(2)=1 208 start(3)=1 209 start(4)=0 210 COUNT(1)=iip1 211 COUNT(2)=jjp1 212 COUNT(3)=1 213 COUNT(4)=0 214 215 status = nf_put_vara_double(ncid_out, phis_id,start,count, phis_loc) 216 status = nf_put_vara_double(ncid_out, area_id,start,count, aire) 217 masque_int(:,:) = nINT(masque(:,:)) 218 status = nf_put_vara_int(ncid_out, mask_id,start,count,masque_int) 219 CALL handle_err(status) 220 168 221 ! fermeture du fichier netcdf 169 222 CALL ncclos(ncid_out,rcode_out) -
LMDZ5/trunk/libf/dyn3dpar/ce0l.F90
r1492 r1511 46 46 REAL, DIMENSION(iip1,jjp1) :: masque 47 47 CHARACTER(LEN=15) :: calnd 48 REAL, DIMENSION(iip1,jjp1) :: phis ! geopotentiel au sol 48 49 !------------------------------------------------------------------------------- 49 50 CALL conf_gcm( 99, .TRUE. , clesphy0 ) … … 91 92 WRITE(lunout,'(//)') 92 93 WRITE(lunout,*) ' interbar = ',interbar 93 CALL etat0_netcdf(interbar,masque, ok_etat0)94 CALL etat0_netcdf(interbar,masque,phis,ok_etat0) 94 95 95 96 IF(ok_limit) THEN … … 108 109 WRITE(lunout,*) ' *************************** ' 109 110 WRITE(lunout,'(//)') 110 CALL grilles_gcm_netcdf_sub( )111 CALL grilles_gcm_netcdf_sub(masque,phis) 111 112 END IF 112 113 -
LMDZ5/trunk/libf/dyn3dpar/etat0_netcdf.F90
r1496 r1511 4 4 !------------------------------------------------------------------------------- 5 5 ! 6 SUBROUTINE etat0_netcdf(ib, masque, letat0)6 SUBROUTINE etat0_netcdf(ib, masque, phis, letat0) 7 7 ! 8 8 !------------------------------------------------------------------------------- … … 37 37 LOGICAL, INTENT(IN) :: ib ! barycentric interpolat. 38 38 REAL, DIMENSION(iip1,jjp1), INTENT(INOUT) :: masque ! land mask 39 REAL, DIMENSION(iip1,jjp1), INTENT(OUT) :: phis ! geopotentiel au sol 39 40 LOGICAL, INTENT(IN) :: letat0 ! F: masque only required 40 41 #ifndef CPP_EARTH … … 51 52 REAL, DIMENSION(klon) :: tsol, qsol 52 53 REAL, DIMENSION(klon) :: sn, rugmer, run_off_lic_0 53 REAL, DIMENSION(iip1,jjp1) :: orog, rugo, psol , phis54 REAL, DIMENSION(iip1,jjp1) :: orog, rugo, psol 54 55 REAL, DIMENSION(iip1,jjp1,llm+1) :: p3d 55 56 REAL, DIMENSION(iip1,jjp1,llm) :: uvent, t3d, tpot, qsat, qd -
LMDZ5/trunk/libf/dyn3dpar/grilles_gcm_netcdf_sub.F90
r1492 r1511 7 7 ! part in the program create_fausse_var. 8 8 ! 9 SUBROUTINE grilles_gcm_netcdf_sub 9 SUBROUTINE grilles_gcm_netcdf_sub(masque,phis) 10 10 11 11 IMPLICIT NONE … … 19 19 INCLUDE "serre.h" 20 20 21 22 REAL,DIMENSION(iip1,jjp1),INTENT(IN) :: masque ! masque terre/mer 23 REAL,DIMENSION(iip1,jjp1),INTENT(IN) :: phis ! geopotentiel au sol 24 21 25 REAL temp(iim+1,jjm+1) 22 26 ! Attributs netcdf sortie 23 27 INTEGER ncid_out,rcode_out 24 INTEGER out_lonuid,out_lonvid,out_latuid,out_latvid 28 INTEGER out_lonuid,out_lonvid,out_latuid,out_latvid,out_levid 25 29 INTEGER out_varid 26 30 INTEGER out_lonudim,out_lonvdim 27 31 INTEGER out_latudim,out_latvdim,out_dim(3) 32 INTEGER out_levdim 28 33 29 34 INTEGER, PARAMETER :: longcles = 20 … … 33 38 34 39 INTEGER status,i,j 35 REAL rlatudeg(jjp1),rlatvdeg(jjm) 40 REAL rlatudeg(jjp1),rlatvdeg(jjm),rlevdeg(llm) 36 41 REAL rlonudeg(iip1),rlonvdeg(iip1) 37 42 38 43 REAL dlon1(iip1),dlon2(iip1),dlat1(jjp1),dlat2(jjp1) 39 44 REAL acoslat,dxkm,dykm,resol(iip1,jjp1) 40 45 REAL,DIMENSION(iip1,jjp1) :: phis_loc 46 INTEGER masque_int(iip1,jjp1) 47 INTEGER :: phis_id 48 INTEGER :: area_id 49 INTEGER :: mask_id 50 41 51 rad = 6400000 42 52 omeg = 7.272205e-05 … … 165 175 #endif 166 176 167 177 ! On re-ouvre le fichier pour rajouter 4 nouvelles variables necessaire pour INCA 178 ! lev - phis - aire - mask 179 rlevdeg(:) = presnivs 180 phis_loc(:,:) = phis(:,:)/g 181 182 ! niveaux de pression verticaux 183 status = NF_REDEF (ncid_out) 184 status=NF_DEF_DIM(ncid_out,'lev',llm,out_levdim) 185 186 ! fields 187 out_dim(1)=out_lonvdim 188 out_dim(2)=out_latudim 189 190 status = nf_def_var(ncid_out,'phis',NF_FLOAT,2,out_dim,phis_id) 191 CALL handle_err(status) 192 status = nf_def_var(ncid_out,'aire',NF_FLOAT,2,out_dim,area_id) 193 CALL handle_err(status) 194 status = nf_def_var(ncid_out,'mask',NF_INT ,2,out_dim,mask_id) 195 CALL handle_err(status) 196 197 status=NF_ENDDEF(ncid_out) 198 199 ! ecriture des variables 200 #ifdef NC_DOUBLE 201 status=NF_PUT_VARA_DOUBLE(ncid_out,out_levid,1,llm,rlevdeg) 202 #else 203 status=NF_PUT_VARA_REAL(ncid_out,out_levid,1,llm,rlevdeg) 204 #endif 205 206 start(1)=1 207 start(2)=1 208 start(3)=1 209 start(4)=0 210 COUNT(1)=iip1 211 COUNT(2)=jjp1 212 COUNT(3)=1 213 COUNT(4)=0 214 215 status = nf_put_vara_double(ncid_out, phis_id,start,count, phis_loc) 216 status = nf_put_vara_double(ncid_out, area_id,start,count, aire) 217 masque_int(:,:) = nINT(masque(:,:)) 218 status = nf_put_vara_int(ncid_out, mask_id,start,count,masque_int) 219 CALL handle_err(status) 220 168 221 ! fermeture du fichier netcdf 169 222 CALL ncclos(ncid_out,rcode_out)
Note: See TracChangeset
for help on using the changeset viewer.