Ignore:
Timestamp:
Dec 31, 2024, 5:53:47 PM (5 days ago)
Author:
fhourdin
Message:

Bug fix for nf90_open in Dust routines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/trunk/libf/phylmd/Dust/read_vent.f90

    r5337 r5463  
    2323  save ncidu1, varidu1, ncidv1, varidv1
    2424!$OMP THREADPRIVATE(ncidu1, varidu1, ncidv1, varidv1)
    25   integer :: start(4),count(4), status
     25  integer :: start(4),count_(4)
    2626  integer :: i, j, ig
    2727
     
    3232  if (debutphy) then
    3333  !
    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
    3842  !
    3943  endif
     
    4145  start(1)=1
    4246  start(2)=1
     47  start(3)=step
    4348  start(4)=0
    4449
    45    ! count(1)=iip1
    46   count(1)=nbp_lon+1
    47    ! count(2)=jjp1
    48   count(2)=nbp_lat
    49   count(3)=1
    50   count(4)=0
     50   ! 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
    5156  !
    52   start(3)=step
    5357  !
    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
    5562
    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 -----------------------------------------------------
    5973
    6074  !
     
    6377  !  print *,'beforebidcor v10m_nc', v10m_nc(1,jjp1)
    6478
    65   !   print *,status
     79  !   print *,rcode
    6680  !  call correctbid(iim,jjp1,u10m_nc)
    6781  !  call correctbid(iim,jjp1,v10m_nc)
Note: See TracChangeset for help on using the changeset viewer.