Changeset 697 for trunk/LMDZ.MARS/libf
- Timestamp:
- Jun 6, 2012, 10:56:42 AM (13 years ago)
- Location:
- trunk/LMDZ.MARS/libf
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.MARS/libf/dyn3d/calfis.F
r38 r697 178 178 latfi(ngridmx)= rlatu(jjp1) 179 179 lonfi(ngridmx)= 0. 180 181 ! build airefi(), mesh area on physics grid 180 182 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,aire,airefi) 183 ! Poles are single points on physics grid 184 airefi(1)=airefi(1)*iim 185 airefi(ngridmx)=airefi(ngridmx)*iim 181 186 182 187 CALL inifis(ngridmx,llm,day_ini,daysec,dtphys, -
trunk/LMDZ.MARS/libf/dyn3d/newstart.F
r664 r697 347 347 latfi(ngridmx)=rlatu(jjp1) 348 348 lonfi(ngridmx)=0. 349 350 ! build airefi(), mesh area on physics grid 349 351 CALL gr_dyn_fi(1,iip1,jjp1,ngridmx,aire,airefi) 352 ! Poles are single points on physics grid 353 airefi(1)=airefi(1)*iim 354 airefi(ngridmx)=airefi(ngridmx)*iim 350 355 351 356 ! also initialize various physics flags/settings which might be needed -
trunk/LMDZ.MARS/libf/phymars/phyetat0.F
r224 r697 17 17 #include "dimensions.h" 18 18 #include "dimphys.h" 19 #include "comgeomfi.h"19 !#include "comgeomfi.h" 20 20 #include "surfdat.h" 21 21 #include "planete.h" … … 113 113 . p_omeg,p_g,p_mugaz,p_daysec,time) 114 114 c 115 c Lecture des latitudes (coordonnees):116 c 117 ierr=nf90_inq_varid(nid,"latitude",nvarid)118 IF (ierr.NE.nf90_noerr) THEN119 PRINT*, 'phyetat0: Le champ <latitude> est absent'120 write(*,*)trim(nf90_strerror(ierr))121 CALL abort122 ENDIF123 ierr=nf90_get_var(nid,nvarid,lati)124 IF (ierr.NE.nf90_noerr) THEN125 PRINT*, 'phyetat0: Lecture echouee pour <latitude>'126 write(*,*)trim(nf90_strerror(ierr))127 CALL abort128 ENDIF129 c 130 c Lecture des longitudes (coordonnees):131 c 132 ierr=nf90_inq_varid(nid,"longitude",nvarid)133 IF (ierr.NE.nf90_noerr) THEN134 PRINT*, 'phyetat0: Le champ <longitude> est absent'135 write(*,*)trim(nf90_strerror(ierr))136 CALL abort137 ENDIF138 ierr=nf90_get_var(nid,nvarid,long)139 IF (ierr.NE.nf90_noerr) THEN140 PRINT*, 'phyetat0: Lecture echouee pour <longitude>'141 write(*,*)trim(nf90_strerror(ierr))142 CALL abort143 ENDIF144 c 145 c Lecture des aires des mailles:146 c 147 ierr=nf90_inq_varid(nid,"area",nvarid)148 IF (ierr.NE.nf90_noerr) THEN149 PRINT*, 'phyetat0: Le champ <area> est absent'150 write(*,*)trim(nf90_strerror(ierr))151 CALL abort152 ENDIF153 ierr=nf90_get_var(nid,nvarid,area)154 IF (ierr.NE.nf90_noerr) THEN155 PRINT*, 'phyetat0: Lecture echouee pour <area>'156 write(*,*)trim(nf90_strerror(ierr))157 CALL abort158 ENDIF159 xmin = 1.0E+20160 xmax = -1.0E+20161 xmin = MINVAL(area)162 xmax = MAXVAL(area)163 PRINT*,'Aires des mailles <area>:', xmin, xmax115 c Read latitudes (coordinates): No need, these are provided by the dynamics 116 c 117 ! ierr=nf90_inq_varid(nid,"latitude",nvarid) 118 ! IF (ierr.NE.nf90_noerr) THEN 119 ! PRINT*, 'phyetat0: Le champ <latitude> est absent' 120 ! write(*,*)trim(nf90_strerror(ierr)) 121 ! CALL abort 122 ! ENDIF 123 ! ierr=nf90_get_var(nid,nvarid,lati) 124 ! IF (ierr.NE.nf90_noerr) THEN 125 ! PRINT*, 'phyetat0: Lecture echouee pour <latitude>' 126 ! write(*,*)trim(nf90_strerror(ierr)) 127 ! CALL abort 128 ! ENDIF 129 c 130 c read longitudes (coordinates): No need, these are provided by the dynamics 131 c 132 ! ierr=nf90_inq_varid(nid,"longitude",nvarid) 133 ! IF (ierr.NE.nf90_noerr) THEN 134 ! PRINT*, 'phyetat0: Le champ <longitude> est absent' 135 ! write(*,*)trim(nf90_strerror(ierr)) 136 ! CALL abort 137 ! ENDIF 138 ! ierr=nf90_get_var(nid,nvarid,long) 139 ! IF (ierr.NE.nf90_noerr) THEN 140 ! PRINT*, 'phyetat0: Lecture echouee pour <longitude>' 141 ! write(*,*)trim(nf90_strerror(ierr)) 142 ! CALL abort 143 ! ENDIF 144 c 145 c Read areas of meshes: No need, these are provided by the dynamics 146 c 147 ! ierr=nf90_inq_varid(nid,"area",nvarid) 148 ! IF (ierr.NE.nf90_noerr) THEN 149 ! PRINT*, 'phyetat0: Le champ <area> est absent' 150 ! write(*,*)trim(nf90_strerror(ierr)) 151 ! CALL abort 152 ! ENDIF 153 ! ierr=nf90_get_var(nid,nvarid,area) 154 ! IF (ierr.NE.nf90_noerr) THEN 155 ! PRINT*, 'phyetat0: Lecture echouee pour <area>' 156 ! write(*,*)trim(nf90_strerror(ierr)) 157 ! CALL abort 158 ! ENDIF 159 ! xmin = 1.0E+20 160 ! xmax = -1.0E+20 161 ! xmin = MINVAL(area) 162 ! xmax = MAXVAL(area) 163 ! PRINT*,'Aires des mailles <area>:', xmin, xmax 164 164 c 165 165 c Lecture du geopotentiel au sol: -
trunk/LMDZ.MARS/libf/phymars/surfini.F
r669 r697 2 2 ! to use 'getin' 3 3 USE ioipsl_getincom 4 use netcdf 4 5 IMPLICIT NONE 5 6 c======================================================================= … … 20 21 21 22 #include "datafile.h" 22 #include "netcdf.inc"23 23 24 24 INTEGER ngrid,ig,icap,iq,alternate … … 57 57 58 58 REAL,SAVE :: min_icevalue = 500. 59 PARAMETERstring = 'thermal'59 character(len=50) :: string = 'thermal' 60 60 61 61 character (len=100) :: zedatafile … … 143 143 144 144 145 ierr =nf_open(trim(zedatafile)//'/surface.nc',146 & NF _NOWRITE,nid)147 148 IF (ierr.NE.nf _noerr) THEN145 ierr=nf90_open(trim(zedatafile)//'/surface.nc', 146 & NF90_NOWRITE,nid) 147 148 IF (ierr.NE.nf90_noerr) THEN 149 149 write(*,*)'Error : cannot open file surface.nc ' 150 150 write(*,*)'(in phymars/surfini.F)' … … 159 159 160 160 161 ierr = NF_INQ_VARID(nid, string, nvarid)162 if (ierr.ne.nf _noerr) then163 write(*,*) ' datareadncerror, cannot find ',trim(string)161 ierr=nf90_inq_varid(nid, string, nvarid) 162 if (ierr.ne.nf90_noerr) then 163 write(*,*) 'surfini error, cannot find ',trim(string) 164 164 write(*,*) ' in file ',trim(zedatafile),'/surface.nc' 165 write(*,*)trim(nf90_strerror(ierr)) 165 166 stop 166 167 endif 167 #ifdef NC_DOUBLE 168 ierr = NF_GET_VAR_DOUBLE(nid, nvarid, zdata) 169 #else 170 ierr = NF_GET_VAR_REAL(nid, nvarid, zdata) 171 #endif 172 if (ierr.ne.nf_noerr) then 173 write(*,*) 'datareadnc: error failed loading ',trim(string) 168 169 ierr=nf90_get_var(nid, nvarid, zdata) 170 171 if (ierr.ne.nf90_noerr) then 172 write(*,*) 'surfini: error failed loading ',trim(string) 173 write(*,*)trim(nf90_strerror(ierr)) 174 174 stop 175 175 endif 176 176 177 177 178 ierr=nf _close(nid)178 ierr=nf90_close(nid) 179 179 180 180
Note: See TracChangeset
for help on using the changeset viewer.