Changeset 2761 in lmdz_wrf for trunk/tools


Ignore:
Timestamp:
Nov 14, 2019, 2:37:30 PM (5 years ago)
Author:
lfita
Message:

Adding:

  • `get_multindices_lonlat': Subroutine to provide the nearest grid point of a series of longitudes and latitudes values

Fixing:

  • Errors on values in ' OBSstations.csv'
Location:
trunk/tools
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/tools/OBSstations.csv

    r2756 r2761  
    5555VILLAGUAY AERO,87385,-31.850000,-31,51,0.00,-59.083333,-59,05,0.00,43,ENTRE RIOS,Argentina,Villaguay Airpot,,
    5656# https://en.wikipedia.org/wiki/Argentine_Antarctica
    57 BASE Belgrano II,-99999,-34.6269444444,-34,37,37.0,-77.8736111111,-77,52,25.0,39.0, Antartic, Argentina, Base antárica Belgrano II,-,-
     57BASE Belgrano II,-99999,-34.6269444444,-34,37,37.0,-77.8736111111,-77,52,25.0,39.0, Antartic, Argentina, Base antártica Belgrano II,-,-
    5858BASE Belgrano III,-99999,-45.7836111111,-45,47,1.0,-77.9005555556,-77,54,2.0,510.0, Antartic, Argentina, Base antártica Belgrano III,-,-
    59 BASE Esperanza,-99999,-56.9977777778,-56,59,52.0,-63.3975,-63,23,51.0,23.0, Antartic, Argentina, Base antárica Esperanza,-,-
    60 BASE Carlini,-99999,-58.6677777778,-58,40,4.0,-62.2383333333,-62,14,18.0,10.0, Antartic, Argentina, Base antárica Carlini,-,-
    61 BASE Marambio,-99999,-56.6267527778,-56,37,36.31,-64.2410138889,-64,14,27.65,196.0, Antartic, Argentina, Base antárica Marambio,-,-
    62 BASE Orcadas,-99999,-44.7380555556,-44,44,17.0,-60.7380555556,-60,44,17.0,4.0, Antartic, Argentina, Base antárica Orcadas,-,-
    63 BASE San Martín,-99999,-67.1013888889,-67,6,5.0,-68.13,-68,7,48.0,1.0, Antartic, Argentina, Base antárica San Martín,-,-
    64 BASE Teniente Cámara,-99999,-59.9186111111,-59,55,7.0,-62.5947222222,-62,35,41.0,22.0, Antartic, Argentina, Base antárica Teniente Cámara,-,-
    65 BASE Deception,-99999,-60.6977777778,-60,41,52.0,-62.9752777778,-62,58,31.0,7.0, Antartic, Argentina, Base antárica Decepción,-,-
     59BASE Esperanza,-99999,-56.9977777778,-56,59,52.0,-63.3975,-63,23,51.0,23.0, Antartic, Argentina, Base antártica Esperanza,-,-
     60BASE Carlini,-99999,-58.6677777778,-58,40,4.0,-62.2383333333,-62,14,18.0,10.0, Antartic, Argentina, Base antártica Carlini,-,-
     61BASE Marambio,-99999,-56.6267527778,-56,37,36.31,-64.2410138889,-64,14,27.65,196.0, Antartic, Argentina, Base antártica Marambio,-,-
     62BASE Orcadas,-99999,-44.7380555556,-44,44,17.0,-60.7380555556,-60,44,17.0,4.0, Antartic, Argentina, Base antártica Orcadas,-,-
     63BASE San Martín,-99999,-67.1013888889,-67,6,5.0,-68.13,-68,7,48.0,1.0, Antartic, Argentina, Base antártica San Martín,-,-
     64BASE Teniente Cámara,-99999,-59.9186111111,-59,55,7.0,-62.5947222222,-62,35,41.0,22.0, Antartic, Argentina, Base antártica Teniente Cámara,-,-
     65BASE Deception,-99999,-60.6977777778,-60,41,52.0,-62.9752777778,-62,58,31.0,7.0, Antartic, Argentina, Base antártica Decepción,-,-
    6666BASE Petrel,-99999,-56.2288888889,-56,13,44.0,-63.4780555556,-63,28,41.0,18.0, Antartic, Argentina, Base antártica Petrel - Air Station,-,-
    67 BASE Primavera,-99999,-60.9552777778,-60,57,19.0,-64.1558333333,-64,9,21.0,50.0, Antartic, Argentina, Base antárica Primavera,-,-
    68 BASE Melchior,-99999,-62.9761111111,-62,58,34.0,-64.3255555556,-64,19,32.0,8.0, Antartic, Argentina, Base antárica Melchior,-,-
    69 BASE Almirante Brown,-99999,-62.8708333333,-62,52,15.0,-64.8955555556,-64,53,44.0,10.0, Antartic, Argentina, Base antárica Almirante Brown,-,-
    70 BASE Teniente Matienzo,-99999,-60.0713888889,-60,4,17.0,-64.9755555556,-64,58,32.0,25.0, Antartic, Argentina, Base antárica Teniente Matienzo,-,-
    71 BASE Alférez de Navío Sobral,-99999,-40.52,-40,31,12.0,-81.0791666667,-81,4,45.0,1000.0, Antartic, Argentina, Base antárica Alférez de Navío Sobral,-,-
    72 BASE Estación Científica Ellsworth,-99999,-41.0333333333,-41,2,0.0,-77.65,-77,39,0.0,42.0, Antartic, Argentina, Base antárica Estación Científica Ellsworth,-,-
    73 BASE Refuge Francisco de Gurruchaga,-99999,-59.2069444444,-59,12,25.0,-62.3088888889,-62,18,32.0,1.0, Antartic, Argentina, Base antárica Refugio Francisco de Gurruchaga,-,-
    74 BASE Ballvé,-99999,-58.9261111111,-58,55,34.0,-62.2105555556,-62,12,38.0,45.0, Antartic, Argentina, Base antárica Ballvé,-,-
    75 BASE Belgrano I,-99999,-38.1833333333,-38,11,0.0,-77.7666666667,-77,46,0.0,32.0, Antartic, Argentina, Base antárica Belgrano I,-,-
    76 BASE Belgrano III,-99999,-45.7836111111,-45,47,1.0,-77.9005555556,-77,54,2.0,510.0, Antartic, Argentina, Base antárica Belgrano II,-,-
    77 BASE Camp Livingston,-99999,-61.0108333333,-61,0,39.0,-62.6561111111,-62,39,22.0,1.0, Antartic, Argentina, Base antárica Camp Livingston,-,-
    78 BASE Refugio Suecia,-99999,-56.9833333333,-56,59,0.0,-63.3666666667,-63,22,0.0,1.0, Antartic, Argentina, Base antárica Refugio Suecia,-,-
    79 BASE Refuge Abrazo de Maipú,-99999,-57.5827777778,-57,34,58.0,-63.3880555556,-63,23,17.0,1.0, Antartic, Argentina, Base antárica Refugio abrazo de Maipú,-,-
     67BASE Primavera,-99999,-60.9552777778,-60,57,19.0,-64.1558333333,-64,9,21.0,50.0, Antartic, Argentina, Base antártica Primavera,-,-
     68BASE Melchior,-99999,-62.9761111111,-62,58,34.0,-64.3255555556,-64,19,32.0,8.0, Antartic, Argentina, Base antártica Melchior,-,-
     69BASE Almirante Brown,-99999,-62.8708333333,-62,52,15.0,-64.8955555556,-64,53,44.0,10.0, Antartic, Argentina, Base antártica Almirante Brown,-,-
     70BASE Teniente Matienzo,-99999,-60.0713888889,-60,4,17.0,-64.9755555556,-64,58,32.0,25.0, Antartic, Argentina, Base antártica Teniente Matienzo,-,-
     71BASE Alférez de Navío Sobral,-99999,-40.52,-40,31,12.0,-81.0791666667,-81,4,45.0,1000.0, Antartic, Argentina, Base antártica Alférez de Navío Sobral,-,-
     72BASE Estación Científica Ellsworth,-99999,-41.0333333333,-41,2,0.0,-77.65,-77,39,0.0,42.0, Antartic, Argentina, Base antártica Estación Científica Ellsworth,-,-
     73BASE Refuge Francisco de Gurruchaga,-99999,-59.2069444444,-59,12,25.0,-62.3088888889,-62,18,32.0,1.0, Antartic, Argentina, Base antártica Refugio Francisco de Gurruchaga,-,-
     74BASE Ballvé,-99999,-58.9261111111,-58,55,34.0,-62.2105555556,-62,12,38.0,45.0, Antartic, Argentina, Base antártica Ballvé,-,-
     75BASE Belgrano I,-99999,-38.1833333333,-38,11,0.0,-77.7666666667,-77,46,0.0,32.0, Antartic, Argentina, Base antártica Belgrano I,-,-
     76BASE Belgrano III,-99999,-45.7836111111,-45,47,1.0,-77.9005555556,-77,54,2.0,510.0, Antartic, Argentina, Base antártica Belgrano II,-,-
     77BASE Camp Livingston,-99999,-61.0108333333,-61,0,39.0,-62.6561111111,-62,39,22.0,1.0, Antartic, Argentina, Base antártica Camp Livingston,-,-
     78BASE Refugio Suecia,-99999,-56.9833333333,-56,59,0.0,-63.3666666667,-63,22,0.0,1.0, Antartic, Argentina, Base antártica Refugio Suecia,-,-
     79BASE Refuge Abrazo de Maipú,-99999,-57.5827777778,-57,34,58.0,-63.3880555556,-63,23,17.0,1.0, Antartic, Argentina, Base antártica Refugio abrazo de Maipú,-,-
  • trunk/tools/module_scientific.f90

    r2723 r2761  
    2222! fill3DI_2Dvec: Subroutine to fill a 3D integer matrix from a series of indices from a 2D matrix
    2323! fill3DR_2Dvec: Subroutine to fill a 3D float matrix from a series of indices from a 2D matrix
     24! get_multindices_lonlat: Subroutine to provide the nearest grid point of a series of longitudes and latitudes values
    2425! grid_within_polygon: Subroutine to determine which grid cells from a matrix lay inside a polygon
    2526! grid_spacepercen: Subroutine to compute the space-percentages of a series of grid cells (B) which lay inside another
     
    81268127  END SUBROUTINE Histogram2D1_RK
    81278128
     8129
     8130  SUBROUTINE get_multindices_lonlat(dx, dy, lons, lats, dvals, lonvals, latvals, indices)
     8131! Subroutine to provide the nearest grid point of a series of longitudes and latitudes values
     8132
     8133    IMPLICIT NONE
     8134
     8135    INTEGER, INTENT(in)                                  :: dx, dy, dvals
     8136    REAL(r_k), DIMENSION(dx, dy), INTENT(in)             :: lons, lats
     8137    REAL(r_k), DIMENSION(dvals), INTENT(in)              :: lonvals, latvals
     8138    INTEGER, DIMENSION(2,dvals), INTENT(out)             :: indices
     8139
     8140! Local
     8141    INTEGER                                              :: iv, ip
     8142    REAL(r_k)                                            :: mindiff
     8143    REAL(r_k), DIMENSION(dx,dy)                          :: diff
     8144
     8145!!!!!!! Variables
     8146! dx, dy: shape of the longitude and latitude matrices where to find the indices
     8147! lons, lats: matrices of longitudes and latitudes
     8148! dvals: number of longitudes and latitudes values
     8149! lonvals, latvals: longitudes and latitudes values for which search the indices
     8150! indices: indices found
     8151
     8152    fname = 'get_multindices_lonlat'
     8153
     8154    indices = zeroRK
     8155
     8156    DO iv=1, dvals
     8157      diff = SQRT((lons-lonvals(iv))**2+(lats-latvals(iv))**2)
     8158      mindiff = MINVAL(diff)
     8159      CALL multi_index_mat2DRK(dx, dy, 1, diff, mindiff, ip, indices(:,iv))
     8160    END DO
     8161
     8162  END SUBROUTINE get_multindices_lonlat
     8163
    81288164END MODULE module_scientific
    81298165
Note: See TracChangeset for help on using the changeset viewer.