- Timestamp:
- Feb 12, 2025, 10:08:35 AM (7 days ago)
- Location:
- LMDZ6/branches/contrails
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/branches/contrails
- Property svn:mergeinfo changed
/LMDZ6/trunk reverse-merged: 5451,5458,5460,5463,5468-5487
- Property svn:mergeinfo changed
-
LMDZ6/branches/contrails/libf/phylmd/Dust/read_surface.f90
r5489 r5536 31 31 real surfa_glo(klon_glo,5) 32 32 ! 33 integer ncid, varid, rcode , varlatid,tmpid34 integer start _(2),count_(2)33 integer ncid, varid, rcode 34 integer start(2),count(2),status 35 35 integer i,j,l,ig 36 36 character*1 str1 … … 41 41 real, dimension(nbp_lat) :: lats 42 42 real, dimension(nbp_lat) :: lats_glo 43 integer, dimension(1) :: start _j,endj43 integer, dimension(1) :: startj,endj 44 44 !JE20140526>> 45 45 !$OMP MASTER … … 47 47 48 48 print*,'Lecture du fichier donnees_lisa.nc' 49 rcode=nf90_open('donnees_lisa.nc',nf90_nowrite,ncid) 50 if ( rcode /= 0 ) then ; call abort_physic('LMDZ','open donnees_lisa.nc dans read_vent',1) ; endif 51 49 ncid=nf90_open('donnees_lisa.nc',nf90_nowrite,rcode) 52 50 53 51 !JE20140526<<: check if are inversed or not the latitude grid in donnes_lisa … … 56 54 isinversed=.false. 57 55 do i=1,5 58 if (i==1) aux4s='latu' 59 if (i==2) aux4s='LATU' 60 if (i==3) aux4s='LatU' 61 if (i==4) aux4s='Latu' 62 if (i==5) aux4s='latU' 63 rcode = nf90_inq_varid(ncid, aux4s, tmpid) 64 IF ((rcode==0).and.( .not. outcycle )) THEN 65 outcycle=.true. 66 varlatid=tmpid 67 ENDIF 56 if (i==1) aux4s='latu' 57 if (i==2) aux4s='LATU' 58 if (i==3) aux4s='LatU' 59 if (i==4) aux4s='Latu' 60 if (i==5) aux4s='latU' 61 status = nf90_inq_varid(ncid, aux4s, rcode) 62 ! print *,'stat,i',status,i,outcycle,aux4s 63 ! print *,'ifclause',status.NE. nf90_noerr ,outcycle == .false. 64 IF ((.not.(status.NE. nf90_noerr) ).and.( .not. outcycle )) THEN 65 outcycle=.true. 66 latstr=aux4s 67 ENDIF 68 68 enddo ! check if it inversed lat 69 start_j(1)=1 69 startj(1)=1 70 ! endj(1)=jjp1 70 71 endj(1)=nbp_lat 71 rcode = nf90_get_var(ncid, varlatid, lats_glo, start_j, endj) 72 if ( .not. outcycle ) then ; call abort_physic('LMDZ','get lat dans read_surface',1) ; endif 72 varid=nf90_inq_varid(ncid,latstr,rcode) 73 73 74 74 status = nf90_get_var(ncid, varid, lats_glo, startj, endj) 75 ! print *,latstr,varid,status,jjp1,rcode 76 ! IF (status .NE. nf90_noerr) print*,'NOOOOOOO' 77 ! print *,lats 78 !stop 75 79 76 80 ! check if netcdf is latitude inversed or not. … … 82 86 write(str1,'(i1)') i 83 87 varname=trim(name)//str1 84 rcode=nf90_inq_varid(ncid,trim(varname),varid)85 if ( rcode /= 0 ) then ; call abort_physic('LMDZ','get'//varname//' dans read_vent',1) ; endif88 print*,'lecture variable:',varname 89 varid=nf90_inq_varid(ncid,trim(varname),rcode) 86 90 ! varid=nf90_inq_varid(ncid,varname,rcode) 87 91 … … 89 93 ! ----------------------------------------------------- 90 94 91 start _(1)=192 start _(2)=193 count _(1)=nbp_lon+194 ! count _(1)=iip195 count _(2)=nbp_lat96 ! count _(2)=jjp195 start(1)=1 96 start(2)=1 97 count(1)=nbp_lon+1 98 ! count(1)=iip1 99 count(2)=nbp_lat 100 ! count(2)=jjp1 97 101 98 102 ! mise a zero des tableaux … … 102 106 ! Lecture 103 107 ! ----------------------- 104 rcode = nf90_get_var(ncid, varid, tmp_dyn_glo, start_, count_) 105 if ( rcode /= 0 ) then ; call abort_physic('LMDZ','get'//varname//' dans read_vent',1) ; endif 108 status = nf90_get_var(ncid, varid, tmp_dyn_glo, start, count) 106 109 107 110 ! call dump2d(iip1,jjp1,tmp_dyn,'tmp_dyn ')
Note: See TracChangeset
for help on using the changeset viewer.