示例#1
0
  /**
   * _more_
   *
   * @param ilat _more_
   * @param ilon _more_
   * @param ipos _more_
   * @return _more_
   */
  int aodtv72_setlocation(float ilat, float ilon, int ipos)
        /*
         * set current storm center location within from AODT library memory Inputs
         * : AODT library current storm center latitude and longitude values and
         * location positioning method : 1-forecast interpolation 2-laplacian
         * technique 3-warm spot 4-extrapolation Outputs: none Return : -21 :
         * invalid storm center position 21 : user selected storm center position 22
         * : auto selected storm center position
         */
      {
    int iret;

    /* assign current storm center latitude value to AODT library variable */
    odtcurrent_v72IR.latitude = ilat;
    /* assign current storm center longitude value to AODT library variable */
    odtcurrent_v72IR.longitude = ilon;
    /* assign current storm center positioning flag to AODT library variable */
    odtcurrent_v72IR.autopos = ipos;
    if ((odtcurrent_v72IR.longitude < -180.) || (odtcurrent_v72IR.longitude > 180.)) {
      iret = -21;
    }
    if ((odtcurrent_v72IR.latitude < -90.) || (odtcurrent_v72IR.latitude > 90.)) {
      iret = -21;
    }

    iret = 21; /* user selected image location */
    if (ipos >= 1) {
      iret = 22;
    }

    return iret;
  }
示例#2
0
  /**
   * _more_
   *
   * @param redo _more_
   * @param odtcurrent_v72IR _more_
   * @return _more_
   */
  int aodtv72_initcurrent(boolean redo, StormAODTInfo.IRData odtcurrent_v72IR)
        /*
         * initialize odtcurrent_v72 array or reset values for land interaction
         * situations
         */
      {
    int b, bb;
    // char comm[50]="\0";

    if (!redo) {
      // odtcurrent_v72=(struct odtdata *)malloc(sizeof(struct odtdata));
      odtcurrent_v72IR.latitude = 999.99f;
      odtcurrent_v72IR.longitude = 999.99f;
      odtcurrent_v72IR.land = 0;
      odtcurrent_v72IR.autopos = 0;
      // strcpy(odtcurrent_v72IR.comment,comm);
      // diagnostics_v72=(char *)calloc((size_t)50000,sizeof(char));
      // hfile_v72=(char *)calloc((size_t)200,sizeof(char));
      // fixfile_v72=(char *)calloc((size_t)200,sizeof(char));

      // b=sizeof(float);
      // bb=sizeof(double);
      // fcstlat_v72=(float *)calloc((size_t)5,b);
      // fcstlon_v72=(float *)calloc((size_t)5,b);
      // fcsttime_v72=(double *)calloc((size_t)5,bb);
    }

    odtcurrent_v72IR.Traw = 0.0f;
    odtcurrent_v72IR.TrawO = 0.0f;
    odtcurrent_v72IR.Tfinal = 0.0f;
    odtcurrent_v72IR.Tfinal3 = 0.0f;
    odtcurrent_v72IR.CI = 0.0f;
    odtcurrent_v72IR.eyet = 99.99f;
    odtcurrent_v72IR.warmt = 99.99f;
    odtcurrent_v72IR.cloudt = 99.99f;
    odtcurrent_v72IR.cloudt2 = 99.99f;
    odtcurrent_v72IR.cwcloudt = 99.99f;
    odtcurrent_v72IR.warmlatitude = 999.99f;
    odtcurrent_v72IR.warmlongitude = 999.99f;
    odtcurrent_v72IR.eyecdosize = 0.0f;
    odtcurrent_v72IR.eyestdv = 0.0f;
    odtcurrent_v72IR.cloudsymave = 0.0f;
    odtcurrent_v72IR.eyescene = 0;
    odtcurrent_v72IR.cloudscene = 0;
    odtcurrent_v72IR.eyesceneold = -1;
    odtcurrent_v72IR.cloudsceneold = -1;
    odtcurrent_v72IR.rule9 = 0;
    odtcurrent_v72IR.rule8 = 0;
    odtcurrent_v72IR.LBflag = 0;
    odtcurrent_v72IR.rapiddiss = 0;
    odtcurrent_v72IR.eyefft = 0;
    odtcurrent_v72IR.cloudfft = 0;
    odtcurrent_v72IR.cwring = 0;
    odtcurrent_v72IR.ringcb = 0;
    odtcurrent_v72IR.ringcbval = 0;
    odtcurrent_v72IR.ringcbvalmax = 0;
    odtcurrent_v72IR.CIadjp = 0.0f;
    odtcurrent_v72IR.rmw = -99.9f;
    /* odtcurrent_v72->IR.TIEflag=0; */
    /* odtcurrent_v72->IR.TIEraw=0.0; */
    /* odtcurrent_v72->IR.TIEavg=0.0; */
    /* odtcurrent_v72->IR.sst=-99.9; */
    // if(!redo) odtcurrent_v72->nextrec=NULL; /* added by CDB */

    return 0;
  }