Solar incidence angle using google earth engine Planned maintenance scheduled April 17/18,...

Can a non-EU citizen traveling with me come with me through the EU passport line?

What can I do if my MacBook isn’t charging but already ran out?

Replacing HDD with SSD; what about non-APFS/APFS?

Strange behaviour of Check

If I can make up priors, why can't I make up posteriors?

Geometric mean and geometric standard deviation

What is the electric potential inside a point charge?

Do working physicists consider Newtonian mechanics to be "falsified"?

When is phishing education going too far?

Was credit for the black hole image misattributed?

What do you call a plan that's an alternative plan in case your initial plan fails?

How to rotate it perfectly?

What LEGO pieces have "real-world" functionality?

3 doors, three guards, one stone

How do I keep my slimes from escaping their pens?

Complexity of many constant time steps with occasional logarithmic steps

The following signatures were invalid: EXPKEYSIG 1397BC53640DB551

Determine whether f is a function, an injection, a surjection

Did the new image of black hole confirm the general theory of relativity?

Is there a documented rationale why the House Ways and Means chairman can demand tax info?

Cauchy Sequence Characterized only By Directly Neighbouring Sequence Members

When communicating altitude with a '9' in it, should it be pronounced "nine hundred" or "niner hundred"?

Autumning in love

Single author papers against my advisor's will?



Solar incidence angle using google earth engine



Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)
Announcing the arrival of Valued Associate #679: Cesar Manara
Unicorn Meta Zoo #1: Why another podcast?Accessing JavaScript modules in Google Earth EngineGoogle Earth Engine - Map.addLayerUsing globe view in Google Earth Engine?Creating threshold for NDVI using Google Earth Engine?Classification of NDVI using Google Earth EngineGoogle Earth Engine Modis Data ScalingMissing band in mapping function using Google Earth EngineGoogle Earth Engine formaTrend functionReducing arrays within arrays using Google Earth Engine?Edge detection using Google Earth Engine?





.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ margin-bottom:0;
}







0















I am using the formula for solar incidence angle : cosd = sin(a)sin(b) + cos(a)cos(b)cos(c), where a = 0.409sin((2pi/365)*DOY - 1.39), b = latitude of region and c = hour angle(taken as constant for daily estimates) the code for the formula is not working. My code:



// Zoom to a location.


Map.setCenter(80.34, 26.42); // Center on IIT Kanpur.
var G = 1367;



//dayofyear
var sequence = ee.Array(ee.List.sequence(1, 365));



//calculating the relative earth sun distance
var dr = sequence.multiply(2).divide(365).multiply(Math.PI).cos().multiply(0.033).add(1);
print(dr);



//calculating the solar incidence angle
//getting latitude and longitude of the geometry
var l8 = ee.ImageCollection("LANDSAT/LC08/C01/T1_SR")
.filterBounds(geometry);
var first = ee.Image(l8.first()).clip(geometry);

// get image projection
var proj = first.select([0]).projection();
// get coordinates image
var latlon = ee.Image.pixelLonLat().reproject(proj);
Map.addLayer(first, {bands:['B1'], min:0, max:500}, 'Image');



// put each lon lat in a list
var coords = latlon.select(['longitude', 'latitude'])
.reduceRegion({
reducer: ee.Reducer.toList(),
geometry: geometry,
scale: 30
});
var lat1 = ee.List(coords.get('latitude'));
var lat = ee.Array(lat1);
var lon = ee.List(coords.get('longitude'));
// zip them. Example: zip([1, 3],[2, 4]) --> [[1, 2], [3,4]]
var point_list = lon.zip(lat);
//getting the declination angle and hour angle
var d = ee.Number(dr).multiply(2*Math.PI).divide(365).subtract(1.39).sin().multiply(0.409);
var w = 1; //assuming average of hour angle as 0 degrees
var cosd1 = d.sin();
var cosd2 = lat.sin();
var cosd3 = d.cos();
var cosd4 = lat.cos();
var cosd01 = cosd1.multiply(cosd2);
//print(cosd01);
var cosd02 = cosd3.multiply(cosd4);
var cosd = cosd01.add(cosd02);









