[Dart-dev] Copied/ Revision: 12103

dart at ucar.edu dart at ucar.edu
Mon Nov 13 13:00:53 MST 2017


thoar at ucar.edu
2017-11-13 13:00:52 -0700 (Mon, 13 Nov 2017)
248
Adding stubs for the EASE-Grid converter (for SMAP and a slew of other NSIDC satellite products).
The input data format is hdf5
The actual converter program is not committed just yet - it has to be modified from AMSR-E,
which is on a test branch.




Added: DART/branches/rma_trunk/observations/obs_converters/EASE-Grid/EASE_utilities_mod.f90
===================================================================
--- DART/branches/rma_trunk/observations/obs_converters/EASE-Grid/EASE_utilities_mod.f90	                        (rev 0)
+++ DART/branches/rma_trunk/observations/obs_converters/EASE-Grid/EASE_utilities_mod.f90	2017-11-13 20:00:52 UTC (rev 12103)
@@ -0,0 +1,566 @@
+
+module EASE_utilities_mod
+
+implicit none
+private
+
+public :: ezlh_convert, ezlh_inverse
+public :: get_grid_dims
+public :: deconstruct_filename
+public :: read_ease_Tb
+public :: read_ease_TIM
+public :: EASE_MISSING
+
+! This routine came from http://nsidc.org/data/ease/tools.html#geo_data_files
+! as ezlconv.f ... and was converted to F90 and put in a module by TJH.
+!
+! DART $Id$
+
+! RE_km    ... radius of the earth (km), authalic sphere based on International datum 
+! CELL_km  ... nominal cell size in kilometers
+! COS_PHI1 ... scale factor for standard paralles at +/-30.00 degrees
+
+real, parameter :: RE_km    = 6371.228
+real, parameter :: CELL_km  = 25.067525
+real, parameter :: COS_PHI1 = 0.866025403
+real, parameter :: PI       = 3.141592653589793
+
+integer, parameter :: l_nrows = 721
+integer, parameter :: l_ncols = 721
+integer, parameter :: h_nrows = 586
+integer, parameter :: h_ncols = 1383
+integer, parameter :: EASE_MISSING = -32768
+
+contains
+
+!==========================================================================
+! ezlhconv.for - FORTRAN routines for conversion of azimuthal 
+!		equal area and equal area cylindrical grid coordinates
+!
+!	30-Jan.-1992 H.Maybee
+!	20-Mar-1992 Ken Knowles  303-492-0644  knowles at kryos.colorado.edu
+!       16-Dec-1993 MJ Brodzik   303-492-8263  brodzik at jokull.colorado.edu
+!                   Copied from nsmconv.f, changed resolutions from 
+!                   40-20-10 km to 25-12.5 km
+!       21-Dec-1993 MJ Brodzik   303-492-8263  brodzik at jokull.colorado.edu
+!                   Fixed sign of Southern latitudes in ease_inverse.
+!	12-Sep-1994 David Hoogstrate 303-492-4116 hoogstra at jokull.colorado.edu
+!		    Changed grid cell size. Changed "c","f" to "l","h"
+!	25-Oct-1994 David Hoogstrate 303-492-4116 hoogstra at jokull.colorado.edu
+!		    Changed row size from 587 to 586 for Mercator projection
+!		    Changed function names to "ezlh-.."
+!$Log: ezlhconv.f,v $
+!Revision 1.3  1994/11/01 23:40:43  brodzik
+!Replaced all references to 'ease' with 'ezlh'
+!
+!==========================================================================
+
+
+!--------------------------------------------------------------------------
+function ezlh_convert (grid, lat, lon, r, s)
+character(len=*), intent(in)  :: grid
+real,             intent(in)  :: lat, lon
+real,             intent(out) :: r, s
+integer                       :: ezlh_convert
+!
+!	convert geographic coordinates (spherical earth) to 
+!	azimuthal equal area or equal area cylindrical grid coordinates
+!
+!	status = ezlh_convert (grid, lat, lon, r, s)
+!
+!	input : grid - projection name '[NSM][lh]'
+!               where l = "low"  = 25km resolution
+!                     h = "high" = 12.5km resolution
+!		lat, lon - geo. coords. (decimal degrees)
+!
+!	output: r, s - column, row coordinates
+!
+!	result: status = 0 indicates normal successful completion
+!			-1 indicates error status (point not on grid)
+!
+!--------------------------------------------------------------------------
+integer :: cols, rows, scale
+real    :: Rg, phi, lam, rho, r0, s0
+
+ezlh_convert = -1
+
+if ((grid(1:1) == 'N') .or. (grid(1:1) == 'S')) then
+   cols = l_ncols
+   rows = l_nrows
+else if (grid(1:1) == 'M') then
+   cols = h_ncols
+   rows = h_nrows
+else
+   print *, 'ezlh_convert: unknown projection: ', grid
+   return
+endif


More information about the Dart-dev mailing list