Ignore:
Timestamp:
Jun 29, 2021, 10:02:59 PM (3 years ago)
Author:
abierjon
Message:

Mars GCM:
Make simu_MCS.F90 compatible with DYNAMICO lon-lat output files, with a check on the latitude array order when doing the interpolation

AB

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LMDZ.MARS/util/simu_MCS.F90

    r2525 r2540  
    693693endif
    694694
     695!write(*,*) "gcm_vars retrieved : ",gcm_vars(1:nbvar)
     696
    695697!===============================================================================
    696698! 2.2 Definition of LT variables from obsfile to outfile
     
    16241626
    16251627if (lat.ne.prev_lat) then
    1626   ! recall that latitudes start from north pole
    1627   do i=1,latlen-1
    1628     if (latitude(i).ge.lat) then
    1629       ilat_inf=i
    1630     else
    1631       exit
    1632     endif
    1633   enddo
     1628  if (latitude(1).gt.latitude(2)) then
     1629  ! decreasing latitudes, from 90N to (-)90S (LMDZ-like)
     1630    do i=1,latlen-1
     1631      if (latitude(i).ge.lat) then
     1632        ilat_inf=i
     1633      else
     1634        exit
     1635      endif
     1636    enddo
     1637  else
     1638  ! increasing latitudes, from (-)90S to 90N (DYNAMICO-like)
     1639    do i=1,latlen-1
     1640      if (latitude(i).le.lat) then
     1641        ilat_inf=i
     1642      else
     1643        exit
     1644      endif
     1645    enddo
     1646  endif
    16341647  ilat_sup=ilat_inf+1
    16351648endif ! of if (lat.ne.prev_lat)
Note: See TracChangeset for help on using the changeset viewer.