share





























    0















    I am using the formula for solar incidence angle : cosd = sin(a)sin(b) + cos(a)cos(b)cos(c), where a = 0.409sin((2pi/365)*DOY - 1.39), b = latitude of region and c = hour angle(taken as constant for daily estimates) the code for the formula is not working. My code:



    // Zoom to a location.


    Map.setCenter(80.34, 26.42); // Center on IIT Kanpur.
    var G = 1367;



    //dayofyear
    var sequence = ee.Array(ee.List.sequence(1, 365));



    //calculating the relative earth sun distance
    var dr = sequence.multiply(2).divide(365).multiply(Math.PI).cos().multiply(0.033).add(1);
    print(dr);



    //calculating the solar incidence angle
    //getting latitude and longitude of the geometry
    var l8 = ee.ImageCollection("LANDSAT/LC08/C01/T1_SR")
    .filterBounds(geometry);
    var first = ee.Image(l8.first()).clip(geometry);

    // get image projection
    var proj = first.select([0]).projection();
    // get coordinates image
    var latlon = ee.Image.pixelLonLat().reproject(proj);
    Map.addLayer(first, {bands:['B1'], min:0, max:500}, 'Image');



    // put each lon lat in a list
    var coords = latlon.select(['longitude', 'latitude'])
    .reduceRegion({
    reducer: ee.Reducer.toList(),
    geometry: geometry,
    scale: 30
    });
    var lat1 = ee.List(coords.get('latitude'));
    var lat = ee.Array(lat1);
    var lon = ee.List(coords.get('longitude'));
    // zip them. Example: zip([1, 3],[2, 4]) --> [[1, 2], [3,4]]
    var point_list = lon.zip(lat);
    //getting the declination angle and hour angle
    var d = ee.Number(dr).multiply(2*Math.PI).divide(365).subtract(1.39).sin().multiply(0.409);
    var w = 1; //assuming average of hour angle as 0 degrees
    var cosd1 = d.sin();
    var cosd2 = lat.sin();
    var cosd3 = d.cos();
    var cosd4 = lat.cos();
    var cosd01 = cosd1.multiply(cosd2);
    //print(cosd01);
    var cosd02 = cosd3.multiply(cosd4);
    var cosd = cosd01.add(cosd02);









    share

























      0












      0








      0








      I am using the formula for solar incidence angle : cosd = sin(a)sin(b) + cos(a)cos(b)cos(c), where a = 0.409sin((2pi/365)*DOY - 1.39), b = latitude of region and c = hour angle(taken as constant for daily estimates) the code for the formula is not working. My code:



      // Zoom to a location.


      Map.setCenter(80.34, 26.42); // Center on IIT Kanpur.
      var G = 1367;



      //dayofyear
      var sequence = ee.Array(ee.List.sequence(1, 365));



      //calculating the relative earth sun distance
      var dr = sequence.multiply(2).divide(365).multiply(Math.PI).cos().multiply(0.033).add(1);
      print(dr);



      //calculating the solar incidence angle
      //getting latitude and longitude of the geometry
      var l8 = ee.ImageCollection("LANDSAT/LC08/C01/T1_SR")
      .filterBounds(geometry);
      var first = ee.Image(l8.first()).clip(geometry);

      // get image projection
      var proj = first.select([0]).projection();
      // get coordinates image
      var latlon = ee.Image.pixelLonLat().reproject(proj);
      Map.addLayer(first, {bands:['B1'], min:0, max:500}, 'Image');



      // put each lon lat in a list
      var coords = latlon.select(['longitude', 'latitude'])
      .reduceRegion({
      reducer: ee.Reducer.toList(),
      geometry: geometry,
      scale: 30
      });
      var lat1 = ee.List(coords.get('latitude'));
      var lat = ee.Array(lat1);
      var lon = ee.List(coords.get('longitude'));
      // zip them. Example: zip([1, 3],[2, 4]) --> [[1, 2], [3,4]]
      var point_list = lon.zip(lat);
      //getting the declination angle and hour angle
      var d = ee.Number(dr).multiply(2*Math.PI).divide(365).subtract(1.39).sin().multiply(0.409);
      var w = 1; //assuming average of hour angle as 0 degrees
      var cosd1 = d.sin();
      var cosd2 = lat.sin();
      var cosd3 = d.cos();
      var cosd4 = lat.cos();
      var cosd01 = cosd1.multiply(cosd2);
      //print(cosd01);
      var cosd02 = cosd3.multiply(cosd4);
      var cosd = cosd01.add(cosd02);









      share














      I am using the formula for solar incidence angle : cosd = sin(a)sin(b) + cos(a)cos(b)cos(c), where a = 0.409sin((2pi/365)*DOY - 1.39), b = latitude of region and c = hour angle(taken as constant for daily estimates) the code for the formula is not working. My code:



      // Zoom to a location.


      Map.setCenter(80.34, 26.42); // Center on IIT Kanpur.
      var G = 1367;



      //dayofyear
      var sequence = ee.Array(ee.List.sequence(1, 365));



      //calculating the relative earth sun distance
      var dr = sequence.multiply(2).divide(365).multiply(Math.PI).cos().multiply(0.033).add(1);
      print(dr);



      //calculating the solar incidence angle
      //getting latitude and longitude of the geometry
      var l8 = ee.ImageCollection("LANDSAT/LC08/C01/T1_SR")
      .filterBounds(geometry);
      var first = ee.Image(l8.first()).clip(geometry);

      // get image projection
      var proj = first.select([0]).projection();
      // get coordinates image
      var latlon = ee.Image.pixelLonLat().reproject(proj);
      Map.addLayer(first, {bands:['B1'], min:0, max:500}, 'Image');



      // put each lon lat in a list
      var coords = latlon.select(['longitude', 'latitude'])
      .reduceRegion({
      reducer: ee.Reducer.toList(),
      geometry: geometry,
      scale: 30
      });
      var lat1 = ee.List(coords.get('latitude'));
      var lat = ee.Array(lat1);
      var lon = ee.List(coords.get('longitude'));
      // zip them. Example: zip([1, 3],[2, 4]) --> [[1, 2], [3,4]]
      var point_list = lon.zip(lat);
      //getting the declination angle and hour angle
      var d = ee.Number(dr).multiply(2*Math.PI).divide(365).subtract(1.39).sin().multiply(0.409);
      var w = 1; //assuming average of hour angle as 0 degrees
      var cosd1 = d.sin();
      var cosd2 = lat.sin();
      var cosd3 = d.cos();
      var cosd4 = lat.cos();
      var cosd01 = cosd1.multiply(cosd2);
      //print(cosd01);
      var cosd02 = cosd3.multiply(cosd4);
      var cosd = cosd01.add(cosd02);







      javascript google-earth-engine





      share












      share










      share



      share










      asked 15 mins ago









      Bhumika OjhaBhumika Ojha

      234




      234






















          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%2f318770%2fsolar-incidence-angle-using-google-earth-engine%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%2f318770%2fsolar-incidence-angle-using-google-earth-engine%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 Содержание Параметры шины | Стандартизация |...