Changeset 5463
- Timestamp:
- Dec 31, 2024, 5:53:47 PM (3 days ago)
- Location:
- LMDZ6/trunk/libf/phylmd/Dust
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
LMDZ6/trunk/libf/phylmd/Dust/read_dust.f90
r5337 r5463 21 21 save ncid1, varid1, ncid2, varid2 22 22 !$OMP THREADPRIVATE(ncid1, varid1, ncid2, varid2) 23 integer :: start (4),count(4), status23 integer :: start_(4),count_(4) 24 24 integer :: i, j, ig 25 25 ! … … 28 28 if (debutphy) then 29 29 ! 30 ncid1=nf90_open('dust.nc',nf90_nowrite,rcode) 31 varid1=nf90_inq_varid(ncid1,'EMISSION',rcode) 30 rcode=nf90_open('dust.nc',nf90_nowrite,ncid1) 31 if ( rcode /= 0 ) then ; call abort_physic('LMDZ','open dust.nc dans read_vent',1) ; endif 32 33 rcode=nf90_inq_varid(ncid1,'EMISSION',varid1) 34 if ( rcode /= 0 ) then ; call abort_physic('LMDZ','inq varid EMISSION dans read_vent',1) ; endif 32 35 ! 33 36 endif 34 37 ! 35 start(1)=1 36 start(2)=1 37 start(4)=0 38 start_(1)=1 39 start_(2)=1 40 start_(3)=step 41 start_(4)=0 38 42 39 ! count (1)=iip140 count (1)=nbp_lon+141 ! count (2)=jjp142 count (2)=nbp_lat43 count (3)=144 count (4)=043 ! count_(1)=iip1 44 count_(1)=nbp_lon+1 45 ! count_(2)=jjp1 46 count_(2)=nbp_lat 47 count_(3)=1 48 count_(4)=0 45 49 ! 46 start(3)=step47 50 ! 48 status = nf90_get_var(ncid1, varid1, dust_nc_glo, start, count) 51 rcode = nf90_get_var(ncid1, varid1, dust_nc_glo, start_, count_) 52 if ( rcode /= 0 ) then ; call abort_physic('LMDZ','get EMISSION dans read_vent',1) ; endif 49 53 50 54 ! -
LMDZ6/trunk/libf/phylmd/Dust/read_surface.f90
r5337 r5463 31 31 real surfa_glo(klon_glo,5) 32 32 ! 33 integer ncid, varid, rcode 34 integer start (2),count(2),status33 integer ncid, varid, rcode, varlatid,tmpid 34 integer start_(2),count_(2) 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) :: start_j,endj 44 44 !JE20140526>> 45 45 !$OMP MASTER … … 47 47 48 48 print*,'Lecture du fichier donnees_lisa.nc' 49 ncid=nf90_open('donnees_lisa.nc',nf90_nowrite,rcode) 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 50 52 51 53 !JE20140526<<: check if are inversed or not the latitude grid in donnes_lisa … … 54 56 isinversed=.false. 55 57 do i=1,5 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 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 68 68 enddo ! check if it inversed lat 69 startj(1)=1 70 ! endj(1)=jjp1 69 start_j(1)=1 71 70 endj(1)=nbp_lat 72 varid=nf90_inq_varid(ncid,latstr,rcode) 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 73 73 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 74 79 75 80 76 ! check if netcdf is latitude inversed or not. … … 86 82 write(str1,'(i1)') i 87 83 varname=trim(name)//str1 88 print*,'lecture variable:',varname89 varid=nf90_inq_varid(ncid,trim(varname),rcode)84 rcode=nf90_inq_varid(ncid,trim(varname),varid) 85 if ( rcode /= 0 ) then ; call abort_physic('LMDZ','get'//varname//' dans read_vent',1) ; endif 90 86 ! varid=nf90_inq_varid(ncid,varname,rcode) 91 87 … … 93 89 ! ----------------------------------------------------- 94 90 95 start (1)=196 start (2)=197 count (1)=nbp_lon+198 ! count (1)=iip199 count (2)=nbp_lat100 ! count (2)=jjp191 start_(1)=1 92 start_(2)=1 93 count_(1)=nbp_lon+1 94 ! count_(1)=iip1 95 count_(2)=nbp_lat 96 ! count_(2)=jjp1 101 97 102 98 ! mise a zero des tableaux … … 106 102 ! Lecture 107 103 ! ----------------------- 108 status = nf90_get_var(ncid, varid, tmp_dyn_glo, start, count) 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 109 106 110 107 ! call dump2d(iip1,jjp1,tmp_dyn,'tmp_dyn ') -
LMDZ6/trunk/libf/phylmd/Dust/read_vent.f90
r5337 r5463 23 23 save ncidu1, varidu1, ncidv1, varidv1 24 24 !$OMP THREADPRIVATE(ncidu1, varidu1, ncidv1, varidv1) 25 integer :: start(4),count (4), status25 integer :: start(4),count_(4) 26 26 integer :: i, j, ig 27 27 … … 32 32 if (debutphy) then 33 33 ! 34 ncidu1=nf90_open('u10m.nc',nf90_nowrite,rcode) 35 varidu1=nf90_inq_varid(ncidu1,'U10M',rcode) 36 ncidv1=nf90_open('v10m.nc',nf90_nowrite,rcode) 37 varidv1=nf90_inq_varid(ncidv1,'V10M',rcode) 34 rcode=nf90_open('u10m.nc',nf90_nowrite,ncidu1) 35 if ( rcode /= 0 ) then ; call abort_physic('LMDZ','open u10m.nc dans read_vent',1) ; endif 36 rcode=nf90_inq_varid(ncidu1,'U10M',varidu1) 37 if ( rcode /= 0 ) then ; call abort_physic('LMDZ','get id u10m dans read_vent',1) ; endif 38 rcode=nf90_open('v10m.nc',nf90_nowrite,ncidv1) 39 if ( rcode /= 0 ) then ; call abort_physic('LMDZ','open v10m.nc dans read_vent',1) ; endif 40 rcode=nf90_inq_varid(ncidv1,'V10M',varidv1) 41 if ( rcode /= 0 ) then ; call abort_physic('LMDZ','get id v10m dans read_vent',1) ; endif 38 42 ! 39 43 endif … … 41 45 start(1)=1 42 46 start(2)=1 47 start(3)=step 43 48 start(4)=0 44 49 45 ! count (1)=iip146 count (1)=nbp_lon+147 ! count (2)=jjp148 count (2)=nbp_lat49 count (3)=150 count (4)=050 ! count_(1)=iip1 51 count_(1)=nbp_lon+1 52 ! count_(2)=jjp1 53 count_(2)=nbp_lat 54 count_(3)=1 55 count_(4)=0 51 56 ! 52 start(3)=step53 57 ! 54 status = nf90_get_var(ncidu1, varidu1, u10m_nc_glo, start, count) 58 rcode = nf90_get_var(ncidu1, varidu1, u10m_nc_glo, start, count_) 59 if ( rcode /= 0 ) then ; call abort_physic('LMDZ','lecture u10m dans read_vent',1) ; endif 60 rcode = nf90_get_var(ncidv1, varidv1, v10m_nc_glo, start, count_) 61 if ( rcode /= 0 ) then ; call abort_physic('LMDZ','lecture v10m dans read_vent',1) ; endif 55 62 56 ! print *,status 57 ! 58 status = nf90_get_var(ncidv1, varidv1, v10m_nc_glo, start, count) 63 64 ! ------- Tests 2024/12/31-FH---------------------------------------- 65 ! print*,'nbp_lon,npb_lat ',nbp_lon,nbp_lat 66 ! print*,'start ',start 67 ! print*,'count_ ',count_ 68 ! print*,'satus lecture u10m ',rcode 69 ! call dump2d(nbp_lon+1,nbp_lat,u10m_nc_glo,'U10M global read_vent') 70 ! call dump2d(nbp_lon+1,nbp_lat,v10m_nc_glo,'V10M global read_vent') 71 ! stop 72 ! ------- Tests ----------------------------------------------------- 59 73 60 74 ! … … 63 77 ! print *,'beforebidcor v10m_nc', v10m_nc(1,jjp1) 64 78 65 ! print *, status79 ! print *,rcode 66 80 ! call correctbid(iim,jjp1,u10m_nc) 67 81 ! call correctbid(iim,jjp1,v10m_nc)
Note: See TracChangeset
for help on using the changeset viewer.