R stars package and set dimensions to a NetCDF fileGDAL and reprojecting a NetCDF fileTransforming and...

Boss Telling direct supervisor I snitched

What is the purpose of a disclaimer like "this is not legal advice"?

Does an unused member variable take up memory?

Is there a logarithm base for which the logarithm becomes an identity function?

How to write a chaotic neutral protagonist and prevent my readers from thinking they are evil?

How to educate team mate to take screenshots for bugs with out unwanted stuff

What is Tony Stark injecting into himself in Iron Man 3?

A vote on the Brexit backstop

Create chunks from an array

What does "rhumatis" mean?

How to install "rounded" brake pads

Ultrafilters as a double dual

Use Mercury as quenching liquid for swords?

How to recover against Snake as a heavyweight character?

An Undercover Army

What can I do if someone tampers with my SSH public key?

Was this cameo in Captain Marvel computer generated?

How to make sure I'm assertive enough in contact with subordinates?

Is there a math expression equivalent to the conditional ternary operator?

Precision notation for voltmeters

Sort array by month and year

I've given my players a lot of magic items. Is it reasonable for me to give them harder encounters?

Why aren't there more Gauls like Obelix?

How do you make a gun that shoots melee weapons and/or swords?



R stars package and set dimensions to a NetCDF file


GDAL and reprojecting a NetCDF fileTransforming and Projecting Shapefiles in R & ArcGIS for Desktop?How to read *.adf files into R?Set projection (netCDF) with R-ncdf4-PackageProcessing vector to raster faster with RCrop a raster by a grid shapefile with different extensions in RProblem points into a shape polygonCRS Projection problems prevent spatial merge in RAccess to attribute in rasterlayer in RMissing 1.6% of expected area after buffering SpatialPoints from vector of widthsCompute a distance matrix in R with geosphere













0















Related: GDAL and reprojecting a NetCDF file



Following above, I would like to reproject a NetCDF ( NOAA GOES-16 file ) using R stars package.
However, I have been unsuccessful at the first step; I mean, unable to assign original CRS information to the file.



Parameters I want to assign were obtained by gdalinfo:



Proj.4 string = "+proj=geos +lon_0=-75 +h=35786023 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  +sweep=x"
Origin = (-3627271.328111211769283,1583173.512170388596132)
Pixel Size = (1002.008657743770527,1002.008657743770527)


My failed R code is:



library(stars)              # stars package 0.3-0

nc1= "./OR_ABI-L1b-RadC-M3C01_G16_s20190611802132_e20190611804505_c20190611804549.nc"
(nc1_s1= read_stars(nc1, along= c("DQF", "Rad")))
crs_proj4 = "+proj=geos +lon_0=-75 +h=35786023 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs +sweep=x"

nc1_out = st_set_dimensions(nc1_s1,
offset= c(-3627271.328111211769283, 1583173.512170388596132),
delta= c(1002.008657743770527, 1002.008657743770527),
refsys= c(crs_proj4, crs_proj4)
)
nc1_out


As my code did not take effect, both nc1_s1 (input to st_set_dimensions()) and nc1_out (its output) show the same dimensions as below.



stars object with 2 dimensions and 2 attributes
attribute(s), summary of first 1e+05 cells:
X..DQF X..Rad
Min. : 0.0 Min. : 157.0
1st Qu.: 0.0 1st Qu.: 256.0
Median : 0.0 Median : 329.0
Mean : 36.5 Mean : 408.8
3rd Qu.: 0.0 3rd Qu.: 396.0
Max. :255.0 Max. :1023.0
dimension(s):
from to offset delta refsys point values
x 1 5000 NA NA NA NA NULL [x]
y 1 3000 NA NA NA NA NULL [y]


How can I set dimensions to NetCDF using stars package?









