Ignore:
Timestamp:
Nov 21, 2019, 4:43:45 PM (5 years ago)
Author:
lguez
Message:

Merge revisions 3427:3600 of trunk into branch Ocean_skin

Location:
LMDZ6/branches/Ocean_skin
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • LMDZ6/branches/Ocean_skin

  • LMDZ6/branches/Ocean_skin/libf/phylmd/geo2atm.F90

    r2429 r3605  
    55  USE dimphy
    66  USE mod_phys_lmdz_para
    7 
     7  USE mod_grid_phy_lmdz, only: grid_type, unstructured, regular_lonlat
    88  IMPLICIT NONE
    99  INCLUDE 'YOMCST.h'
     10  CHARACTER (len = 6)                :: clmodnam
     11  CHARACTER (len = 20)               :: modname = 'geo2atm'
     12  CHARACTER (len = 80)               :: abort_message
    1013
    1114! Change wind coordinates from cartesian geocentric to local spherical
    1215! NB! Fonctionne probablement uniquement en MPI seul (sans OpenMP)
    1316!
     17! Geocentric :
     18  ! axe x is eastward : crosses (0N,90E) point.
     19  ! axe y  crosses (0N,180E) point.
     20  ! axe z is 'up' : crosses north pole.
     21!
     22! NB! Aux poles, fonctionne probablement uniquement en MPI seul (sans OpenMP)
     23
    1424  INTEGER, INTENT (IN)                 :: im, jm
    1525  REAL, DIMENSION (im,jm), INTENT(IN)  :: px, py, pz
     
    1727  REAL, DIMENSION (im,jm), INTENT(OUT) :: pu, pv, pr
    1828
    19   REAL :: rad
     29  REAL :: rad,reps
    2030
    2131
    2232  rad = rpi / 180.0E0
    23  
     33  reps = 1.0e-5
     34
    2435  pu(:,:) = &
    2536       - px(:,:) * SIN(rad * plon(:,:)) &
     
    3647       + pz(:,:) * SIN(rad * plat(:,:))
    3748
    38   ! Value at North Pole
    39   IF (is_north_pole_dyn) THEN
    40      pu(:, 1) = -px (1,1)
    41      pv(:, 1) = -py (1,1)
    42      pr(:, 1) = 0.0
    43   ENDIF
     49  IF (grid_type==regular_lonlat) THEN
     50    ! Value at North Pole
     51    IF (is_north_pole_dyn) THEN
     52       pu(:, 1) = -px (1,1)
     53       pv(:, 1) = -py (1,1)
     54       pr(:, 1) = 0.0
     55    ENDIF
    4456 
    45   ! Value at South Pole     
    46   IF (is_south_pole_dyn) THEN
    47      pu(:,jm) = -px (1,jm)
    48      pv(:,jm) = -py (1,jm)
    49      pr(:,jm) = 0.0
    50   ENDIF
     57    ! Value at South Pole     
     58    IF (is_south_pole_dyn) THEN
     59       pu(:,jm) = -px (1,jm)
     60       pv(:,jm) = -py (1,jm)
     61       pr(:,jm) = 0.0
     62    ENDIF
     63
     64  ELSE IF (grid_type==unstructured) THEN
     65     ! Pole nord pour Dynamico
     66     WHERE ( plat(:,:) >= 90.0-reps )
     67        pu(:,:) =  py(:,:)
     68        pv(:,:) = -px(:,:)
     69        pr(:,:) = 0.0e0
     70     END WHERE
     71
     72  ELSE
     73     abort_message='Problem: unknown grid type'
     74     CALL abort_physic(modname,abort_message,1)
     75  END IF
     76
     77 
     78 
    5179 
    5280END SUBROUTINE geo2atm
Note: See TracChangeset for help on using the changeset viewer.