share



























    0















    Related: GDAL and reprojecting a NetCDF file



    Following above, I would like to reproject a NetCDF ( NOAA GOES-16 file ) using R stars package.
    However, I have been unsuccessful at the first step; I mean, unable to assign original CRS information to the file.



    Parameters I want to assign were obtained by gdalinfo:



    Proj.4 string = "+proj=geos +lon_0=-75 +h=35786023 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  +sweep=x"
    Origin = (-3627271.328111211769283,1583173.512170388596132)
    Pixel Size = (1002.008657743770527,1002.008657743770527)


    My failed R code is:



    library(stars)              # stars package 0.3-0

    nc1= "./OR_ABI-L1b-RadC-M3C01_G16_s20190611802132_e20190611804505_c20190611804549.nc"
    (nc1_s1= read_stars(nc1, along= c("DQF", "Rad")))
    crs_proj4 = "+proj=geos +lon_0=-75 +h=35786023 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs +sweep=x"

    nc1_out = st_set_dimensions(nc1_s1,
    offset= c(-3627271.328111211769283, 1583173.512170388596132),
    delta= c(1002.008657743770527, 1002.008657743770527),
    refsys= c(crs_proj4, crs_proj4)
    )
    nc1_out


    As my code did not take effect, both nc1_s1 (input to st_set_dimensions()) and nc1_out (its output) show the same dimensions as below.



    stars object with 2 dimensions and 2 attributes
    attribute(s), summary of first 1e+05 cells:
    X..DQF X..Rad
    Min. : 0.0 Min. : 157.0
    1st Qu.: 0.0 1st Qu.: 256.0
    Median : 0.0 Median : 329.0
    Mean : 36.5 Mean : 408.8
    3rd Qu.: 0.0 3rd Qu.: 396.0
    Max. :255.0 Max. :1023.0
    dimension(s):
    from to offset delta refsys point values
    x 1 5000 NA NA NA NA NULL [x]
    y 1 3000 NA NA NA NA NULL [y]


    How can I set dimensions to NetCDF using stars package?









    share

























      0












      0








      0








      Related: GDAL and reprojecting a NetCDF file



      Following above, I would like to reproject a NetCDF ( NOAA GOES-16 file ) using R stars package.
      However, I have been unsuccessful at the first step; I mean, unable to assign original CRS information to the file.



      Parameters I want to assign were obtained by gdalinfo:



      Proj.4 string = "+proj=geos +lon_0=-75 +h=35786023 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  +sweep=x"
      Origin = (-3627271.328111211769283,1583173.512170388596132)
      Pixel Size = (1002.008657743770527,1002.008657743770527)


      My failed R code is:



      library(stars)              # stars package 0.3-0

      nc1= "./OR_ABI-L1b-RadC-M3C01_G16_s20190611802132_e20190611804505_c20190611804549.nc"
      (nc1_s1= read_stars(nc1, along= c("DQF", "Rad")))
      crs_proj4 = "+proj=geos +lon_0=-75 +h=35786023 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs +sweep=x"

      nc1_out = st_set_dimensions(nc1_s1,
      offset= c(-3627271.328111211769283, 1583173.512170388596132),
      delta= c(1002.008657743770527, 1002.008657743770527),
      refsys= c(crs_proj4, crs_proj4)
      )
      nc1_out


      As my code did not take effect, both nc1_s1 (input to st_set_dimensions()) and nc1_out (its output) show the same dimensions as below.



      stars object with 2 dimensions and 2 attributes
      attribute(s), summary of first 1e+05 cells:
      X..DQF X..Rad
      Min. : 0.0 Min. : 157.0
      1st Qu.: 0.0 1st Qu.: 256.0
      Median : 0.0 Median : 329.0
      Mean : 36.5 Mean : 408.8
      3rd Qu.: 0.0 3rd Qu.: 396.0
      Max. :255.0 Max. :1023.0
      dimension(s):
      from to offset delta refsys point values
      x 1 5000 NA NA NA NA NULL [x]
      y 1 3000 NA NA NA NA NULL [y]


      How can I set dimensions to NetCDF using stars package?









      share














      Related: GDAL and reprojecting a NetCDF file



      Following above, I would like to reproject a NetCDF ( NOAA GOES-16 file ) using R stars package.
      However, I have been unsuccessful at the first step; I mean, unable to assign original CRS information to the file.



      Parameters I want to assign were obtained by gdalinfo:



      Proj.4 string = "+proj=geos +lon_0=-75 +h=35786023 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs  +sweep=x"
      Origin = (-3627271.328111211769283,1583173.512170388596132)
      Pixel Size = (1002.008657743770527,1002.008657743770527)


      My failed R code is:



      library(stars)              # stars package 0.3-0

      nc1= "./OR_ABI-L1b-RadC-M3C01_G16_s20190611802132_e20190611804505_c20190611804549.nc"
      (nc1_s1= read_stars(nc1, along= c("DQF", "Rad")))
      crs_proj4 = "+proj=geos +lon_0=-75 +h=35786023 +x_0=0 +y_0=0 +ellps=GRS80 +units=m +no_defs +sweep=x"

      nc1_out = st_set_dimensions(nc1_s1,
      offset= c(-3627271.328111211769283, 1583173.512170388596132),
      delta= c(1002.008657743770527, 1002.008657743770527),
      refsys= c(crs_proj4, crs_proj4)
      )
      nc1_out


      As my code did not take effect, both nc1_s1 (input to st_set_dimensions()) and nc1_out (its output) show the same dimensions as below.



      stars object with 2 dimensions and 2 attributes
      attribute(s), summary of first 1e+05 cells:
      X..DQF X..Rad
      Min. : 0.0 Min. : 157.0
      1st Qu.: 0.0 1st Qu.: 256.0
      Median : 0.0 Median : 329.0
      Mean : 36.5 Mean : 408.8
      3rd Qu.: 0.0 3rd Qu.: 396.0
      Max. :255.0 Max. :1023.0
      dimension(s):
      from to offset delta refsys point values
      x 1 5000 NA NA NA NA NULL [x]
      y 1 3000 NA NA NA NA NULL [y]


      How can I set dimensions to NetCDF using stars package?







      r stars





      share












      share










      share



      share










      asked 7 mins ago









      KazuhitoKazuhito

      16k41883




      16k41883






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "79"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f314912%2fr-stars-package-and-set-dimensions-to-a-netcdf-file%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f314912%2fr-stars-package-and-set-dimensions-to-a-netcdf-file%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Щит и меч (фильм) Содержание Названия серий | Сюжет |...

          Венесуэла на летних Олимпийских играх 2000 Содержание Состав...

          Meter-Bus Содержание Параметры шины | Стандартизация |...